From: Tim-Philipp Müller Date: Sat, 20 May 2017 13:53:42 +0000 (+0100) Subject: meson: add options to set package name and origin X-Git-Tag: 1.19.3~509^2~2072 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c35292505bea1698df3ba34be51d9ccfce92c04b;p=platform%2Fupstream%2Fgstreamer.git meson: add options to set package name and origin https://bugzilla.gnome.org/show_bug.cgi?id=782172 --- diff --git a/meson.build b/meson.build index 497dd47..5b0a680 100644 --- a/meson.build +++ b/meson.build @@ -136,9 +136,19 @@ cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version)) cdata.set('GST_LICENSE', '"LGPL"') cdata.set('PACKAGE', '"gst-plugins-good"') cdata.set('GETTEXT_PACKAGE', '"gst-plugins-good-1.0"') -cdata.set('PACKAGE_NAME', '"GStreamer Good Plug-ins"') -cdata.set('GST_PACKAGE_NAME', '"GStreamer Good Plug-ins"') -cdata.set('GST_PACKAGE_ORIGIN', '"Unknown package origin"') # FIXME: make configurable + +# GStreamer package name and origin url +gst_package_name = get_option('with-package-name') +if gst_package_name == '' + if gst_version_nano == 0 + cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer Good Plug-ins source release') + elif gst_version_nano == 1 + cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer Good Plug-ins git') + else + cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer Good Plug-ins prerelease') + endif +endif +cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('with-package-origin')) # Mandatory GST deps gst_dep = dependency('gstreamer-1.0', version : gst_req, diff --git a/meson_options.txt b/meson_options.txt index c8117cc..dccf42e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,3 +4,7 @@ option('v4l2-probe', type : 'boolean', value : true) option('with-libv4l2', type : 'boolean', value : true) # Whether to use orc or not (auto will autodetect, yes will error out if not found) option('use_orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto') +option('with-package-name', type : 'string', + description : 'package name to use in plugins') +option('with-package-origin', type : 'string', value : 'Unknown package origin', + description : 'package origin URL to use in plugins') diff --git a/tests/check/elements/autodetect.c b/tests/check/elements/autodetect.c index eb36977..4e0f1c7 100644 --- a/tests/check/elements/autodetect.c +++ b/tests/check/elements/autodetect.c @@ -212,8 +212,7 @@ autodetect_suite (void) "autodetect-test", "autodetect test elements", plugin_init, - VERSION, "LGPL", PACKAGE, PACKAGE_NAME, - "http://gstreamer.freedesktop.org"); + VERSION, "LGPL", PACKAGE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_autovideosink_plugs_best);