wok-next view glib/stuff/patches/glib-2.54.3-meson_fixes-1.patch @ rev 20921
flake8 -> python-flake8
| author | Aleksej Bobylev <al.bobylev@gmail.com> |
|---|---|
| date | Wed Aug 22 11:18:36 2018 +0300 (2018-08-22) |
| parents | |
| children |
line source
1 Submitted by: DJ Lucas (dj_AT_linuxfromscratch_DOT_org)
2 Date: 2017-11-04
3 Initial Package Version: 2.54.2
4 Upstream Status: Not submitted
5 Origin: Based on Arch Linux patches and upstream
6 Description: Fixes several build issue with meson
8 Update: Reset for version 2.54.3 2018-01-12 bdubbs_AT_linuxfromscratch_DOT_org
10 diff -Naurp glib-2.54.2-orig/config.h.meson glib-2.54.2/config.h.meson
11 --- glib-2.54.2-orig/config.h.meson 2017-10-27 17:42:46.000000000 -0500
12 +++ glib-2.54.2/config.h.meson 2017-11-02 20:25:23.523120928 -0500
13 @@ -247,6 +247,9 @@
14 /* Define if libelf is available */
15 #mesondefine HAVE_LIBELF
17 +/* Define if libmount is available */
18 +#mesondefine HAVE_LIBMOUNT
19 +
20 /* Define to 1 if you have the <linux/magic.h> header file. */
21 #mesondefine HAVE_LINUX_MAGIC_H
23 diff -Naurp glib-2.54.2-orig/docs/reference/gio/meson.build glib-2.54.2/docs/reference/gio/meson.build
24 --- glib-2.54.2-orig/docs/reference/gio/meson.build 2017-07-14 14:14:02.000000000 -0500
25 +++ glib-2.54.2/docs/reference/gio/meson.build 2017-11-02 20:25:23.523120928 -0500
26 @@ -52,9 +52,12 @@ if get_option('with-docs') != 'no'
27 'gnetworkmonitorbase.h',
28 'gnetworkmonitornetlink.h',
29 'gnetworkmonitornm.h',
30 + 'gnetworkmonitorportal.h',
31 'gnotificationbackend.h',
32 'gnotification-private.h',
33 + 'gosxappinfo.h',
34 'gpollfilemonitor.h',
35 + 'gproxyresolverportal.h',
36 'gregistrysettingsbackend.h',
37 'gresourcefile.h',
38 'gsettingsbackendinternal.h',
39 @@ -95,12 +98,22 @@ if get_option('with-docs') != 'no'
40 configuration: version_conf
41 )
43 + # Meson uses paths relative to meson.source_root() in dependencies,
44 + # which is invalid relative to current_source_dir(), so the compile
45 + # process fails to find glib headers
46 + top_build_dir = meson.build_root()
47 + top_source_dir = meson.source_root()
48 + glib_top_build_dir = join_paths(top_build_dir, 'glib')
49 + glib_top_source_dir = join_paths(top_source_dir, 'glib')
50 +
51 + scan_dep = declare_dependency(include_directories : [ top_source_dir, glib_top_build_dir, glib_top_source_dir ])
52 +
53 gnome.gtkdoc('gio',
54 main_xml : 'gio-docs.xml',
55 namespace : 'g',
56 gobject_typesfile : 'gio.types',
57 mode : 'none',
58 - dependencies : [libgio_dep, libgobject_dep, libglib_dep],
59 + dependencies : [libgio_dep, libgobject_dep, libglib_dep, scan_dep],
60 src_dir : 'gio',
61 scan_args : [
62 '--rebuild-types',
63 diff -Naurp glib-2.54.2-orig/docs/reference/gobject/meson.build glib-2.54.2/docs/reference/gobject/meson.build
64 --- glib-2.54.2-orig/docs/reference/gobject/meson.build 2017-07-14 14:14:02.000000000 -0500
65 +++ glib-2.54.2/docs/reference/gobject/meson.build 2017-11-02 20:25:23.523120928 -0500
66 @@ -17,12 +17,23 @@ if get_option('with-docs') != 'no'
67 configuration: version_conf
68 )
70 + # Meson uses paths relative to meson.source_root() in dependencies,
71 + # which is invalid relative to current_source_dir(), so the compile
72 + # process fails to find glib headers
73 + doc_source_dir = meson.current_source_dir()
74 + top_build_dir = meson.build_root()
75 + top_source_dir = meson.source_root()
76 + glib_top_build_dir = join_paths(top_build_dir, 'glib')
77 + glib_top_source_dir = join_paths(top_source_dir, 'glib')
78 +
79 + scan_dep = declare_dependency(include_directories : [ doc_source_dir, top_source_dir, glib_top_build_dir, glib_top_source_dir ])
80 +
81 gnome.gtkdoc('gobject',
82 main_xml : 'gobject-docs.xml',
83 namespace : 'g',
84 gobject_typesfile : join_paths(meson.current_source_dir(), 'gobject.types'),
85 mode : 'none',
86 - dependencies : [libgobject_dep, libglib_dep],
87 + dependencies : [libgobject_dep, libglib_dep, scan_dep],
88 src_dir : 'gobject',
89 scan_args : [
90 '--deprecated-guards=G_DISABLE_DEPRECATED',
91 diff -Naurp glib-2.54.2-orig/gio/gdbus-2.0/codegen/meson.build glib-2.54.2/gio/gdbus-2.0/codegen/meson.build
92 --- glib-2.54.2-orig/gio/gdbus-2.0/codegen/meson.build 2017-10-27 17:42:46.000000000 -0500
93 +++ glib-2.54.2/gio/gdbus-2.0/codegen/meson.build 2017-11-02 20:25:23.523120928 -0500
94 @@ -13,7 +13,6 @@ gdbus_codegen_conf.set('VERSION', glib_v
95 gdbus_codegen_conf.set('PYTHON', python.path())
97 # Install gdbus-codegen executable
98 -# FIXME: Set permissions
99 gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
100 output : 'gdbus-codegen',
101 install : true,
102 diff -Naurp glib-2.54.2-orig/gio/meson.build glib-2.54.2/gio/meson.build
103 --- glib-2.54.2-orig/gio/meson.build 2017-10-27 17:42:46.000000000 -0500
104 +++ glib-2.54.2/gio/meson.build 2017-11-02 20:25:23.523120928 -0500
105 @@ -727,7 +727,7 @@ libgio = shared_library('gio-2.0',
106 libgobject_dep, libgmodule_dep] + platform_deps + network_libs,
107 c_args : gio_c_args,
108 # intl.lib is not compatible with SAFESEH
109 - link_args : noseh_link_args,
110 + link_args : noseh_link_args + library_link_args,
111 )
113 libgio_dep = declare_dependency(link_with : libgio,
114 diff -Naurp glib-2.54.2-orig/gio/tests/gengiotypefuncs.py glib-2.54.2/gio/tests/gengiotypefuncs.py
115 diff -Naurp glib-2.54.2-orig/glib/meson.build glib-2.54.2/glib/meson.build
116 --- glib-2.54.2-orig/glib/meson.build 2017-10-02 09:17:23.000000000 -0500
117 +++ glib-2.54.2/glib/meson.build 2017-11-02 20:25:23.523120928 -0500
118 @@ -227,7 +227,7 @@ libglib = shared_library('glib-2.0',
119 soversion : soversion,
120 install : true,
121 # intl.lib is not compatible with SAFESEH
122 - link_args : noseh_link_args,
123 + link_args : noseh_link_args + library_link_args,
124 include_directories : configinc,
125 link_with : [charset_lib, gnulib_lib],
126 dependencies : [pcre, thread_dep, libintl, librt] + libiconv + platform_deps,
127 @@ -283,8 +283,9 @@ configure_file(
128 input: 'libglib-gdb.py.in',
129 output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version),
130 configuration: gdb_conf,
131 - install: true,
132 - install_dir: join_paths(get_option('datadir'), 'gdb/auto-load' + get_option('libdir'))
133 + # FIXME: Figure out how to install this on Windows
134 + install: host_system != 'windows',
135 + install_dir: join_paths(glib_datadir, 'gdb', 'auto-load', './' + glib_libdir)
136 )
138 if enable_systemtap
139 diff -Naurp glib-2.54.2-orig/gmodule/meson.build glib-2.54.2/gmodule/meson.build
140 --- glib-2.54.2-orig/gmodule/meson.build 2017-07-14 14:14:02.000000000 -0500
141 +++ glib-2.54.2/gmodule/meson.build 2017-11-02 20:25:23.523120928 -0500
142 @@ -37,7 +37,7 @@ elif cc.has_function('NSLinkModule')
143 elif cc.links(dlopen_dlsym_test_code, args : '-ldl', name : 'dlopen() and dlsym() in libdl')
144 g_module_impl = 'G_MODULE_IMPL_DL'
145 libdl_dep = cc.find_library('dl')
146 - g_module_lib_args = '-ldl'
147 + g_module_lib_args = ['-ldl']
148 endif
150 # additional checks for G_MODULE_IMPL_DL
151 @@ -72,6 +72,10 @@ if g_module_impl == ''
152 message('WARNING: No suitable GModule implementation found!')
153 endif
155 +# For pc files
156 +glib_conf.set('G_MODULE_SUPPORTED', g_module_impl == '0' ? 'false' : 'true')
157 +glib_conf.set('G_MODULE_LIBS', ' '.join(g_module_lib_args))
158 +
159 gmoduleconf_conf.set('G_MODULE_IMPL', g_module_impl)
160 gmoduleconf_conf.set('G_MODULE_SUPPORTED', g_module_impl != '0')
161 gmoduleconf_conf.set('G_MODULE_HAVE_DLERROR', g_module_have_dlerror)
162 @@ -91,6 +95,7 @@ libgmodule = shared_library('gmodule-2.0
163 install : true,
164 include_directories : [configinc, gmoduleinc],
165 dependencies : [libdl_dep, libglib_dep],
166 + link_args : library_link_args,
167 c_args : ['-DG_LOG_DOMAIN="GModule"', '-DG_DISABLE_DEPRECATED'] + glib_hidden_visibility_args)
169 libgmodule_dep = declare_dependency(link_with : libgmodule,
170 diff -Naurp glib-2.54.2-orig/gobject/meson.build glib-2.54.2/gobject/meson.build
171 --- glib-2.54.2-orig/gobject/meson.build 2017-10-27 17:42:46.000000000 -0500
172 +++ glib-2.54.2/gobject/meson.build 2017-11-02 20:25:23.523120928 -0500
173 @@ -61,6 +61,7 @@ libgobject = shared_library('gobject-2.0
174 install : true,
175 include_directories : [configinc],
176 dependencies : [libintl, libffi_dep, libglib_dep],
177 + link_args : library_link_args,
178 c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION'] + glib_hidden_visibility_args)
180 libgobject_dep = declare_dependency(link_with : libgobject,
181 @@ -76,7 +77,6 @@ python_tools_conf.set('VERSION', glib_ve
182 python_tools_conf.set('PYTHON', python.path())
184 foreach tool: python_tools
185 - # FIXME: Ensure we set the appropriate permissions
186 tool_bin = configure_file(
187 input : tool + '.in',
188 output : tool,
189 @@ -101,8 +101,9 @@ configure_file(
190 input: 'libgobject-gdb.py.in',
191 output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
192 configuration: gdb_conf,
193 - install: true,
194 - install_dir: join_paths(get_option('datadir'), 'gdb/auto-load/' + get_option('libdir'))
195 + # FIXME: Figure out how to install this on Windows
196 + install: host_system != 'windows',
197 + install_dir: join_paths(glib_datadir, 'gdb', 'auto-load', './' + glib_libdir)
198 )
200 if enable_systemtap
201 diff -Naurp glib-2.54.2-orig/gthread/meson.build glib-2.54.2/gthread/meson.build
202 --- glib-2.54.2-orig/gthread/meson.build 2017-07-14 14:14:02.000000000 -0500
203 +++ glib-2.54.2/gthread/meson.build 2017-11-02 20:25:23.523120928 -0500
204 @@ -6,4 +6,5 @@ libgthread = shared_library('gthread-2.0
205 soversion : soversion,
206 install : true,
207 dependencies : [libglib_dep],
208 + link_args : library_link_args,
209 c_args : ['-DG_LOG_DOMAIN="GThread"' ] + glib_hidden_visibility_args)
210 diff -Naurp glib-2.54.2-orig/meson.build glib-2.54.2/meson.build
211 --- glib-2.54.2-orig/meson.build 2017-10-27 17:42:46.000000000 -0500
212 +++ glib-2.54.2/meson.build 2017-11-02 20:25:23.523120928 -0500
213 @@ -1484,7 +1484,7 @@ libmount_opt = get_option('enable-libmou
214 if host_system == 'linux' and libmount_opt != 'no'
215 libmount_dep = [dependency('mount', version : '>=2.28', required : false)]
216 if not libmount_dep[0].found()
217 - libmount_dep = [cc.find_library('mount')]
218 + libmount_dep = [cc.find_library('mount', required : false)]
219 libmount_h = cc.has_header('libmount/libmount.h')
220 libmount_needed = libmount_opt == 'yes' and host_system == 'linux'
221 if libmount_needed and (not libmount_dep[0].found() or not libmount_h)
222 @@ -1527,12 +1527,20 @@ if use_system_pcre
223 endif
224 if libmount_dep.length() == 1 and libmount_dep[0].found()
225 glib_conf.set('LIBMOUNT_LIBS', '-lmount')
226 + glib_conf.set('HAVE_LIBMOUNT', 1)
227 endif
228 glib_conf.set('GIO_MODULE_DIR', '${libdir}/gio/modules')
229 # FIXME: Missing:
230 # @G_MODULE_LIBS@ @SELINUX_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@ @G_LIBS_EXTRA@
231 # @PCRE_REQUIRES@ @GLIB_EXTRA_CFLAGS@ @G_THREAD_CFLAGS@
233 +# HACK
234 +glib_conf.set('G_THREAD_LIBS', '-pthread')
235 +glib_conf.set('G_THREAD_CFLAGS', '-pthread')
236 +glib_conf.set('G_MODULE_LDFLAGS', '-Wl,--export-dynamic')
237 +glib_conf.set('PCRE_REQUIRES', 'libpcre')
238 +library_link_args = [ '-Wl,-z,nodelete' ]
239 +
240 # Tracing: dtrace
241 want_dtrace = get_option('enable-dtrace')
242 enable_dtrace = false