meson: rebase on top of master ~2.53.1

From 2.51.2
This commit is contained in:
Tim-Philipp Müller 2017-05-13 11:10:52 +01:00 committed by Matthias Clasen
parent 2e9fd74b25
commit 03eac5fac5
3 changed files with 61 additions and 24 deletions

View File

@ -282,13 +282,11 @@ local_sources = [
platform_deps = []
internal_deps = []
appinfo_sources = []
contenttype_sources = []
portal_sources = []
unix_sources = []
if host_system != 'windows'
appinfo_sources += ['gdesktopappinfo.c']
subdir('xdgmime')
internal_deps += [xdgmime_lib]
unix_sources = [
'gfiledescriptorbased.c',
'gunixconnection.c',
@ -302,7 +300,6 @@ if host_system != 'windows'
'gunixvolumemonitor.c',
'gunixinputstream.c',
'gunixoutputstream.c',
'gcontenttype.c',
'gfdonotificationbackend.c',
'ggtknotificationbackend.c',
]
@ -316,13 +313,7 @@ if host_system != 'windows'
xdp_dbus_generated
]
# FIXME
#if OS_COCOA
#unix_sources += gcocoanotificationbackend.c
#endif
gio_unix_include_headers = [
'gdesktopappinfo.h',
'gfiledescriptorbased.h',
'gunixconnection.h',
'gunixcredentialsmessage.h',
@ -333,6 +324,21 @@ if host_system != 'windows'
'gunixoutputstream.h',
'gunixsocketaddress.h',
]
if glib_have_cocoa
contenttype_sources += ['gosxcontenttype.c']
appinfo_sources += ['gosxappinfo.c']
if glib_have_os_x_9_or_later
unix_sources += ['gcocoanotificationbackend.c']
endif
else
contenttype_sources += ['gcontenttype.c']
appinfo_sources += ['gdesktopappinfo.c']
gio_unix_include_headers += ['gdesktopappinfo.h']
subdir('xdgmime')
internal_deps += [xdgmime_lib]
endif
install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio')
if glib_conf.has('HAVE_NETLINK')
@ -352,13 +358,13 @@ gdbus_daemon_sources = [
win32_sources = gdbus_daemon_sources
if host_system == 'windows'
appinfo_sources += ['gwin32appinfo.c']
contenttype_sources += ['gcontenttype-win32.c']
platform_deps += [cc.find_library('shlwapi'),
cc.find_library('dnsapi'),
cc.find_library('iphlpapi'),
winsock2]
win32_sources += [
'gwin32registrykey.c',
'gcontenttype-win32.c',
'gwin32mount.c',
'gwin32volumemonitor.c',
'gwin32inputstream.c',
@ -492,6 +498,7 @@ gio_sources = [
]
gio_sources += appinfo_sources
gio_sources += contenttype_sources
gio_sources += unix_sources
gio_sources += win32_sources
gio_sources += application_sources

View File

@ -100,24 +100,29 @@ if host_machine.system() != 'windows'
'stream-rw_all',
'unix-fd',
'unix-streams',
'mimeapps',
'gschema-compile',
]
# Uninstalled because of the check-for-executable logic in DesktopAppInfo
# unable to find the installed executable
gio_tests += [
'appinfo',
'desktop-app-info',
]
if not glib_have_cocoa
gio_tests += [
'appinfo',
'desktop-app-info',
]
endif
test_extra_programs += [
['basic-application'],
['dbus-launch'],
['appinfo-test'],
['apps'],
]
if not glib_have_cocoa
test_extra_programs += [['apps']]
gio_tests += ['mimeapps']
endif
# Test programs that need to bring up a session bus (requires dbus-daemon)
have_dbus_daemon = find_program('dbus-daemon', required : false).found()
if have_dbus_daemon
@ -144,7 +149,6 @@ if host_machine.system() != 'windows'
gio_dbus_tests = [
['actions', [], []],
['dbus-appinfo', [], []],
['gdbus-auth', [], []],
['gdbus-bz627724', [], []],
['gdbus-close-pending', [], []],
@ -165,6 +169,10 @@ if host_machine.system() != 'windows'
['gnotification', ['gnotification-server.c'], []],
]
if not glib_have_cocoa
gio_dbus_tests = [['dbus-appinfo', [], []]]
endif
# separate loop because extra source files for each test
foreach dbus_test : gio_dbus_tests
test_name = dbus_test[0]
@ -189,11 +197,13 @@ if host_machine.system() != 'windows'
# different name for the unit test executable, since we can't have two
# targets of the same name even if in different directories
# (FIXME: just rename source file to gapplication-test.c)
exe = executable('gapplication-test', 'gapplication.c',
'gdbus-sessionbus.c', 'gdbus-tests.c',
install : false,
c_args : test_c_args,
dependencies : [libglib_dep, libgmodule_dep, libgio_dep])
if not glib_have_cocoa
exe = executable('gapplication-test', 'gapplication.c',
'gdbus-sessionbus.c', 'gdbus-tests.c',
install : false,
c_args : test_c_args,
dependencies : [libglib_dep, libgmodule_dep, libgio_dep])
endif
test('gapplication', exe, env : test_env)
gio_tests += ['gdbus-unix-addresses']

View File

@ -1,5 +1,5 @@
project('glib', 'c', 'cpp',
version : '2.51.2',
version : '2.53.1',
meson_version : '>= 0.38.1',
default_options : [
'warning_level=1',
@ -390,13 +390,33 @@ glib_have_carbon = cc.compiles('''#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>''',
name : 'Mac OS X Carbon support')
glib_have_os_x_9_or_later = false
if glib_have_carbon
glib_conf.set('HAVE_CARBON', true)
CARBON_LIBS='-Wl,-framework,Carbon' # FIXME: propagate to .pc files as well
glib_have_os_x_9_or_later = cc.compiles('''#include <AvailabilityMacros.h>
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
#error Compiling for minimum OS X version before 10.9
#endif''', name : 'OS X 9 or later')
else
CARBON_LIBS=''
endif
# Mac OS X Cocoa support
glib_have_cocoa = cc.compiles('''#include <Cocoa/Cocoa.h>
#ifdef GNUSTEP_BASE_VERSION
#error "Detected GNUstep, not Cocoa"
#endif''',
name : 'Mac OS X Cocoa support')
if glib_have_cocoa
glib_conf.set('HAVE_COCOA', true)
COCOA_LIBS='-Wl,-framework,Foundation' # FIXME: propagate to .pc files as well
else
COCOA_LIBS=''
endif
# Check for futex(2)
if cc.links('''#include <linux/futex.h>
#include <sys/syscall.h>