[gnome-bluetooth: 7/14] build: Do not use prefix on directory variables
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth: 7/14] build: Do not use prefix on directory variables
- Date: Fri, 11 Jan 2019 11:23:24 +0000 (UTC)
commit e6e08123e4899b60bece17a2f089e899c6f05d98
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Fri Dec 21 10:40:58 2018 +0100
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.
lib/meson.build | 2 +-
meson.build | 6 +++---
meson_post_install.py | 4 +++-
3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/lib/meson.build b/lib/meson.build
index cf1f520b..c7afd18f 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -74,7 +74,7 @@ deps = [
]
cflags = [
- '-DPKGDATADIR="@0@"'.format(gnomebt_pkgdatadir),
+ '-DPKGDATADIR="@0@"'.format(gnomebt_prefix / gnomebt_pkgdatadir),
'-DG_LOG_DOMAIN="Bluetooth"',
]
diff --git a/meson.build b/meson.build
index 0ba2f6eb..07b417af 100644
--- a/meson.build
+++ b/meson.build
@@ -20,8 +20,8 @@ gnomebt_gir_ns = 'GnomeBluetooth'
gnomebt_gettext_package = meson.project_name() + '2'
gnomebt_prefix = get_option('prefix')
-gnomebt_datadir = gnomebt_prefix / get_option('datadir')
-gnomebt_localedir = gnomebt_prefix / get_option('localedir')
+gnomebt_datadir = get_option('datadir')
+gnomebt_localedir = get_option('localedir')
gnomebt_pkgdatadir = gnomebt_datadir / meson.project_name()
@@ -56,7 +56,7 @@ config_h = configuration_data()
#i18n
config_h.set_quoted('GETTEXT_PACKAGE', gnomebt_gettext_package)
-config_h.set_quoted('LOCALEDIR', gnomebt_localedir)
+config_h.set_quoted('LOCALEDIR', gnomebt_prefix / gnomebt_localedir)
# compiler flags
common_flags = [
diff --git a/meson_post_install.py b/meson_post_install.py
index cd917218..bf71922d 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -5,6 +5,8 @@ import subprocess
import sys
if not os.environ.get('DESTDIR') and sys.argv[1] == 'icon_update':
- icondir = os.path.join(sys.argv[2], 'icons', 'hicolor')
+ prefix = os.environ['MESON_INSTALL_PREFIX']
+
+ icondir = os.path.join(prefix, sys.argv[2], 'icons', 'hicolor')
print('Update icon cache...')
subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]