diff options
author | Gonzalo Exequiel Pedone | 2024-02-10 18:19:08 -0300 |
---|---|---|
committer | Gonzalo Exequiel Pedone | 2024-02-10 18:19:08 -0300 |
commit | 01c52f40f83599f3dc6005be5d06d7b7b4ee333d (patch) | |
tree | e29b477ffd99ed3f6c8e9d90062f72a6adab64a1 | |
download | aur-01c52f40f83599f3dc6005be5d06d7b7b4ee333d.tar.gz |
New package.
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | 0001-Enable-table-validation-modules.patch | 42 | ||||
-rw-r--r-- | 0002-Enable-subpixel-rendering.patch | 22 | ||||
-rw-r--r-- | 0003-Enable-long-PCF-family-names.patch | 22 | ||||
-rw-r--r-- | 0004-Fix-build.patch | 75 | ||||
-rw-r--r-- | PKGBUILD | 83 |
7 files changed, 284 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5bb7bffdf67e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = android-x86-freetype2-bootstrap + pkgdesc = Font rasterization library (android) + pkgver = 2.13.2 + pkgrel = 1 + url = https://www.freetype.org/ + arch = any + license = GPL + makedepends = android-meson + depends = android-ndk + depends = android-x86-zlib + depends = android-x86-bzip2 + depends = android-x86-brotli + depends = android-x86-libpng + provides = android-x86-freetype2 + conflicts = android-x86-freetype2 + options = !strip + options = !buildflags + options = staticlibs + options = !emptydirs + source = https://download-mirror.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.xz + source = https://download-mirror.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.xz.sig + source = 0001-Enable-table-validation-modules.patch + source = 0002-Enable-subpixel-rendering.patch + source = 0003-Enable-long-PCF-family-names.patch + source = 0004-Fix-build.patch + validpgpkeys = E30674707856409FF1948010BE6C3AAC63AD8E3F + b2sums = cebc82180d9afaeb112a65ba78903d7bf7a9295a803166a033585ad2325add6023f05066852240c4665e56285345ba503b01ecd461d48f0478a8f3f56136988e + b2sums = SKIP + b2sums = 2c148694e150b3faae9dc46ead824ae6d94cfe34f2918bc9066f45bab7e6b6f77b4d4b2fee00c3d466d866e1985132cea4a774dcf1bab95409b7cf55efff01e1 + b2sums = 9598d13eae0411878c1af8e5d875c3b1fc09f4e6649edfbbf3b0a819c4c585648521f0b30ffd1318f5106cfde9c899d3db70c8ffe36dac59f3f98b5fd7dab115 + b2sums = 66deb179d1f1f4e2e35f6d50acfbacce80595d5128f5fed8c1871838c210dbf1a7173a87dd937d64997844c8f478c8f81120f71e33b9d59d980e179d103ff31c + b2sums = 1ef51ab6bacfecc731541531f3dacf0f17cea5b1b4be9dde5b313cd0f61e463b4d21d81f3b7ffac30d108ce0ece34b1407b8018585662fbbcd5dd2899eb5a12b + +pkgname = android-x86-freetype2-bootstrap diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..bff248642c42 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +pkg +src +*.tar.xz +*.tar.gz +*.tar.bz2 +*.gz diff --git a/0001-Enable-table-validation-modules.patch b/0001-Enable-table-validation-modules.patch new file mode 100644 index 000000000000..f360a143132c --- /dev/null +++ b/0001-Enable-table-validation-modules.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 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] Enable table validation modules + +--- + modules.cfg | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.cfg b/modules.cfg +index 5b6c9b5a5c1d..b4933bea7654 100644 +--- a/modules.cfg ++++ b/modules.cfg +@@ -117,26 +117,26 @@ 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). + # + # See include/freetype/ftgzip.h for the API. + AUX_MODULES += gzip + + # Support for streams compressed with LZW (files with suffix .Z). + # + # See include/freetype/ftlzw.h for the API. + AUX_MODULES += lzw + + # Support for streams compressed with bzip2 (files with suffix .bz2). + # + # See include/freetype/ftbzip2.h for the API. + AUX_MODULES += bzip2 + + # OpenType table validation. Needs `ftotval.c' below. + # +-# AUX_MODULES += otvalid ++AUX_MODULES += otvalid + + # Auxiliary PostScript driver component to share common code. + # diff --git a/0002-Enable-subpixel-rendering.patch b/0002-Enable-subpixel-rendering.patch new file mode 100644 index 000000000000..95f40a306efa --- /dev/null +++ b/0002-Enable-subpixel-rendering.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 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] 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 1976b33af959..b3425e55feec 100644 +--- a/include/freetype/config/ftoption.h ++++ b/include/freetype/config/ftoption.h +@@ -123,7 +123,7 @@ FT_BEGIN_HEADER + * When this macro is not defined, FreeType offers alternative LCD + * rendering technology that produces excellent output. + */ +-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ ++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING + + + /************************************************************************** diff --git a/0003-Enable-long-PCF-family-names.patch b/0003-Enable-long-PCF-family-names.patch new file mode 100644 index 000000000000..e38679e4184d --- /dev/null +++ b/0003-Enable-long-PCF-family-names.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Sun, 14 May 2017 18:09:31 +0200 +Subject: [PATCH] Enable long PCF family names + +--- + 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 b3425e55feec..ecff3ccd12d6 100644 +--- a/include/freetype/config/ftoption.h ++++ b/include/freetype/config/ftoption.h +@@ -887,7 +887,7 @@ FT_BEGIN_HEADER + * If this option is activated, it can be controlled with the + * `no-long-family-names` property of the 'pcf' driver module. + */ +-/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ ++#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + + + /*************************************************************************/ diff --git a/0004-Fix-build.patch b/0004-Fix-build.patch new file mode 100644 index 000000000000..d7488db7832a --- /dev/null +++ b/0004-Fix-build.patch @@ -0,0 +1,75 @@ +--- a/meson.build 2024-02-10 12:33:38.571741005 -0300 ++++ b/meson.build 2024-02-10 12:44:21.523784137 -0300 +@@ -279,11 +279,17 @@ + zlib_option = 'auto' + endif + ++res = run_command('python3', '-c', 'import os; print(os.environ["LIBRARY_PATH"])') ++library_path = [] ++ ++if res.returncode() == 0 ++ library_path = res.stdout().strip().split(':') ++endif ++ + if zlib_option == 'auto' + # First try to find a system installation, otherwise fall back to + # the subproject. +- zlib_dep = dependency('zlib', +- required: false) ++ zlib_dep = cc.find_library('z', required: false, dirs: library_path) + if zlib_dep.found() + zlib_option = 'system' + else +@@ -303,8 +309,7 @@ + zlib_dep = zlib_project.get_variable('zlib_dep') + ft2_deps += [zlib_dep] + elif zlib_option == 'system' +- zlib_dep = dependency('zlib', +- required: true) ++ zlib_dep = cc.find_library('z', required: true, dirs: library_path) + assert(zlib_dep.found(), 'Could not find system zlib installation!') + ftoption_command += [ + '--enable=FT_CONFIG_OPTION_USE_ZLIB', +@@ -316,8 +321,7 @@ + endif + + # BZip2 support +-bzip2_dep = cc.find_library('bz2', +- required: get_option('bzip2')) ++bzip2_dep = cc.find_library('bz2', required: get_option('bzip2'), dirs: library_path) + + if bzip2_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BZIP2'] +@@ -326,9 +330,7 @@ + endif + + # PNG support +-libpng_dep = dependency('libpng', +- required: get_option('png'), +- fallback: 'libpng') ++libpng_dep = cc.find_library('png', required: get_option('png'), dirs: library_path) + + if libpng_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_PNG'] +@@ -336,10 +338,7 @@ + endif + + # Harfbuzz support +-harfbuzz_dep = dependency('harfbuzz', +- version: '>= 2.0.0', +- required: get_option('harfbuzz'), +- default_options: ['freetype=disabled']) ++harfbuzz_dep = cc.find_library('harfbuzz', required: get_option('harfbuzz'), dirs: library_path) + + if harfbuzz_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_HARFBUZZ'] +@@ -347,8 +346,7 @@ + endif + + # Brotli decompression support +-brotli_dep = dependency('libbrotlidec', +- required: get_option('brotli')) ++brotli_dep = cc.find_library('brotlidec', required: get_option('brotli'), dirs: library_path) + + if brotli_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BROTLI'] diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..70a7e9d165ae --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,83 @@ +# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com> +# Contributor: Martchus <martchus@gmx.net> + +_android_arch=x86 + +pkgname=android-${_android_arch}-freetype2-bootstrap +pkgver=2.13.2 +pkgrel=1 +arch=('any') +pkgdesc='Font rasterization library (android)' +depends=("android-ndk" + "android-${_android_arch}-zlib" + "android-${_android_arch}-bzip2" + "android-${_android_arch}-brotli" + "android-${_android_arch}-libpng") +provides=("android-${_android_arch}-freetype2") +conflicts=("android-${_android_arch}-freetype2") +makedepends=('android-meson') +options=(!strip !buildflags staticlibs !emptydirs) +license=('GPL') +url='https://www.freetype.org/' +source=("https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz"{,.sig} + '0001-Enable-table-validation-modules.patch' + '0002-Enable-subpixel-rendering.patch' + '0003-Enable-long-PCF-family-names.patch' + '0004-Fix-build.patch') +b2sums=('cebc82180d9afaeb112a65ba78903d7bf7a9295a803166a033585ad2325add6023f05066852240c4665e56285345ba503b01ecd461d48f0478a8f3f56136988e' + 'SKIP' + '2c148694e150b3faae9dc46ead824ae6d94cfe34f2918bc9066f45bab7e6b6f77b4d4b2fee00c3d466d866e1985132cea4a774dcf1bab95409b7cf55efff01e1' + '9598d13eae0411878c1af8e5d875c3b1fc09f4e6649edfbbf3b0a819c4c585648521f0b30ffd1318f5106cfde9c899d3db70c8ffe36dac59f3f98b5fd7dab115' + '66deb179d1f1f4e2e35f6d50acfbacce80595d5128f5fed8c1871838c210dbf1a7173a87dd937d64997844c8f478c8f81120f71e33b9d59d980e179d103ff31c' + '1ef51ab6bacfecc731541531f3dacf0f17cea5b1b4be9dde5b313cd0f61e463b4d21d81f3b7ffac30d108ce0ece34b1407b8018585662fbbcd5dd2899eb5a12b') +validpgpkeys=( + E30674707856409FF1948010BE6C3AAC63AD8E3F # Werner Lemberg <wl@gnu.org> +) + +prepare() { + cd "${srcdir}/freetype-${pkgver}" + patch -Np1 -i ../0001-Enable-table-validation-modules.patch + patch -Np1 -i ../0002-Enable-subpixel-rendering.patch + patch -Np1 -i ../0003-Enable-long-PCF-family-names.patch + patch -Np1 -i ../0004-Fix-build.patch + + find . -type f -exec sed -i 's|#include <png\.h>|#include <libpng/png.h>|g' {} \; +} + +build() { + cd "${srcdir}/freetype-${pkgver}" + source android-env ${_android_arch} + + export C_INCLUDE_PATH="${ANDROID_PREFIX_INCLUDE}" + export LIBRARY_PATH="${ANDROID_PREFIX_LIB}" + bzip2opt=enabled + + # Platform specific patches + case "$_android_arch" in + x86) + bzip2opt=disabled + ;; + *) + ;; + esac + + mkdir -p build + cd build + android-${_android_arch}-meson \ + --default-library both \ + -D zlib=enabled \ + -D bzip2="${bzip2opt}" \ + -D png=enabled \ + -D harfbuzz=disabled \ + -D brotli=enabled \ + -D b_lto=false + ninja +} + +package() { + cd "${srcdir}/freetype-${pkgver}/build" + DESTDIR="${pkgdir}" ninja install + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so + ${ANDROID_RANLIB} "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a +} |