build: downgrade of meson 91/271091/3
authorEunhye Choi <eunhae1.choi@samsung.com>
Tue, 15 Feb 2022 07:56:34 +0000 (16:56 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Tue, 15 Feb 2022 08:30:21 +0000 (17:30 +0900)
- downgrade of meson temporarily for SR verification.
- this will be reverted as soon as meson 0.60.3 is applied
  at tizen_base.

Change-Id: I458e1907c36011c45efc6cf9a49292eac281fabd

38 files changed:
meson.build
meson_options.txt
packaging/gstreamer.spec
subprojects/gst-editing-services/meson.build
subprojects/gst-libav/docs/meson.build
subprojects/gst-libav/meson.build
subprojects/gst-omx/docs/meson.build
subprojects/gst-omx/meson.build
subprojects/gst-plugins-bad/docs/meson.build
subprojects/gst-plugins-bad/ext/dts/meson.build
subprojects/gst-plugins-bad/ext/faad/meson.build
subprojects/gst-plugins-bad/ext/iqa/meson.build
subprojects/gst-plugins-bad/ext/mpeg2enc/meson.build
subprojects/gst-plugins-bad/ext/mplex/meson.build
subprojects/gst-plugins-bad/ext/resindvd/meson.build
subprojects/gst-plugins-bad/ext/wayland/meson.build
subprojects/gst-plugins-bad/ext/x265/meson.build
subprojects/gst-plugins-bad/meson.build
subprojects/gst-plugins-bad/meson_options.txt
subprojects/gst-plugins-base/docs/meson.build
subprojects/gst-plugins-base/ext/ogg/meson.build
subprojects/gst-plugins-base/ext/vorbis/meson.build
subprojects/gst-plugins-base/meson.build
subprojects/gst-plugins-base/tests/meson.build
subprojects/gst-plugins-good/docs/meson.build
subprojects/gst-plugins-good/meson.build
subprojects/gst-plugins-ugly/docs/meson.build
subprojects/gst-plugins-ugly/ext/a52dec/meson.build
subprojects/gst-plugins-ugly/ext/cdio/meson.build
subprojects/gst-plugins-ugly/ext/dvdread/meson.build
subprojects/gst-plugins-ugly/ext/mpeg2dec/meson.build
subprojects/gst-plugins-ugly/ext/sidplay/meson.build
subprojects/gst-plugins-ugly/ext/x264/meson.build
subprojects/gst-plugins-ugly/meson.build
subprojects/gst-plugins-ugly/meson_options.txt
subprojects/gst-rtsp-server/docs/meson.build
subprojects/gst-rtsp-server/meson.build
subprojects/gstreamer/meson.build

index 45ff5e26c5845860815445a4ae4e40d52e446279..a3cd1511dd57a26ad89aa5981b897372dd0f7cd4 100644 (file)
@@ -1,6 +1,6 @@
 project('gstreamer-full', 'c',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : ['buildtype=debugoptimized',
                      # Needed due to https://github.com/mesonbuild/meson/issues/1889,
                      # but this can cause problems in the future. Remove it
@@ -156,6 +156,10 @@ foreach sp : subprojects
     orc_update_targets += subproj.get_variable('orc_update_targets', [])
 
     subprojects_names += [project_name]
+    cmdres = run_command(python3, '-c', symlink.format(project_name, meson.current_source_dir()))
+    if cmdres.returncode() == 0
+      message('Created symlink to ' + project_name)
+    endif
 
     if not meson.is_cross_build() and build_infos.get('build-hotdoc', false)
       if plugins.length() > 0
@@ -224,24 +228,13 @@ if documented_projects != ''
 endif
 
 all_plugins_paths = []
-all_plugins_dirs = []
 foreach plugin: all_plugins
   all_plugins_paths += plugin.full_path()
-  all_plugins_dirs += fs.parent(plugin.full_path())
 endforeach
 # Work around meson bug: https://github.com/mesonbuild/meson/pull/6770
 pathsep = host_machine.system() == 'windows' ? ';' : ':'
 all_plugins_paths = pathsep.join(all_plugins_paths)
 
-devenv = environment()
-devenv.set('GST_PLUGIN_PATH', all_plugins_dirs)
-devenv.set('CURRENT_GST', meson.current_source_dir())
-devenv.set('GST_VERSION', meson.project_version())
-devenv.set('GST_ENV', 'gst-' + meson.project_version())
-devenv.set('GST_REGISTRY', meson.current_build_dir() / 'registry.dat')
-devenv.set('GST_PLUGIN_SYSTEM_PATH', '')
-meson.add_devenv(devenv)
-
 generate_plugins_paths = find_program('scripts/generate_plugins_path.py')
 configure_file(
   output : 'GstPluginsPath.json',
@@ -328,7 +321,7 @@ if get_option('default_library') == 'static'
     elif cc.get_id() == 'msvc'
       warning('FIXME: Provide a def file to publish the public symbols')
     else
-      warning('FIXME: Linker does not support the supplied version script (' + symbol_map + '), please disable the "gst-full-version-script" option')
+      error('Failed to link with version script (' + symbol_map + '), check logs for details')
     endif
   endif
 
@@ -377,15 +370,23 @@ if get_option('default_library') == 'static'
   meson.override_dependency('gstreamer-full-1.0', gst_full_dep)
 endif
 
+foreach custom_subproj: get_option('custom_subprojects').split(',')
+    if custom_subproj != ''
+        message ('Adding custom subproject ' + custom_subproj)
+        subproject(custom_subproj)
+        subprojects_names += [custom_subproj]
+    endif
+endforeach
+
 message('Building subprojects: ' + ', '.join(subprojects_names))
 
 setenv = find_program('gst-env.py')
-devenv_cmd = [setenv, '--builddir=@0@'.format(meson.project_build_root()),
+devenv_cmd = [setenv, '--builddir=@0@'.format(meson.build_root()),
               '--gstbuilddir=@0@'.format(meson.current_build_dir()),
-              '--srcdir=@0@'.format(meson.project_source_root())]
+              '--srcdir=@0@'.format(meson.source_root())]
 
 subdir('tests')
-if meson.can_run_host_binaries() and build_machine.system() == 'linux' and host_machine.system() == 'windows'
+if meson.has_exe_wrapper() and build_machine.system() == 'linux' and host_machine.system() == 'windows'
   # FIXME: Ideally we could get the wrapper directly from meson
   devenv_cmd += ['--wine', host_machine.cpu_family() == 'x86_64' ? 'wine64' : 'wine32']
   sysroot = meson.get_cross_property('sys_root')
index cd2ff15ef0430dc2c8eab840255b78cf36fea7fc..df785d3f529562e444dbd3a66fc9211676731ae8 100644 (file)
@@ -34,10 +34,6 @@ option('gst-full-device-providers', type : 'string', value : '',
 option('gst-full-dynamic-types', type : 'string', value : '',
   description : '''List of dynamic types to expose in gstreamer-full's ABI with the syntax plugin:dt1,dt2. By default '' will export all device provider of the enabled plugin.''')
 
-# License-related feature options
-option('gpl', type: 'feature', value: 'disabled',
-  description: 'Allow build of plugins that have (A)GPL-licensed dependencies')
-
 # Common options, automatically inherited by subprojects
 option('tests', type : 'feature', value : 'auto', description : 'Build tests')
 option('examples', type : 'feature', value : 'auto', description : 'Build examples')
index 5f8a704f28e7ff570925fb9d377386e76782f541..37d5a632a5bcf72b0a37091e6765198e734a65e8 100644 (file)
@@ -66,7 +66,7 @@ Group:          Multimedia/Framework
 Url:            http://gstreamer.freedesktop.org/
 Source0:        gstreamer-%{version}.tar.gz
 Source1001:     gstreamer.manifest
-BuildRequires:  meson >= 0.59.0
+BuildRequires:  meson >= 0.52.0
 BuildRequires:  gettext-tools
 BuildRequires:  pkgconfig(glib-2.0) >= 2.32.0
 
index 8e6244222846d4c59ac7dbf62a5d5e9894a3bc4b..6ad18f17f4e1a23c414e751ff48bc44df59cc40b 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-editing-services', 'c',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
index 5f25f208372ddc6be468bef7b74b46f881736166..eb2c125987cd73efb60b794e44e64731b4189f6e 100644 (file)
@@ -14,7 +14,7 @@ if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
 else
-    plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+    plugins_cache_generator = find_program(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
     required: false)
 endif
 
index 08473fd6e085b3d30540bd97942f3645e109f4d2..23014614cca977c074b23e5860e3a9041b2a5f92 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-libav', 'c', 'cpp',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
index 811929d90dcdad22240ba5faba1a11692336d60c..908b4cfb750cbe562ddd1eeff905b9b5aeea3afb 100644 (file)
@@ -15,7 +15,7 @@ if gst_dep.type_name() == 'internal'
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
 else
     required_hotdoc_extensions += ['gst-extension']
-    plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+    plugins_cache_generator = find_program(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
         required: false)
 endif
 
index 89f55fb3bce653f752ca38694ab1d916bea44776..1de769887c81e90e795c3cf9a225715d90549b55 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-omx', 'c',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
index e3f952c187a75b00a44712c5bbcb788ddc8f7e78..8ed754c516d1ed0261b04a51ffe9d0a026e61875 100644 (file)
@@ -31,7 +31,7 @@ if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
 else
-    plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+    plugins_cache_generator = find_program(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
         required: false)
 endif
 
index e4a5bcbfef3e2a2820b7508c37c0fdecf7ca58c6..8ab3fc917f03ef62ec0b21f89983b9ce4f779260 100644 (file)
@@ -1,10 +1,5 @@
-dts_opt = get_option('dts').require(gpl_allowed, error_message: '''
-  Plugin dts explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
 # Don't do any dependency checks if disabled
-if dts_opt.disabled()
+if get_option('dts').disabled()
   subdir_done()
 endif
 
@@ -14,7 +9,7 @@ if not dca_dep.found()
   if cc.has_header_symbol('dca.h', 'dca_init')
     dca_dep = cc.find_library('dca', required : false)
   endif
-  if not dca_dep.found() and dts_opt.enabled()
+  if not dca_dep.found() and get_option('dts').enabled()
     error('DTS plugin enabled, but libdca not found')
   endif
 endif
index 2e633bd53155a383548b3cf7b7c7e17338a19dde..e3aefc90763b773b621cd8b6640eae7d56baa75d 100644 (file)
@@ -1,22 +1,12 @@
-faad_opt = get_option('faad').require(gpl_allowed, error_message: '''
-  Plugin faad explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
-if faad_opt.disabled()
-  faad_dep = dependency('', required: false)
-  subdir_done()
-endif
-
 faad_args = [ ]
 
 have_faad = cc.has_header_symbol('neaacdec.h', 'NeAACDecOpen')
 have_faad_2_7 = have_faad and cc.has_header_symbol('neaacdec.h', 'LATM')
-if have_faad and not have_faad_2_7 and faad_opt.enabled()
+if have_faad and not have_faad_2_7 and get_option('faad').enabled()
   message('Found faad2, but too old (< v2.7.0)')
 endif
 
-faad_dep = cc.find_library('faad', required : faad_opt)
+faad_dep = cc.find_library('faad', required : get_option('faad'))
 
 if faad_dep.found() and have_faad_2_7
   gstfaad = library('gstfaad',
index 08d37a35093883eab23e36919a35ee809f09a005..75e07fc44546def690995c5ef55ef368c9e17815 100644 (file)
@@ -1,9 +1,4 @@
-iqa_opt = get_option('iqa').require(gpl_allowed, error_message: '''
-  Plugin iqa explicitly required via options but (A)GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow (A)GPL-licensed plugins to be built.
-  ''')
-
-dssim_dep = dependency('dssim', required: iqa_opt,
+dssim_dep = dependency('dssim', required : get_option('iqa'),
     fallback: ['dssim', 'dssim_dep'])
 
 if dssim_dep.found()
index 325df936dcedfac2212cd581d8f67e893d32f912..af99bd564c30d256e21a74f032b4cd31d9f2d205 100644 (file)
@@ -1,26 +1,21 @@
-mpeg2enc_opt = get_option('mpeg2enc').require(gpl_allowed, error_message: '''
-  Plugin mpeg2enc explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
 # mjpegtools upstream breaks API constantly and doesn't export the version in
 # a header anywhere. The configure file has a lot of logic to support old
 # versions, but it all seems untested and broken. Require 2.0.0. Can be changed
 # if someone complains.
-mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : mpeg2enc_opt)
-mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : mpeg2enc_opt)
+mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : get_option('mpeg2enc'))
+mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : get_option('mpeg2enc'))
 
-if mjpegtools_dep.found() and mpeg2enc_dep.found()
-  no_warn_args = []
-  foreach arg : [
-      '-Wno-mismatched-tags', # mjpeg headers get class/struct mixed up
-      '-Wno-header-guard',
-    ]
-    if cxx.has_argument(arg)
-      no_warn_args += [arg]
-    endif
-  endforeach
+no_warn_args = []
+foreach arg : [
+    '-Wno-mismatched-tags', # mjpeg headers get class/struct mixed up
+    '-Wno-header-guard',
+  ]
+  if cxx.has_argument(arg)
+    no_warn_args += [arg]
+  endif
+endforeach
 
+if mjpegtools_dep.found() and mpeg2enc_dep.found()
   gstmpeg2enc = library('gstmpeg2enc',
     'gstmpeg2enc.cc',
     'gstmpeg2encoptions.cc',
index 38a017e12fa5f83524f0e7f16907f6e3d41bbf50..a1ac6ac57d9f4c99c78dbb4d533e0d87bcb43a56 100644 (file)
@@ -1,11 +1,6 @@
-mplex_opt = get_option('mplex').require(gpl_allowed, error_message: '''
-  Plugin mplex explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
-# See: ext/mplex for note about mjpegtools dep
-mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : mplex_opt)
-mplex2_dep = cxx.find_library('mplex2', required : mplex_opt)
+# See: ext/mpeg2enc for note about mjpegtools dep
+mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : get_option('mplex'))
+mplex2_dep = cxx.find_library('mplex2', required : get_option('mplex'))
 
 if mjpegtools_dep.found() and mplex2_dep.found()
   gstmplex2 = library('gstmplex',
index b7c901b505323af1b6f482fead5dde676540496f..06c216a33bcf017d079561b2bb65ff9b863776da 100644 (file)
@@ -1,8 +1,3 @@
-resindvd_opt = get_option('resindvd').require(gpl_allowed, error_message: '''
-  Plugin resindvd explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
 resindvd_sources = [
   'gstmpegdemux.c',
   'gstmpegdesc.c',
@@ -15,8 +10,8 @@ resindvd_sources = [
   'rsnparsetter.c',
 ]
 
-dvdnav_dep = dependency('dvdnav', version : '>= 4.1.2', required : resindvd_opt)
-dvdread_dep = dependency('dvdread', version : '>= 4.1.2', required : resindvd_opt)
+dvdnav_dep = dependency('dvdnav', version : '>= 4.1.2', required : get_option('resindvd'))
+dvdread_dep = dependency('dvdread', version : '>= 4.1.2', required : get_option('resindvd'))
 
 if dvdnav_dep.found() and dvdread_dep.found()
   gstresindvd = library('gstresindvd',
index a3ffb70d8456279441442165831b47c5a5729300..75800b287b008331c7d39e5e2bfb11a7704dcff6 100644 (file)
@@ -11,7 +11,7 @@ wl_sources = [
 libdrm_dep = dependency('libdrm', version: '>= 2.4.55', required:get_option('wayland'))
 
 if use_wayland
-    protocols_datadir = wl_protocol_dep.get_variable('pkgdatadir')
+    protocols_datadir = wl_protocol_dep.get_pkgconfig_variable('pkgdatadir')
 
     protocol_defs = [
         ['/stable/viewporter/viewporter.xml', 'viewporter-protocol.c', 'viewporter-client-protocol.h'],
index 9743803868005b4d40f8f791066eff84d0be55c2..b664caebf8f2f91f07c9d4e3c9aaae0ad1e7c1cd 100644 (file)
@@ -1,9 +1,4 @@
-x265_opt = get_option('x265').require(gpl_allowed, error_message: '''
-  Plugin x265 explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
-x265_dep = dependency('x265', required: x265_opt)
+x265_dep = dependency('x265', required: get_option('x265'))
 if x265_dep.found()
   gstx265 = library('gstx265',
     'gstx265enc.c',
index 3b72173caf05913af0a1d19016346ee545dced8a..0963ff84a4436f9c89d5754013ff2cc7e5a75e90 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-plugins-bad', 'c', 'cpp',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
@@ -321,9 +321,9 @@ gstglegl_dep = dependency('', required : false)
 
 if gstgl_dep.found()
   if gstgl_dep.type_name() == 'pkgconfig'
-    gst_gl_apis = gstgl_dep.get_variable('gl_apis').split()
-    gst_gl_winsys = gstgl_dep.get_variable('gl_winsys').split()
-    gst_gl_platforms = gstgl_dep.get_variable('gl_platforms').split()
+    gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis').split()
+    gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys').split()
+    gst_gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms').split()
   else
     gstbase = subproject('gst-plugins-base')
     gst_gl_apis = gstbase.get_variable('enabled_gl_apis')
@@ -457,7 +457,7 @@ cdata.set('TIZEN_FEATURE_WEBRTC_IMPORT_NETSIM', true)
 cdata.set('TIZEN_FEATURE_PITCH_AUDIO_META', true)
 
 # For plugins from libnice
-libnice_dep = dependency('nice', version : '>=0.1.17', required : get_option('nice'))
+libnice_dep = dependency('nice', version : '>=0.1.17', required : true)
 
 # TIZEN BUILD OPTION end
 
@@ -524,8 +524,6 @@ pkgconfig.generate(
   description : 'Streaming media framework, bad plugins libraries',
 )
 
-gpl_allowed = get_option('gpl').allowed()
-
 subdir('gst-libs')
 subdir('gst')
 subdir('sys')
@@ -582,16 +580,17 @@ configure_file(output : 'config.h', configuration : cdata)
 
 subdir('docs')
 
-plugin_names = []
-foreach plugin: plugins
-  if plugin.name().startswith('gst')
-    plugin_names += [plugin.name().substring(3)]
-  else
-    plugin_names += [plugin.name()]
-  endif
-endforeach
-
-summary({
-    'Plugins': plugin_names,
-      '(A)GPL license allowed': gpl_allowed,
-}, list_sep: ', ')
+if meson.version().version_compare('>= 0.54')
+  plugin_names = []
+  foreach plugin: plugins
+    # FIXME: Use str.subtring() when we can depend on Meson 0.56
+    split = plugin.name().split('gst')
+    if split.length() == 2
+      plugin_names += [split[1]]
+    else
+      warning('Need substring API in meson >= 0.56 to properly parse plugin name: ' + plugin.name())
+      plugin_names += [plugin.name()]
+    endif
+  endforeach
+  summary({'Plugins':plugin_names}, list_sep: ', ')
+endif
index 7fa60e12234c610176d5e5eb170c7022bf85c64e..be0a27bd09bd515a7bf109cef6107d59f4527948 100644 (file)
@@ -191,10 +191,6 @@ option('sctp-internal-usrsctp', type: 'feature', value : 'enabled',
 option('mfx_api', type : 'combo', choices : ['MSDK', 'oneVPL', 'auto'], value : 'auto',
        description : 'Select MFX API to build against')
 
-# License-related feature options
-option('gpl', type: 'feature', value: 'disabled', yield: true,
-  description: 'Allow build plugins that have (A)GPL-licensed dependencies')
-
 # Common feature options
 option('examples', type : 'feature', value : 'auto', yield : true)
 option('tests', type : 'feature', value : 'auto', yield : true)
index 328e5aaa4e5e1301b271c22838b53dffcb7e714d..69f9438326adbdd399f82a79f1a317e53ce42503 100644 (file)
@@ -33,7 +33,7 @@ if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
 else
-    plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+    plugins_cache_generator = find_program(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
         required: false)
 endif
 
index d6b133bff993e807ad2a56674062f64f51bf5b90..4ff7b6b27d502340ea5ec09a1f8a2e574e405a52 100644 (file)
@@ -10,7 +10,7 @@ ogg_sources = [
   'vorbis_parse.c',
 ]
 
-ogg_dep = dependency('ogg', allow_fallback: true, version : '>=1.0', required : get_option('ogg'))
+ogg_dep = dependency('ogg', version : '>=1.0', required : get_option('ogg'))
 core_conf.set('HAVE_OGG', ogg_dep.found())
 
 if ogg_dep.found()
index 23fdf373c98bf74688ac39ebb42364cbafa54a45..a55249acc60798fbd2c70f513157c50cf6b7ebe5 100644 (file)
@@ -17,9 +17,9 @@ vorbisidec_sources = [
   'gstvorbiscommon.c',
 ]
 
-vorbis_dep = dependency('vorbis', version : '>= 1.3.1', allow_fallback: true, required : get_option('vorbis'))
-vorbisenc_dep = dependency('vorbisenc', version : '>= 1.3.1', allow_fallback: true, required : get_option('vorbis'))
-vorbisidec_dep = dependency('vorbisidec', allow_fallback: true, required : get_option('tremor'))
+vorbis_dep = dependency('vorbis', version : '>= 1.3.1', required : get_option('vorbis'))
+vorbisenc_dep = dependency('vorbisenc', version : '>= 1.3.1', required : get_option('vorbis'))
+vorbisidec_dep = dependency('vorbisidec', required : get_option('tremor'))
 
 if vorbis_dep.found()
   vorbis_deps = [vorbis_dep]
index b3536475e588e0adb9a8dea7c34f237c9ee48c5b..b44f2b2306ae0008941e97a8102a116025feafa9 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-plugins-base', 'c',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
@@ -329,11 +329,11 @@ core_conf.set('HAVE_GIO_UNIX_2_0', giounix_dep.found())
 
 if gio_dep.type_name() == 'pkgconfig'
     core_conf.set_quoted('GIO_MODULE_DIR',
-        gio_dep.get_variable('giomoduledir'))
+        gio_dep.get_pkgconfig_variable('giomoduledir'))
     core_conf.set_quoted('GIO_LIBDIR',
-        gio_dep.get_variable('libdir'))
+        gio_dep.get_pkgconfig_variable('libdir'))
     core_conf.set_quoted('GIO_PREFIX',
-        gio_dep.get_variable('prefix'))
+        gio_dep.get_pkgconfig_variable('prefix'))
 else
     core_conf.set_quoted('GIO_MODULE_DIR', join_paths(get_option('prefix'),
       get_option('libdir'), 'gio/modules'))
@@ -566,15 +566,17 @@ endif
 # Use core_conf after all subdirs have set values
 configure_file(output : 'config.h', configuration : core_conf)
 
-plugin_names = []
-foreach plugin: plugins
-  if plugin.name().startswith('gst')
-    plugin_names += [plugin.name().substring(3)]
-  else
-    plugin_names += [plugin.name()]
-  endif
-endforeach
-
-summary({
-    'Plugins': plugin_names,
-}, list_sep: ', ')
+if meson.version().version_compare('>= 0.54')
+  plugin_names = []
+  foreach plugin: plugins
+    # FIXME: Use str.subtring() when we can depend on Meson 0.56
+    split = plugin.name().split('gst')
+    if split.length() == 2
+      plugin_names += [split[1]]
+    else
+      warning('Need substring API in meson >= 0.56 to properly parse plugin name: ' + plugin.name())
+      plugin_names += [plugin.name()]
+    endif
+  endforeach
+  summary({'Plugins':plugin_names}, list_sep: ', ')
+endif
index e10aa9a6870cc5ecd72ae71db8d4a2ae4d43d2a6..25bd3497fb56e5b0e9415a71cf298f66a20907b4 100644 (file)
@@ -1,7 +1,7 @@
 pluginsdirs = []
 if gst_dep.type_name() == 'pkgconfig'
-  pluginsdirs = [gst_dep.get_variable('pluginsdir')]
-  gst_plugin_scanner_dir = gst_dep.get_variable('pluginscannerdir')
+  pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir')]
+  gst_plugin_scanner_dir = gst_dep.get_pkgconfig_variable('pluginscannerdir')
 else
   gst_plugin_scanner_dir = gst_proj.get_variable('gst_scanner_dir')
 endif
index 83c3a273fc6e59ffb0f188eaa5dc92031ca9cee9..86304ab78859a71d89812479c11743f859c103c8 100644 (file)
@@ -14,7 +14,7 @@ if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
 else
-    plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+    plugins_cache_generator = find_program(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
         required: false)
 endif
 
index 482df0e94346a965f0f0fa2101c5b27d63b1f503..546e250678df575e726816de94c9a8b22e387fba 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-plugins-good', 'c',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
@@ -299,9 +299,9 @@ have_gstgl = gstgl_dep.found()
 
 if have_gstgl
   if gstgl_dep.type_name() == 'pkgconfig'
-    gst_gl_apis = gstgl_dep.get_variable('gl_apis').split()
-    gst_gl_winsys = gstgl_dep.get_variable('gl_winsys').split()
-    gst_gl_platforms = gstgl_dep.get_variable('gl_platforms').split()
+    gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis').split()
+    gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys').split()
+    gst_gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms').split()
   else
     gstbase = subproject('gst-plugins-base')
     gst_gl_apis = gstbase.get_variable('enabled_gl_apis')
@@ -536,15 +536,17 @@ endif
 
 configure_file(output : 'config.h', configuration : cdata)
 
-plugin_names = []
-foreach plugin: plugins
-  if plugin.name().startswith('gst')
-    plugin_names += [plugin.name().substring(3)]
-  else
-    plugin_names += [plugin.name()]
-  endif
-endforeach
-
-summary({
-    'Plugins': plugin_names,
-}, list_sep: ', ')
+if meson.version().version_compare('>= 0.54')
+  plugin_names = []
+  foreach plugin: plugins
+    # FIXME: Use str.subtring() when we can depend on Meson 0.56
+    split = plugin.name().split('gst')
+    if split.length() == 2
+      plugin_names += [split[1]]
+    else
+      warning('Need substring API in meson >= 0.56 to properly parse plugin name: ' + plugin.name())
+      plugin_names += [plugin.name()]
+    endif
+  endforeach
+  summary({'Plugins':plugin_names}, list_sep: ', ')
+endif
index f71d07bb9671c143471cb04dacc0b37448216c14..1c67d8c701e6702360e4673f51283a2e77c75737 100644 (file)
@@ -15,7 +15,7 @@ if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
 else
-    plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+    plugins_cache_generator = find_program(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
         required: false)
 endif
 
index 68908a7e7fd762d4b44c3c99c5a4258bbf579d13..843bef091014be0eac29c2c31b0895704ffe4b7f 100644 (file)
@@ -1,24 +1,22 @@
-a52dec_opt = get_option('a52dec').require(gpl_allowed, error_message: '''
-  Plugin a52dec explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
+if get_option('a52dec').disabled()
+  subdir_done()
+endif
 
 a52_dep = cc.find_library('a52', required : get_option('a52dec'))
-if a52_dep.found()
-  have_a52_h = cc.has_header_symbol('a52dec/a52.h', 'a52_init', prefix : '#include <stdint.h>')
+have_a52_h = cc.has_header_symbol('a52dec/a52.h', 'a52_init', prefix : '#include <stdint.h>')
+if not have_a52_h and get_option('a52dec').enabled()
+  error('a52dec plugin enabled but a52.h not found')
+endif
 
-  if have_a52_h
-    a52dec = library('gsta52dec',
-      'gsta52dec.c',
-      c_args : ugly_args,
-      include_directories : [configinc],
-      dependencies : [gstaudio_dep, orc_dep, a52_dep],
-      install : true,
-      install_dir : plugins_install_dir,
-    )
-    pkgconfig.generate(a52dec, install_dir : plugins_pkgconfig_install_dir)
-    plugins += [a52dec]
-  elif a52dec_opt.enabled()
-    error('a52dec plugin enabled but a52.h not found')  
-  endif
+if a52_dep.found() and have_a52_h
+  a52dec = library('gsta52dec',
+    'gsta52dec.c',
+    c_args : ugly_args,
+    include_directories : [configinc],
+    dependencies : [gstaudio_dep, orc_dep, a52_dep],
+    install : true,
+    install_dir : plugins_install_dir,
+  )
+  pkgconfig.generate(a52dec, install_dir : plugins_pkgconfig_install_dir)
+  plugins += [a52dec]
 endif
index 4b21e36012cb6a5be314751060fdf70e1a35f0e6..054d02627c1dfe0f458e249d022e063201612c25 100644 (file)
@@ -1,9 +1,4 @@
-cdio_opt = get_option('cdio').require(gpl_allowed, error_message: '''
-  Plugin cdio explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
-cdio_dep = dependency('libcdio', version : '>= 0.76', required : cdio_opt)
+cdio_dep = dependency('libcdio', version : '>= 0.76', required : get_option('cdio'))
 
 if cdio_dep.found()
   cdio = library('gstcdio',
index a1cbfdcb38b3f536d3e2ad1df301338ffe033623..f075d8462b1b6ca455b1ebbec4aacdafec8c16d6 100644 (file)
@@ -1,9 +1,4 @@
-dvdread_opt = get_option('dvdread').require(gpl_allowed, error_message: '''
-  Plugin dvdread explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
-dvdread_dep = dependency('dvdread', version : '>= 0.5.0', required : dvdread_opt)
+dvdread_dep = dependency('dvdread', version : '>= 0.5.0', required : get_option('dvdread'))
 
 if gmodule_dep.found() and dvdread_dep.found()
   dvdread = library('gstdvdread',
index 77d3ba057bae58ca96f59385453d289fedba2120..aa5262ac59ed3a4da8efbacc649f182dd9bcb011 100644 (file)
@@ -1,9 +1,4 @@
-mpeg2dec_opt = get_option('mpeg2dec').require(gpl_allowed, error_message: '''
-  Plugin mpeg2dec explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
-mpeg2_dep = dependency('libmpeg2', version : '>= 0.4.0', required : mpeg2dec_opt)
+mpeg2_dep = dependency('libmpeg2', version : '>= 0.4.0', required : get_option('mpeg2dec'))
 
 if mpeg2_dep.found()
   mpeg2dec = library('gstmpeg2dec',
index bc3bc778497f09c84b4b3bea285e4a23dc519fb4..6310652f364d5786a513a17f3d4b62914f2a6caf 100644 (file)
@@ -1,7 +1,7 @@
-sidplay_option = get_option('sidplay').require(gpl_allowed, error_message: '''
-  Plugin sidplay explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
+sidplay_option = get_option('sidplay')
+if sidplay_option.disabled()
+  subdir_done()
+endif
 
 if not add_languages('cpp', native: false, required: sidplay_option)
   subdir_done()
index 7fe65f88ee040e5012fb04385d4539d560bc4fb7..fdbfeebce5c628af0e809a3d79040526881fa37c 100644 (file)
@@ -1,14 +1,9 @@
-x264_opt = get_option('x264').require(gpl_allowed, error_message: '''
-  Plugin x264 explicitly required via options but GPL-licensed plugins disabled via options.
-  Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
-  ''')
-
 x264_sources = [
   'gstx264enc.c',
   'gstencoderbitrateprofilemanager.c',
 ]
 
-x264_dep = dependency('x264', required : x264_opt,
+x264_dep = dependency('x264', required : get_option('x264'),
                       fallback: ['x264', 'libx264_dep'])
 
 if x264_dep.found()
index a98be6acaaade21c7872b84a2738c9e7b6adcd37..522bdcd57922b992133b8a98752475a419199718 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-plugins-ugly', 'c',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
@@ -292,8 +292,6 @@ if get_option('default_library') == 'shared'
   plugins_pkgconfig_install_dir = disabler()
 endif
 
-gpl_allowed = get_option('gpl').allowed()
-
 python3 = import('python').find_installation()
 
 subdir('gst')
@@ -319,16 +317,17 @@ endif
 
 configure_file(output : 'config.h', configuration : cdata)
 
-plugin_names = []
-foreach plugin: plugins
-  if plugin.name().startswith('gst')
-    plugin_names += [plugin.name().substring(3)]
-  else
-    plugin_names += [plugin.name()]
-  endif
-endforeach
-
-summary({
-    'Plugins': plugin_names,
-      '(A)GPL license allowed': gpl_allowed,
-}, list_sep: ', ')
+if meson.version().version_compare('>= 0.54')
+  plugin_names = []
+  foreach plugin: plugins
+    # FIXME: Use str.subtring() when we can depend on Meson 0.56
+    split = plugin.name().split('gst')
+    if split.length() == 2
+      plugin_names += [split[1]]
+    else
+      warning('Need substring API in meson >= 0.56 to properly parse plugin name: ' + plugin.name())
+      plugin_names += [plugin.name()]
+    endif
+  endforeach
+  summary({'Plugins':plugin_names}, list_sep: ', ')
+endif
index a3fc8c4c3c7c04078f323d48999f042043a8ebe0..fac0fef0b63be6b8c2d8eedd15bfd8c4db2e6f9d 100644 (file)
@@ -18,10 +18,6 @@ option('mpeg2dec', type : 'feature', value : 'auto', description : 'MPEG 2 video
 option('sidplay', type : 'feature', value : 'auto', description : 'Commodore 64 audio decoder plugin based on libsidplay (GPL - only built if gpl option is also enabled!)')
 option('x264', type : 'feature', value : 'auto', description : 'H.264 video encoder plugin based on libx264 (GPL - only built if gpl option is also enabled!)')
 
-# License-related feature options
-option('gpl', type: 'feature', value: 'disabled', yield: true,
-  description: 'Allow build plugins that have GPL-licensed dependencies')
-
 # Common feature options
 option('nls', type : 'feature', value : 'auto', yield: true,
        description : 'Enable native language support (translations)')
index fa649cf077862042f0561ae9b028e5a2c29c3656..39d8ec634f716662bc9b35fd8bdd47b0f9e85e84 100644 (file)
@@ -33,7 +33,7 @@ if gst_dep.type_name() == 'internal'
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
 else
     required_hotdoc_extensions += ['gst-extension']
-    plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+    plugins_cache_generator = find_program(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
         required: false)
 endif
 
index 35953af72c06837a352395c7315bda94ec344b83..5580285244f79f8a90203262e366c9994c739345 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-rtsp-server', 'c',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : ['warning_level=1', 'buildtype=debugoptimized'])
 
 gst_version = meson.project_version()
index 7b9b96d331f31777c2acd479a5d3a04c28f032be..32b6a83b0e344f7c7ea52df282eaa83ef73f9c41 100644 (file)
@@ -1,6 +1,6 @@
 project('gstreamer', 'c',
   version : '1.20.0',
-  meson_version : '>= 0.59',
+  meson_version : '>= 0.52',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
@@ -539,7 +539,7 @@ bashcomp_found = false
 if bashcomp_dep.found()
   bashcomp_found = true
   bashcomp_dir_override = bashcomp_dep.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix]
-  bash_completions_dir = bashcomp_dep.get_variable('completionsdir', pkgconfig_define:  bashcomp_dir_override)
+  bash_completions_dir = bashcomp_dep.get_pkgconfig_variable('completionsdir', define_variable: bashcomp_dir_override)
   if bash_completions_dir == ''
     msg = 'Found bash-completion but the .pc file did not set \'completionsdir\'.'
     if bashcomp_option.enabled()
@@ -550,7 +550,7 @@ if bashcomp_dep.found()
     bashcomp_found = false
   endif
 
-  bash_helpers_dir = bashcomp_dep.get_variable('helpersdir', pkgconfig_define:  bashcomp_dir_override)
+  bash_helpers_dir = bashcomp_dep.get_pkgconfig_variable('helpersdir', define_variable: bashcomp_dir_override)
   if bash_helpers_dir == ''
     msg = 'Found bash-completion, but the .pc file did not set \'helpersdir\'.'
     if bashcomp_option.enabled()
@@ -643,15 +643,17 @@ endif
 configure_file(output : 'config.h', configuration : cdata)
 install_data('gst-element-check-1.0.m4', install_dir : join_paths(get_option('datadir'), 'aclocal'))
 
-plugin_names = []
-foreach plugin: plugins
-  if plugin.name().startswith('gst')
-    plugin_names += [plugin.name().substring(3)]
-  else
-    plugin_names += [plugin.name()]
-  endif
-endforeach
-
-summary({
-    'Plugins': plugin_names,
-}, list_sep: ', ')
+if meson.version().version_compare('>= 0.54')
+  plugin_names = []
+  foreach plugin: plugins
+    # FIXME: Use str.subtring() when we can depend on Meson 0.56
+    split = plugin.name().split('gst')
+    if split.length() == 2
+      plugin_names += [split[1]]
+    else
+      warning('Need substring API in meson >= 0.56 to properly parse plugin name: ' + plugin.name())
+      plugin_names += [plugin.name()]
+    endif
+  endforeach
+  summary({'Plugins':plugin_names}, list_sep: ', ')
+endif