Subject: [alpine-devel] new aport freetype

From: "Carlo Landmeter" <[email-masked]>
Date: Fri, 30 Jan 2009 13:12:33 +0000

see attached git patch.

From 6d7f17aa0bbd935d3c97643e6574076eb8b47be1 Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <[email-masked]>
Date: Fri, 30 Jan 2009 13:11:53 +0000
Subject: [PATCH] extra/freetype: new aport

---
 extra/freetype/10-bytecode.patch     |   29 ++++++++++++++++++++++++
 extra/freetype/20-enable-spr.patch   |   11 +++++++++
 extra/freetype/30-enable-valid.patch |   20 ++++++++++++++++
 extra/freetype/40-memcpy-fix.patch   |   14 +++++++++++
 extra/freetype/APKBUILD              |   41 ++++++++++++++++++++++++++++++++++
 5 files changed, 115 insertions(+), 0 deletions(-)
 create mode 100644 extra/freetype/10-bytecode.patch
 create mode 100644 extra/freetype/20-enable-spr.patch
 create mode 100644 extra/freetype/30-enable-valid.patch
 create mode 100644 extra/freetype/40-memcpy-fix.patch
 create mode 100644 extra/freetype/APKBUILD

diff --git a/extra/freetype/10-bytecode.patch b/extra/freetype/10-bytecode.patch
new file mode 100644
index 0000000..dd901ad
--- /dev/null
+++ b/extra/freetype/10-bytecode.patch
@@ -0,0 +1,29 @@
+--- include/freetype/config/ftoption.h.old	2006-05-12 02:05:49.000000000 +0800
++++ include/freetype/config/ftoption.h	2006-10-02 01:22:50.000000000 +0800
+@@ -436,7 +436,7 @@
+   /*   Do not #undef this macro here, since the build system might         */
+   /*   define it for certain configurations only.                          */
+   /*                                                                       */
+-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
++#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+ 
+ 
+   /*************************************************************************/
+@@ -448,7 +448,7 @@
+   /* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook               */
+   /* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally activated.               */
+   /*                                                                       */
+-#define TT_CONFIG_OPTION_UNPATENTED_HINTING
++#undef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ 
+ 
+   /*************************************************************************/
+@@ -480,7 +480,7 @@
+   /*   http://partners.adobe.com/asn/developer/opentype/glyf.html          */
+   /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */
+   /*                                                                       */
+-#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
++#define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
+ 
+ 
+   /*************************************************************************/
diff --git a/extra/freetype/20-enable-spr.patch b/extra/freetype/20-enable-spr.patch
new file mode 100644
index 0000000..217912a
--- /dev/null
+++ b/extra/freetype/20-enable-spr.patch
@@ -0,0 +1,11 @@
+--- include/freetype/config/ftoption.h.spf	2007-01-18 14:27:34.000000000 -0500
++++ include/freetype/config/ftoption.h	2007-01-18 14:27:48.000000000 -0500
+@@ -92,7 +92,7 @@
+   /* This is done to allow FreeType clients to run unmodified, forcing     */
+   /* them to display normal gray-level anti-aliased glyphs.                */
+   /*                                                                       */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ 
+ 
+   /*************************************************************************/
diff --git a/extra/freetype/30-enable-valid.patch b/extra/freetype/30-enable-valid.patch
new file mode 100644
index 0000000..b61a792
--- /dev/null
+++ b/extra/freetype/30-enable-valid.patch
@@ -0,0 +1,20 @@
+--- modules.cfg.orig	2006-07-07 21:01:09.000000000 -0400
++++ modules.cfg	2006-07-07 21:01:54.000000000 -0400
+@@ -110,7 +110,7 @@
+ AUX_MODULES += cache
+ 
+ # TrueType GX/AAT table validation.  Needs ftgxval.c below.
+-# AUX_MODULES += gxvalid
++AUX_MODULES += gxvalid
+ 
+ # Support for streams compressed with gzip (files with suffix .gz).
+ #
+@@ -124,7 +124,7 @@
+ 
+ # OpenType table validation.  Needs ftotval.c below.
+ #
+-# AUX_MODULES += otvalid
++AUX_MODULES += otvalid
+ 
+ # Auxiliary PostScript driver component to share common code.
+ #
diff --git a/extra/freetype/40-memcpy-fix.patch b/extra/freetype/40-memcpy-fix.patch
new file mode 100644
index 0000000..95c1cd6
--- /dev/null
+++ b/extra/freetype/40-memcpy-fix.patch
@@ -0,0 +1,14 @@
+--- src/psaux/psobjs.c~	2006-04-26 16:38:17.000000000 +0200
++++ src/psaux/psobjs.c	2006-09-10 15:01:13.000000000 +0200
+@@ -165,6 +165,11 @@
+       return PSaux_Err_Invalid_Argument;
+     }
+ 
++    if ( length < 0 ) {
++      FT_ERROR(( "ps_table_add: invalid length\n" ));
++      return PSaux_Err_Invalid_Argument;
++    }
++
+     /* grow the base block if needed */
+     if ( table->cursor + length > table->capacity )
+     {
diff --git a/extra/freetype/APKBUILD b/extra/freetype/APKBUILD
new file mode 100644
index 0000000..e7f2a87
--- /dev/null
+++ b/extra/freetype/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Carlo Landmeter <clandmeter at gmail>
+# Maintainer: Carlo Landmeter <clandmeter at gmail>
+pkgname=freetype
+pkgver=2.3.8
+pkgrel=0
+pkgdesc="TrueType font rendering library"
+url="http://freetype.sourceforge.net"
+license="GPL"
+depends="zlib"
+makedepends="zlib-dev"
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+10-bytecode.patch
+20-enable-spr.patch
+30-enable-valid.patch
+40-memcpy-fix.patch
+"
+
+build() {
+	cd "$srcdir/$pkgname-$pkgver"
+
+        for i in "$srcdir"/*.patch; do
+                msg "Applying ${i}"
+                patch -p0 -i $i || return 1
+        done
+
+	./configure --prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--disable-static
+	make || return 1
+	make -j1 DESTDIR="$pkgdir" install
+
+}
+
+md5sums="ebd7d255fd72b7f86c94501b80c50009  freetype-2.3.8.tar.gz
+9ff19e742968c29e3ba52b08d6bf0a50  10-bytecode.patch
+376b94c06b113a62a3437e4130bb3fc3  20-enable-spr.patch
+3f6c5739843dcbc110ee0f243c4f6bdb  30-enable-valid.patch
+bd2d808a0c00dcf9f1d1c0a9a8227ad9  40-memcpy-fix.patch"
-- 
1.6.1

---

From: Natanael Copa <[email-masked]>
Date: Fri, 30 Jan 2009 14:44:28 +0100

> see attached git patch.

committed, thanks!

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---