freetype: make default TT_INTERPRETER_VERSION a compile-time build option.

This commit is contained in:
Christian Neukirchen 2016-11-17 14:24:02 +01:00
parent 0e83a067e6
commit 22325e1c40
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,12 @@
--- src/truetype/ttobjs.c.orig
+++ src/truetype/ttobjs.c
@@ -1294,6 +1294,9 @@
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
driver->interpreter_version = TT_INTERPRETER_VERSION_40;
#endif
+#ifdef DEFAULT_TT_INTERPRETER_VERSION
+ driver->interpreter_version = DEFAULT_TT_INTERPRETER_VERSION;
+#endif
#else /* !TT_USE_BYTECODE_INTERPRETER */

View File

@ -1,7 +1,7 @@
# Template build file 'freetype'.
pkgname=freetype
version=2.7
revision=1
revision=2
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="zlib-devel bzip2-devel libpng-devel"
@ -12,6 +12,26 @@ license="GPL-2"
distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.bz2"
checksum=d6a451f5b754857d2aa3964fd4473f8bc5c64e879b24516d780fb26bec7f7d48
build_options="v35 v38 v40"
build_options_default="v40"
desc_option_v35="Use default interpreter version 35 (Classic mode)"
desc_option_v38="Use default interpreter version 38 (Infinality mode)"
desc_option_v40="Use default interpreter version 40 (Minimal mode)"
vopt_conflict v35 v38
vopt_conflict v35 v40
vopt_conflict v38 v40
pre_configure() {
CFLAGS+=" -DDEFAULT_TT_INTERPRETER_VERSION=TT_INTERPRETER_VERSION_"
if [ "$build_option_v35" ]; then
CFLAGS+="35"
elif [ "$build_option_v38" ]; then
CFLAGS+="38"
elif [ "$build_option_v40" ]; then
CFLAGS+="40"
fi
}
freetype-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"