diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2022-05-24 01:41:33 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2022-12-07 02:10:17 +0000 |
commit | 6e8251009aad6f1e463fc13ba00a230543d6fda9 (patch) | |
tree | 5328deaf6ec404bab327e677af9168f78ccde33c | |
parent | a3631176b56425625eec0da900ef67b23bb05a7d (diff) |
fontconfig: update to 2.14.0
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1366
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1037>
7 files changed, 10 insertions, 232 deletions
diff --git a/recipes/fontconfig.recipe b/recipes/fontconfig.recipe index d7decb55..d6210fdf 100644 --- a/recipes/fontconfig.recipe +++ b/recipes/fontconfig.recipe @@ -5,24 +5,15 @@ from cerbero.tools.libtool import get_libtool_versions class Recipe(recipe.Recipe): name = 'fontconfig' - version = '2.13.93' + version = '2.14.0' stype = SourceType.TARBALL - url = 'https://www.freedesktop.org/software/fontconfig/release/fontconfig-%(version)s.tar.gz' - tarball_checksum = '0f302a18ee52dde0793fe38b266bf269dfe6e0c0ae140e30d72c6cca5dc08db5' + url = 'https://www.freedesktop.org/software/fontconfig/release/fontconfig-%(version)s.tar.xz' + tarball_checksum = 'dcbeb84c9c74bbfdb133d535fe1c7bedc9f2221a8daf3914b984c44c520e9bac' licenses = [{License.MIT: ['COPYING']}] btype = BuildType.MESON meson_options = {'doc': 'disabled', 'tests': 'disabled', 'tools': 'disabled'} deps = ['expat', 'freetype', 'zlib', 'bzip2'] patches = [ - # From git master post-2.13.93 - 'fontconfig/0001-meson-error-out-in-script-if-gperf-preprocessing-fai.patch', - # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/138/ - 'fontconfig/0001-handle-absolute-sysconfdir-when-installing-symlinks.patch', - # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/165 - 'fontconfig/0001-meson-fix-cross-compilation-issues-with-gperf-header.patch', - # From git master post-2.13.93 - 'fontconfig/0001-Windows-Fix-symlink-privilege-error-detection.patch', - 'fontconfig/0001-Overwrite-symlinks-for-config-files.patch', # Proper fix is pending, upstream issue is: # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/247 'fontconfig/0001-fcobjs-Remove-duplicate-function-prototypes.patch', diff --git a/recipes/fontconfig/0001-Overwrite-symlinks-for-config-files.patch b/recipes/fontconfig/0001-Overwrite-symlinks-for-config-files.patch deleted file mode 100644 index 17e0cf0d..00000000 --- a/recipes/fontconfig/0001-Overwrite-symlinks-for-config-files.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 615e2cb844a7eb266aa562071a26093ae3ec4d28 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH <akira@tagoh.org> -Date: Tue, 2 Mar 2021 19:29:08 +0900 -Subject: [PATCH] Overwrite symlinks for config files - -In Makefile, we are trying to remove old symlinks first and then create a symlink. -do the same thing in meson too. - -Also, the line of the exception handling for FileExistsError is meaningless -as the above line is taking care of it instead and we shouldn't ignore it if -os.remove and os.symlink doesn't work somehow. - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/275 ---- - conf.d/link_confs.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/conf.d/link_confs.py b/conf.d/link_confs.py -index 5a78d8d..e195095 100644 ---- a/conf.d/link_confs.py -+++ b/conf.d/link_confs.py -@@ -20,6 +20,10 @@ if __name__=='__main__': - for link in args.links: - src = os.path.join(args.availpath, link) - dst = os.path.join(confpath, link) -+ try: -+ os.remove(dst) -+ except FileNotFoundError: -+ pass - try: - os.symlink(src, dst) - except NotImplementedError: -@@ -30,5 +34,3 @@ if __name__=='__main__': - if platform.system().lower() == 'windows' and e.winerror == 1314: - break - raise -- except FileExistsError: -- pass --- -2.31.1.windows.1 - diff --git a/recipes/fontconfig/0001-Windows-Fix-symlink-privilege-error-detection.patch b/recipes/fontconfig/0001-Windows-Fix-symlink-privilege-error-detection.patch deleted file mode 100644 index 8412560e..00000000 --- a/recipes/fontconfig/0001-Windows-Fix-symlink-privilege-error-detection.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7bfbaecf819a8b1630dfc8f56126e31f985d5fb3 Mon Sep 17 00:00:00 2001 -From: Xavier Claessens <xavier.claessens@collabora.com> -Date: Fri, 29 Jan 2021 19:17:38 -0500 -Subject: [PATCH] Windows: Fix symlink privilege error detection - -The message is in e.args[1] and not e.args[0] at least with python 3.8. -Should be more future proof like this in case it change again. ---- - conf.d/link_confs.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/conf.d/link_confs.py b/conf.d/link_confs.py -index 0c42efb..5a78d8d 100644 ---- a/conf.d/link_confs.py -+++ b/conf.d/link_confs.py -@@ -3,6 +3,7 @@ - import os - import sys - import argparse -+import platform - - if __name__=='__main__': - parser = argparse.ArgumentParser() -@@ -26,7 +27,7 @@ if __name__=='__main__': - break - except OSError as e: - # Symlink privileges are not available -- if len(e.args) == 1 and 'privilege' in e.args[0]: -+ if platform.system().lower() == 'windows' and e.winerror == 1314: - break - raise - except FileExistsError: --- -2.31.1.windows.1 - diff --git a/recipes/fontconfig/0001-fcobjs-Remove-duplicate-function-prototypes.patch b/recipes/fontconfig/0001-fcobjs-Remove-duplicate-function-prototypes.patch index de6ee0dc..c542e2e5 100644 --- a/recipes/fontconfig/0001-fcobjs-Remove-duplicate-function-prototypes.patch +++ b/recipes/fontconfig/0001-fcobjs-Remove-duplicate-function-prototypes.patch @@ -1,4 +1,4 @@ -From cfc6475fcdb94e60840227f3b12f45e99719d2a2 Mon Sep 17 00:00:00 2001 +From 6287527c316a5dfb783b4f82d9b2d9702e9d8728 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan <nirbheek@centricular.com> Date: Wed, 2 Jun 2021 17:16:41 +0530 Subject: [PATCH] fcobjs: Remove duplicate function prototypes @@ -32,7 +32,7 @@ let the header define it. 3 files changed, 62 deletions(-) diff --git a/configure.ac b/configure.ac -index faee5b0..e239da0 100644 +index da69f8d..fff20f2 100644 --- a/configure.ac +++ b/configure.ac @@ -208,26 +208,6 @@ fi @@ -63,12 +63,12 @@ index faee5b0..e239da0 100644 # Checks for iconv # diff --git a/meson.build b/meson.build -index 3c96f1f..8151498 100644 +index f616600..0dd1f69 100644 --- a/meson.build +++ b/meson.build -@@ -247,42 +247,6 @@ if not gperf.found() - gperf = find_program('gperf') - endif +@@ -256,42 +256,6 @@ endif + # It will automatically fallback to subproject if not found on system + gperf = find_program('gperf') -sh = find_program('sh', required : false) - @@ -127,5 +127,5 @@ index 33bba8d..b0d660f 100644 #include <string.h> -- -2.31.1.windows.1 +2.36.1 diff --git a/recipes/fontconfig/0001-handle-absolute-sysconfdir-when-installing-symlinks.patch b/recipes/fontconfig/0001-handle-absolute-sysconfdir-when-installing-symlinks.patch deleted file mode 100644 index e3ac53a1..00000000 --- a/recipes/fontconfig/0001-handle-absolute-sysconfdir-when-installing-symlinks.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 4912e1b58e2297c13857ec08fccf77221f106cd6 Mon Sep 17 00:00:00 2001 -From: Heiko Becker <heirecka@exherbo.org> -Date: Thu, 3 Dec 2020 21:04:26 +0100 -Subject: [PATCH] Handle absolute sysconfdir when installing symlinks - -sysconfdir defaults to /etc when the prefix is set to /usr. But joining -MESON_INSTALL_DESTDIR_PREFIX and sysconfdir when the latter is an -absoulte path, results in sysconfdir only. Which might lead to an error -during install because /etc/fonts/conf.d/ might already exist from an -pre-existing fontconfig installation. ---- - conf.d/link_confs.py | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/conf.d/link_confs.py b/conf.d/link_confs.py -index 0c42efb5..bafaf3a8 100644 ---- a/conf.d/link_confs.py -+++ b/conf.d/link_confs.py -@@ -11,7 +11,14 @@ if __name__=='__main__': - parser.add_argument('links', nargs='+') - args = parser.parse_args() - -- confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath) -+ if os.path.isabs(args.confpath): -+ destdir = os.environ.get('DESTDIR') -+ if destdir: -+ confpath = os.path.join(destdir, args.confpath[1:]) -+ else: -+ confpath = args.confpath -+ else: -+ confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath) - - if not os.path.exists(confpath): - os.makedirs(confpath) --- -GitLab - diff --git a/recipes/fontconfig/0001-meson-error-out-in-script-if-gperf-preprocessing-fai.patch b/recipes/fontconfig/0001-meson-error-out-in-script-if-gperf-preprocessing-fai.patch deleted file mode 100644 index 99e7d8a4..00000000 --- a/recipes/fontconfig/0001-meson-error-out-in-script-if-gperf-preprocessing-fai.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5bfb9bcbea916ca6bd62fa459978a33e47d8ad3d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> -Date: Thu, 31 Dec 2020 15:04:10 +0000 -Subject: [PATCH] meson: error out in script if gperf preprocessing failed - ---- - src/cutout.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/cutout.py b/src/cutout.py -index 6fa55a3..96cafd2 100644 ---- a/src/cutout.py -+++ b/src/cutout.py -@@ -12,7 +12,7 @@ if __name__== '__main__': - print (args[0].output) - - cpp = args[1] -- ret = subprocess.run(cpp + [args[0].input], stdout=subprocess.PIPE) -+ ret = subprocess.run(cpp + [args[0].input], stdout=subprocess.PIPE, check=True) - - stdout = ret.stdout.decode('utf8') - --- -2.29.2 - diff --git a/recipes/fontconfig/0001-meson-fix-cross-compilation-issues-with-gperf-header.patch b/recipes/fontconfig/0001-meson-fix-cross-compilation-issues-with-gperf-header.patch deleted file mode 100644 index ef854695..00000000 --- a/recipes/fontconfig/0001-meson-fix-cross-compilation-issues-with-gperf-header.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 15dd8e71cd9b702ab3def1d2fe885fa0a8e6815d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> -Date: Sun, 17 Jan 2021 12:51:59 +0000 -Subject: [PATCH] meson: fix cross-compilation issues with gperf header file - preprocessing - -Pass c_args to the compiler when preprocessing the gperf header file, -they might contain important bits without which compilation/preprocessing -might fail (e.g. with clang on Android). cc.cmd_array() does not include -the c_args and we can't easily look them up from the meson.build file, so -we have retrieve them ourselves from the introspection info. ---- - src/cutout.py | 16 ++++++++++++++-- - src/meson.build | 5 ++++- - 2 files changed, 18 insertions(+), 3 deletions(-) - -diff --git a/src/cutout.py b/src/cutout.py -index 96cafd2..323eec8 100644 ---- a/src/cutout.py -+++ b/src/cutout.py -@@ -1,5 +1,6 @@ - import argparse - import subprocess -+import json - import os - import re - -@@ -7,12 +8,23 @@ if __name__== '__main__': - parser = argparse.ArgumentParser() - parser.add_argument('input') - parser.add_argument('output') -+ parser.add_argument('buildroot') - - args = parser.parse_known_args() -- print (args[0].output) -+ -+ # c_args might contain things that are essential for crosscompilation, but -+ # are not included in cc.cmd_array(), so we have to look them up ourselves -+ host_cargs = [] -+ buildroot = args[0].buildroot -+ with open(os.path.join(buildroot, 'meson-info', 'intro-buildoptions.json')) as json_file: -+ bopts = json.load(json_file) -+ for opt in bopts: -+ if opt['name'] == 'c_args' and opt['section'] == 'compiler' and opt['machine'] == 'host': -+ host_cargs = opt['value'] -+ break - - cpp = args[1] -- ret = subprocess.run(cpp + [args[0].input], stdout=subprocess.PIPE, check=True) -+ ret = subprocess.run(cpp + host_cargs + [args[0].input], stdout=subprocess.PIPE, check=True) - - stdout = ret.stdout.decode('utf8') - -diff --git a/src/meson.build b/src/meson.build -index f2a4861..7f9bf31 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -44,10 +44,13 @@ endif - - cpp += ['-I', join_paths(meson.current_source_dir(), '..')] - -+# Can use meson.project_build_dir() once we require Meson 0.56 -+project_build_dir = meson.current_build_dir() / '..' -+ - fcobjshash_gperf = custom_target('fcobjshash.gperf', - input: 'fcobjshash.gperf.h', - output: 'fcobjshash.gperf', -- command: [python3, files('cutout.py')[0], '@INPUT@', '@OUTPUT@', cpp], -+ command: [python3, files('cutout.py')[0], '@INPUT@', '@OUTPUT@', project_build_dir, cpp], - build_by_default: true, - ) - --- -2.29.2 - |