diff options
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | 0001-Enable-table-validation-modules.patch | 34 | ||||
-rw-r--r-- | 0002-Enable-subpixel-rendering.patch | 25 | ||||
-rw-r--r-- | 0003-Enable-subpixel-hinting.patch | 25 | ||||
-rw-r--r-- | 0004-Add-env-var-to-turn-off-subpixel-hinting.patch | 31 | ||||
-rw-r--r-- | PKGBUILD | 62 |
6 files changed, 207 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f584982607e3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = freetype2-git + pkgdesc = TrueType font rendering library (from git) + pkgver = 2.6+6+g5931268-1 + pkgrel = 1 + url = http://freetype.sourceforge.net + arch = i686 + arch = x86_64 + license = GPL + makedepends = git + depends = zlib + depends = bzip2 + depends = sh + depends = libpng + depends = harfbuzz + provides = freetype2=2.6+6+g5931268-1 + provides = libfreetype.so + conflicts = freetype2 + source = git://git.sv.gnu.org/freetype/freetype2.git + source = 0001-Enable-table-validation-modules.patch + source = 0002-Enable-subpixel-rendering.patch + source = 0003-Enable-subpixel-hinting.patch + source = 0004-Add-env-var-to-turn-off-subpixel-hinting.patch + sha1sums = SKIP + sha1sums = ccc9aaf53621a6e752b01db9e054aa63eb56f9b6 + sha1sums = a9e78bc59ed06f3e11efc33e54fd7695899862a5 + sha1sums = 3b69ac9f198ee3e4459e2466d3cb0f0b07cc3837 + sha1sums = 7517bf45c066d036e3ec729b17c8fa221e4e81a0 + +pkgname = freetype2-git + diff --git a/0001-Enable-table-validation-modules.patch b/0001-Enable-table-validation-modules.patch new file mode 100644 index 000000000000..e8cdec138bb6 --- /dev/null +++ b/0001-Enable-table-validation-modules.patch @@ -0,0 +1,34 @@ +From 5c55ed25694e95a7ff6f3c231b3b5bcde233af30 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Tue, 23 Jun 2015 08:40:29 +0200 +Subject: [PATCH 1/4] Enable table validation modules + +--- + modules.cfg | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.cfg b/modules.cfg +index 3d70a7c..862fe34 100644 +--- a/modules.cfg ++++ b/modules.cfg +@@ -110,7 +110,7 @@ RASTER_MODULES += smooth + 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). + # +@@ -129,7 +129,7 @@ AUX_MODULES += bzip2 + + # OpenType table validation. Needs ftotval.c below. + # +-# AUX_MODULES += otvalid ++AUX_MODULES += otvalid + + # Auxiliary PostScript driver component to share common code. + # +-- +2.4.4 + diff --git a/0002-Enable-subpixel-rendering.patch b/0002-Enable-subpixel-rendering.patch new file mode 100644 index 000000000000..7670fd4c58a4 --- /dev/null +++ b/0002-Enable-subpixel-rendering.patch @@ -0,0 +1,25 @@ +From 54382c3d753b08e92033927cbd83ea8d4d417eab Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Tue, 23 Jun 2015 08:43:07 +0200 +Subject: [PATCH 2/4] Enable subpixel rendering + +--- + include/freetype2/config/ftoption.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/freetype2/config/ftoption.h b/include/freetype2/config/ftoption.h +index 3904645..17d6ba5 100644 +--- a/include/freetype2/config/ftoption.h ++++ b/include/freetype2/config/ftoption.h +@@ -92,7 +92,7 @@ FT_BEGIN_HEADER + /* 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 + + + /*************************************************************************/ +-- +2.4.4 + diff --git a/0003-Enable-subpixel-hinting.patch b/0003-Enable-subpixel-hinting.patch new file mode 100644 index 000000000000..323d70cb7710 --- /dev/null +++ b/0003-Enable-subpixel-hinting.patch @@ -0,0 +1,25 @@ +From d9c87f10ce02b5622323bed419df0ea5ac746347 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Tue, 23 Jun 2015 08:43:57 +0200 +Subject: [PATCH 3/4] Enable subpixel hinting + +--- + include/freetype2/config/ftoption.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/freetype2/config/ftoption.h b/include/freetype2/config/ftoption.h +index 17d6ba5..07b4211 100644 +--- a/include/freetype2/config/ftoption.h ++++ b/include/freetype2/config/ftoption.h +@@ -602,7 +602,7 @@ FT_BEGIN_HEADER + /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ + /* defined. */ + /* */ +-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */ ++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING + + + /*************************************************************************/ +-- +2.4.4 + diff --git a/0004-Add-env-var-to-turn-off-subpixel-hinting.patch b/0004-Add-env-var-to-turn-off-subpixel-hinting.patch new file mode 100644 index 000000000000..acf979f729e0 --- /dev/null +++ b/0004-Add-env-var-to-turn-off-subpixel-hinting.patch @@ -0,0 +1,31 @@ +From d03029736ac69256ca3fe5d302bebcf5e22d8844 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Tue, 23 Jun 2015 08:33:22 +0200 +Subject: [PATCH 4/4] Add env var to turn off subpixel hinting + +--- + src/truetype/ttobjs.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c +index 202aa04..302d127 100644 +--- a/src/truetype/ttobjs.c ++++ b/src/truetype/ttobjs.c +@@ -1253,10 +1253,11 @@ + TT_Driver driver = (TT_Driver)ttdriver; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- driver->interpreter_version = TT_INTERPRETER_VERSION_38; +-#else +- driver->interpreter_version = TT_INTERPRETER_VERSION_35; ++ if ( !getenv( "FT2_NO_SUBPIXEL_HINTING" ) ) ++ driver->interpreter_version = TT_INTERPRETER_VERSION_38; ++ else + #endif ++ driver->interpreter_version = TT_INTERPRETER_VERSION_35; + + #else /* !TT_USE_BYTECODE_INTERPRETER */ + +-- +2.4.4 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f84cfe0f138c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> +# Contributor: Jan de Groot <jgc@archlinux.org> + +pkgname=freetype2-git +pkgver=2.6+6+g5931268-1 +pkgrel=1 +pkgdesc="TrueType font rendering library (from git)" +arch=(i686 x86_64) +license=('GPL') +url="http://freetype.sourceforge.net" +# adding harfbuzz for improved OpenType features auto-hinting +# introduces a cycle dep to harfbuzz depending on freetype wanted by upstream +depends=('zlib' 'bzip2' 'sh' 'libpng' 'harfbuzz') +makedepends=('git') +source=(git://git.sv.gnu.org/freetype/freetype2.git + 0001-Enable-table-validation-modules.patch + 0002-Enable-subpixel-rendering.patch + 0003-Enable-subpixel-hinting.patch + 0004-Add-env-var-to-turn-off-subpixel-hinting.patch) +sha1sums=('SKIP' + 'ccc9aaf53621a6e752b01db9e054aa63eb56f9b6' + 'a9e78bc59ed06f3e11efc33e54fd7695899862a5' + '3b69ac9f198ee3e4459e2466d3cb0f0b07cc3837' + '7517bf45c066d036e3ec729b17c8fa221e4e81a0') + +provides=("freetype2=$pkgver" libfreetype.so) +conflicts=("freetype2") + +pkgver() { + local _tag _count + + cd "${srcdir}/freetype2" + _tag=$(git describe --abbrev=0 ) + _count=$(git rev-list --count ${_tag}..HEAD) + _tag=${_tag#VER-} + echo ${_tag//-/.}+$_count+g$(git rev-parse --short HEAD) +} + +prepare() { + cd "${srcdir}/freetype2" + patch -Np1 -i ../0001-Enable-table-validation-modules.patch + patch -Np1 -i ../0002-Enable-subpixel-rendering.patch + patch -Np1 -i ../0003-Enable-subpixel-hinting.patch + patch -Np1 -i ../0004-Add-env-var-to-turn-off-subpixel-hinting.patch +} + +build() { + cd "${srcdir}/freetype2" + ./autogen.sh + ./configure --prefix=/usr --disable-static + make +} + +check() { + cd "${srcdir}/freetype2" + make -k check +} + +package() { + cd "${srcdir}/freetype2" + make DESTDIR="${pkgdir}" install +} |