project('gstreamer-full', 'c',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : ['buildtype=debugoptimized',
# Needed due to https://github.com/mesonbuild/meson/issues/1889,
# but this can cause problems in the future. Remove it
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
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',
elif cc.get_id() == 'msvc'
warning('FIXME: Provide a def file to publish the public symbols')
else
- error('Failed to link with version script (' + symbol_map + '), check logs for details')
+ warning('FIXME: Linker does not support the supplied version script (' + symbol_map + '), please disable the "gst-full-version-script" option')
endif
endif
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.build_root()),
+devenv_cmd = [setenv, '--builddir=@0@'.format(meson.project_build_root()),
'--gstbuilddir=@0@'.format(meson.current_build_dir()),
- '--srcdir=@0@'.format(meson.source_root())]
+ '--srcdir=@0@'.format(meson.project_source_root())]
subdir('tests')
-if meson.has_exe_wrapper() and build_machine.system() == 'linux' and host_machine.system() == 'windows'
+if meson.can_run_host_binaries() 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')
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')
Name: %{_name}
Version: 1.20.0
-Release: 3
+Release: 4
Summary: Streaming-Media Framework Runtime
License: LGPL-2.0+
Group: Multimedia/Framework
Url: http://gstreamer.freedesktop.org/
Source0: gstreamer-%{version}.tar.gz
Source1001: gstreamer.manifest
-BuildRequires: meson >= 0.52.0
+BuildRequires: meson >= 0.59.0
BuildRequires: gettext-tools
BuildRequires: pkgconfig(glib-2.0) >= 2.32.0
project('gst-editing-services', 'c',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
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_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+ plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
required: false)
endif
project('gst-libav', 'c', 'cpp',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
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_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+ plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
required: false)
endif
project('gst-omx', 'c',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
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_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+ plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
required: false)
endif
+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 get_option('dts').disabled()
+if dts_opt.disabled()
subdir_done()
endif
if cc.has_header_symbol('dca.h', 'dca_init')
dca_dep = cc.find_library('dca', required : false)
endif
- if not dca_dep.found() and get_option('dts').enabled()
+ if not dca_dep.found() and dts_opt.enabled()
error('DTS plugin enabled, but libdca not found')
endif
endif
+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 get_option('faad').enabled()
+if have_faad and not have_faad_2_7 and faad_opt.enabled()
message('Found faad2, but too old (< v2.7.0)')
endif
-faad_dep = cc.find_library('faad', required : get_option('faad'))
+faad_dep = cc.find_library('faad', required : faad_opt)
if faad_dep.found() and have_faad_2_7
gstfaad = library('gstfaad',
-dssim_dep = dependency('dssim', required : get_option('iqa'),
+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,
fallback: ['dssim', 'dssim_dep'])
if dssim_dep.found()
+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 : get_option('mpeg2enc'))
-mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : get_option('mpeg2enc'))
-
-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
+mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : mpeg2enc_opt)
+mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : mpeg2enc_opt)
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
+
gstmpeg2enc = library('gstmpeg2enc',
'gstmpeg2enc.cc',
'gstmpeg2encoptions.cc',
-# 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'))
+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)
if mjpegtools_dep.found() and mplex2_dep.found()
gstmplex2 = library('gstmplex',
+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',
'rsnparsetter.c',
]
-dvdnav_dep = dependency('dvdnav', version : '>= 4.1.2', required : get_option('resindvd'))
-dvdread_dep = dependency('dvdread', version : '>= 4.1.2', required : get_option('resindvd'))
+dvdnav_dep = dependency('dvdnav', version : '>= 4.1.2', required : resindvd_opt)
+dvdread_dep = dependency('dvdread', version : '>= 4.1.2', required : resindvd_opt)
if dvdnav_dep.found() and dvdread_dep.found()
gstresindvd = library('gstresindvd',
libdrm_dep = dependency('libdrm', version: '>= 2.4.55', required:get_option('wayland'))
if use_wayland
- protocols_datadir = wl_protocol_dep.get_pkgconfig_variable('pkgdatadir')
+ protocols_datadir = wl_protocol_dep.get_variable('pkgdatadir')
protocol_defs = [
['/stable/viewporter/viewporter.xml', 'viewporter-protocol.c', 'viewporter-client-protocol.h'],
-x265_dep = dependency('x265', required: get_option('x265'))
+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)
if x265_dep.found()
gstx265 = library('gstx265',
'gstx265enc.c',
project('gst-plugins-bad', 'c', 'cpp',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
if gstgl_dep.found()
if gstgl_dep.type_name() == 'pkgconfig'
- 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()
+ 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()
else
gstbase = subproject('gst-plugins-base')
gst_gl_apis = gstbase.get_variable('enabled_gl_apis')
cdata.set('TIZEN_FEATURE_PITCH_AUDIO_META', true)
# For plugins from libnice
-libnice_dep = dependency('nice', version : '>=0.1.17', required : true)
+libnice_dep = dependency('nice', version : '>=0.1.17', required : get_option('nice'))
# TIZEN BUILD OPTION end
description : 'Streaming media framework, bad plugins libraries',
)
+gpl_allowed = get_option('gpl').allowed()
+
subdir('gst-libs')
subdir('gst')
subdir('sys')
subdir('docs')
-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
+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: ', ')
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)
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_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+ plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
required: false)
endif
'vorbis_parse.c',
]
-ogg_dep = dependency('ogg', version : '>=1.0', required : get_option('ogg'))
+ogg_dep = dependency('ogg', allow_fallback: true, version : '>=1.0', required : get_option('ogg'))
core_conf.set('HAVE_OGG', ogg_dep.found())
if ogg_dep.found()
'gstvorbiscommon.c',
]
-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'))
+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'))
if vorbis_dep.found()
vorbis_deps = [vorbis_dep]
project('gst-plugins-base', 'c',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
if gio_dep.type_name() == 'pkgconfig'
core_conf.set_quoted('GIO_MODULE_DIR',
- gio_dep.get_pkgconfig_variable('giomoduledir'))
+ gio_dep.get_variable('giomoduledir'))
core_conf.set_quoted('GIO_LIBDIR',
- gio_dep.get_pkgconfig_variable('libdir'))
+ gio_dep.get_variable('libdir'))
core_conf.set_quoted('GIO_PREFIX',
- gio_dep.get_pkgconfig_variable('prefix'))
+ gio_dep.get_variable('prefix'))
else
core_conf.set_quoted('GIO_MODULE_DIR', join_paths(get_option('prefix'),
get_option('libdir'), 'gio/modules'))
# Use core_conf after all subdirs have set values
configure_file(output : 'config.h', configuration : core_conf)
-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
+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: ', ')
pluginsdirs = []
if gst_dep.type_name() == 'pkgconfig'
- pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir')]
- gst_plugin_scanner_dir = gst_dep.get_pkgconfig_variable('pluginscannerdir')
+ pluginsdirs = [gst_dep.get_variable('pluginsdir')]
+ gst_plugin_scanner_dir = gst_dep.get_variable('pluginscannerdir')
else
gst_plugin_scanner_dir = gst_proj.get_variable('gst_scanner_dir')
endif
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_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+ plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
required: false)
endif
project('gst-plugins-good', 'c',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
if have_gstgl
if gstgl_dep.type_name() == 'pkgconfig'
- 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()
+ 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()
else
gstbase = subproject('gst-plugins-base')
gst_gl_apis = gstbase.get_variable('enabled_gl_apis')
configure_file(output : 'config.h', configuration : cdata)
-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
+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: ', ')
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_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+ plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
required: false)
endif
-if get_option('a52dec').disabled()
- subdir_done()
-endif
+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.
+ ''')
a52_dep = cc.find_library('a52', required : get_option('a52dec'))
-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 a52_dep.found()
+ have_a52_h = cc.has_header_symbol('a52dec/a52.h', 'a52_init', prefix : '#include <stdint.h>')
-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]
+ 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
endif
-cdio_dep = dependency('libcdio', version : '>= 0.76', required : get_option('cdio'))
+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)
if cdio_dep.found()
cdio = library('gstcdio',
-dvdread_dep = dependency('dvdread', version : '>= 0.5.0', required : get_option('dvdread'))
+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)
if gmodule_dep.found() and dvdread_dep.found()
dvdread = library('gstdvdread',
-mpeg2_dep = dependency('libmpeg2', version : '>= 0.4.0', required : get_option('mpeg2dec'))
+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)
if mpeg2_dep.found()
mpeg2dec = library('gstmpeg2dec',
-sidplay_option = get_option('sidplay')
-if sidplay_option.disabled()
- subdir_done()
-endif
+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.
+ ''')
if not add_languages('cpp', native: false, required: sidplay_option)
subdir_done()
+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 : get_option('x264'),
+x264_dep = dependency('x264', required : x264_opt,
fallback: ['x264', 'libx264_dep'])
if x264_dep.found()
project('gst-plugins-ugly', 'c',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
plugins_pkgconfig_install_dir = disabler()
endif
+gpl_allowed = get_option('gpl').allowed()
+
python3 = import('python').find_installation()
subdir('gst')
configure_file(output : 'config.h', configuration : cdata)
-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
+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: ', ')
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)')
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_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+ plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
required: false)
endif
project('gst-rtsp-server', 'c',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : ['warning_level=1', 'buildtype=debugoptimized'])
gst_version = meson.project_version()
project('gstreamer', 'c',
version : '1.20.0',
- meson_version : '>= 0.52',
+ meson_version : '>= 0.59',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
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_pkgconfig_variable('completionsdir', define_variable: bashcomp_dir_override)
+ bash_completions_dir = bashcomp_dep.get_variable('completionsdir', pkgconfig_define: bashcomp_dir_override)
if bash_completions_dir == ''
msg = 'Found bash-completion but the .pc file did not set \'completionsdir\'.'
if bashcomp_option.enabled()
bashcomp_found = false
endif
- bash_helpers_dir = bashcomp_dep.get_pkgconfig_variable('helpersdir', define_variable: bashcomp_dir_override)
+ bash_helpers_dir = bashcomp_dep.get_variable('helpersdir', pkgconfig_define: bashcomp_dir_override)
if bash_helpers_dir == ''
msg = 'Found bash-completion, but the .pc file did not set \'helpersdir\'.'
if bashcomp_option.enabled()
configure_file(output : 'config.h', configuration : cdata)
install_data('gst-element-check-1.0.m4', install_dir : join_paths(get_option('datadir'), 'aclocal'))
-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
+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: ', ')