From d286b7f3d9e1a72ce3bbe6e3ff6d618bd398d4b4 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 8 Jan 2017 14:27:17 +0100 Subject: [PATCH] Sync bootstrap mingw-w64-freetype2 correctly --- ...0001-Enable-table-validation-modules.patch | 18 ++-- .../0002-Enable-subpixel-rendering.patch | 10 +-- ...3-Enable-infinality-subpixel-hinting.patch | 27 ++++++ ...e-subpixel-hinting-mode-configurable.patch | 88 ------------------- ...ep-default-interpreter-version-as-35.patch | 29 ------ freetype2/mingw-w64-bootstrap/PKGBUILD | 24 ++--- freetype2/mingw-w64/PKGBUILD | 4 +- freetype2/sync-variants.sh | 27 ++++++ 8 files changed, 78 insertions(+), 149 deletions(-) create mode 100644 freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch delete mode 100644 freetype2/mingw-w64-bootstrap/0003-Make-subpixel-hinting-mode-configurable.patch delete mode 100644 freetype2/mingw-w64-bootstrap/0004-Keep-default-interpreter-version-as-35.patch create mode 100755 freetype2/sync-variants.sh 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 55288708..3e9451fa 100644 --- a/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch +++ b/freetype2/mingw-w64-bootstrap/0001-Enable-table-validation-modules.patch @@ -1,34 +1,34 @@ -From a7e32953f291c39a8286b87516cd0c0516c2c89b Mon Sep 17 00:00:00 2001 +From c3680bf8d38cf759c1e33dcc2d2d51e0a4fea2f9 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 +Subject: [PATCH 1/3] Enable table validation modules --- modules.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.cfg b/modules.cfg -index d677565a2bc2b5a2..f19cbec33384a86f 100644 +index f30049c38cc45159..7b8e50fe1b34584a 100644 --- a/modules.cfg +++ b/modules.cfg -@@ -110,7 +110,7 @@ RASTER_MODULES += smooth - AUX_MODULES += cache - +@@ -120,7 +120,7 @@ AUX_MODULES += cache # TrueType GX/AAT table validation. Needs ftgxval.c below. + # + # No FT_CONFIG_OPTION_PIC support. -# AUX_MODULES += gxvalid +AUX_MODULES += gxvalid # Support for streams compressed with gzip (files with suffix .gz). # -@@ -129,7 +129,7 @@ AUX_MODULES += bzip2 - +@@ -143,7 +143,7 @@ AUX_MODULES += bzip2 # OpenType table validation. Needs ftotval.c below. # + # No FT_CONFIG_OPTION_PIC support. -# AUX_MODULES += otvalid +AUX_MODULES += otvalid # Auxiliary PostScript driver component to share common code. # -- -2.9.0 +2.9.3 diff --git a/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch b/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch index d70b4f0e..dfb57966 100644 --- a/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch +++ b/freetype2/mingw-w64-bootstrap/0002-Enable-subpixel-rendering.patch @@ -1,17 +1,17 @@ -From 6a8bbe968954bcc54fdfcd5a71c7632370e3066a Mon Sep 17 00:00:00 2001 +From 96f09f08417887b2618c177bccfb6da2906568d9 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 +Subject: [PATCH 2/3] Enable subpixel rendering --- 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 2556c64d9d6c0838..8e58403529f597e5 100644 +index 90c123ef93e9ea04..67a361dd41e0b026 100644 --- a/include/freetype/config/ftoption.h +++ b/include/freetype/config/ftoption.h -@@ -92,7 +92,7 @@ FT_BEGIN_HEADER +@@ -122,7 +122,7 @@ FT_BEGIN_HEADER /* This is done to allow FreeType clients to run unmodified, forcing */ /* them to display normal gray-level anti-aliased glyphs. */ /* */ @@ -21,5 +21,5 @@ index 2556c64d9d6c0838..8e58403529f597e5 100644 /*************************************************************************/ -- -2.9.0 +2.9.3 diff --git a/freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch b/freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch new file mode 100644 index 00000000..bbfa2a2c --- /dev/null +++ b/freetype2/mingw-w64-bootstrap/0003-Enable-infinality-subpixel-hinting.patch @@ -0,0 +1,27 @@ +From 220e96a9a8d7aff6ad0f0f1aa12c79cdb563331c Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Mon, 29 Aug 2016 08:43:10 +0200 +Subject: [PATCH 3/3] Enable infinality subpixel hinting + +--- + include/freetype/config/ftoption.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h +index 67a361dd41e0b026..c4812862518b66a6 100644 +--- a/include/freetype/config/ftoption.h ++++ b/include/freetype/config/ftoption.h +@@ -675,8 +675,8 @@ FT_BEGIN_HEADER + /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ + /* */ + /* #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 2 */ ++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) + + + /*************************************************************************/ +-- +2.9.3 + 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 deleted file mode 100644 index c1441dbe..00000000 --- a/freetype2/mingw-w64-bootstrap/0003-Make-subpixel-hinting-mode-configurable.patch +++ /dev/null @@ -1,88 +0,0 @@ -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 deleted file mode 100644 index ba188537..00000000 --- a/freetype2/mingw-w64-bootstrap/0004-Keep-default-interpreter-version-as-35.patch +++ /dev/null @@ -1,29 +0,0 @@ -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/PKGBUILD b/freetype2/mingw-w64-bootstrap/PKGBUILD index 2377a4e6..8de673d5 100644 --- a/freetype2/mingw-w64-bootstrap/PKGBUILD +++ b/freetype2/mingw-w64-bootstrap/PKGBUILD @@ -6,9 +6,9 @@ pkgname=mingw-w64-freetype2-bootstrap pkgver=2.7.1 pkgrel=1 -pkgdesc="TrueType font rendering library (mingw-w64)" +pkgdesc='TrueType font rendering library (mingw-w64)' arch=('any') -url="http://www.freetype.org/" +url='http://www.freetype.org/' license=('GPL') depends=(mingw-w64-crt mingw-w64-zlib mingw-w64-bzip2) makedepends=(mingw-w64-gcc mingw-w64-configure) @@ -18,15 +18,13 @@ 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-Make-subpixel-hinting-mode-configurable.patch - 0004-Keep-default-interpreter-version-as-35.patch) + 0003-Enable-infinality-subpixel-hinting.patch) options=(!strip !buildflags !libtool staticlibs) sha1sums=('4d08a9a6567c6332d58e9a5f9a7e9e3fbce66789' 'SKIP' - 'e1fde7854d2a64868a5eef07415ad23c339fc630' - '7da3af8e1e002e39a247c37a05a10beb576007d6' - 'c64ba9d37732fc75de7817d1d679a3e38efdb4cb' - '1f30feeba9c51c9ec745bd29ef07beccf9544338') + 'b31882ef5e8447e761acee1c4a44c0630cd4d465' + 'b1494810ed3aca25cdd8e8cedf634e5adfe6c09e' + '41d27140fd590945e22e012c9dce62de3d6f11e6') validpgpkeys=('58E0C111E39F5408C5D3EC76C1A60EACE707FDA5') if [[ $pkgname = 'mingw-w64-freetype2-bootstrap' ]]; then @@ -45,16 +43,10 @@ _architectures='i686-w64-mingw32 x86_64-w64-mingw32' prepare() { cd "${srcdir}/freetype-${pkgver}" + patch -Np1 -i ../0001-Enable-table-validation-modules.patch patch -Np1 -i ../0002-Enable-subpixel-rendering.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 + patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch } build() { diff --git a/freetype2/mingw-w64/PKGBUILD b/freetype2/mingw-w64/PKGBUILD index 1cedbe34..b96eb411 100644 --- a/freetype2/mingw-w64/PKGBUILD +++ b/freetype2/mingw-w64/PKGBUILD @@ -6,9 +6,9 @@ pkgname=mingw-w64-freetype2 pkgver=2.7.1 pkgrel=1 -pkgdesc="TrueType font rendering library (mingw-w64)" +pkgdesc='TrueType font rendering library (mingw-w64)' arch=('any') -url="http://www.freetype.org/" +url='http://www.freetype.org/' license=('GPL') depends=(mingw-w64-crt mingw-w64-zlib mingw-w64-bzip2) makedepends=(mingw-w64-gcc mingw-w64-configure) diff --git a/freetype2/sync-variants.sh b/freetype2/sync-variants.sh new file mode 100755 index 00000000..b66aa337 --- /dev/null +++ b/freetype2/sync-variants.sh @@ -0,0 +1,27 @@ +#!/usr/bin/bash + +# Syncs the different variants of mingw-w64-qt5-base + +set -e # abort on first error +master="$1" + +if [[ ! $master ]]; then + # no default here to prevent unintented use + echo "Error: no master specified" + exit -1 +elif [ $# -gt 1 ]; then + echo "Error: too many arguments specified" + echo "Usage: $0 master_dir" + exit -2 +elif [[ ! -d $master ]]; then + echo "Error: specified master $master does not exist" + exit -3 +fi + +for dir in *; do + if [[ $dir != $master ]] && [[ -d $dir ]]; then + rm "$dir/"* # clean first (files might have been remove in master) + cp "$master/"* "$dir" + sed -e '/pkgname=mingw-w64-freetype2/{c\pkgname=mingw-w64-freetype2'${dir#mingw-w64} -e ';d}' "$master/PKGBUILD" > "$dir/PKGBUILD" + fi +done