diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2020-07-08 17:23:12 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-07-08 17:23:12 +0100 |
commit | f7fc58112e668ef0718f8a09c95d32ba9cc38140 (patch) | |
tree | 6be56b11907ef9f22d596fbe7642671b1242bdbf /meson.build | |
parent | 88fa030ab19ca1128235b376363fab773d6fea08 (diff) | |
download | gst-libav-f7fc58112e668ef0718f8a09c95d32ba9cc38140.tar.gz |
meson: set release date from .doap file for releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/84>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 2f92b2b..c829fb9 100644 --- a/meson.build +++ b/meson.build @@ -93,8 +93,6 @@ gstpbutils_dep = dependency('gstreamer-pbutils-1.0', version : gst_req, fallback : ['gst-plugins-base', 'pbutils_dep']) libm = cc.find_library('m', required : false) -configure_file(output : 'config.h', configuration : cdata) - gst_libav_args = ['-DHAVE_CONFIG_H'] if cc.get_id() == 'msvc' # Ignore several spurious warnings for things gstreamer does very commonly @@ -188,5 +186,21 @@ plugins = [] subdir('ext/libav') subdir('docs') +# Set release date +if gst_version_nano == 0 + extract_release_date = find_program('scripts/extract-release-date-from-doap-file.py') + run_result = run_command(extract_release_date, gst_version, files('gst-libav.doap')) + if run_result.returncode() == 0 + release_date = run_result.stdout().strip() + cdata.set_quoted('GST_PACKAGE_RELEASE_DATETIME', release_date) + message('Package release date: ' + release_date) + else + # Error out if our release can't be found in the .doap file + error(run_result.stderr()) + endif +endif + +configure_file(output: 'config.h', configuration: cdata) + python3 = import('python').find_installation() run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")') |