Warning, /graphics/krita/3rdparty/ext_fontconfig/0002-fontconfig-Enable-tool-CLI-option-handling-24553.patch is written in an unsupported language. File is not indexed.
0001 From 6c91a8a164eeda98f828e1e9bc9f01f12edbf575 Mon Sep 17 00:00:00 2001 0002 From: Alonso Schaich <alonso@freebsd.org> 0003 Date: Mon, 9 May 2022 21:34:42 +0000 0004 Subject: [PATCH 2/2] [fontconfig] Enable tool CLI option handling (#24553) 0005 0006 Co-Authored-By: L. E. Segovia <amy@amyspark.me> 0007 --- 0008 fc-cache/meson.build | 1 + 0009 fc-cat/meson.build | 1 + 0010 fc-conflist/meson.build | 1 + 0011 fc-list/meson.build | 1 + 0012 fc-match/meson.build | 1 + 0013 fc-pattern/meson.build | 1 + 0014 fc-query/meson.build | 2 +- 0015 fc-scan/meson.build | 2 +- 0016 fc-validate/meson.build | 2 +- 0017 meson.build | 22 +++++++++++++++++++--- 0018 10 files changed, 28 insertions(+), 6 deletions(-) 0019 0020 diff --git a/fc-cache/meson.build b/fc-cache/meson.build 0021 index 5e40fac..3c3e46b 100644 0022 --- a/fc-cache/meson.build 0023 +++ b/fc-cache/meson.build 0024 @@ -1,6 +1,7 @@ 0025 fccache = executable('fc-cache', ['fc-cache.c', fcstdint_h, alias_headers, ft_alias_headers], 0026 include_directories: [incbase, incsrc], 0027 link_with: [libfontconfig], 0028 + dependencies: [getopt_dep], 0029 c_args: c_args, 0030 install: true, 0031 ) 0032 diff --git a/fc-cat/meson.build b/fc-cat/meson.build 0033 index f26e4b8..476c0f9 100644 0034 --- a/fc-cat/meson.build 0035 +++ b/fc-cat/meson.build 0036 @@ -1,6 +1,7 @@ 0037 fccat = executable('fc-cat', ['fc-cat.c', fcstdint_h, alias_headers, ft_alias_headers], 0038 include_directories: [incbase, incsrc], 0039 link_with: [libfontconfig], 0040 + dependencies: [getopt_dep], 0041 c_args: c_args, 0042 install: true, 0043 ) 0044 diff --git a/fc-conflist/meson.build b/fc-conflist/meson.build 0045 index f543cf9..f06640b 100644 0046 --- a/fc-conflist/meson.build 0047 +++ b/fc-conflist/meson.build 0048 @@ -1,6 +1,7 @@ 0049 fcconflist = executable('fc-conflist', ['fc-conflist.c', fcstdint_h, alias_headers, ft_alias_headers], 0050 include_directories: [incbase, incsrc], 0051 link_with: [libfontconfig], 0052 + dependencies: [getopt_dep], 0053 c_args: c_args, 0054 install: true, 0055 ) 0056 diff --git a/fc-list/meson.build b/fc-list/meson.build 0057 index 2f679d5..4b0fb62 100644 0058 --- a/fc-list/meson.build 0059 +++ b/fc-list/meson.build 0060 @@ -1,6 +1,7 @@ 0061 fclist = executable('fc-list', ['fc-list.c', fcstdint_h, alias_headers, ft_alias_headers], 0062 include_directories: [incbase, incsrc], 0063 link_with: [libfontconfig], 0064 + dependencies: [getopt_dep], 0065 c_args: c_args, 0066 install: true, 0067 ) 0068 diff --git a/fc-match/meson.build b/fc-match/meson.build 0069 index aca8bc8..cab4f09 100644 0070 --- a/fc-match/meson.build 0071 +++ b/fc-match/meson.build 0072 @@ -1,6 +1,7 @@ 0073 fcmatch = executable('fc-match', ['fc-match.c', fcstdint_h, alias_headers, ft_alias_headers], 0074 include_directories: [incbase, incsrc], 0075 link_with: [libfontconfig], 0076 + dependencies: [getopt_dep], 0077 c_args: c_args, 0078 install: true, 0079 ) 0080 diff --git a/fc-pattern/meson.build b/fc-pattern/meson.build 0081 index 07de245..b957c67 100644 0082 --- a/fc-pattern/meson.build 0083 +++ b/fc-pattern/meson.build 0084 @@ -1,6 +1,7 @@ 0085 fcpattern = executable('fc-pattern', ['fc-pattern.c', fcstdint_h, alias_headers, ft_alias_headers], 0086 include_directories: [incbase, incsrc], 0087 link_with: [libfontconfig], 0088 + dependencies: [getopt_dep], 0089 c_args: c_args, 0090 install: true, 0091 ) 0092 diff --git a/fc-query/meson.build b/fc-query/meson.build 0093 index d0f2dd4..940b021 100644 0094 --- a/fc-query/meson.build 0095 +++ b/fc-query/meson.build 0096 @@ -1,7 +1,7 @@ 0097 fcquery = executable('fc-query', ['fc-query.c', fcstdint_h, alias_headers, ft_alias_headers], 0098 include_directories: [incbase, incsrc], 0099 link_with: [libfontconfig], 0100 - dependencies: [freetype_dep], 0101 + dependencies: [freetype_dep, getopt_dep], 0102 c_args: c_args, 0103 install: true, 0104 ) 0105 diff --git a/fc-scan/meson.build b/fc-scan/meson.build 0106 index 4de2134..c5b2b67 100644 0107 --- a/fc-scan/meson.build 0108 +++ b/fc-scan/meson.build 0109 @@ -1,7 +1,7 @@ 0110 fcscan = executable('fc-scan', ['fc-scan.c', fcstdint_h, alias_headers, ft_alias_headers], 0111 include_directories: [incbase, incsrc], 0112 link_with: [libfontconfig], 0113 - dependencies: [freetype_dep], 0114 + dependencies: [freetype_dep, getopt_dep], 0115 c_args: c_args, 0116 install: true, 0117 ) 0118 diff --git a/fc-validate/meson.build b/fc-validate/meson.build 0119 index e2b956e..8902d59 100644 0120 --- a/fc-validate/meson.build 0121 +++ b/fc-validate/meson.build 0122 @@ -1,7 +1,7 @@ 0123 fcvalidate = executable('fc-validate', ['fc-validate.c', fcstdint_h, alias_headers, ft_alias_headers], 0124 include_directories: [incbase, incsrc], 0125 link_with: [libfontconfig], 0126 - dependencies: [freetype_dep], 0127 + dependencies: [freetype_dep, getopt_dep], 0128 c_args: c_args, 0129 install: true, 0130 ) 0131 diff --git a/meson.build b/meson.build 0132 index f616600..081cd7e 100644 0133 --- a/meson.build 0134 +++ b/meson.build 0135 @@ -202,6 +202,23 @@ if cc.links(files('meson-cc-tests/solaris-atomic-operations.c'), name: 'Solaris 0136 conf.set('HAVE_SOLARIS_ATOMIC_OPS', 1) 0137 endif 0138 0139 +if host_machine.system() == 'windows' 0140 + if cc.has_function('getopt', prefix : '#include <getopt.h>') 0141 + conf.set('HAVE_GETOPT', 1) 0142 + endif 0143 + if cc.has_function('getopt_long', prefix : '#include <getopt.h>') 0144 + conf.set('HAVE_GETOPT_LONG', 1) 0145 + endif 0146 + is_msvc_like = ['msvc', 'clang-cl'].contains(cc.get_id()) 0147 + if is_msvc_like 0148 + getopt_dep = cc.find_library('getopt', required: false) 0149 + else 0150 + getopt_dep = dependency('', required: false) 0151 + endif 0152 +else 0153 + getopt_dep = dependency('', required: false) 0154 +endif 0155 + 0156 0157 prefix = get_option('prefix') 0158 0159 @@ -258,9 +275,8 @@ gperf = find_program('gperf') 0160 0161 sh = find_program('sh', required : false) 0162 0163 -if not sh.found() # host_machine.system() == 'windows' or not sh.found() 0164 - # TODO: This is not always correct 0165 - if cc.get_id() == 'msvc' 0166 +if not sh.found() 0167 + if host_machine.system() == 'windows' 0168 gperf_len_type = 'size_t' 0169 else 0170 gperf_len_type = 'unsigned' 0171 -- 0172 2.32.0.windows.2 0173