diff --git a/ccache/default/PKGBUILD b/ccache/default/PKGBUILD new file mode 100644 index 00000000..d3ba21b2 --- /dev/null +++ b/ccache/default/PKGBUILD @@ -0,0 +1,41 @@ +# $Id: PKGBUILD 171533 2016-04-21 19:25:15Z arojas $ +# Maintainer: Giovanni Scafora +# Contributor: Tom Newsom + +pkgname=ccache +pkgver=3.2.5 +pkgrel=1.1 +pkgdesc="A compiler cache" +arch=('i686' 'x86_64') +url="http://ccache.samba.org/" +license=('GPL3') +depends=('zlib') +source=("http://samba.org/ftp/${pkgname}/${pkgname}-${pkgver}.tar.xz") +md5sums=('270c9ad0631c6e34f5fa84f0d9385f95') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --sysconfdir=/etc + + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + install -Dm 755 ccache ${pkgdir}/usr/bin/ccache + install -Dm 644 ccache.1 ${pkgdir}/usr/share/man/man1/ccache.1 + + install -d ${pkgdir}/usr/lib/ccache/bin + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/cc + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/gcc + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/g++ + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/cpp + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/c++ + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/${CHOST}-cc + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/${CHOST}-gcc + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/${CHOST}-g++ + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/${CHOST}-cpp + ln -sf /usr/bin/ccache ${pkgdir}/usr/lib/ccache/bin/${CHOST}-c++ +} diff --git a/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch b/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch index 4ed7dd81..55288708 100644 --- a/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch +++ b/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch @@ -1,4 +1,4 @@ -From 27f765b5f41638de36de728e9018a1400b0be615 Mon Sep 17 00:00:00 2001 +From a7e32953f291c39a8286b87516cd0c0516c2c89b Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Tue, 23 Jun 2015 08:40:29 +0200 Subject: [PATCH 1/4] Enable table validation modules @@ -8,7 +8,7 @@ Subject: [PATCH 1/4] Enable table validation modules 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.cfg b/modules.cfg -index 2984e51..a5db21d 100644 +index d677565a2bc2b5a2..f19cbec33384a86f 100644 --- a/modules.cfg +++ b/modules.cfg @@ -110,7 +110,7 @@ RASTER_MODULES += smooth @@ -30,5 +30,5 @@ index 2984e51..a5db21d 100644 # Auxiliary PostScript driver component to share common code. # -- -2.6.0 +2.9.0 diff --git a/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch b/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch index acc0475c..d70b4f0e 100644 --- a/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch +++ b/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch @@ -1,4 +1,4 @@ -From 27d96091b2bb0a825cbd62a332ef918f39c6126f Mon Sep 17 00:00:00 2001 +From 6a8bbe968954bcc54fdfcd5a71c7632370e3066a Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Tue, 23 Jun 2015 08:43:07 +0200 Subject: [PATCH 2/4] Enable subpixel rendering @@ -8,7 +8,7 @@ Subject: [PATCH 2/4] Enable subpixel rendering 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index 4970945..ab407e3 100644 +index 2556c64d9d6c0838..8e58403529f597e5 100644 --- a/include/freetype/config/ftoption.h +++ b/include/freetype/config/ftoption.h @@ -92,7 +92,7 @@ FT_BEGIN_HEADER @@ -21,5 +21,5 @@ index 4970945..ab407e3 100644 /*************************************************************************/ -- -2.6.0 +2.9.0 diff --git a/freetype2/mingw-w64-bootstrap/0003-Enable-subpixel-hinting.patch b/freetype2/mingw-w64-bootstrap/0003-Enable-subpixel-hinting.patch deleted file mode 100644 index 00a5c2f7..00000000 --- a/freetype2/mingw-w64-bootstrap/0003-Enable-subpixel-hinting.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f96a1d21d787b173d6293330fbf782b977194aa7 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:43:57 +0200 -Subject: [PATCH 3/4] Enable subpixel hinting - ---- - include/freetype/config/ftoption.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index ab407e3..a2eab6a 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/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.6.0 - diff --git a/freetype2/mingw-w64-bootstrap/0003-Make-subpixel-hinting-mode-configurable.patch b/freetype2/mingw-w64-bootstrap/0003-Make-subpixel-hinting-mode-configurable.patch new file mode 100644 index 00000000..c1441dbe --- /dev/null +++ b/freetype2/mingw-w64-bootstrap/0003-Make-subpixel-hinting-mode-configurable.patch @@ -0,0 +1,88 @@ +From be997becc28dfbf2077cca55dc9a6a090d13e22a Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Wed, 15 Jun 2016 14:10:20 +0200 +Subject: [PATCH 3/4] Make subpixel hinting mode configurable + +--- + include/freetype/config/ftoption.h | 2 +- + src/truetype/ttobjs.c | 37 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 38 insertions(+), 1 deletion(-) + +diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h +index 8e58403529f597e5..197e15cdc3cc1e74 100644 +--- a/include/freetype/config/ftoption.h ++++ b/include/freetype/config/ftoption.h +@@ -632,7 +632,7 @@ FT_BEGIN_HEADER + /* */ + /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ + /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */ +-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */ ++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) + + + /*************************************************************************/ +diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c +index ed3be2dbee79427c..d89f92e94d0e816b 100644 +--- a/src/truetype/ttobjs.c ++++ b/src/truetype/ttobjs.c +@@ -36,6 +36,9 @@ + #include "ttgxvar.h" + #endif + ++#include ++#include ++ + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ +@@ -1286,6 +1289,7 @@ + #ifdef TT_USE_BYTECODE_INTERPRETER + + TT_Driver driver = (TT_Driver)ttdriver; ++ const char *envval; + + driver->interpreter_version = TT_INTERPRETER_VERSION_35; + #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY +@@ -1295,6 +1299,39 @@ + driver->interpreter_version = TT_INTERPRETER_VERSION_40; + #endif + ++ errno = 0; ++ envval = getenv( "FT2_SUBPIXEL_HINTING" ); ++ if ( envval ) ++ { ++ char *endptr = NULL; ++ unsigned long value = strtoul( envval, &endptr, 10 ); ++ ++ if ( !errno && endptr && !*endptr ) ++ { ++ switch( value ) ++ { ++ case 0: ++ driver->interpreter_version = TT_INTERPRETER_VERSION_35; ++ break; ++ ++#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY ++ case 1: ++ driver->interpreter_version = TT_INTERPRETER_VERSION_38; ++ break; ++#endif ++ ++#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL ++ case 2: ++ driver->interpreter_version = TT_INTERPRETER_VERSION_40; ++ break; ++#endif ++ ++ default: ++ break; ++ } ++ } ++ } ++ + #else /* !TT_USE_BYTECODE_INTERPRETER */ + + FT_UNUSED( ttdriver ); +-- +2.9.0 + diff --git a/freetype2/mingw-w64-bootstrap/0004-Keep-default-interpreter-version-as-35.patch b/freetype2/mingw-w64-bootstrap/0004-Keep-default-interpreter-version-as-35.patch new file mode 100644 index 00000000..ba188537 --- /dev/null +++ b/freetype2/mingw-w64-bootstrap/0004-Keep-default-interpreter-version-as-35.patch @@ -0,0 +1,29 @@ +From 88e7474320b8d2b5333e276b8b1771bc2690c43f Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Tue, 12 Jul 2016 12:47:57 +0200 +Subject: [PATCH 4/4] Keep default interpreter version as 35 + +--- + src/truetype/ttobjs.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c +index d89f92e94d0e816b..efca66fc21c0287a 100644 +--- a/src/truetype/ttobjs.c ++++ b/src/truetype/ttobjs.c +@@ -1292,12 +1292,6 @@ + const char *envval; + + driver->interpreter_version = TT_INTERPRETER_VERSION_35; +-#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY +- driver->interpreter_version = TT_INTERPRETER_VERSION_38; +-#endif +-#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL +- driver->interpreter_version = TT_INTERPRETER_VERSION_40; +-#endif + + errno = 0; + envval = getenv( "FT2_SUBPIXEL_HINTING" ); +-- +2.9.0 + diff --git a/freetype2/mingw-w64-bootstrap/0004-Mask-subpixel-hinting-with-an-env-var.patch b/freetype2/mingw-w64-bootstrap/0004-Mask-subpixel-hinting-with-an-env-var.patch deleted file mode 100644 index ec891048..00000000 --- a/freetype2/mingw-w64-bootstrap/0004-Mask-subpixel-hinting-with-an-env-var.patch +++ /dev/null @@ -1,31 +0,0 @@ -From bb5ece9c6773145c8342107bd32fcacbc4b212ab Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:34:54 +0200 -Subject: [PATCH 4/4] Mask subpixel hinting with an env var - ---- - 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 6060d6f..3fa98e7 100644 ---- a/src/truetype/ttobjs.c -+++ b/src/truetype/ttobjs.c -@@ -1302,10 +1302,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_SUBPIXEL_HINTING" ) ) -+ driver->interpreter_version = TT_INTERPRETER_VERSION_38; -+ else - #endif -+ driver->interpreter_version = TT_INTERPRETER_VERSION_35; - - #else /* !TT_USE_BYTECODE_INTERPRETER */ - --- -2.6.0 - diff --git a/freetype2/mingw-w64-bootstrap/PKGBUILD b/freetype2/mingw-w64-bootstrap/PKGBUILD index e4a46a88..7cc22f3f 100644 --- a/freetype2/mingw-w64-bootstrap/PKGBUILD +++ b/freetype2/mingw-w64-bootstrap/PKGBUILD @@ -4,45 +4,57 @@ # you also find the URL of a binary repository. pkgname=mingw-w64-freetype2-bootstrap -pkgver=2.6.3 +pkgver=2.6.5 pkgrel=1 -pkgdesc="TrueType font rendering library (mingw-w64 bootstrap)" +pkgdesc="TrueType font rendering library (mingw-w64)" arch=('any') url="http://www.freetype.org/" license=('GPL') -# adding harfbuzz for improved OpenType features auto-hinting -# introduces a cycle dep to harfbuzz depending on freetype wanted by upstream depends=(mingw-w64-crt mingw-w64-zlib mingw-w64-bzip2) makedepends=(mingw-w64-gcc mingw-w64-configure) -provides=(mingw-w64-freetype ${pkgname%-bootstrap}) -conflicts=(mingw-w64-freetype ${pkgname%-bootstrap}) +provides=(mingw-w64-freetype) +replaces=(mingw-w64-freetype) +conflicts=(mingw-w64-freetype) source=(http://download.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.bz2{,.sig} 0001-Enable-table-validation-modules.patch 0002-Enable-subpixel-rendering.patch - 0003-Enable-subpixel-hinting.patch - 0004-Mask-subpixel-hinting-with-an-env-var.patch) + 0003-Make-subpixel-hinting-mode-configurable.patch + 0004-Keep-default-interpreter-version-as-35.patch) options=(!strip !buildflags !libtool staticlibs) -sha1sums=('6c98bd5d0be313207c37ca23d25faf983486aee5' +sha1sums=('5db38ae2308c5a2c519c8e071e98b70d61585201' 'SKIP' - '1c7bc438df0428a63f881e7e4343b22c5b09ecb1' - 'e2d2b8c4847ab9cfd497179c7140835e99ece711' - 'ebe3d7a6fc41304a77c23cb56e94dc718146d963' - 'f50c70080f3fbee45b9c4264d8ae37eb4f1ac335') + 'e1fde7854d2a64868a5eef07415ad23c339fc630' + '7da3af8e1e002e39a247c37a05a10beb576007d6' + 'c64ba9d37732fc75de7817d1d679a3e38efdb4cb' + '1f30feeba9c51c9ec745bd29ef07beccf9544338') validpgpkeys=('58E0C111E39F5408C5D3EC76C1A60EACE707FDA5') +if [[ $pkgname = "mingw-w64-freetype2-bootstrap" ]]; then + _provides=${pkgname%-bootstrap} +else + _provides=${pkgname}-bootstrap + # adding harfbuzz for improved OpenType features auto-hinting + # introduces a cycle dep to harfbuzz depending on freetype wanted by upstream + depends+=(mingw-w64-harfbuzz) +fi +provides+=(${_provides}) +replaces+=(${_provides}) +conflicts+=(${_provides}) + _architectures="i686-w64-mingw32 x86_64-w64-mingw32" prepare() { cd "${srcdir}/freetype-${pkgver}" - patch -Np1 -i "${srcdir}/0001-Enable-table-validation-modules.patch" - patch -Np1 -i "${srcdir}/0002-Enable-subpixel-rendering.patch" + patch -Np1 -i ../0001-Enable-table-validation-modules.patch + patch -Np1 -i ../0002-Enable-subpixel-rendering.patch - # https://bugs.archlinux.org/task/35274 - patch -Np1 -i "${srcdir}/0003-Enable-subpixel-hinting.patch" - # Provide a way to enable the above patch at runtime. - # Hopefully just a temporary measure until fontconfig picks up - # the necessary configurables. - patch -Np1 -i "${srcdir}/0004-Mask-subpixel-hinting-with-an-env-var.patch" + # Provide a way to set the default subpixel hinting mode + # at runtime, without depending on the application to do so. + patch -Np1 -i ../0003-Make-subpixel-hinting-mode-configurable.patch + + # Keep the classic subpixel hinting mode as default, as expected + # by upstream for the 2.6 series + patch -Np1 -i ../0004-Keep-default-interpreter-version-as-35.patch } build() { diff --git a/freetype2/mingw-w64/0001-Enable-table-validation-modules.patch b/freetype2/mingw-w64/0001-Enable-table-validation-modules.patch index 4ed7dd81..55288708 100644 --- a/freetype2/mingw-w64/0001-Enable-table-validation-modules.patch +++ b/freetype2/mingw-w64/0001-Enable-table-validation-modules.patch @@ -1,4 +1,4 @@ -From 27f765b5f41638de36de728e9018a1400b0be615 Mon Sep 17 00:00:00 2001 +From a7e32953f291c39a8286b87516cd0c0516c2c89b Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Tue, 23 Jun 2015 08:40:29 +0200 Subject: [PATCH 1/4] Enable table validation modules @@ -8,7 +8,7 @@ Subject: [PATCH 1/4] Enable table validation modules 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.cfg b/modules.cfg -index 2984e51..a5db21d 100644 +index d677565a2bc2b5a2..f19cbec33384a86f 100644 --- a/modules.cfg +++ b/modules.cfg @@ -110,7 +110,7 @@ RASTER_MODULES += smooth @@ -30,5 +30,5 @@ index 2984e51..a5db21d 100644 # Auxiliary PostScript driver component to share common code. # -- -2.6.0 +2.9.0 diff --git a/freetype2/mingw-w64/0002-Enable-subpixel-rendering.patch b/freetype2/mingw-w64/0002-Enable-subpixel-rendering.patch index acc0475c..d70b4f0e 100644 --- a/freetype2/mingw-w64/0002-Enable-subpixel-rendering.patch +++ b/freetype2/mingw-w64/0002-Enable-subpixel-rendering.patch @@ -1,4 +1,4 @@ -From 27d96091b2bb0a825cbd62a332ef918f39c6126f Mon Sep 17 00:00:00 2001 +From 6a8bbe968954bcc54fdfcd5a71c7632370e3066a Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Tue, 23 Jun 2015 08:43:07 +0200 Subject: [PATCH 2/4] Enable subpixel rendering @@ -8,7 +8,7 @@ Subject: [PATCH 2/4] Enable subpixel rendering 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index 4970945..ab407e3 100644 +index 2556c64d9d6c0838..8e58403529f597e5 100644 --- a/include/freetype/config/ftoption.h +++ b/include/freetype/config/ftoption.h @@ -92,7 +92,7 @@ FT_BEGIN_HEADER @@ -21,5 +21,5 @@ index 4970945..ab407e3 100644 /*************************************************************************/ -- -2.6.0 +2.9.0 diff --git a/freetype2/mingw-w64/0003-Enable-subpixel-hinting.patch b/freetype2/mingw-w64/0003-Enable-subpixel-hinting.patch deleted file mode 100644 index 00a5c2f7..00000000 --- a/freetype2/mingw-w64/0003-Enable-subpixel-hinting.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f96a1d21d787b173d6293330fbf782b977194aa7 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:43:57 +0200 -Subject: [PATCH 3/4] Enable subpixel hinting - ---- - include/freetype/config/ftoption.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index ab407e3..a2eab6a 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/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.6.0 - diff --git a/freetype2/mingw-w64/0003-Make-subpixel-hinting-mode-configurable.patch b/freetype2/mingw-w64/0003-Make-subpixel-hinting-mode-configurable.patch new file mode 100644 index 00000000..c1441dbe --- /dev/null +++ b/freetype2/mingw-w64/0003-Make-subpixel-hinting-mode-configurable.patch @@ -0,0 +1,88 @@ +From be997becc28dfbf2077cca55dc9a6a090d13e22a Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Wed, 15 Jun 2016 14:10:20 +0200 +Subject: [PATCH 3/4] Make subpixel hinting mode configurable + +--- + include/freetype/config/ftoption.h | 2 +- + src/truetype/ttobjs.c | 37 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 38 insertions(+), 1 deletion(-) + +diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h +index 8e58403529f597e5..197e15cdc3cc1e74 100644 +--- a/include/freetype/config/ftoption.h ++++ b/include/freetype/config/ftoption.h +@@ -632,7 +632,7 @@ FT_BEGIN_HEADER + /* */ + /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ + /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */ +-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */ ++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) + + + /*************************************************************************/ +diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c +index ed3be2dbee79427c..d89f92e94d0e816b 100644 +--- a/src/truetype/ttobjs.c ++++ b/src/truetype/ttobjs.c +@@ -36,6 +36,9 @@ + #include "ttgxvar.h" + #endif + ++#include ++#include ++ + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ +@@ -1286,6 +1289,7 @@ + #ifdef TT_USE_BYTECODE_INTERPRETER + + TT_Driver driver = (TT_Driver)ttdriver; ++ const char *envval; + + driver->interpreter_version = TT_INTERPRETER_VERSION_35; + #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY +@@ -1295,6 +1299,39 @@ + driver->interpreter_version = TT_INTERPRETER_VERSION_40; + #endif + ++ errno = 0; ++ envval = getenv( "FT2_SUBPIXEL_HINTING" ); ++ if ( envval ) ++ { ++ char *endptr = NULL; ++ unsigned long value = strtoul( envval, &endptr, 10 ); ++ ++ if ( !errno && endptr && !*endptr ) ++ { ++ switch( value ) ++ { ++ case 0: ++ driver->interpreter_version = TT_INTERPRETER_VERSION_35; ++ break; ++ ++#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY ++ case 1: ++ driver->interpreter_version = TT_INTERPRETER_VERSION_38; ++ break; ++#endif ++ ++#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL ++ case 2: ++ driver->interpreter_version = TT_INTERPRETER_VERSION_40; ++ break; ++#endif ++ ++ default: ++ break; ++ } ++ } ++ } ++ + #else /* !TT_USE_BYTECODE_INTERPRETER */ + + FT_UNUSED( ttdriver ); +-- +2.9.0 + diff --git a/freetype2/mingw-w64/0004-Keep-default-interpreter-version-as-35.patch b/freetype2/mingw-w64/0004-Keep-default-interpreter-version-as-35.patch new file mode 100644 index 00000000..ba188537 --- /dev/null +++ b/freetype2/mingw-w64/0004-Keep-default-interpreter-version-as-35.patch @@ -0,0 +1,29 @@ +From 88e7474320b8d2b5333e276b8b1771bc2690c43f Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Tue, 12 Jul 2016 12:47:57 +0200 +Subject: [PATCH 4/4] Keep default interpreter version as 35 + +--- + src/truetype/ttobjs.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c +index d89f92e94d0e816b..efca66fc21c0287a 100644 +--- a/src/truetype/ttobjs.c ++++ b/src/truetype/ttobjs.c +@@ -1292,12 +1292,6 @@ + const char *envval; + + driver->interpreter_version = TT_INTERPRETER_VERSION_35; +-#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY +- driver->interpreter_version = TT_INTERPRETER_VERSION_38; +-#endif +-#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL +- driver->interpreter_version = TT_INTERPRETER_VERSION_40; +-#endif + + errno = 0; + envval = getenv( "FT2_SUBPIXEL_HINTING" ); +-- +2.9.0 + diff --git a/freetype2/mingw-w64/0004-Mask-subpixel-hinting-with-an-env-var.patch b/freetype2/mingw-w64/0004-Mask-subpixel-hinting-with-an-env-var.patch deleted file mode 100644 index ec891048..00000000 --- a/freetype2/mingw-w64/0004-Mask-subpixel-hinting-with-an-env-var.patch +++ /dev/null @@ -1,31 +0,0 @@ -From bb5ece9c6773145c8342107bd32fcacbc4b212ab Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 23 Jun 2015 08:34:54 +0200 -Subject: [PATCH 4/4] Mask subpixel hinting with an env var - ---- - 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 6060d6f..3fa98e7 100644 ---- a/src/truetype/ttobjs.c -+++ b/src/truetype/ttobjs.c -@@ -1302,10 +1302,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_SUBPIXEL_HINTING" ) ) -+ driver->interpreter_version = TT_INTERPRETER_VERSION_38; -+ else - #endif -+ driver->interpreter_version = TT_INTERPRETER_VERSION_35; - - #else /* !TT_USE_BYTECODE_INTERPRETER */ - --- -2.6.0 - diff --git a/freetype2/mingw-w64/PKGBUILD b/freetype2/mingw-w64/PKGBUILD index d091e337..ea25ce39 100644 --- a/freetype2/mingw-w64/PKGBUILD +++ b/freetype2/mingw-w64/PKGBUILD @@ -4,46 +4,57 @@ # you also find the URL of a binary repository. pkgname=mingw-w64-freetype2 -pkgver=2.6.3 +pkgver=2.6.5 pkgrel=1 pkgdesc="TrueType font rendering library (mingw-w64)" arch=('any') url="http://www.freetype.org/" license=('GPL') -# adding harfbuzz for improved OpenType features auto-hinting -# introduces a cycle dep to harfbuzz depending on freetype wanted by upstream -depends=(mingw-w64-crt mingw-w64-zlib mingw-w64-harfbuzz mingw-w64-bzip2) +depends=(mingw-w64-crt mingw-w64-zlib mingw-w64-bzip2) makedepends=(mingw-w64-gcc mingw-w64-configure) -provides=(mingw-w64-freetype $pkgname-bootstrap) -replaces=(mingw-w64-freetype $pkgname-bootstrap) -conflicts=(mingw-w64-freetype $pkgname-bootstrap) +provides=(mingw-w64-freetype) +replaces=(mingw-w64-freetype) +conflicts=(mingw-w64-freetype) source=(http://download.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.bz2{,.sig} 0001-Enable-table-validation-modules.patch 0002-Enable-subpixel-rendering.patch - 0003-Enable-subpixel-hinting.patch - 0004-Mask-subpixel-hinting-with-an-env-var.patch) + 0003-Make-subpixel-hinting-mode-configurable.patch + 0004-Keep-default-interpreter-version-as-35.patch) options=(!strip !buildflags !libtool staticlibs) -sha1sums=('6c98bd5d0be313207c37ca23d25faf983486aee5' +sha1sums=('5db38ae2308c5a2c519c8e071e98b70d61585201' 'SKIP' - '1c7bc438df0428a63f881e7e4343b22c5b09ecb1' - 'e2d2b8c4847ab9cfd497179c7140835e99ece711' - 'ebe3d7a6fc41304a77c23cb56e94dc718146d963' - 'f50c70080f3fbee45b9c4264d8ae37eb4f1ac335') + 'e1fde7854d2a64868a5eef07415ad23c339fc630' + '7da3af8e1e002e39a247c37a05a10beb576007d6' + 'c64ba9d37732fc75de7817d1d679a3e38efdb4cb' + '1f30feeba9c51c9ec745bd29ef07beccf9544338') validpgpkeys=('58E0C111E39F5408C5D3EC76C1A60EACE707FDA5') +if [[ $pkgname = "mingw-w64-freetype2-bootstrap" ]]; then + _provides=${pkgname%-bootstrap} +else + _provides=${pkgname}-bootstrap + # adding harfbuzz for improved OpenType features auto-hinting + # introduces a cycle dep to harfbuzz depending on freetype wanted by upstream + depends+=(mingw-w64-harfbuzz) +fi +provides+=(${_provides}) +replaces+=(${_provides}) +conflicts+=(${_provides}) + _architectures="i686-w64-mingw32 x86_64-w64-mingw32" prepare() { cd "${srcdir}/freetype-${pkgver}" - patch -Np1 -i "${srcdir}/0001-Enable-table-validation-modules.patch" - patch -Np1 -i "${srcdir}/0002-Enable-subpixel-rendering.patch" + patch -Np1 -i ../0001-Enable-table-validation-modules.patch + patch -Np1 -i ../0002-Enable-subpixel-rendering.patch - # https://bugs.archlinux.org/task/35274 - patch -Np1 -i "${srcdir}/0003-Enable-subpixel-hinting.patch" - # Provide a way to enable the above patch at runtime. - # Hopefully just a temporary measure until fontconfig picks up - # the necessary configurables. - patch -Np1 -i "${srcdir}/0004-Mask-subpixel-hinting-with-an-env-var.patch" + # Provide a way to set the default subpixel hinting mode + # at runtime, without depending on the application to do so. + patch -Np1 -i ../0003-Make-subpixel-hinting-mode-configurable.patch + + # Keep the classic subpixel hinting mode as default, as expected + # by upstream for the 2.6 series + patch -Np1 -i ../0004-Keep-default-interpreter-version-as-35.patch } build() {