diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-27 09:57:18 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-27 09:57:18 +0100 |
commit | c70685892bc3f0b09aea1216ff278f6095f21281 (patch) | |
tree | 4f39843e13c4d3bfd7d02fcfde9adf66af6063b0 /media-libs/fontconfig/files | |
parent | 6e8f2ebdce568f2c6c7870edbb9db5324a0e300f (diff) |
gentoo auto-resync : 27:10:2022 - 09:57:18
Diffstat (limited to 'media-libs/fontconfig/files')
-rw-r--r-- | media-libs/fontconfig/files/fontconfig-2.14.1-gperf-meson-debugging.patch | 23 | ||||
-rw-r--r-- | media-libs/fontconfig/files/fontconfig-2.14.1-gperf-meson.patch | 79 |
2 files changed, 102 insertions, 0 deletions
diff --git a/media-libs/fontconfig/files/fontconfig-2.14.1-gperf-meson-debugging.patch b/media-libs/fontconfig/files/fontconfig-2.14.1-gperf-meson-debugging.patch new file mode 100644 index 000000000000..fb5e8a14f8b8 --- /dev/null +++ b/media-libs/fontconfig/files/fontconfig-2.14.1-gperf-meson-debugging.patch @@ -0,0 +1,23 @@ +https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/240 +https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/335 + +From c42eb5b503a44b0b062b041d2e8a0138ce21a0c7 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH <akira@tagoh.org> +Date: Thu, 27 Oct 2022 12:32:07 +0900 +Subject: [PATCH] Fix the build issue on meson when -g option is added to + c_args + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/335 +--- a/src/cutout.py ++++ b/src/cutout.py +@@ -24,7 +24,8 @@ if __name__== '__main__': + break + + cpp = args[1] +- ret = subprocess.run(cpp + host_cargs + [args[0].input], stdout=subprocess.PIPE, check=True) ++ cpp_args = [i for i in host_cargs + [args[0].input] if not i.startswith('-g')] ++ ret = subprocess.run(cpp + cpp_args, stdout=subprocess.PIPE, check=True) + + stdout = ret.stdout.decode('utf8') + +GitLab diff --git a/media-libs/fontconfig/files/fontconfig-2.14.1-gperf-meson.patch b/media-libs/fontconfig/files/fontconfig-2.14.1-gperf-meson.patch new file mode 100644 index 000000000000..5565012cad65 --- /dev/null +++ b/media-libs/fontconfig/files/fontconfig-2.14.1-gperf-meson.patch @@ -0,0 +1,79 @@ +https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/a07e2f1e8ad049772cd24b7daa0a4a168f33bfba.patch + +From a07e2f1e8ad049772cd24b7daa0a4a168f33bfba Mon Sep 17 00:00:00 2001 +From: Christopher Degawa <ccom@randomderp.com> +Date: Tue, 25 Oct 2022 14:41:05 -0500 +Subject: [PATCH] meson: modify gperf test to remove sh dependency + +modifies the gperf test to instead rely on a file input +rather than piping in using sh, as sh is often not reliable +on Windows due to paths. + +Also changes the if else ladder into a foreach loop. + +Signed-off-by: Christopher Degawa <ccom@randomderp.com> +--- /dev/null ++++ b/meson-cc-tests/gperf.txt +@@ -0,0 +1 @@ ++foo,bar +--- a/meson.build ++++ b/meson.build +@@ -315,39 +315,33 @@ if fc_configdir.startswith(fc_baseconfigdir + '/') + fonts_conf.set('CONFIGDIR', fc_configdir.split(fc_baseconfigdir + '/')[1]) + endif + +-# It will automatically fallback to subproject if not found on system +-gperf = find_program('gperf') ++gperf = find_program('gperf', required: false) ++gperf_len_type = '' + +-sh = find_program('sh', required : false) +- +-if not sh.found() # host_machine.system() == 'windows' or not sh.found() +- # TODO: This is not always correct +- if cc.get_id() == 'msvc' +- gperf_len_type = 'size_t' +- else +- gperf_len_type = 'unsigned' +- endif +-else ++if gperf.found() + gperf_test_format = ''' + #include <string.h> + const char * in_word_set(const char *, @0@); + @1@ + ''' +- gperf_snippet_format = 'echo foo,bar | @0@ -L ANSI-C' +- gperf_snippet = run_command(sh, '-c', gperf_snippet_format.format(gperf.full_path()), +- check: true) +- gperf_test = gperf_test_format.format('size_t', gperf_snippet.stdout()) ++ gperf_snippet = run_command(gperf, '-L', 'ANSI-C', files('meson-cc-tests/gperf.txt'), ++ check: true).stdout() + +- if cc.compiles(gperf_test) +- gperf_len_type = 'size_t' +- else +- gperf_test = gperf_test_format.format('unsigned', gperf_snippet.stdout()) +- if cc.compiles(gperf_test) +- gperf_len_type = 'unsigned' +- else +- error('unable to determine gperf len type') ++ foreach type : ['size_t', 'unsigned'] ++ if cc.compiles(gperf_test_format.format(type, gperf_snippet)) ++ gperf_len_type = type ++ break + endif ++ endforeach ++ ++ if gperf_len_type == '' ++ error('unable to determine gperf len type') + endif ++else ++ # Fallback to subproject ++ gperf = find_program('gperf') ++ # assume if we are compiling from the wrap, the size is just size_t ++ gperf_len_type = 'size_t' + endif + + message('gperf len type is @0@'.format(gperf_len_type)) +GitLab |