[dconf/wip/inigomartinez/meson: 5/14] build: Retrieve D-Bus and gio paths from pkg-config files
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf/wip/inigomartinez/meson: 5/14] build: Retrieve D-Bus and gio paths from pkg-config files
- Date: Wed, 11 Apr 2018 07:57:35 +0000 (UTC)
commit 515a2430b8cd4f71d0d1a02e334fe7cb74096d13
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Mon Apr 9 20:44:50 2018 +0200
build: Retrieve D-Bus and gio paths from pkg-config files
D-Bus' session bus services' paths and gio's module's paths are
hardcoded. However, these directories can be retrieved by checking
this information from their pkgconfig files.
This patch retrieves the paths for their correspondant pkgconfig
files and uses those paths as installation directories.
The options to set different directories for these options are not
necessary anymore, so they have been removed.
Finally, the post install script does not depend anymore on the
existence of `gio-querymodules` and is always executed.
https://bugzilla.gnome.org/show_bug.cgi?id=790236
gsettings/meson.build | 2 +-
meson.build | 13 ++++---------
meson_options.txt | 3 ---
meson_post_install.py | 2 +-
service/meson.build | 12 +-----------
5 files changed, 7 insertions(+), 25 deletions(-)
---
diff --git a/gsettings/meson.build b/gsettings/meson.build
index 5319cce..59492d9 100644
--- a/gsettings/meson.build
+++ b/gsettings/meson.build
@@ -16,7 +16,7 @@ libdconf_settings = shared_library(
libgvdb_shared
],
install: true,
- install_dir: join_paths(dconf_libdir, 'gio', 'modules')
+ install_dir: gio_module_dir
)
unit_test = 'abicheck'
diff --git a/meson.build b/meson.build
index 59b3176..e0dc7b1 100644
--- a/meson.build
+++ b/meson.build
@@ -68,15 +68,8 @@ gio_unix_req_version = '>= 2.25.7'
glib_dep = dependency('glib-2.0', version: '>= 2.44.0')
gio_unix_dep = dependency('gio-unix-2.0', version: gio_unix_req_version)
-gio_querymodules = find_program('gio-querymodules', required: false)
-if gio_querymodules.found()
- gio_modules_dir = get_option('gio_modules_dir')
- if gio_modules_dir == ''
- gio_modules_dir = join_paths(dconf_libdir, 'gio', 'modules')
- endif
-
- meson.add_install_script('meson_post_install.py', gio_querymodules.path(), gio_modules_dir)
-endif
+gio_module_dir = dependency('gio-2.0').get_pkgconfig_variable('giomoduledir', define_variable: ['libdir',
dconf_libdir])
+dbus_session_service_dir = dependency('dbus-1').get_pkgconfig_variable('session_bus_services_dir',
define_variable: ['datadir', dconf_datadir])
configure_file(
output: 'config.h',
@@ -103,3 +96,5 @@ if get_option('gtk_doc')
endif
subdir('tests')
+
+meson.add_install_script('meson_post_install.py', gio_module_dir)
diff --git a/meson_options.txt b/meson_options.txt
index 4599ada..76e88ea 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,2 @@
option('man', type: 'boolean', value: true, description: 'generate man pages')
-option('gio_modules_dir', type: 'string', value: '', description: 'choose directory for the GIO module
[default=LIBDIR/gio/modules]')
-option('dbus_service_dir', type: 'string', value: '', description: 'choose directory for dbus service files
[default=PREFIX/share/dbus-1/services]')
-option('dbus_system_service_dir', type: 'string', value: '', description: 'choose directory for dbus system
service files [default=PREFIX/share/dbus-1/system-services]')
option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
diff --git a/meson_post_install.py b/meson_post_install.py
index 8960540..3082d42 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -6,4 +6,4 @@ import sys
if not os.environ.get('DESTDIR'):
print('GIO module cache creation...')
- subprocess.call([sys.argv[1], sys.argv[2]])
+ subprocess.call(['gio-querymodules', sys.argv[1]])
diff --git a/service/meson.build b/service/meson.build
index 800dd87..87184aa 100644
--- a/service/meson.build
+++ b/service/meson.build
@@ -1,13 +1,3 @@
-dbus_service_dir = get_option('dbus_service_dir')
-if dbus_service_dir == ''
- dbus_service_dir = join_paths(dconf_datadir, 'dbus-1', 'services')
-endif
-
-dbus_system_service_dir = get_option('dbus_system_service_dir')
-if dbus_system_service_dir == ''
- dbus_system_service_dir = join_paths(dconf_datadir, 'dbus-1', 'system-services')
-endif
-
service_conf = configuration_data()
service_conf.set('libexecdir', dconf_libexecdir)
@@ -17,7 +7,7 @@ configure_file(
input: service + '.in',
output: service,
install: true,
- install_dir: dbus_service_dir,
+ install_dir: dbus_session_service_dir,
configuration: service_conf
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]