[polari] build: Meson cleanup
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] build: Meson cleanup
- Date: Tue, 14 Mar 2017 16:58:10 +0000 (UTC)
commit b725582b86a28a782c5984a6de97cbf574569bd9
Author: Patrick Griffis <tingping tingping se>
Date: Mon Mar 13 22:12:17 2017 -0400
build: Meson cleanup
- Use relative paths
- Remove uneeded join_paths()
- Fix post-install script handling DESTDIR
build-aux/meson/meson-postinstall.sh | 9 ++++++---
data/appdata/meson.build | 2 +-
data/meson.build | 2 +-
meson.build | 8 +-------
src/meson.build | 20 +++++++++-----------
5 files changed, 18 insertions(+), 23 deletions(-)
---
diff --git a/build-aux/meson/meson-postinstall.sh b/build-aux/meson/meson-postinstall.sh
index 575aba3..afee4ac 100755
--- a/build-aux/meson/meson-postinstall.sh
+++ b/build-aux/meson/meson-postinstall.sh
@@ -1,5 +1,8 @@
#!/bin/sh
-glib-compile-schemas ${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas
-update-desktop-database -q
-gtk-update-icon-cache -q -t -f ${MESON_INSTALL_PREFIX}/share/icons/hicolor
+# Package managers set this so we don't need to run
+if [ -z "$DESTDIR" ]; then
+ glib-compile-schemas ${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas
+ update-desktop-database -q ${MESON_INSTALL_PREFIX}/share/applications
+ gtk-update-icon-cache -q -t -f ${MESON_INSTALL_PREFIX}/share/icons/hicolor
+fi
\ No newline at end of file
diff --git a/data/appdata/meson.build b/data/appdata/meson.build
index 69bb3ce..8d2bf89 100644
--- a/data/appdata/meson.build
+++ b/data/appdata/meson.build
@@ -2,7 +2,7 @@ appdata = app_id + '.appdata.xml'
i18n.merge_file('appdata',
input: appdata + '.in',
output: appdata,
- po_dir: src_podir,
+ po_dir: '../../po',
install: true,
install_dir: appdatadir)
diff --git a/data/meson.build b/data/meson.build
index 8ff0748..0f97a8f 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -5,7 +5,7 @@ desktop_file = app_id + '.desktop'
i18n.merge_file('desktop',
input: desktop_file + '.in',
output: desktop_file,
- po_dir: src_podir,
+ po_dir: '../po',
install: true,
install_dir: desktopdir,
type: 'desktop')
diff --git a/meson.build b/meson.build
index 392caea..e62478d 100644
--- a/meson.build
+++ b/meson.build
@@ -26,10 +26,6 @@ tpclientdir = join_paths(datadir, 'telepathy', 'clients')
girdir = join_paths(pkgdatadir, 'gir-1.0')
typelibdir = join_paths(pkglibdir, 'girepository-1.0')
-src_auxdir = join_paths(meson.source_root(), 'build-aux', 'meson')
-src_datadir = join_paths(meson.source_root(), 'data')
-src_podir = join_paths(meson.source_root(), 'po')
-
gjs_console = find_program('gjs')
desktop_file_validate = find_program('desktop-file-validate', required: false)
@@ -51,6 +47,4 @@ subdir('data')
subdir('po')
subdir('help')
-if (not is_variable('DESTDIR'))
- meson.add_install_script(join_paths(src_auxdir, 'meson-postinstall.sh'))
-endif
+meson.add_install_script('build-aux/meson/meson-postinstall.sh')
diff --git a/src/meson.build b/src/meson.build
index 5470ef2..f5e56e2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -6,15 +6,13 @@ configure_file(input: script + '.in',
output: script,
configuration: script_conf)
-resource_name = app_id + '.data.gresource.xml'
data_resources = gnome.compile_resources('data-resources',
- join_paths(src_datadir, resource_name),
- source_dir: src_datadir,
+ '../data/@0 data gresource xml'.format(app_id),
+ source_dir: '../data',
c_name: 'data_resources')
-resource_name = app_id + '.src.gresource.xml'
src_resources = gnome.compile_resources('src-resources',
- resource_name,
+ '@0 src gresource xml'.format(app_id),
c_name: 'src_resources')
exeargs = ['-DPACKAGE_NAME="polari"',
@@ -28,12 +26,12 @@ polari = executable('polari',
c_args: exeargs,
install: true)
-libsources = [join_paths('lib', 'polari-drag-helper.c'),
- join_paths('lib', 'polari-drag-helper.h'),
- join_paths('lib', 'polari-room.c'),
- join_paths('lib', 'polari-room.h'),
- join_paths('lib', 'polari-util.c'),
- join_paths('lib', 'polari-util.h')]
+libsources = ['lib/polari-drag-helper.c',
+ 'lib/polari-drag-helper.h',
+ 'lib/polari-room.c',
+ 'lib/polari-room.h',
+ 'lib/polari-util.c',
+ 'lib/polari-util.h']
libargs = ['-DG_LOG_USE_STRUCTURED',
'-DG_LOG_DOMAIN="Polari"']
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]