Commit 7fde89de authored by Iñigo Martínez's avatar Iñigo Martínez

build: Do not use prefix on directory variables

Although usually directory variables are set by using the `prefix`
directory, this might cause issues due to parameters that need
relative directories.

In order to ease the transition `prefix` directory has been stripped
from directory variables and only has been appended when necessary.
parent 5d253327
......@@ -39,8 +39,8 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="@0@"'.format(gvfs_name.to_upper()),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DGVFS_MODULE_DIR="@0@"'.format(gvfs_pkglibdir / 'modules'),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
'-DGVFS_MODULE_DIR="@0@"'.format(gvfs_prefix / gvfs_pkglibdir / 'modules'),
]
symbol_map = meson.current_source_dir() / 'symbol.map'
......
......@@ -28,7 +28,7 @@ deps = [
gobject_dep,
]
cflags = common_cflags + ['-DREMOTE_VOLUME_MONITORS_DIR="@0@"'.format(gvfs_remote_volume_monitors_dir)]
cflags = common_cflags + ['-DREMOTE_VOLUME_MONITORS_DIR="@0@"'.format(gvfs_prefix / gvfs_remote_volume_monitors_dir)]
libgvfscommon = shared_library(
'gvfscommon',
......
......@@ -21,7 +21,7 @@ endif
dbus_service_conf = configuration_data()
dbus_service_conf.set('service', dbus_service)
dbus_service_conf.set('exec', gvfs_libexecdir / dbus_exec)
dbus_service_conf.set('exec', gvfs_prefix / gvfs_libexecdir / dbus_exec)
dbus_service_conf.set('systemd_service', dbus_systemd_service)
daemon_service = configure_file(
......@@ -109,9 +109,9 @@ if enable_keyring
endif
cflags = [
'-DLIBEXEC_DIR="@0@"'.format(gvfs_libexecdir),
'-DMOUNTABLE_DIR="@0@"'.format(gvfs_mountdir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DLIBEXEC_DIR="@0@"'.format(gvfs_prefix / gvfs_libexecdir),
'-DMOUNTABLE_DIR="@0@"'.format(gvfs_prefix / gvfs_mounts_dir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
]
libgvfsdaemon = shared_library(
......@@ -604,7 +604,7 @@ foreach mount: mounts
output: '@BASENAME@',
configuration: service_conf,
install: true,
install_dir: gvfs_mountdir,
install_dir: gvfs_mounts_dir,
)
endforeach
......
......@@ -10,20 +10,20 @@ gvfs_name = meson.project_name()
gvfs_version = meson.project_version()
gvfs_prefix = get_option('prefix')
gvfs_datadir = gvfs_prefix / get_option('datadir')
gvfs_libdir = gvfs_prefix / get_option('libdir')
gvfs_libexecdir = gvfs_prefix / get_option('libexecdir')
gvfs_localedir = gvfs_prefix / get_option('localedir')
gvfs_mandir = gvfs_prefix / get_option('mandir')
gvfs_datadir = get_option('datadir')
gvfs_libdir = get_option('libdir')
gvfs_libexecdir = get_option('libexecdir')
gvfs_localedir = get_option('localedir')
gvfs_mandir = get_option('mandir')
gvfs_pkgdatadir = gvfs_datadir / gvfs_name
gvfs_pkglibdir = gvfs_libdir / gvfs_name
gvfs_rpath = gvfs_pkglibdir
gvfs_rpath = gvfs_prefix / gvfs_pkglibdir
gvfs_remote_volume_monitors_dir = gvfs_pkgdatadir / 'remote-volume-monitors'
gvfs_mountdir = gvfs_pkgdatadir / 'mounts'
gvfs_mounts_dir = gvfs_pkgdatadir / 'mounts'
gvfs_namespace = 'org.gtk.vfs'
......@@ -240,7 +240,7 @@ config_h.set('HAVE_GCRYPT', enable_gcrypt)
# *** Check for dbus service dir ***
dbus_session_bus_services_dir = dependency('dbus-1').get_pkgconfig_variable(
'session_bus_services_dir',
define_variable: ['datadir', gvfs_datadir],
define_variable: ['datadir', gvfs_prefix / gvfs_datadir],
)
dbus_service_in = files('dbus.service.in')
......@@ -248,13 +248,13 @@ dbus_service_in = files('dbus.service.in')
# *** Check for giomoduledir and schemasdir ***
gio_giomoduledir = gio_dep.get_pkgconfig_variable(
'giomoduledir',
define_variable: ['libdir', gvfs_libdir],
define_variable: ['libdir', gvfs_prefix / gvfs_libdir],
)
gio_schemasdir = gio_dep.get_pkgconfig_variable(
'schemasdir',
define_variable: ['datadir', gvfs_datadir],
default: gvfs_datadir / 'glib-2.0/schemas',
define_variable: ['datadir', gvfs_prefix / gvfs_datadir],
default: gvfs_prefix / gvfs_datadir / 'glib-2.0/schemas',
)
# *** Check for systemd options ***
......@@ -458,7 +458,7 @@ i18n = import('i18n')
pkg = import('pkgconfig')
service_conf = configuration_data()
service_conf.set('libexecdir', gvfs_libexecdir)
service_conf.set('libexecdir', gvfs_prefix / gvfs_libexecdir)
po_dir = meson.source_root() / 'po'
......
......@@ -18,7 +18,7 @@ endif
dbus_service_conf = configuration_data()
dbus_service_conf.set('service', dbus_service)
dbus_service_conf.set('exec', gvfs_libexecdir / dbus_exec)
dbus_service_conf.set('exec', gvfs_prefix / gvfs_libexecdir / dbus_exec)
dbus_service_conf.set('systemd_service', dbus_systemd_service)
metadata_service = configure_file(
......@@ -51,7 +51,7 @@ deps = [
cflags = [
'-DDBUS_API_SUBJECT_TO_CHANGE',
'-DG_LOG_DOMAIN="@0@"'.format(gvfs_name.to_upper()),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
]
libmetadata = static_library(
......
......@@ -15,7 +15,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-AFC"',
'-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
]
executable(
......
......@@ -14,7 +14,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-GOA"',
'-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
]
executable(
......
......@@ -15,7 +15,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-GPhoto2"',
'-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
]
executable(
......
......@@ -54,7 +54,7 @@ foreach monitor: monitors
dbus_service_conf = configuration_data()
dbus_service_conf.set('service', dbus_service)
dbus_service_conf.set('exec', gvfs_libexecdir / dbus_exec)
dbus_service_conf.set('exec', gvfs_prefix / gvfs_libexecdir / dbus_exec)
dbus_service_conf.set('systemd_service', dbus_systemd_service)
monitor_service = configure_file(
......
......@@ -14,7 +14,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-MTP"',
'-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
]
executable(
......
......@@ -23,8 +23,8 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-RemoteVolumeMonitor"',
'-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DREMOTE_VOLUME_MONITORS_DIR="@0@"'.format(gvfs_remote_volume_monitors_dir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
'-DREMOTE_VOLUME_MONITORS_DIR="@0@"'.format(gvfs_prefix / gvfs_remote_volume_monitors_dir),
]
symbol_map = meson.current_source_dir() / 'symbol.map'
......@@ -57,7 +57,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="GVFS-RemoteVolumeMonitorDaemon"',
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
]
libgvfsproxyvolumemonitordaemon_noin = static_library(
......
......@@ -29,7 +29,7 @@ cflags = [
'-DG_LOG_DOMAIN="GVFS-UDisks2"',
'-DG_DISABLE_DEPRECATED',
'-DGIO_MODULE_DIR="@0@"'.format(gio_giomoduledir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
'-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
'-DUDISKS_API_IS_SUBJECT_TO_CHANGE',
]
......
......@@ -3,7 +3,7 @@ if enable_installed_tests
installed_tests_metadir = gvfs_datadir / 'installed-tests' / gvfs_name
tests_conf = configuration_data()
tests_conf.set('testdir', installed_tests_execdir)
tests_conf.set('testdir', gvfs_prefix / installed_tests_execdir)
configure_file(
input: 'session.conf.in',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment