[gnome-software] Allow compiling with newer versions of meson
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Allow compiling with newer versions of meson
- Date: Wed, 14 Jun 2017 07:09:14 +0000 (UTC)
commit 40604fd303d9e23d8621eb94a17303d1c854d454
Author: Richard Hughes <richard hughsie com>
Date: Wed Jun 14 08:02:12 2017 +0100
Allow compiling with newer versions of meson
In 0.41.0 meson introduced it's own 'dist' target and so we don't need to
define this ourselves anymore. Use a version compare to avoid depending on a
very new meson.
Also, the new meson broke dependency('valgrind') so don't use that until a new
meson minor tarball is released.
RELEASE | 2 +-
meson.build | 43 ++++++++++++++++++++++++++-----------------
2 files changed, 27 insertions(+), 18 deletions(-)
---
diff --git a/RELEASE b/RELEASE
index c2ec073..25e7788 100644
--- a/RELEASE
+++ b/RELEASE
@@ -19,7 +19,7 @@ ninja-build dist
5. Upload tarballs:
-scp *.tar.xz rhughes master gnome org:
+scp meson-dist/*.tar.xz rhughes master gnome org:
6. Install module
diff --git a/meson.build b/meson.build
index 9feb0a8..e5f187f 100644
--- a/meson.build
+++ b/meson.build
@@ -101,8 +101,15 @@ libsoup = dependency('libsoup-2.4', version : '>= 2.51.92')
sqlite3 = dependency('sqlite3')
if get_option('enable-valgrind')
- valgrind = dependency('valgrind')
- conf.set('USE_VALGRIND', 1)
+ message(meson.version())
+ # urgh, meson is broken
+ if meson.version().version_compare('>0.41.0')
+ valgrind = dependency('valgrind')
+ conf.set('USE_VALGRIND', 1)
+ else
+ message('Valgrind integration disabled to work around a meson bug')
+ valgrind = []
+ endif
else
message('Valgrind integration disabled')
valgrind = []
@@ -200,21 +207,23 @@ subdir('po')
subdir('data')
subdir('doc')
-archiver = find_program('git', required : false)
-if archiver.found()
- run_target('dist',
- # git config tar.tar.xz.command "xz -c"
- command: [
- 'git', 'archive',
- '--prefix=' + meson.project_name() + '-' + meson.project_version() + '/',
- 'HEAD',
- '--format=tar.xz',
- '--output',
- meson.project_name() + '-' + meson.project_version() + '.tar.xz'
- ]
- )
-else
- message('git not found, you will not be able to run `ninja dist`')
+if meson.version().version_compare('<0.41.0')
+ archiver = find_program('git', required : false)
+ if archiver.found()
+ run_target('dist',
+ # git config tar.tar.xz.command "xz -c"
+ command: [
+ 'git', 'archive',
+ '--prefix=' + meson.project_name() + '-' + meson.project_version() + '/',
+ 'HEAD',
+ '--format=tar.xz',
+ '--output',
+ meson.project_name() + '-' + meson.project_version() + '.tar.xz'
+ ]
+ )
+ else
+ message('git not found, you will not be able to run `ninja dist`')
+ endif
endif
appstream_util = find_program('appstream-util', required : false)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]