summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2017-06-13 16:53:36 +0100
committerRichard Hughes <richard@hughsie.com>2017-06-13 16:53:38 +0100
commitde276b6d8f402e0f9854d9de497f8ba777a77e5e (patch)
tree95a63dc0e984805119f11b8b7d8e86d228be0a38
parent9407f7c7ba2223dc9c2504b2eb2556c9c39a8f5f (diff)
downloadappstream-glib-de276b6d8f402e0f9854d9de497f8ba777a77e5e.tar.gz
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, fix up some underlinking which was somehow allowed before. Fixes: https://github.com/hughsie/appstream-glib/issues/170
-rw-r--r--RELEASE4
-rw-r--r--libappstream-builder/meson.build5
-rw-r--r--meson.build32
3 files changed, 23 insertions, 18 deletions
diff --git a/RELEASE b/RELEASE
index 0b4fb1b..190a70e 100644
--- a/RELEASE
+++ b/RELEASE
@@ -33,11 +33,11 @@ git tag -s -f -m "Release 0.6.14" appstream_glib_0_6_14
git push --tags
git push
-5. run 'make distcheck'
+5. run 'ninja dist'
6. Upload tarball to:
-scp *.tar.* hughsient@people.freedesktop.org:~/public_html/appstream-glib/releases
+scp meson-dist/*.tar.* hughsient@people.freedesktop.org:~/public_html/appstream-glib/releases
7. Do post release version bump in configure.ac
diff --git a/libappstream-builder/meson.build b/libappstream-builder/meson.build
index e2a772e..ce257a4 100644
--- a/libappstream-builder/meson.build
+++ b/libappstream-builder/meson.build
@@ -109,7 +109,10 @@ asb_self_test = executable(
'-DTESTDIRBUILD="@0@/../data/tests"'.format(meson.current_build_dir()),
'-DTESTPLUGINDIR="@0@/plugins"'.format(meson.current_build_dir()),
],
- link_with : asbuilder
+ link_with : [
+ asbuilder,
+ asglib,
+ ],
)
test('asb-self-test', asb_self_test)
diff --git a/meson.build b/meson.build
index 78495ce..0eff656 100644
--- a/meson.build
+++ b/meson.build
@@ -129,19 +129,21 @@ endif
# depends on libappstream-builder
subdir('client')
-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('<meson-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