[gvfs] build: Fix the use of pkg-config file variables
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] build: Fix the use of pkg-config file variables
- Date: Wed, 23 Jan 2019 07:09:04 +0000 (UTC)
commit bced2bd5c383935c1487e0d72800c6439e5859c8
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Mon Dec 17 21:08:43 2018 +0100
build: Fix the use of pkg-config file variables
The names of the variables in meson corresponding to the variables
obtained from the pkg-config files has been fixed by using a
pattern.
The pattern uses the dependency name as the prefix and the obtained
variable as the suffix.
client/meson.build | 6 +++---
daemon/meson.build | 10 +++++-----
meson.build | 48 +++++++++++++++++++++++++++------------------
metadata/meson.build | 6 +++---
monitor/afc/meson.build | 2 +-
monitor/goa/meson.build | 2 +-
monitor/gphoto2/meson.build | 2 +-
monitor/meson.build | 6 +++---
monitor/mtp/meson.build | 2 +-
monitor/proxy/meson.build | 4 ++--
monitor/udisks2/meson.build | 2 +-
11 files changed, 50 insertions(+), 40 deletions(-)
---
diff --git a/client/meson.build b/client/meson.build
index 72e80c10..73b8d7e3 100644
--- a/client/meson.build
+++ b/client/meson.build
@@ -60,7 +60,7 @@ libgvfsdbus = shared_module(
link_depends: symbol_map,
install: true,
install_rpath: gvfs_rpath,
- install_dir: gio_module_dir,
+ install_dir: gio_giomoduledir,
)
if enable_devel_utils
@@ -77,10 +77,10 @@ endif
# FUSE daemon
if enable_fuse
- if install_tmp_files_dir
+ if install_systemd_tmpfilesdir
install_data(
'gvfsd-fuse-tmpfiles.conf',
- install_dir: tmp_files_dir,
+ install_dir: systemd_tmpfilesdir,
)
endif
diff --git a/daemon/meson.build b/daemon/meson.build
index 4f3155ef..70b0346c 100644
--- a/daemon/meson.build
+++ b/daemon/meson.build
@@ -5,14 +5,14 @@ dbus_service = gvfs_namespace + '.Daemon'
dbus_exec = 'gvfsd'
dbus_systemd_service = ''
-if install_systemd_user_unit_dir
+if install_systemd_systemduserunitdir
service = 'gvfs-daemon.service'
configure_file(
input: service + '.in',
output: service,
install: true,
- install_dir: systemd_user_unit_dir,
+ install_dir: systemd_systemduserunitdir,
configuration: service_conf,
)
@@ -28,7 +28,7 @@ daemon_service = configure_file(
input: dbus_service_in,
output: dbus_service + '.service',
install: true,
- install_dir: dbus_service_dir,
+ install_dir: dbus_session_bus_services_dir,
configuration: dbus_service_conf,
)
@@ -42,7 +42,7 @@ gnome.mkenums(
vtail: ' </@type@>',
ftail: '</schemalist>',
install_header: true,
- install_dir: gvfs_schema_dir,
+ install_dir: gio_schemasdir,
)
sources = files(
@@ -630,7 +630,7 @@ endif
install_data(
schema_data,
- install_dir: gvfs_schema_dir,
+ install_dir: gio_schemasdir,
)
install_data(
diff --git a/meson.build b/meson.build
index e3aeeae9..43171d58 100644
--- a/meson.build
+++ b/meson.build
@@ -24,7 +24,6 @@ gvfs_rpath = gvfs_pkglibdir
gvfs_remote_volume_monitors_dir = gvfs_pkgdatadir / 'remote-volume-monitors'
gvfs_mountdir = gvfs_pkgdatadir / 'mounts'
-gvfs_schema_dir = gvfs_datadir / 'glib-2.0/schemas'
gvfs_namespace = 'org.gtk.vfs'
@@ -239,33 +238,44 @@ endif
config_h.set('HAVE_GCRYPT', enable_gcrypt)
# *** Check for dbus service dir ***
-dbus_dep = dependency('dbus-1')
-dbus_service_dir = dbus_dep.get_pkgconfig_variable('session_bus_services_dir', define_variable: ['datadir',
gvfs_datadir])
+dbus_session_bus_services_dir = dependency('dbus-1').get_pkgconfig_variable(
+ 'session_bus_services_dir',
+ define_variable: ['datadir', gvfs_datadir],
+)
dbus_service_in = files('dbus.service.in')
-# *** Check for gio module dir ***
-gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir', define_variable: ['libdir', gvfs_libdir])
+# *** Check for giomoduledir and schemasdir ***
+gio_giomoduledir = gio_dep.get_pkgconfig_variable(
+ 'giomoduledir',
+ define_variable: ['libdir', gvfs_libdir],
+)
+
+gio_schemasdir = gio_dep.get_pkgconfig_variable(
+ 'schemasdir',
+ define_variable: ['datadir', gvfs_datadir],
+ default: gvfs_datadir / 'glib-2.0/schemas',
+)
# *** Check for systemd options ***
-systemd_user_unit_dir = get_option('systemduserunitdir')
-install_systemd_user_unit_dir = (systemd_user_unit_dir != 'no')
+systemd_systemduserunitdir = get_option('systemduserunitdir')
+install_systemd_systemduserunitdir = (systemd_systemduserunitdir != 'no')
-tmp_files_dir = get_option('tmpfilesdir')
-install_tmp_files_dir = (tmp_files_dir != 'no')
+systemd_tmpfilesdir = get_option('tmpfilesdir')
+install_systemd_tmpfilesdir = (systemd_tmpfilesdir != 'no')
-if install_systemd_user_unit_dir or install_tmp_files_dir
- if systemd_user_unit_dir == '' or tmp_files_dir == ''
+if install_systemd_systemduserunitdir or install_systemd_tmpfilesdir
+ if systemd_systemduserunitdir == '' or systemd_tmpfilesdir == ''
systemd_dep = dependency('systemd', version: '>= 206', required: false)
- if install_systemd_user_unit_dir and systemd_user_unit_dir == ''
+ if install_systemd_systemduserunitdir and systemd_systemduserunitdir == ''
assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit
dir or disable it')
- systemd_user_unit_dir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
+ systemd_systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
endif
- if install_tmp_files_dir and tmp_files_dir == ''
+ if install_systemd_tmpfilesdir and systemd_tmpfilesdir == ''
assert(systemd_dep.found(), 'systemd not found, if you use opentmpfiles please provide a valid systemd
user unit dir or disable it')
- tmp_files_dir = systemd_dep.get_pkgconfig_variable('tmpfilesdir')
+ systemd_tmpfilesdir = systemd_dep.get_pkgconfig_variable('tmpfilesdir')
endif
endif
endif
@@ -481,14 +491,14 @@ configure_file(
meson.add_install_script(
'meson_post_install.py',
- gvfs_schema_dir,
- gio_module_dir,
+ gio_schemasdir,
+ gio_giomoduledir,
)
output = gvfs_name + ' ' + gvfs_version + ' configuration summary:\n'
output += '\n'
-output += ' systemduserunitdir: ' + systemd_user_unit_dir + '\n'
-output += ' tmpfilesdir: ' + tmp_files_dir + '\n'
+output += ' systemduserunitdir: ' + systemd_systemduserunitdir + '\n'
+output += ' tmpfilesdir: ' + systemd_tmpfilesdir + '\n'
output += '\n'
output += ' admin: ' + enable_admin.to_string() + '\n'
output += ' afc: ' + enable_afc.to_string() + '\n'
diff --git a/metadata/meson.build b/metadata/meson.build
index 929d32fa..081213dd 100644
--- a/metadata/meson.build
+++ b/metadata/meson.build
@@ -2,14 +2,14 @@ dbus_service = gvfs_namespace + '.Metadata'
dbus_exec = 'gvfsd-metadata'
dbus_systemd_service = ''
-if install_systemd_user_unit_dir
+if install_systemd_systemduserunitdir
service = 'gvfs-metadata.service'
configure_file(
input: service + '.in',
output: service,
install: true,
- install_dir: systemd_user_unit_dir,
+ install_dir: systemd_systemduserunitdir,
configuration: service_conf,
)
@@ -25,7 +25,7 @@ metadata_service = configure_file(
input: dbus_service_in,
output: dbus_service + '.service',
install: true,
- install_dir: dbus_service_dir,
+ install_dir: dbus_session_bus_services_dir,
configuration: dbus_service_conf,
)
diff --git a/monitor/afc/meson.build b/monitor/afc/meson.build
index ff1177ca..27b1c166 100644
--- a/monitor/afc/meson.build
+++ b/monitor/afc/meson.build
@@ -14,7 +14,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-AFC"',
- '-DGIO_MODULE_DIR="@0@"'.format(gio_module_dir),
+ '-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
]
diff --git a/monitor/goa/meson.build b/monitor/goa/meson.build
index e9f13bdf..5a66b240 100644
--- a/monitor/goa/meson.build
+++ b/monitor/goa/meson.build
@@ -13,7 +13,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-GOA"',
- '-DGIO_MODULE_DIR="@0@"'.format(gio_module_dir),
+ '-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
]
diff --git a/monitor/gphoto2/meson.build b/monitor/gphoto2/meson.build
index 76a0768e..99ef8ceb 100644
--- a/monitor/gphoto2/meson.build
+++ b/monitor/gphoto2/meson.build
@@ -14,7 +14,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-GPhoto2"',
- '-DGIO_MODULE_DIR="@0@"'.format(gio_module_dir),
+ '-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
]
diff --git a/monitor/meson.build b/monitor/meson.build
index 05a080e7..e32817ad 100644
--- a/monitor/meson.build
+++ b/monitor/meson.build
@@ -31,14 +31,14 @@ foreach monitor: monitors
dbus_exec = 'gvfs-@0@-volume-monitor'.format(monitor_name)
dbus_systemd_service = ''
- if install_systemd_user_unit_dir
+ if install_systemd_systemduserunitdir
service = dbus_exec + '.service'
configure_file(
input: monitor_name / service + '.in',
output: service,
install: true,
- install_dir: systemd_user_unit_dir,
+ install_dir: systemd_systemduserunitdir,
configuration: service_conf,
)
@@ -61,7 +61,7 @@ foreach monitor: monitors
input: dbus_service_in,
output: dbus_service + '.service',
install: true,
- install_dir: dbus_service_dir,
+ install_dir: dbus_session_bus_services_dir,
configuration: dbus_service_conf,
)
diff --git a/monitor/mtp/meson.build b/monitor/mtp/meson.build
index 0b107871..c76f8aaa 100644
--- a/monitor/mtp/meson.build
+++ b/monitor/mtp/meson.build
@@ -13,7 +13,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-MTP"',
- '-DGIO_MODULE_DIR="@0@"'.format(gio_module_dir),
+ '-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
]
diff --git a/monitor/proxy/meson.build b/monitor/proxy/meson.build
index 89119557..2d616812 100644
--- a/monitor/proxy/meson.build
+++ b/monitor/proxy/meson.build
@@ -22,7 +22,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-RemoteVolumeMonitor"',
- '-DGIO_MODULE_DIR="@0@"'.format(gio_module_dir),
+ '-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DREMOTE_VOLUME_MONITORS_DIR="@0@"'.format(gvfs_remote_volume_monitors_dir),
]
@@ -44,7 +44,7 @@ libgioremote_volume_monitor = shared_module(
link_depends: symbol_map,
install: true,
install_rpath: gvfs_rpath,
- install_dir: gio_module_dir,
+ install_dir: gio_giomoduledir,
)
sources = files('gvfsproxyvolumemonitordaemon.c')
diff --git a/monitor/udisks2/meson.build b/monitor/udisks2/meson.build
index 19cd852a..f163d888 100644
--- a/monitor/udisks2/meson.build
+++ b/monitor/udisks2/meson.build
@@ -28,7 +28,7 @@ endif
cflags = [
'-DG_LOG_DOMAIN="GVFS-UDisks2"',
'-DG_DISABLE_DEPRECATED',
- '-DGIO_MODULE_DIR="@0@"'.format(gio_module_dir),
+ '-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DUDISKS_API_IS_SUBJECT_TO_CHANGE',
]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]