[tracker-miners/wip/sam/meson-subproject: 5/5] meson: Set rpath for all binaries
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/sam/meson-subproject: 5/5] meson: Set rpath for all binaries
- Date: Thu, 19 Oct 2017 20:34:24 +0000 (UTC)
commit 704283c669bd58707683049167ddf2ed9ed697f7
Author: Sam Thursfield <sam thursfield codethink co uk>
Date: Thu Oct 19 21:02:42 2017 +0100
meson: Set rpath for all binaries
This fixes two issues; one where the Tracker daemons don't work if
installed in a non-standard prefix unless you set LD_LIBRARY_PATH
appropriately, and the other where the daemons fail to start if
built with Tracker core as a subproject due to failing to find the
single copy of libtracker-common.
meson.build | 10 ++++++++++
src/miners/apps/meson.build | 2 +-
src/miners/fs/meson.build | 2 +-
src/miners/rss/meson.build | 2 +-
src/tracker-extract/meson.build | 3 ++-
src/tracker-writeback/meson.build | 3 ++-
6 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index 183f02f..849fb8d 100644
--- a/meson.build
+++ b/meson.build
@@ -365,6 +365,16 @@ configinc = include_directories('./')
srcinc = include_directories('src/')
tracker_internal_libs_dir = join_paths(get_option('prefix'), get_option('libdir'), 'tracker-miners-' +
tracker_api_version)
+tracker_libs_dir = join_paths(get_option('prefix'), get_option('libdir'))
+
+if tracker_subproject == false
+ tracker_rpath = ':'.join([tracker_libs_dir, tracker_internal_libs_dir])
+else
+ # This slight hack is needed to locate the copy of libtracker-common.so
+ # built by the tracker core subproject.
+ tracker_core_internal_libs_dir = join_paths(get_option('prefix'), get_option('libdir'), 'tracker-' +
tracker_api_version)
+ tracker_rpath = ':'.join([tracker_libs_dir, tracker_internal_libs_dir, tracker_core_internal_libs_dir])
+endif
tracker_extract_modules_dir = join_paths(get_option('prefix'), get_option('libdir'),
'tracker-miners-@0@/extract-modules'.format(tracker_api_version))
# NOTE: We don't use ${TRACKER_API_VERSION} because other content like
diff --git a/src/miners/apps/meson.build b/src/miners/apps/meson.build
index 1ec46d5..7c537fe 100644
--- a/src/miners/apps/meson.build
+++ b/src/miners/apps/meson.build
@@ -8,7 +8,7 @@ executable('tracker-miner-apps', sources,
c_args: tracker_c_args,
install: true,
install_dir: get_option('libexecdir'),
- install_rpath: tracker_internal_libs_dir,
+ install_rpath: tracker_rpath,
)
dbus_service_file_untranslated = configure_file(
diff --git a/src/miners/fs/meson.build b/src/miners/fs/meson.build
index 2ba122e..15075c7 100644
--- a/src/miners/fs/meson.build
+++ b/src/miners/fs/meson.build
@@ -31,7 +31,7 @@ executable('tracker-miner-fs', sources,
c_args: tracker_c_args,
install: true,
install_dir: get_option('libexecdir'),
- install_rpath: tracker_internal_libs_dir,
+ install_rpath: tracker_rpath,
)
dbus_service_file_untranslated = configure_file(
diff --git a/src/miners/rss/meson.build b/src/miners/rss/meson.build
index 6d7e1ac..9628145 100644
--- a/src/miners/rss/meson.build
+++ b/src/miners/rss/meson.build
@@ -8,7 +8,7 @@ executable('tracker-miner-rss', sources,
c_args: tracker_c_args,
install: true,
install_dir: get_option('libexecdir'),
- install_rpath: tracker_internal_libs_dir,
+ install_rpath: tracker_rpath,
)
dbus_service_file_untranslated = configure_file(
diff --git a/src/tracker-extract/meson.build b/src/tracker-extract/meson.build
index 627b0ea..b42bf9c 100644
--- a/src/tracker-extract/meson.build
+++ b/src/tracker-extract/meson.build
@@ -158,7 +158,8 @@ executable('tracker-extract',
c_args: tracker_c_args + ['-I' + meson.build_root()],
dependencies: tracker_extract_dependencies,
install: true,
- install_dir: join_paths(get_option('prefix'), get_option('libexecdir')))
+ install_dir: join_paths(get_option('prefix'), get_option('libexecdir')),
+ install_rpath: tracker_rpath)
dbus_service_file_untranslated = configure_file(
input: 'org.freedesktop.Tracker1.Miner.Extract.service.in.in',
diff --git a/src/tracker-writeback/meson.build b/src/tracker-writeback/meson.build
index cd32edd..c3a8767 100644
--- a/src/tracker-writeback/meson.build
+++ b/src/tracker-writeback/meson.build
@@ -46,7 +46,8 @@ executable('tracker-writeback',
],
dependencies: [gmodule, tracker_miner, tracker_sparql, tracker_common_dep],
install: true,
- install_dir: join_paths(get_option('prefix'), get_option('libexecdir')))
+ install_dir: join_paths(get_option('prefix'), get_option('libexecdir')),
+ install_rpath: tracker_rpath)
dbus_service_file = configure_file(
input: 'org.freedesktop.Tracker1.Writeback.service.in',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]