2016-03-07 12:13:24 +01:00
|
|
|
gio_c_args = [
|
|
|
|
'-DG_LOG_DOMAIN="GLib-GIO"',
|
2022-07-14 15:28:11 +02:00
|
|
|
'-DGIO_LAUNCH_DESKTOP="@0@"'.format(glib_prefix / multiarch_libexecdir / 'gio-launch-desktop'),
|
2016-12-20 23:37:24 +01:00
|
|
|
'-DGIO_MODULE_DIR="@0@"'.format(glib_giomodulesdir),
|
2021-02-24 12:58:49 +01:00
|
|
|
'-DLOCALSTATEDIR="@0@"'.format(glib_localstatedir),
|
2016-03-07 12:13:24 +01:00
|
|
|
]
|
|
|
|
|
2022-10-05 23:45:07 +02:00
|
|
|
gio_c_args_internal = [
|
|
|
|
'-DGIO_COMPILATION',
|
|
|
|
]
|
|
|
|
|
2022-10-24 20:31:45 +02:00
|
|
|
# Install empty glib_giomodulesdir
|
|
|
|
install_emptydir(glib_giomodulesdir)
|
2022-10-24 14:13:04 +02:00
|
|
|
|
2022-10-24 20:31:45 +02:00
|
|
|
gio_includedir = glib_includedir / 'gio'
|
2016-12-06 14:07:03 +01:00
|
|
|
|
2016-03-07 12:13:24 +01:00
|
|
|
gnetworking_h_conf = configuration_data()
|
|
|
|
|
|
|
|
gnetworking_h_nameser_compat_include = ''
|
|
|
|
|
2020-12-29 18:47:34 +01:00
|
|
|
if host_system not in ['windows', 'android']
|
2017-12-11 04:48:18 +01:00
|
|
|
# Don't check for C_IN on Android since it does not define it in public
|
|
|
|
# headers, we define it ourselves wherever necessary
|
2016-03-07 12:13:24 +01:00
|
|
|
if not cc.compiles('''#include <sys/types.h>
|
|
|
|
#include <arpa/nameser.h>
|
|
|
|
int qclass = C_IN;''',
|
|
|
|
name : 'C_IN in public headers (no arpa/nameser_compat.h needed)')
|
|
|
|
if cc.compiles('''#include <sys/types.h>
|
|
|
|
#include <arpa/nameser.h>
|
|
|
|
#include <arpa/nameser_compat.h>
|
|
|
|
int qclass = C_IN;''',
|
|
|
|
name : 'arpa/nameser_compat.h needed for C_IN')
|
|
|
|
gnetworking_h_nameser_compat_include = '#include <arpa/nameser_compat.h>'
|
|
|
|
else
|
|
|
|
error('Could not find required includes for ARPA C_IN')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
network_libs = [ ]
|
|
|
|
network_args = [ ]
|
2016-12-20 23:37:24 +01:00
|
|
|
if host_system != 'windows'
|
2016-03-07 12:13:24 +01:00
|
|
|
# res_query()
|
|
|
|
res_query_test = '''#include <resolv.h>
|
|
|
|
int main (int argc, char ** argv) {
|
|
|
|
return res_query("test", 0, 0, (void *)0, 0);
|
|
|
|
}'''
|
|
|
|
res_query_test_full = '''#include <sys/types.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <arpa/nameser.h>
|
|
|
|
''' + res_query_test
|
|
|
|
if not cc.links(res_query_test_full, name : 'res_query()')
|
|
|
|
if cc.links(res_query_test_full, args : '-lresolv', name : 'res_query() in -lresolv')
|
2016-12-20 23:37:24 +01:00
|
|
|
network_libs += [ cc.find_library('resolv') ]
|
2016-03-07 12:13:24 +01:00
|
|
|
network_args += [ '-lresolv' ]
|
|
|
|
elif cc.links(res_query_test, args : '-lbind', name : 'res_query() in -lbind')
|
2016-12-20 23:37:24 +01:00
|
|
|
network_libs += [ cc.find_library('bind') ]
|
2016-03-07 12:13:24 +01:00
|
|
|
network_args += [ '-lbind' ]
|
2015-03-25 17:35:44 +01:00
|
|
|
elif cc.links(res_query_test, args : '-lsocket', name : 'res_query() in -lsocket')
|
|
|
|
network_libs += [ cc.find_library('socket') ]
|
|
|
|
network_args += [ '-lsocket' ]
|
2016-03-07 12:13:24 +01:00
|
|
|
else
|
|
|
|
error('Could not find res_query()')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# socket()
|
|
|
|
socket_test = '''#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
int main (int argc, char ** argv) {
|
|
|
|
return socket(1, 2, 3);
|
|
|
|
}'''
|
|
|
|
if not cc.links(socket_test, name : 'socket()')
|
|
|
|
if cc.links(socket_test, args : '-lsocket', name : 'socket() in -lsocket')
|
2016-12-20 23:37:24 +01:00
|
|
|
network_libs += [ cc.find_library('socket') ]
|
2016-03-07 12:13:24 +01:00
|
|
|
network_args += [ '-lsocket' ]
|
|
|
|
else
|
|
|
|
error('Could not find socket()')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2022-03-18 15:22:38 +01:00
|
|
|
# dn_comp()
|
|
|
|
if cc.links('''#include <resolv.h>
|
|
|
|
int main (int argc, char ** argv) {
|
|
|
|
return dn_comp(NULL, NULL, 0, NULL, NULL) == -1;
|
|
|
|
} ''', args : network_args, name : 'dn_comp()')
|
|
|
|
glib_conf.set('HAVE_DN_COMP', 1)
|
|
|
|
endif
|
|
|
|
|
gio: Port GThreadedResolver to use res_nquery() to fix thread-safety
res_query() uses global state in the form of the struct __res_state
which contains the contents of resolv.conf (and other things). On Linux,
this state seems to be thread-local, so there is no problem. On OS X,
however, it is not, and hence multiple res_query() calls from parallel
threads will compete and return bogus results.
The fix for this is to use res_nquery(), introduced in BIND 8.2, which
takes an explicit state argument. This allows us to manually store the
state thread-locally. If res_nquery() isn’t available, we fall back to
res_query(). It should be available on OS X though. As a data point,
it’s available on Fedora 27.
There’s a slight complication in the fact that OS X requires the state
to be freed using res_ndestroy() rather than res_nclose(). Linux uses
res_nclose().
(See, for example, the NetBSD man page:
https://www.unix.com/man-page/netbsd/3/res_ninit/. The Linux one is
incomplete and not so useful:
http://man7.org/linux/man-pages/man3/resolver.3.html.)
The new code will call res_ninit() once per res_nquery() task. This is
not optimal, but no worse than before — since res_query() was being
called in a worker thread, on Linux, it would implicitly initialise the
thread-local struct __res_state when it was called. We’ve essentially
just made that explicit. In practical terms, this means a
stat("/etc/resolv.conf") call per res_nquery() task.
In future, we could improve this by using an explicit thread pool with
some manually-created worker threads, each of which initialises a struct
__res_state on spawning, and only updates it on receiving
the #GResolver::reload signal.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=792050
2018-01-05 15:26:35 +01:00
|
|
|
# res_nclose()
|
|
|
|
if cc.links('''#include <sys/types.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <arpa/nameser.h>
|
|
|
|
#include <resolv.h>
|
|
|
|
int main (int argc, char ** argv) {
|
|
|
|
struct __res_state res;
|
2018-02-09 20:01:45 +01:00
|
|
|
res_nclose(&res);
|
|
|
|
return 0;
|
gio: Port GThreadedResolver to use res_nquery() to fix thread-safety
res_query() uses global state in the form of the struct __res_state
which contains the contents of resolv.conf (and other things). On Linux,
this state seems to be thread-local, so there is no problem. On OS X,
however, it is not, and hence multiple res_query() calls from parallel
threads will compete and return bogus results.
The fix for this is to use res_nquery(), introduced in BIND 8.2, which
takes an explicit state argument. This allows us to manually store the
state thread-locally. If res_nquery() isn’t available, we fall back to
res_query(). It should be available on OS X though. As a data point,
it’s available on Fedora 27.
There’s a slight complication in the fact that OS X requires the state
to be freed using res_ndestroy() rather than res_nclose(). Linux uses
res_nclose().
(See, for example, the NetBSD man page:
https://www.unix.com/man-page/netbsd/3/res_ninit/. The Linux one is
incomplete and not so useful:
http://man7.org/linux/man-pages/man3/resolver.3.html.)
The new code will call res_ninit() once per res_nquery() task. This is
not optimal, but no worse than before — since res_query() was being
called in a worker thread, on Linux, it would implicitly initialise the
thread-local struct __res_state when it was called. We’ve essentially
just made that explicit. In practical terms, this means a
stat("/etc/resolv.conf") call per res_nquery() task.
In future, we could improve this by using an explicit thread pool with
some manually-created worker threads, each of which initialises a struct
__res_state on spawning, and only updates it on receiving
the #GResolver::reload signal.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=792050
2018-01-05 15:26:35 +01:00
|
|
|
}''', args : network_args, name : 'res_nclose()')
|
|
|
|
glib_conf.set('HAVE_RES_NCLOSE', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# res_ndestroy()
|
|
|
|
if cc.links('''#include <sys/types.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <arpa/nameser.h>
|
|
|
|
#include <resolv.h>
|
|
|
|
int main (int argc, char ** argv) {
|
|
|
|
struct __res_state res;
|
2018-02-09 20:01:45 +01:00
|
|
|
res_ndestroy(&res);
|
|
|
|
return 0;
|
gio: Port GThreadedResolver to use res_nquery() to fix thread-safety
res_query() uses global state in the form of the struct __res_state
which contains the contents of resolv.conf (and other things). On Linux,
this state seems to be thread-local, so there is no problem. On OS X,
however, it is not, and hence multiple res_query() calls from parallel
threads will compete and return bogus results.
The fix for this is to use res_nquery(), introduced in BIND 8.2, which
takes an explicit state argument. This allows us to manually store the
state thread-locally. If res_nquery() isn’t available, we fall back to
res_query(). It should be available on OS X though. As a data point,
it’s available on Fedora 27.
There’s a slight complication in the fact that OS X requires the state
to be freed using res_ndestroy() rather than res_nclose(). Linux uses
res_nclose().
(See, for example, the NetBSD man page:
https://www.unix.com/man-page/netbsd/3/res_ninit/. The Linux one is
incomplete and not so useful:
http://man7.org/linux/man-pages/man3/resolver.3.html.)
The new code will call res_ninit() once per res_nquery() task. This is
not optimal, but no worse than before — since res_query() was being
called in a worker thread, on Linux, it would implicitly initialise the
thread-local struct __res_state when it was called. We’ve essentially
just made that explicit. In practical terms, this means a
stat("/etc/resolv.conf") call per res_nquery() task.
In future, we could improve this by using an explicit thread pool with
some manually-created worker threads, each of which initialises a struct
__res_state on spawning, and only updates it on receiving
the #GResolver::reload signal.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=792050
2018-01-05 15:26:35 +01:00
|
|
|
}''', args : network_args, name : 'res_ndestroy()')
|
|
|
|
glib_conf.set('HAVE_RES_NDESTROY', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# res_ninit()
|
|
|
|
if cc.links('''#include <sys/types.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <arpa/nameser.h>
|
|
|
|
#include <resolv.h>
|
|
|
|
int main (int argc, char ** argv) {
|
|
|
|
struct __res_state res;
|
|
|
|
return res_ninit(&res);
|
|
|
|
}''', args : network_args, name : 'res_ninit()')
|
|
|
|
glib_conf.set('HAVE_RES_NINIT', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# res_nquery()
|
|
|
|
if cc.links('''#include <sys/types.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <arpa/nameser.h>
|
|
|
|
#include <resolv.h>
|
|
|
|
int main (int argc, char ** argv) {
|
|
|
|
struct __res_state res;
|
|
|
|
return res_nquery(&res, "test", 0, 0, (void *)0, 0);
|
|
|
|
}''', args : network_args, name : 'res_nquery()')
|
|
|
|
glib_conf.set('HAVE_RES_NQUERY', 1)
|
|
|
|
endif
|
|
|
|
|
2018-04-20 18:07:59 +02:00
|
|
|
if cc.has_type('struct ip_mreqn', prefix : '#include <netinet/in.h>')
|
|
|
|
glib_conf.set('HAVE_IP_MREQN', 1)
|
2016-03-07 12:13:24 +01:00
|
|
|
endif
|
2014-11-27 01:04:25 +01:00
|
|
|
|
|
|
|
if cc.compiles('''#include <sys/ioctl.h>
|
|
|
|
#include <net/if.h>
|
|
|
|
int main (int argc, char ** argv) {
|
|
|
|
struct ifreq ifr;
|
|
|
|
ioctl(0, SIOCGIFADDR, &ifr);
|
|
|
|
return 0;
|
|
|
|
}''',
|
|
|
|
name : 'ioctl with request SIOCGIFADDR')
|
|
|
|
glib_conf.set('HAVE_SIOCGIFADDR', '/**/')
|
|
|
|
endif
|
|
|
|
|
2018-08-03 10:15:46 +02:00
|
|
|
endif
|
|
|
|
|
2020-12-29 18:47:34 +01:00
|
|
|
if host_system == 'android'
|
2018-08-03 10:15:46 +02:00
|
|
|
# struct ip_mreq_source definition is broken on Android NDK <= r16
|
|
|
|
# See https://bugzilla.gnome.org/show_bug.cgi?id=740791
|
2018-04-23 17:47:17 +02:00
|
|
|
if not cc.compiles('''#include <netinet/in.h>
|
|
|
|
int main(int argc, char ** argv) {
|
|
|
|
struct ip_mreq_source mc_req_src;
|
|
|
|
mc_req_src.imr_interface.s_addr = 0;
|
|
|
|
return 0;
|
|
|
|
}''',
|
|
|
|
name : 'ip_mreq_source.imr_interface has s_addr member')
|
|
|
|
glib_conf.set('BROKEN_IP_MREQ_SOURCE_STRUCT', 1)
|
|
|
|
endif
|
2016-03-07 12:13:24 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
gnetworking_h_conf.set('NAMESER_COMPAT_INCLUDE', gnetworking_h_nameser_compat_include)
|
|
|
|
|
|
|
|
gnetworking_h = configure_file(input : 'gnetworking.h.in',
|
|
|
|
output : 'gnetworking.h',
|
2022-10-24 14:13:04 +02:00
|
|
|
install_dir : gio_includedir,
|
2023-09-01 22:22:28 +02:00
|
|
|
install_tag : 'devel',
|
2016-03-07 12:13:24 +01:00
|
|
|
configuration : gnetworking_h_conf)
|
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
gdbus_headers = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gdbusauthobserver.h',
|
|
|
|
'gcredentials.h',
|
|
|
|
'gdbusutils.h',
|
|
|
|
'gdbuserror.h',
|
|
|
|
'gdbusaddress.h',
|
|
|
|
'gdbusconnection.h',
|
|
|
|
'gdbusmessage.h',
|
|
|
|
'gdbusnameowning.h',
|
|
|
|
'gdbusnamewatching.h',
|
|
|
|
'gdbusproxy.h',
|
|
|
|
'gdbusintrospection.h',
|
|
|
|
'gdbusmethodinvocation.h',
|
|
|
|
'gdbusserver.h',
|
|
|
|
'gdbusinterface.h',
|
|
|
|
'gdbusinterfaceskeleton.h',
|
|
|
|
'gdbusobject.h',
|
|
|
|
'gdbusobjectskeleton.h',
|
|
|
|
'gdbusobjectproxy.h',
|
|
|
|
'gdbusobjectmanager.h',
|
|
|
|
'gdbusobjectmanagerclient.h',
|
|
|
|
'gdbusobjectmanagerserver.h',
|
|
|
|
'gtestdbus.h',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
gdbus_sources = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gdbusutils.c',
|
|
|
|
'gdbusaddress.c',
|
|
|
|
'gdbusauthobserver.c',
|
|
|
|
'gdbusauth.c',
|
|
|
|
'gdbusauthmechanism.c',
|
|
|
|
'gdbusauthmechanismanon.c',
|
|
|
|
'gdbusauthmechanismexternal.c',
|
|
|
|
'gdbusauthmechanismsha1.c',
|
|
|
|
'gdbuserror.c',
|
|
|
|
'gdbusconnection.c',
|
|
|
|
'gdbusmessage.c',
|
|
|
|
'gdbusnameowning.c',
|
|
|
|
'gdbusnamewatching.c',
|
|
|
|
'gdbusproxy.c',
|
|
|
|
'gdbusprivate.c',
|
|
|
|
'gdbusintrospection.c',
|
|
|
|
'gdbusmethodinvocation.c',
|
|
|
|
'gdbusserver.c',
|
|
|
|
'gdbusinterface.c',
|
|
|
|
'gdbusinterfaceskeleton.c',
|
|
|
|
'gdbusobject.c',
|
|
|
|
'gdbusobjectskeleton.c',
|
|
|
|
'gdbusobjectproxy.c',
|
|
|
|
'gdbusobjectmanager.c',
|
|
|
|
'gdbusobjectmanagerclient.c',
|
|
|
|
'gdbusobjectmanagerserver.c',
|
|
|
|
'gtestdbus.c',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
# Generate gdbus-codegen
|
|
|
|
subdir('gdbus-2.0/codegen')
|
|
|
|
|
2016-12-21 02:04:47 +01:00
|
|
|
# Generate xdp-dbus.{c,h}
|
|
|
|
xdp_dbus_generated = custom_target('xdp-dbus',
|
|
|
|
input : ['org.freedesktop.portal.Documents.xml',
|
2017-07-14 01:34:21 +02:00
|
|
|
'org.freedesktop.portal.OpenURI.xml',
|
2018-08-23 06:24:42 +02:00
|
|
|
'org.freedesktop.portal.ProxyResolver.xml',
|
|
|
|
'org.freedesktop.portal.Trash.xml'],
|
2016-12-21 02:04:47 +01:00
|
|
|
output : ['xdp-dbus.h', 'xdp-dbus.c'],
|
2022-11-24 13:09:55 +01:00
|
|
|
depend_files : gdbus_codegen_built_files,
|
2023-10-25 12:20:36 +02:00
|
|
|
depends : gdbus_codegen_built_targets,
|
2016-12-21 02:04:47 +01:00
|
|
|
command : [python, gdbus_codegen,
|
|
|
|
'--interface-prefix', 'org.freedesktop.portal.',
|
2017-07-12 08:15:38 +02:00
|
|
|
'--output-directory', '@OUTDIR@',
|
|
|
|
'--generate-c-code', 'xdp-dbus',
|
2016-12-21 02:04:47 +01:00
|
|
|
'--c-namespace', 'GXdp',
|
|
|
|
'@INPUT@'])
|
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
# Generate gdbus-generated.{c,h}
|
|
|
|
gdbus_daemon_generated = custom_target('gdbus-daemon-generated',
|
|
|
|
input : ['dbus-daemon.xml'],
|
|
|
|
output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'],
|
2022-11-24 13:09:55 +01:00
|
|
|
depend_files : gdbus_codegen_built_files,
|
2023-10-25 12:20:36 +02:00
|
|
|
depends : gdbus_codegen_built_targets,
|
2016-12-20 23:37:24 +01:00
|
|
|
command : [python, gdbus_codegen,
|
|
|
|
'--interface-prefix', 'org.',
|
2017-07-12 08:15:38 +02:00
|
|
|
'--output-directory', '@OUTDIR@',
|
|
|
|
'--generate-c-code', 'gdbus-daemon-generated',
|
2016-12-20 23:37:24 +01:00
|
|
|
'--c-namespace', '_G', '@INPUT@'])
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
settings_headers = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gsettingsbackend.h',
|
|
|
|
'gsettingsschema.h',
|
|
|
|
'gsettings.h',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
settings_sources = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gdelayedsettingsbackend.c',
|
|
|
|
'gkeyfilesettingsbackend.c',
|
|
|
|
'gmemorysettingsbackend.c',
|
|
|
|
'gnullsettingsbackend.c',
|
|
|
|
'gsettingsbackend.c',
|
|
|
|
'gsettingsschema.c',
|
|
|
|
'gsettings-mapping.c',
|
|
|
|
'gsettings.c',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
application_headers = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gapplication.h',
|
|
|
|
'gapplicationcommandline.h',
|
|
|
|
|
|
|
|
'gactiongroup.h',
|
|
|
|
'gactionmap.h',
|
|
|
|
'gsimpleactiongroup.h',
|
|
|
|
'gremoteactiongroup.h',
|
|
|
|
'gactiongroupexporter.h',
|
|
|
|
'gdbusactiongroup.h',
|
|
|
|
'gaction.h',
|
|
|
|
'gpropertyaction.h',
|
|
|
|
'gsimpleaction.h',
|
|
|
|
|
|
|
|
'gmenumodel.h',
|
|
|
|
'gmenu.h',
|
|
|
|
'gmenuexporter.h',
|
|
|
|
'gdbusmenumodel.h',
|
|
|
|
'gnotification.h',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
application_sources = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gapplication.c',
|
|
|
|
'gapplicationcommandline.c',
|
|
|
|
'gapplicationimpl-dbus.c',
|
|
|
|
|
|
|
|
'gactiongroup.c',
|
|
|
|
'gactionmap.c',
|
|
|
|
'gsimpleactiongroup.c',
|
|
|
|
'gremoteactiongroup.c',
|
|
|
|
'gactiongroupexporter.c',
|
|
|
|
'gdbusactiongroup.c',
|
|
|
|
'gaction.c',
|
|
|
|
'gpropertyaction.c',
|
|
|
|
'gsimpleaction.c',
|
|
|
|
|
|
|
|
'gmenumodel.c',
|
|
|
|
'gmenu.c',
|
|
|
|
'gmenuexporter.c',
|
|
|
|
'gdbusmenumodel.c',
|
|
|
|
'gnotification.c',
|
|
|
|
'gnotificationbackend.c',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
local_sources = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'ghttpproxy.c',
|
|
|
|
'glocalfile.c',
|
|
|
|
'glocalfileenumerator.c',
|
|
|
|
'glocalfileinfo.c',
|
|
|
|
'glocalfileinputstream.c',
|
|
|
|
'glocalfilemonitor.c',
|
|
|
|
'glocalfileoutputstream.c',
|
|
|
|
'glocalfileiostream.c',
|
|
|
|
'glocalvfs.c',
|
|
|
|
'gsocks4proxy.c',
|
|
|
|
'gsocks4aproxy.c',
|
|
|
|
'gsocks5proxy.c',
|
|
|
|
'thumbnail-verify.c',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
platform_deps = []
|
|
|
|
internal_deps = []
|
|
|
|
appinfo_sources = []
|
2017-05-13 12:10:52 +02:00
|
|
|
contenttype_sources = []
|
2016-12-21 02:04:47 +01:00
|
|
|
portal_sources = []
|
2016-12-20 23:37:24 +01:00
|
|
|
unix_sources = []
|
2017-11-24 07:36:27 +01:00
|
|
|
win32_sources = []
|
|
|
|
|
|
|
|
# This is also used by tests/gdbus-daemon, so use files() to include the path
|
|
|
|
gdbus_daemon_sources = [
|
|
|
|
files('gdbusdaemon.c'),
|
|
|
|
gdbus_daemon_generated,
|
|
|
|
]
|
2016-12-21 02:04:47 +01:00
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
if host_system != 'windows'
|
2017-11-23 18:30:25 +01:00
|
|
|
unix_sources = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gfiledescriptorbased.c',
|
2021-01-19 22:14:41 +01:00
|
|
|
'giounix-private.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gunixfdmessage.c',
|
|
|
|
'gunixmount.c',
|
|
|
|
'gunixmounts.c',
|
|
|
|
'gunixvolume.c',
|
|
|
|
'gunixvolumemonitor.c',
|
|
|
|
'gunixinputstream.c',
|
|
|
|
'gunixoutputstream.c',
|
|
|
|
'gfdonotificationbackend.c',
|
|
|
|
'ggtknotificationbackend.c',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
portal_sources = [files(
|
2022-10-31 13:36:46 +01:00
|
|
|
'gdocumentportal.c',
|
|
|
|
'gopenuriportal.c',
|
|
|
|
'gmemorymonitorportal.c',
|
|
|
|
'gnetworkmonitorportal.c',
|
|
|
|
'gpowerprofilemonitorportal.c',
|
|
|
|
'gproxyresolverportal.c',
|
|
|
|
'gtrashportal.c',
|
|
|
|
'gportalsupport.c',
|
|
|
|
'gportalnotificationbackend.c',
|
|
|
|
'gsandbox.c',
|
|
|
|
),
|
2016-12-21 02:04:47 +01:00
|
|
|
xdp_dbus_generated
|
|
|
|
]
|
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
gio_unix_include_headers = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gfiledescriptorbased.h',
|
|
|
|
'gunixmounts.h',
|
|
|
|
'gunixfdmessage.h',
|
|
|
|
'gunixinputstream.h',
|
|
|
|
'gunixoutputstream.h',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2017-05-13 12:10:52 +02:00
|
|
|
|
|
|
|
if glib_have_cocoa
|
2018-05-23 15:16:27 +02:00
|
|
|
settings_sources += files('gnextstepsettingsbackend.m')
|
|
|
|
contenttype_sources += files('gosxcontenttype.m')
|
|
|
|
appinfo_sources += files('gosxappinfo.m')
|
2021-12-31 18:31:00 +01:00
|
|
|
framework_dep = dependency('appleframeworks', modules : ['Foundation', 'CoreFoundation', 'AppKit'])
|
|
|
|
platform_deps += [framework_dep]
|
2017-05-13 12:10:52 +02:00
|
|
|
if glib_have_os_x_9_or_later
|
2018-05-23 15:16:27 +02:00
|
|
|
unix_sources += files('gcocoanotificationbackend.m')
|
2017-05-13 12:10:52 +02:00
|
|
|
endif
|
2019-03-14 09:08:30 +01:00
|
|
|
application_headers += files('gosxappinfo.h')
|
2017-05-13 12:10:52 +02:00
|
|
|
else
|
2017-11-23 18:30:25 +01:00
|
|
|
contenttype_sources += files('gcontenttype.c')
|
|
|
|
appinfo_sources += files('gdesktopappinfo.c')
|
|
|
|
gio_unix_include_headers += files('gdesktopappinfo.h')
|
2022-07-14 15:30:30 +02:00
|
|
|
launch_desktop_sources = files('gio-launch-desktop.c')
|
2022-07-14 13:02:51 +02:00
|
|
|
|
2022-07-14 15:30:30 +02:00
|
|
|
if host_system == 'linux'
|
|
|
|
launch_desktop_sources += files('../glib/gjournal-private.c')
|
|
|
|
endif
|
|
|
|
|
|
|
|
gio_launch_desktop = executable('gio-launch-desktop', launch_desktop_sources,
|
|
|
|
include_directories : glibinc,
|
2022-07-14 13:02:51 +02:00
|
|
|
install : true,
|
2022-07-14 15:28:11 +02:00
|
|
|
install_dir : multiarch_libexecdir,
|
2022-09-09 19:56:35 +02:00
|
|
|
install_tag : 'bin',
|
2022-07-14 13:02:51 +02:00
|
|
|
c_args : gio_c_args,
|
|
|
|
# intl.lib is not compatible with SAFESEH
|
|
|
|
link_args : noseh_link_args)
|
2017-05-13 12:10:52 +02:00
|
|
|
endif
|
|
|
|
|
2018-05-23 15:16:35 +02:00
|
|
|
subdir('xdgmime')
|
|
|
|
internal_deps += [xdgmime_lib]
|
|
|
|
|
2016-03-07 12:13:24 +01:00
|
|
|
install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio')
|
|
|
|
|
|
|
|
if glib_conf.has('HAVE_NETLINK')
|
2017-11-23 18:30:25 +01:00
|
|
|
unix_sources += files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gnetworkmonitornetlink.c',
|
|
|
|
'gnetworkmonitornm.c',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
endif
|
2017-11-24 07:36:27 +01:00
|
|
|
else
|
2017-11-23 18:30:25 +01:00
|
|
|
appinfo_sources += files('gwin32appinfo.c')
|
|
|
|
contenttype_sources += files('gcontenttype-win32.c')
|
2016-12-20 23:37:24 +01:00
|
|
|
platform_deps += [cc.find_library('shlwapi'),
|
|
|
|
cc.find_library('dnsapi'),
|
2017-07-18 16:19:54 +02:00
|
|
|
iphlpapi_dep,
|
2016-12-20 23:37:24 +01:00
|
|
|
winsock2]
|
2020-06-04 17:13:33 +02:00
|
|
|
platform_deps += uwp_gio_deps
|
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
win32_sources += files(
|
2022-01-23 21:36:56 +01:00
|
|
|
'gmemorymonitorwin32.c',
|
2023-04-14 19:00:01 +02:00
|
|
|
'gregistrysettingsbackend.c',
|
2016-12-20 23:37:24 +01:00
|
|
|
'gwin32registrykey.c',
|
|
|
|
'gwin32mount.c',
|
|
|
|
'gwin32volumemonitor.c',
|
|
|
|
'gwin32inputstream.c',
|
|
|
|
'gwin32outputstream.c',
|
2020-06-04 17:02:02 +02:00
|
|
|
'gwin32file-sync-stream.c',
|
2020-06-04 17:13:33 +02:00
|
|
|
'gwin32packageparser.c',
|
2018-01-17 13:55:11 +01:00
|
|
|
'gwin32networkmonitor.c',
|
|
|
|
'gwin32networkmonitor.h',
|
2018-03-21 16:48:52 +01:00
|
|
|
'gwin32notificationbackend.c',
|
2022-01-12 14:21:23 +01:00
|
|
|
'gwin32sid.c',
|
|
|
|
'gwin32sid.h',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-12-14 13:32:56 +01:00
|
|
|
gio_win_rc = configure_file(
|
|
|
|
input: 'gio.rc.in',
|
|
|
|
output: 'gio.rc',
|
|
|
|
configuration: glibconfig_conf,
|
|
|
|
)
|
|
|
|
gio_win_res = windows.compile_resources(gio_win_rc)
|
|
|
|
win32_sources += [gio_win_res]
|
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
gio_win32_include_headers = files(
|
2023-04-14 19:00:01 +02:00
|
|
|
'gregistrysettingsbackend.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gwin32inputstream.h',
|
|
|
|
'gwin32outputstream.h',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
install_headers(gio_win32_include_headers, subdir : 'gio-win32-2.0/gio')
|
|
|
|
endif
|
|
|
|
|
2023-10-13 13:57:57 +02:00
|
|
|
gio_base_sources = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gappinfo.c',
|
|
|
|
'gasynchelper.c',
|
|
|
|
'gasyncinitable.c',
|
|
|
|
'gasyncresult.c',
|
|
|
|
'gbufferedinputstream.c',
|
|
|
|
'gbufferedoutputstream.c',
|
|
|
|
'gbytesicon.c',
|
|
|
|
'gcancellable.c',
|
|
|
|
'gcharsetconverter.c',
|
|
|
|
'gcontextspecificgroup.c',
|
|
|
|
'gconverter.c',
|
|
|
|
'gconverterinputstream.c',
|
|
|
|
'gconverteroutputstream.c',
|
|
|
|
'gcredentials.c',
|
|
|
|
'gdatagrambased.c',
|
|
|
|
'gdatainputstream.c',
|
|
|
|
'gdataoutputstream.c',
|
2021-11-11 11:56:50 +01:00
|
|
|
'gdebugcontroller.c',
|
|
|
|
'gdebugcontrollerdbus.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gdrive.c',
|
|
|
|
'gdummyfile.c',
|
|
|
|
'gdummyproxyresolver.c',
|
|
|
|
'gdummytlsbackend.c',
|
|
|
|
'gemblem.c',
|
|
|
|
'gemblemedicon.c',
|
|
|
|
'gfile.c',
|
|
|
|
'gfileattribute.c',
|
|
|
|
'gfileenumerator.c',
|
|
|
|
'gfileicon.c',
|
|
|
|
'gfileinfo.c',
|
|
|
|
'gfileinputstream.c',
|
|
|
|
'gfilemonitor.c',
|
|
|
|
'gfilenamecompleter.c',
|
|
|
|
'gfileoutputstream.c',
|
|
|
|
'gfileiostream.c',
|
|
|
|
'gfilterinputstream.c',
|
|
|
|
'gfilteroutputstream.c',
|
|
|
|
'gicon.c',
|
|
|
|
'ginetaddress.c',
|
|
|
|
'ginetaddressmask.c',
|
|
|
|
'ginetsocketaddress.c',
|
|
|
|
'ginitable.c',
|
|
|
|
'ginputstream.c',
|
|
|
|
'gioerror.c',
|
|
|
|
'giomodule.c',
|
2017-11-30 21:36:21 +01:00
|
|
|
'giomodule-priv.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gioscheduler.c',
|
|
|
|
'giostream.c',
|
|
|
|
'gloadableicon.c',
|
2019-05-31 04:29:18 +02:00
|
|
|
'gmarshal-internal.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gmount.c',
|
2019-07-25 15:52:09 +02:00
|
|
|
'gmemorymonitor.c',
|
|
|
|
'gmemorymonitordbus.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gmemoryinputstream.c',
|
|
|
|
'gmemoryoutputstream.c',
|
|
|
|
'gmountoperation.c',
|
|
|
|
'gnativesocketaddress.c',
|
2019-08-29 14:29:00 +02:00
|
|
|
'gnativevolumemonitor.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gnetworkaddress.c',
|
|
|
|
'gnetworking.c',
|
|
|
|
'gnetworkmonitor.c',
|
|
|
|
'gnetworkmonitorbase.c',
|
|
|
|
'gnetworkservice.c',
|
|
|
|
'goutputstream.c',
|
|
|
|
'gpermission.c',
|
|
|
|
'gpollableinputstream.c',
|
|
|
|
'gpollableoutputstream.c',
|
|
|
|
'gpollableutils.c',
|
|
|
|
'gpollfilemonitor.c',
|
2021-07-20 23:04:31 +02:00
|
|
|
'gpowerprofilemonitor.c',
|
|
|
|
'gpowerprofilemonitordbus.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gproxy.c',
|
|
|
|
'gproxyaddress.c',
|
|
|
|
'gproxyaddressenumerator.c',
|
|
|
|
'gproxyresolver.c',
|
|
|
|
'gresolver.c',
|
|
|
|
'gresource.c',
|
|
|
|
'gresourcefile.c',
|
|
|
|
'gseekable.c',
|
|
|
|
'gsimpleasyncresult.c',
|
|
|
|
'gsimpleiostream.c',
|
|
|
|
'gsimplepermission.c',
|
2019-08-29 14:29:00 +02:00
|
|
|
'gsimpleproxyresolver.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gsocket.c',
|
|
|
|
'gsocketaddress.c',
|
|
|
|
'gsocketaddressenumerator.c',
|
|
|
|
'gsocketclient.c',
|
|
|
|
'gsocketconnectable.c',
|
|
|
|
'gsocketconnection.c',
|
|
|
|
'gsocketcontrolmessage.c',
|
|
|
|
'gsocketinputstream.c',
|
|
|
|
'gsocketlistener.c',
|
|
|
|
'gsocketoutputstream.c',
|
|
|
|
'gsocketservice.c',
|
|
|
|
'gsrvtarget.c',
|
2019-08-29 14:29:00 +02:00
|
|
|
'gsubprocesslauncher.c',
|
|
|
|
'gsubprocess.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gtask.c',
|
|
|
|
'gtcpconnection.c',
|
|
|
|
'gtcpwrapperconnection.c',
|
|
|
|
'gthemedicon.c',
|
2019-08-29 14:29:00 +02:00
|
|
|
'gthreadedsocketservice.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gthreadedresolver.c',
|
|
|
|
'gthreadedresolver.h',
|
|
|
|
'gtlsbackend.c',
|
|
|
|
'gtlscertificate.c',
|
|
|
|
'gtlsclientconnection.c',
|
|
|
|
'gtlsconnection.c',
|
|
|
|
'gtlsdatabase.c',
|
|
|
|
'gtlsfiledatabase.c',
|
|
|
|
'gtlsinteraction.c',
|
|
|
|
'gtlspassword.c',
|
|
|
|
'gtlsserverconnection.c',
|
|
|
|
'gdtlsconnection.c',
|
|
|
|
'gdtlsclientconnection.c',
|
|
|
|
'gdtlsserverconnection.c',
|
|
|
|
'gunionvolumemonitor.c',
|
2022-01-19 12:52:15 +01:00
|
|
|
'gunixconnection.c',
|
2022-04-07 15:59:00 +02:00
|
|
|
'gunixfdlist.c',
|
2022-01-19 12:49:44 +01:00
|
|
|
'gunixcredentialsmessage.c',
|
2022-01-18 21:00:39 +01:00
|
|
|
'gunixsocketaddress.c',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gvfs.c',
|
|
|
|
'gvolume.c',
|
|
|
|
'gvolumemonitor.c',
|
|
|
|
'gzlibcompressor.c',
|
|
|
|
'gzlibdecompressor.c',
|
|
|
|
'glistmodel.c',
|
|
|
|
'gliststore.c',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2023-10-13 13:57:57 +02:00
|
|
|
gio_sources = gio_base_sources
|
|
|
|
|
2022-10-20 00:51:34 +02:00
|
|
|
if glib_build_shared
|
2022-06-20 22:09:51 +02:00
|
|
|
gio_sources += files ('../glib/gtrace.c')
|
|
|
|
endif
|
|
|
|
|
2016-03-07 12:13:24 +01:00
|
|
|
gio_sources += appinfo_sources
|
2017-05-13 12:10:52 +02:00
|
|
|
gio_sources += contenttype_sources
|
2017-11-24 07:36:27 +01:00
|
|
|
gio_sources += gdbus_daemon_sources
|
2016-03-07 12:13:24 +01:00
|
|
|
gio_sources += unix_sources
|
2016-12-20 23:37:24 +01:00
|
|
|
gio_sources += win32_sources
|
2016-03-07 12:13:24 +01:00
|
|
|
gio_sources += application_sources
|
|
|
|
gio_sources += settings_sources
|
|
|
|
gio_sources += gdbus_sources
|
2016-12-21 02:04:47 +01:00
|
|
|
gio_sources += portal_sources
|
2016-03-07 12:13:24 +01:00
|
|
|
gio_sources += local_sources
|
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
MISSING_STUFF = '''
|
2016-03-07 12:13:24 +01:00
|
|
|
# This is read by gobject-introspection/misc/ and gtk-doc
|
|
|
|
gio-public-headers.txt: Makefile
|
|
|
|
'$(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
|
|
|
|
|
|
|
|
gio.def: libgio-2.0.la
|
|
|
|
'$(AM_V_GEN) dumpbin.exe -exports .libs/libgio-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > gio.def.tmp && mv gio.def.tmp gio.def
|
|
|
|
|
|
|
|
gio-2.0.lib: libgio-2.0.la gio.def
|
|
|
|
'$(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
|
|
|
|
'''
|
|
|
|
|
2017-11-23 18:30:25 +01:00
|
|
|
gio_headers = files(
|
2016-03-07 12:13:24 +01:00
|
|
|
'gappinfo.h',
|
|
|
|
'gasyncinitable.h',
|
|
|
|
'gasyncresult.h',
|
|
|
|
'gbufferedinputstream.h',
|
|
|
|
'gbufferedoutputstream.h',
|
|
|
|
'gbytesicon.h',
|
|
|
|
'gcancellable.h',
|
|
|
|
'gcontenttype.h',
|
|
|
|
'gcharsetconverter.h',
|
|
|
|
'gconverter.h',
|
|
|
|
'gconverterinputstream.h',
|
|
|
|
'gconverteroutputstream.h',
|
|
|
|
'gdatagrambased.h',
|
|
|
|
'gdatainputstream.h',
|
|
|
|
'gdataoutputstream.h',
|
2021-11-11 11:56:50 +01:00
|
|
|
'gdebugcontroller.h',
|
|
|
|
'gdebugcontrollerdbus.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gdrive.h',
|
|
|
|
'gemblem.h',
|
|
|
|
'gemblemedicon.h',
|
|
|
|
'gfile.h',
|
|
|
|
'gfileattribute.h',
|
|
|
|
'gfileenumerator.h',
|
|
|
|
'gfileicon.h',
|
|
|
|
'gfileinfo.h',
|
|
|
|
'gfileinputstream.h',
|
|
|
|
'gfilemonitor.h',
|
|
|
|
'gfilenamecompleter.h',
|
|
|
|
'gfileoutputstream.h',
|
|
|
|
'gfileiostream.h',
|
|
|
|
'gfilterinputstream.h',
|
|
|
|
'gfilteroutputstream.h',
|
|
|
|
'gicon.h',
|
|
|
|
'ginetaddress.h',
|
|
|
|
'ginetaddressmask.h',
|
|
|
|
'ginetsocketaddress.h',
|
|
|
|
'ginitable.h',
|
2019-08-29 14:29:00 +02:00
|
|
|
'ginputstream.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gio.h',
|
|
|
|
'gio-autocleanups.h',
|
|
|
|
'gioenums.h',
|
|
|
|
'gioerror.h',
|
|
|
|
'giomodule.h',
|
|
|
|
'gioscheduler.h',
|
|
|
|
'giostream.h',
|
2019-08-29 14:29:00 +02:00
|
|
|
'giotypes.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gloadableicon.h',
|
|
|
|
'gmount.h',
|
|
|
|
'gmemoryinputstream.h',
|
2019-07-25 15:52:09 +02:00
|
|
|
'gmemorymonitor.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gmemoryoutputstream.h',
|
|
|
|
'gmountoperation.h',
|
2019-08-29 14:31:12 +02:00
|
|
|
'gnativesocketaddress.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gnativevolumemonitor.h',
|
|
|
|
'gnetworkaddress.h',
|
|
|
|
'gnetworkmonitor.h',
|
|
|
|
'gnetworkservice.h',
|
|
|
|
'goutputstream.h',
|
|
|
|
'gpermission.h',
|
|
|
|
'gpollableinputstream.h',
|
|
|
|
'gpollableoutputstream.h',
|
|
|
|
'gpollableutils.h',
|
2021-07-20 23:04:31 +02:00
|
|
|
'gpowerprofilemonitor.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gproxy.h',
|
2019-08-29 14:29:00 +02:00
|
|
|
'gproxyaddress.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gproxyaddressenumerator.h',
|
|
|
|
'gproxyresolver.h',
|
|
|
|
'gresolver.h',
|
|
|
|
'gresource.h',
|
|
|
|
'gseekable.h',
|
|
|
|
'gsimpleasyncresult.h',
|
|
|
|
'gsimpleiostream.h',
|
|
|
|
'gsimplepermission.h',
|
2019-08-29 14:29:00 +02:00
|
|
|
'gsimpleproxyresolver.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gsocket.h',
|
|
|
|
'gsocketaddress.h',
|
|
|
|
'gsocketaddressenumerator.h',
|
|
|
|
'gsocketclient.h',
|
|
|
|
'gsocketconnectable.h',
|
|
|
|
'gsocketconnection.h',
|
|
|
|
'gsocketcontrolmessage.h',
|
|
|
|
'gsocketlistener.h',
|
|
|
|
'gsocketservice.h',
|
|
|
|
'gsrvtarget.h',
|
|
|
|
'gsubprocess.h',
|
|
|
|
'gsubprocesslauncher.h',
|
2019-08-29 14:29:00 +02:00
|
|
|
'gtask.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gtcpconnection.h',
|
|
|
|
'gtcpwrapperconnection.h',
|
|
|
|
'gthemedicon.h',
|
2019-08-29 14:29:00 +02:00
|
|
|
'gthreadedsocketservice.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gtlsbackend.h',
|
|
|
|
'gtlscertificate.h',
|
|
|
|
'gtlsclientconnection.h',
|
|
|
|
'gtlsconnection.h',
|
|
|
|
'gtlsdatabase.h',
|
|
|
|
'gtlsfiledatabase.h',
|
|
|
|
'gtlsinteraction.h',
|
|
|
|
'gtlspassword.h',
|
|
|
|
'gtlsserverconnection.h',
|
|
|
|
'gdtlsconnection.h',
|
|
|
|
'gdtlsclientconnection.h',
|
|
|
|
'gdtlsserverconnection.h',
|
2022-01-19 12:52:15 +01:00
|
|
|
'gunixconnection.h',
|
2022-01-19 12:49:44 +01:00
|
|
|
'gunixcredentialsmessage.h',
|
2022-05-18 18:18:53 +02:00
|
|
|
'gunixfdlist.h',
|
2022-01-18 21:00:39 +01:00
|
|
|
'gunixsocketaddress.h',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gvfs.h',
|
|
|
|
'gvolume.h',
|
|
|
|
'gvolumemonitor.h',
|
|
|
|
'gzlibcompressor.h',
|
|
|
|
'gzlibdecompressor.h',
|
|
|
|
'glistmodel.h',
|
|
|
|
'gliststore.h',
|
2017-11-23 18:30:25 +01:00
|
|
|
)
|
2016-12-20 23:37:24 +01:00
|
|
|
|
2023-01-08 01:20:50 +01:00
|
|
|
gio_visibility_h = custom_target(
|
2022-10-03 16:36:04 +02:00
|
|
|
output: 'gio-visibility.h',
|
|
|
|
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GIO', '@OUTPUT@'],
|
2022-10-20 00:27:53 +02:00
|
|
|
install: true,
|
2022-10-24 14:13:04 +02:00
|
|
|
install_dir: gio_includedir,
|
2022-10-26 17:38:10 +02:00
|
|
|
# FIXME: Not needed with Meson >= 0.64.0
|
|
|
|
install_tag: 'devel',
|
2022-10-03 16:36:04 +02:00
|
|
|
)
|
2023-01-08 01:20:50 +01:00
|
|
|
gio_sources += gio_visibility_h
|
2022-10-03 16:36:04 +02:00
|
|
|
|
2016-03-07 12:13:24 +01:00
|
|
|
gio_headers += application_headers
|
|
|
|
gio_headers += settings_headers
|
|
|
|
gio_headers += gdbus_headers
|
2022-10-24 14:13:04 +02:00
|
|
|
install_headers(gio_headers, install_dir : gio_includedir)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2022-11-24 13:06:10 +01:00
|
|
|
# We can't use gnome.mkenums() because the GNOME module looks for glib-mkenums
|
|
|
|
# in PATH, which means you can't bootstrap glib with its own glib-mkenums.
|
|
|
|
gioenumtypes_h = custom_target('gioenumtypes_h',
|
|
|
|
output : 'gioenumtypes.h',
|
|
|
|
capture : true,
|
|
|
|
input : gio_headers,
|
|
|
|
install : true,
|
|
|
|
install_dir : gio_includedir,
|
|
|
|
# FIXME: Not needed with Meson >= 0.64.0
|
|
|
|
install_tag: 'devel',
|
|
|
|
command : [python, glib_mkenums,
|
|
|
|
'--template', files('gioenumtypes.h.template'),
|
|
|
|
'@INPUT@', gnetworking_h])
|
|
|
|
|
|
|
|
gioenumtypes_c = custom_target('gioenumtypes_c',
|
|
|
|
output : 'gioenumtypes.c',
|
|
|
|
capture : true,
|
|
|
|
input : gio_headers,
|
|
|
|
depends : [gioenumtypes_h],
|
|
|
|
command : [python, glib_mkenums,
|
|
|
|
'--template', files('gioenumtypes.c.template'),
|
|
|
|
'@INPUT@', gnetworking_h])
|
|
|
|
|
2023-01-08 01:20:50 +01:00
|
|
|
gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_h, gio_visibility_h])
|
2016-12-20 23:37:24 +01:00
|
|
|
|
|
|
|
# inotify
|
|
|
|
if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1
|
|
|
|
subdir('inotify')
|
|
|
|
internal_deps += [ inotify_lib ]
|
|
|
|
endif
|
|
|
|
|
|
|
|
# kevent
|
|
|
|
if have_func_kqueue and have_func_kevent
|
|
|
|
subdir('kqueue')
|
|
|
|
internal_deps += [ kqueue_lib ]
|
|
|
|
endif
|
|
|
|
|
|
|
|
if host_system == 'windows'
|
|
|
|
subdir('win32')
|
|
|
|
internal_deps += [ giowin32_lib ]
|
|
|
|
endif
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-07-27 10:48:11 +02:00
|
|
|
if have_bash
|
2021-01-24 15:54:18 +01:00
|
|
|
bash_comp_inst_dir = ''
|
|
|
|
if bash_comp_dep.found()
|
|
|
|
bash_comp_dir_override = bash_comp_dep.version().version_compare('>= 2.10') ? ['datadir', get_option('datadir')] : ['prefix', get_option('prefix')]
|
2022-05-06 14:16:26 +02:00
|
|
|
bash_comp_inst_dir = bash_comp_dep.get_variable('completionsdir', pkgconfig_define: bash_comp_dir_override)
|
2021-01-24 15:54:18 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
if bash_comp_inst_dir == ''
|
|
|
|
message('Found bash-completion but the .pc file did not set \'completionsdir\', fallback to a predefined path')
|
|
|
|
bash_comp_inst_dir = join_paths(get_option('datadir'), 'bash-completion/completions')
|
|
|
|
endif
|
|
|
|
|
2017-07-27 10:48:11 +02:00
|
|
|
install_data([
|
2022-09-18 22:51:55 +02:00
|
|
|
'completion/gapplication',
|
|
|
|
'completion/gdbus',
|
|
|
|
'completion/gio',
|
|
|
|
'completion/gsettings',
|
|
|
|
'completion/gresource'
|
|
|
|
],
|
|
|
|
install_dir: bash_comp_inst_dir,
|
|
|
|
install_tag: 'bin',
|
|
|
|
)
|
2017-07-27 10:48:11 +02:00
|
|
|
endif
|
2016-12-06 14:07:03 +01:00
|
|
|
|
2017-01-25 18:02:51 +01:00
|
|
|
if enable_dtrace
|
|
|
|
gio_dtrace_obj = dtrace_obj_gen.process('gio_probes.d')
|
|
|
|
gio_dtrace_hdr = dtrace_hdr_gen.process('gio_probes.d')
|
|
|
|
else
|
|
|
|
gio_dtrace_obj = []
|
|
|
|
gio_dtrace_hdr = []
|
|
|
|
endif
|
|
|
|
|
2017-07-16 16:41:02 +02:00
|
|
|
libgio = library('gio-2.0',
|
2022-11-24 13:06:10 +01:00
|
|
|
gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources,
|
2017-01-25 18:02:51 +01:00
|
|
|
gio_dtrace_hdr, gio_dtrace_obj,
|
2016-12-20 23:37:24 +01:00
|
|
|
version : library_version,
|
|
|
|
soversion : soversion,
|
2018-08-29 12:06:23 +02:00
|
|
|
darwin_versions : darwin_versions,
|
2016-03-07 12:13:24 +01:00
|
|
|
install : true,
|
2016-12-20 23:37:24 +01:00
|
|
|
include_directories : [configinc, gioinc],
|
2016-03-07 12:13:24 +01:00
|
|
|
# '$(gio_win32_res_ldflag)',
|
2021-10-06 22:56:54 +02:00
|
|
|
link_with: internal_deps,
|
2018-05-14 01:22:51 +02:00
|
|
|
dependencies : [libz_dep, libdl_dep, libmount_dep, libglib_dep,
|
2017-11-28 16:44:04 +01:00
|
|
|
libgobject_dep, libgmodule_dep, selinux_dep, xattr_dep,
|
2022-06-07 19:11:32 +02:00
|
|
|
platform_deps, network_libs, libsysprof_capture_dep,
|
|
|
|
gioenumtypes_dep, gvdb_dep],
|
2022-10-05 23:45:07 +02:00
|
|
|
c_args : [gio_c_args, gio_c_args_internal],
|
|
|
|
objc_args : [gio_c_args, gio_c_args_internal],
|
2022-10-03 16:36:04 +02:00
|
|
|
gnu_symbol_visibility : 'hidden',
|
2016-12-20 23:37:24 +01:00
|
|
|
# intl.lib is not compatible with SAFESEH
|
2018-05-01 15:44:19 +02:00
|
|
|
link_args : [noseh_link_args, glib_link_flags],
|
2016-03-07 12:13:24 +01:00
|
|
|
)
|
|
|
|
|
2020-02-07 17:34:13 +01:00
|
|
|
if get_option('gio_module_dir') != ''
|
|
|
|
pkgconfig_giomodulesdir = join_paths('${prefix}', get_option('gio_module_dir'))
|
|
|
|
else
|
|
|
|
pkgconfig_giomodulesdir = join_paths('${libdir}', 'gio', 'modules')
|
2017-12-11 20:47:04 +01:00
|
|
|
endif
|
|
|
|
|
2018-08-27 13:48:47 +02:00
|
|
|
schemas_subdir = join_paths('glib-2.0', 'schemas')
|
2023-08-16 18:58:48 +02:00
|
|
|
dtds_subdir = join_paths('glib-2.0', 'dtds')
|
2018-08-27 13:48:47 +02:00
|
|
|
|
2020-04-05 06:34:04 +02:00
|
|
|
libgio_dep = declare_dependency(link_with : libgio,
|
|
|
|
dependencies : [libgmodule_dep, libgobject_dep, gioenumtypes_dep],
|
2022-05-05 20:24:30 +02:00
|
|
|
include_directories : [gioinc],
|
|
|
|
variables : [
|
|
|
|
'schemasdir=' + join_paths(glib_datadir, schemas_subdir),
|
|
|
|
'giomoduledir=' + glib_giomodulesdir,
|
2023-08-16 18:58:48 +02:00
|
|
|
'dtdsdir=' + join_paths(glib_datadir, dtds_subdir)
|
2022-05-05 20:24:30 +02:00
|
|
|
],
|
|
|
|
)
|
2022-02-21 19:03:15 +01:00
|
|
|
|
2018-12-07 20:37:51 +01:00
|
|
|
pkg.generate(libgio,
|
2017-12-11 20:47:04 +01:00
|
|
|
requires : ['glib-2.0', 'gobject-2.0'],
|
2023-04-14 20:04:22 +02:00
|
|
|
variables : [
|
|
|
|
'schemasdir=' + '${datadir}' / schemas_subdir,
|
2023-08-16 18:58:48 +02:00
|
|
|
'dtdsdir=' + '${datadir}' / dtds_subdir,
|
2023-04-14 20:04:22 +02:00
|
|
|
'giomoduledir=' + pkgconfig_giomodulesdir,
|
|
|
|
'gio=' + '${bindir}' / 'gio',
|
|
|
|
'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules',
|
|
|
|
'glib_compile_schemas=' + pkgconfig_multiarch_bindir / 'glib-compile-schemas',
|
|
|
|
'glib_compile_resources=' + '${bindir}' / 'glib-compile-resources',
|
|
|
|
'gdbus=' + '${bindir}' /'gdbus',
|
|
|
|
'gdbus_codegen=' + '${bindir}' / 'gdbus-codegen',
|
|
|
|
'gresource=' + '${bindir}' / 'gresource',
|
|
|
|
'gsettings=' + '${bindir}' / 'gsettings',
|
|
|
|
],
|
2017-12-11 20:47:04 +01:00
|
|
|
version : glib_version,
|
|
|
|
install_dir : glib_pkgconfigreldir,
|
|
|
|
filebase : 'gio-2.0',
|
|
|
|
name : 'GIO',
|
|
|
|
description : 'glib I/O library',
|
|
|
|
)
|
2022-05-05 20:24:30 +02:00
|
|
|
meson.override_dependency('gio-2.0', libgio_dep)
|
2020-04-05 06:34:04 +02:00
|
|
|
|
2017-12-11 20:47:04 +01:00
|
|
|
if host_system == 'windows'
|
2022-01-27 14:04:12 +01:00
|
|
|
pkg.generate(requires : ['gobject-2.0', 'gmodule-no-export-2.0', 'gio-2.0'],
|
2017-12-11 20:47:04 +01:00
|
|
|
subdirs : ['gio-win32-2.0'],
|
|
|
|
version : glib_version,
|
|
|
|
install_dir : glib_pkgconfigreldir,
|
|
|
|
filebase : 'gio-windows-2.0',
|
|
|
|
name : 'GIO Windows specific APIs',
|
|
|
|
description : 'Windows specific headers for glib I/O library',
|
|
|
|
)
|
2022-05-05 20:24:30 +02:00
|
|
|
meson.override_dependency('gio-windows-2.0', libgio_dep)
|
2017-12-11 20:47:04 +01:00
|
|
|
else
|
|
|
|
pkg.generate(requires : ['gobject-2.0', 'gio-2.0'],
|
|
|
|
subdirs : ['gio-unix-2.0'],
|
|
|
|
version : glib_version,
|
|
|
|
install_dir : glib_pkgconfigreldir,
|
|
|
|
filebase : 'gio-unix-2.0',
|
|
|
|
name : 'GIO unix specific APIs',
|
|
|
|
description : 'unix specific headers for glib I/O library',
|
|
|
|
)
|
2022-05-05 20:24:30 +02:00
|
|
|
meson.override_dependency('gio-unix-2.0', libgio_dep)
|
2017-12-11 20:47:04 +01:00
|
|
|
endif
|
|
|
|
|
2017-11-24 07:36:27 +01:00
|
|
|
if host_system == 'windows'
|
|
|
|
# Hack till https://github.com/mesonbuild/meson/issues/2324 is fixed
|
|
|
|
libgiounix_dep = dependency('', required : false)
|
|
|
|
libgiowin32_dep = libgio_dep
|
|
|
|
else
|
|
|
|
libgiowin32_dep = dependency('', required : false)
|
|
|
|
libgiounix_dep = libgio_dep
|
|
|
|
endif
|
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
# Dependencies used by executables below
|
2018-06-02 20:32:22 +02:00
|
|
|
have_libelf = false
|
2023-03-20 15:55:05 +01:00
|
|
|
libelf = dependency('libelf', version : '>= 0.8.12', required : false)
|
2023-10-17 16:04:19 +02:00
|
|
|
if libelf.found() and get_option('libelf').allowed()
|
2018-06-02 20:32:22 +02:00
|
|
|
have_libelf = true
|
|
|
|
else
|
|
|
|
# This fallback is necessary on *BSD. elfutils isn't the only libelf
|
|
|
|
# implementation, and *BSD usually includes their own libelf as a system
|
|
|
|
# library which doesn't have a corresponding .pc file.
|
2020-10-01 15:47:36 +02:00
|
|
|
libelf = cc.find_library('elf', required : get_option ('libelf'))
|
2018-06-02 20:32:22 +02:00
|
|
|
have_libelf = libelf.found()
|
|
|
|
have_libelf = have_libelf and cc.has_function('elf_begin', dependencies : libelf)
|
|
|
|
have_libelf = have_libelf and cc.has_function('elf_getshdrstrndx', dependencies : libelf)
|
|
|
|
have_libelf = have_libelf and cc.has_function('elf_getshdrnum', dependencies : libelf)
|
|
|
|
have_libelf = have_libelf and cc.has_header('libelf.h')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if have_libelf
|
2016-03-07 12:13:24 +01:00
|
|
|
glib_conf.set('HAVE_LIBELF', 1)
|
2018-06-02 20:32:22 +02:00
|
|
|
else
|
|
|
|
libelf = []
|
2016-03-07 12:13:24 +01:00
|
|
|
endif
|
2016-12-20 23:37:24 +01:00
|
|
|
|
|
|
|
gconstructor_as_data_h = custom_target('gconstructor_as_data.h',
|
2017-06-23 18:00:13 +02:00
|
|
|
input : ['data-to-c.py', files('../glib/gconstructor.h')],
|
2016-12-20 23:37:24 +01:00
|
|
|
output : ['gconstructor_as_data.h'],
|
|
|
|
command : [python, '@INPUT0@', '@INPUT1@', 'gconstructor_code', '@OUTPUT@'])
|
|
|
|
|
|
|
|
# Several installed executables
|
2016-12-21 02:04:47 +01:00
|
|
|
gio_tool_sources = [
|
|
|
|
'gio-tool.c',
|
|
|
|
'gio-tool.h',
|
|
|
|
'gio-tool-cat.c',
|
|
|
|
'gio-tool-copy.c',
|
|
|
|
'gio-tool-info.c',
|
2020-12-03 10:42:47 +01:00
|
|
|
'gio-tool-launch.c',
|
2016-12-21 02:04:47 +01:00
|
|
|
'gio-tool-list.c',
|
|
|
|
'gio-tool-mime.c',
|
|
|
|
'gio-tool-mkdir.c',
|
|
|
|
'gio-tool-monitor.c',
|
|
|
|
'gio-tool-mount.c',
|
|
|
|
'gio-tool-move.c',
|
|
|
|
'gio-tool-open.c',
|
|
|
|
'gio-tool-rename.c',
|
|
|
|
'gio-tool-remove.c',
|
|
|
|
'gio-tool-save.c',
|
|
|
|
'gio-tool-set.c',
|
|
|
|
'gio-tool-trash.c',
|
|
|
|
'gio-tool-tree.c',
|
|
|
|
]
|
|
|
|
|
2023-11-01 17:58:43 +01:00
|
|
|
gio_tool = executable('gio', gio_tool_sources,
|
2016-12-21 02:04:47 +01:00
|
|
|
install : true,
|
2022-09-09 19:56:35 +02:00
|
|
|
install_tag : 'bin',
|
2018-02-19 13:09:10 +01:00
|
|
|
c_args : gio_c_args,
|
2016-12-21 02:04:47 +01:00
|
|
|
# intl.lib is not compatible with SAFESEH
|
|
|
|
link_args : noseh_link_args,
|
2018-05-14 01:22:51 +02:00
|
|
|
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
|
2016-12-21 02:04:47 +01:00
|
|
|
|
2016-03-07 12:13:24 +01:00
|
|
|
executable('gresource', 'gresource-tool.c',
|
2016-12-20 23:37:24 +01:00
|
|
|
install : true,
|
2022-09-09 19:56:35 +02:00
|
|
|
install_tag : 'bin',
|
2016-12-20 23:37:24 +01:00
|
|
|
# intl.lib is not compatible with SAFESEH
|
|
|
|
link_args : noseh_link_args,
|
2018-05-14 01:22:51 +02:00
|
|
|
dependencies : [libelf, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
|
2016-12-20 23:37:24 +01:00
|
|
|
|
2018-06-07 15:50:59 +02:00
|
|
|
gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
|
2016-12-20 23:37:24 +01:00
|
|
|
install : true,
|
gio: Optionally install trigger executables to architecture-specific paths
In Debian-style multiarch (libdir = lib/x86_64-linux-gnu or similar),
Red-Hat-style multilib (libdir = lib64 or lib) and Arch-style multilib
(libdir = lib or lib32), we have to run a separate version of
gio-querymodules to discover 32- or 64-bit modules on x86. Installing
modules in the directory used for each word size needs to trigger
recompilation of the correct modules list.
Debian, Fedora and Arch currently all have patches to facilitate this:
Debian moves gio-querymodules into ${libdir}/glib-2.0 and provides a
compat symlink in ${bindir}, while Fedora and Arch rename one or both
of the gio-querymodules executables to give it a -32 or -64 suffix.
We can avoid the need for these patches by making this a build option.
Doing this upstream has the advantage that the pkg-config metadata for
each architecture points to the correct executable and is in sync with
reality.
I'm using Debian's installation scheme with a separate directory here,
because the word-size suffix used in Fedora and Arch only works for the
common case of 32- and 64-bit multilib, and does not cover scenarios
where there can be more than one ABI with the same word size, such as
multiarch cross-compilation or alternative ABIs like x32.
Now that we have this infrastructure, it's also convenient to use it for
glib-compile-schemas. This works with /usr/share, so it only needs to
be run for one architecture (typically the system's primary
architecture), but using /usr/bin/glib-compile-schemas for the trigger
would result in either primary and secondary architectures trying to
overwrite each other's /usr/bin/glib-compile-schemas binaries, or a
circular dependency (the GLib library would have to depend on a
common package that contains glib-compile-schemas, but
glib-compile-schemas depends on the GLib library). Installing a
glib-compile-schemas binary in an architecture-specific location
alongside each GLib library bypasses this problem.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-14 15:24:33 +02:00
|
|
|
install_dir : multiarch_bindir,
|
2022-09-09 19:56:35 +02:00
|
|
|
install_tag : 'bin',
|
2018-02-19 13:09:10 +01:00
|
|
|
c_args : gio_c_args,
|
2016-12-20 23:37:24 +01:00
|
|
|
# intl.lib is not compatible with SAFESEH
|
|
|
|
link_args : noseh_link_args,
|
|
|
|
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-02-24 10:46:36 +01:00
|
|
|
glib_compile_schemas = executable('glib-compile-schemas',
|
2022-06-07 19:11:32 +02:00
|
|
|
['glib-compile-schemas.c'],
|
2016-12-20 23:37:24 +01:00
|
|
|
install : true,
|
gio: Optionally install trigger executables to architecture-specific paths
In Debian-style multiarch (libdir = lib/x86_64-linux-gnu or similar),
Red-Hat-style multilib (libdir = lib64 or lib) and Arch-style multilib
(libdir = lib or lib32), we have to run a separate version of
gio-querymodules to discover 32- or 64-bit modules on x86. Installing
modules in the directory used for each word size needs to trigger
recompilation of the correct modules list.
Debian, Fedora and Arch currently all have patches to facilitate this:
Debian moves gio-querymodules into ${libdir}/glib-2.0 and provides a
compat symlink in ${bindir}, while Fedora and Arch rename one or both
of the gio-querymodules executables to give it a -32 or -64 suffix.
We can avoid the need for these patches by making this a build option.
Doing this upstream has the advantage that the pkg-config metadata for
each architecture points to the correct executable and is in sync with
reality.
I'm using Debian's installation scheme with a separate directory here,
because the word-size suffix used in Fedora and Arch only works for the
common case of 32- and 64-bit multilib, and does not cover scenarios
where there can be more than one ABI with the same word size, such as
multiarch cross-compilation or alternative ABIs like x32.
Now that we have this infrastructure, it's also convenient to use it for
glib-compile-schemas. This works with /usr/share, so it only needs to
be run for one architecture (typically the system's primary
architecture), but using /usr/bin/glib-compile-schemas for the trigger
would result in either primary and secondary architectures trying to
overwrite each other's /usr/bin/glib-compile-schemas binaries, or a
circular dependency (the GLib library would have to depend on a
common package that contains glib-compile-schemas, but
glib-compile-schemas depends on the GLib library). Installing a
glib-compile-schemas binary in an architecture-specific location
alongside each GLib library bypasses this problem.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-14 15:24:33 +02:00
|
|
|
install_dir : multiarch_bindir,
|
2022-09-09 19:56:35 +02:00
|
|
|
install_tag : 'bin',
|
2016-12-20 23:37:24 +01:00
|
|
|
# intl.lib is not compatible with SAFESEH
|
|
|
|
link_args : noseh_link_args,
|
2022-06-07 19:11:32 +02:00
|
|
|
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep, gvdb_dep])
|
2016-12-20 23:37:24 +01:00
|
|
|
|
2017-02-23 01:40:45 +01:00
|
|
|
glib_compile_resources = executable('glib-compile-resources',
|
2022-06-07 19:11:32 +02:00
|
|
|
[gconstructor_as_data_h, 'glib-compile-resources.c'],
|
2016-12-20 23:37:24 +01:00
|
|
|
install : true,
|
2022-09-09 19:56:35 +02:00
|
|
|
install_tag : 'bin-devel',
|
2018-02-19 13:09:10 +01:00
|
|
|
c_args : gio_c_args,
|
2016-12-20 23:37:24 +01:00
|
|
|
# intl.lib is not compatible with SAFESEH
|
|
|
|
link_args : noseh_link_args,
|
2022-06-07 19:11:32 +02:00
|
|
|
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep, gvdb_dep])
|
2023-08-15 19:38:28 +02:00
|
|
|
install_data('gresource.dtd',
|
2023-08-16 18:58:48 +02:00
|
|
|
install_dir: get_option('datadir') / dtds_subdir,
|
2023-08-15 19:38:28 +02:00
|
|
|
install_tag: 'devel',
|
|
|
|
)
|
2016-12-20 23:37:24 +01:00
|
|
|
|
2019-08-13 14:44:45 +02:00
|
|
|
# Cannot override those programs in cross compilation case because they are
|
|
|
|
# native executables that cannot be run on the build machine.
|
|
|
|
# See https://gitlab.gnome.org/GNOME/glib/issues/1859.
|
2022-05-14 12:24:56 +02:00
|
|
|
if meson.can_run_host_binaries()
|
2019-08-13 14:44:45 +02:00
|
|
|
meson.override_find_program('glib-compile-schemas', glib_compile_schemas)
|
|
|
|
meson.override_find_program('glib-compile-resources', glib_compile_resources)
|
2021-01-30 00:57:09 +01:00
|
|
|
meson.override_find_program('gio-querymodules', gio_querymodules)
|
2019-08-13 14:44:45 +02:00
|
|
|
endif
|
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
executable('gsettings', 'gsettings-tool.c',
|
|
|
|
install : true,
|
2022-09-09 19:56:35 +02:00
|
|
|
install_tag : 'bin',
|
2018-02-19 13:09:10 +01:00
|
|
|
c_args : gio_c_args,
|
2016-12-20 23:37:24 +01:00
|
|
|
# intl.lib is not compatible with SAFESEH
|
|
|
|
link_args : noseh_link_args,
|
2018-05-14 01:22:51 +02:00
|
|
|
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
|
2016-12-06 14:07:03 +01:00
|
|
|
install_data('gschema.dtd',
|
2022-09-18 22:51:55 +02:00
|
|
|
install_dir : get_option('datadir') / schemas_subdir,
|
|
|
|
install_tag : 'devel',
|
|
|
|
)
|
2016-12-06 14:07:03 +01:00
|
|
|
|
|
|
|
install_data(['gschema.loc', 'gschema.its'],
|
2022-09-18 22:51:55 +02:00
|
|
|
install_dir : get_option('datadir') / 'gettext' / 'its',
|
|
|
|
install_tag : 'devel',
|
|
|
|
)
|
2016-12-20 23:37:24 +01:00
|
|
|
|
|
|
|
executable('gdbus', 'gdbus-tool.c',
|
|
|
|
install : true,
|
2022-09-09 19:56:35 +02:00
|
|
|
install_tag : 'bin',
|
2018-02-19 13:09:10 +01:00
|
|
|
c_args : gio_c_args,
|
2016-12-20 23:37:24 +01:00
|
|
|
# intl.lib is not compatible with SAFESEH
|
|
|
|
link_args : noseh_link_args,
|
2018-05-14 01:22:51 +02:00
|
|
|
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
|
2016-12-20 23:37:24 +01:00
|
|
|
|
2018-05-23 15:16:35 +02:00
|
|
|
if host_system != 'windows' and not glib_have_cocoa
|
2016-12-20 23:37:24 +01:00
|
|
|
executable('gapplication', 'gapplication-tool.c',
|
|
|
|
install : true,
|
2022-09-09 19:56:35 +02:00
|
|
|
install_tag : 'bin',
|
2018-02-19 13:09:10 +01:00
|
|
|
c_args : gio_c_args,
|
2016-12-20 23:37:24 +01:00
|
|
|
# intl.lib is not compatible with SAFESEH
|
|
|
|
link_args : noseh_link_args,
|
2018-05-14 01:22:51 +02:00
|
|
|
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
|
2016-12-20 23:37:24 +01:00
|
|
|
endif
|
|
|
|
|
2017-01-25 18:02:51 +01:00
|
|
|
if enable_systemtap
|
|
|
|
gio_stp = configure_file(input : 'gio.stp.in',
|
|
|
|
output : '@0@.stp'.format(libgio.full_path().split('/').get(-1)),
|
|
|
|
configuration : stp_cdata,
|
|
|
|
install_dir : tapset_install_dir,
|
2022-10-26 17:38:10 +02:00
|
|
|
install_tag : 'systemtap',
|
2019-06-17 17:52:36 +02:00
|
|
|
)
|
2017-01-25 18:02:51 +01:00
|
|
|
endif
|
|
|
|
|
gio: Optionally install trigger executables to architecture-specific paths
In Debian-style multiarch (libdir = lib/x86_64-linux-gnu or similar),
Red-Hat-style multilib (libdir = lib64 or lib) and Arch-style multilib
(libdir = lib or lib32), we have to run a separate version of
gio-querymodules to discover 32- or 64-bit modules on x86. Installing
modules in the directory used for each word size needs to trigger
recompilation of the correct modules list.
Debian, Fedora and Arch currently all have patches to facilitate this:
Debian moves gio-querymodules into ${libdir}/glib-2.0 and provides a
compat symlink in ${bindir}, while Fedora and Arch rename one or both
of the gio-querymodules executables to give it a -32 or -64 suffix.
We can avoid the need for these patches by making this a build option.
Doing this upstream has the advantage that the pkg-config metadata for
each architecture points to the correct executable and is in sync with
reality.
I'm using Debian's installation scheme with a separate directory here,
because the word-size suffix used in Fedora and Arch only works for the
common case of 32- and 64-bit multilib, and does not cover scenarios
where there can be more than one ABI with the same word size, such as
multiarch cross-compilation or alternative ABIs like x32.
Now that we have this infrastructure, it's also convenient to use it for
glib-compile-schemas. This works with /usr/share, so it only needs to
be run for one architecture (typically the system's primary
architecture), but using /usr/bin/glib-compile-schemas for the trigger
would result in either primary and secondary architectures trying to
overwrite each other's /usr/bin/glib-compile-schemas binaries, or a
circular dependency (the GLib library would have to depend on a
common package that contains glib-compile-schemas, but
glib-compile-schemas depends on the GLib library). Installing a
glib-compile-schemas binary in an architecture-specific location
alongside each GLib library bypasses this problem.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-14 15:24:33 +02:00
|
|
|
if multiarch_bindir != get_option('bindir')
|
|
|
|
foreach exe : ['gio-querymodules', 'glib-compile-schemas']
|
2023-10-24 17:48:23 +02:00
|
|
|
install_symlink(
|
|
|
|
exe,
|
|
|
|
install_dir : get_option('bindir'),
|
|
|
|
pointing_to : get_option('prefix') / multiarch_bindir / exe,
|
|
|
|
)
|
gio: Optionally install trigger executables to architecture-specific paths
In Debian-style multiarch (libdir = lib/x86_64-linux-gnu or similar),
Red-Hat-style multilib (libdir = lib64 or lib) and Arch-style multilib
(libdir = lib or lib32), we have to run a separate version of
gio-querymodules to discover 32- or 64-bit modules on x86. Installing
modules in the directory used for each word size needs to trigger
recompilation of the correct modules list.
Debian, Fedora and Arch currently all have patches to facilitate this:
Debian moves gio-querymodules into ${libdir}/glib-2.0 and provides a
compat symlink in ${bindir}, while Fedora and Arch rename one or both
of the gio-querymodules executables to give it a -32 or -64 suffix.
We can avoid the need for these patches by making this a build option.
Doing this upstream has the advantage that the pkg-config metadata for
each architecture points to the correct executable and is in sync with
reality.
I'm using Debian's installation scheme with a separate directory here,
because the word-size suffix used in Fedora and Arch only works for the
common case of 32- and 64-bit multilib, and does not cover scenarios
where there can be more than one ABI with the same word size, such as
multiarch cross-compilation or alternative ABIs like x32.
Now that we have this infrastructure, it's also convenient to use it for
glib-compile-schemas. This works with /usr/share, so it only needs to
be run for one architecture (typically the system's primary
architecture), but using /usr/bin/glib-compile-schemas for the trigger
would result in either primary and secondary architectures trying to
overwrite each other's /usr/bin/glib-compile-schemas binaries, or a
circular dependency (the GLib library would have to depend on a
common package that contains glib-compile-schemas, but
glib-compile-schemas depends on the GLib library). Installing a
glib-compile-schemas binary in an architecture-specific location
alongside each GLib library bypasses this problem.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-14 15:24:33 +02:00
|
|
|
endforeach
|
|
|
|
endif
|
|
|
|
|
2023-10-13 13:57:57 +02:00
|
|
|
if enable_gir
|
|
|
|
gio_gir_sources = [
|
|
|
|
gio_visibility_h,
|
|
|
|
gioenumtypes_h,
|
|
|
|
gnetworking_h,
|
|
|
|
gio_headers,
|
|
|
|
gio_base_sources,
|
|
|
|
application_sources,
|
|
|
|
gdbus_sources,
|
|
|
|
appinfo_sources,
|
|
|
|
contenttype_sources,
|
|
|
|
unix_sources,
|
|
|
|
win32_sources,
|
|
|
|
settings_sources,
|
|
|
|
]
|
|
|
|
gio_gir_packages = [ 'gio-2.0' ]
|
|
|
|
gio_gir_args = [
|
|
|
|
'-DGIO_COMPILATION',
|
|
|
|
'-DG_SETTINGS_ENABLE_BACKEND',
|
|
|
|
'--symbol-prefix=gio',
|
|
|
|
]
|
|
|
|
if host_system == 'windows'
|
|
|
|
gio_gir_sources += gio_win32_include_headers
|
|
|
|
foreach h: gio_win32_include_headers
|
|
|
|
gio_gir_args += '--c-include=@0@'.format(h)
|
|
|
|
endforeach
|
|
|
|
gio_gir_packages += 'gio-win32-2.0'
|
|
|
|
gio_gir_args += '--pkg=gio-win32-2.0'
|
|
|
|
else
|
|
|
|
gio_gir_sources += gio_unix_include_headers
|
|
|
|
foreach h: gio_unix_include_headers
|
|
|
|
gio_gir_args += '--c-include=@0@'.format(h)
|
|
|
|
endforeach
|
|
|
|
gio_gir_packages += 'gio-unix-2.0'
|
|
|
|
gio_gir_args += '--pkg=gio-unix-2.0'
|
|
|
|
endif
|
|
|
|
|
|
|
|
gio_gir = gnome.generate_gir(libgio,
|
|
|
|
sources: gio_gir_sources,
|
|
|
|
namespace: 'Gio',
|
|
|
|
nsversion: '2.0',
|
|
|
|
identifier_prefix: 'G',
|
|
|
|
symbol_prefix: 'g',
|
|
|
|
export_packages: gio_gir_packages,
|
|
|
|
header: 'gio/gio.h',
|
|
|
|
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0] ],
|
|
|
|
install: true,
|
|
|
|
dependencies: [ libglib_dep, libgobject_dep, libgmodule_dep ],
|
|
|
|
extra_args: gir_args + gio_gir_args,
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2019-04-16 12:19:41 +02:00
|
|
|
if build_tests
|
|
|
|
subdir('tests')
|
2019-05-31 04:29:18 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# The following is an example for building internal marshallers that are used
|
|
|
|
# by GIO. We cannot guarantee glib-genmarshal availability while building GLib
|
|
|
|
# so they are pre-generated and placed into gmarshal-internal.[ch].
|
|
|
|
#
|
|
|
|
# gmarshal_internal = gnome.genmarshal('gmarshal-internal',
|
|
|
|
# sources: 'gmarshal-internal.list',
|
|
|
|
# prefix: '_g_cclosure_marshal',
|
|
|
|
# valist_marshallers: true,
|
|
|
|
# internal: true,
|
|
|
|
# )
|