X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=subprojects%2Fgst-editing-services%2Fmeson.build;h=829508739f05cb49d53625645a0f61e56a19e68f;hb=d838d8dd1bcf1575e18e3096d25ec0551ff1342d;hp=054751ba816c6f0598514f10f83d84788e8ceb78;hpb=a7fd2762a6adc1da26c18c620ce066573f42f39d;p=platform%2Fupstream%2Fgstreamer.git diff --git a/subprojects/gst-editing-services/meson.build b/subprojects/gst-editing-services/meson.build index 054751b..8295087 100644 --- a/subprojects/gst-editing-services/meson.build +++ b/subprojects/gst-editing-services/meson.build @@ -1,6 +1,6 @@ project('gst-editing-services', 'c', - version : '1.19.2.1', - meson_version : '>= 0.54', + version : '1.22.2.1', + meson_version : '>= 0.62', default_options : [ 'warning_level=1', 'buildtype=debugoptimized' ]) @@ -16,6 +16,8 @@ gst_version_micro = version_arr[2].to_int() else gst_version_nano = 0 endif +gst_version_is_stable = gst_version_minor.is_even() +gst_version_is_dev = gst_version_minor.is_odd() and gst_version_micro < 90 apiversion = '1.0' soversion = 0 @@ -25,8 +27,13 @@ curversion = gst_version_minor * 100 + gst_version_micro libversion = '@0@.@1@.0'.format(soversion, curversion) osxversion = curversion + 1 -glib_req = '>= 2.56.0' -gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) +glib_req = '>= 2.62.0' + +if gst_version_is_stable + gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) +else + gst_req = '>= ' + gst_version +endif cc = meson.get_compiler('c') mathlib = cc.find_library('m', required : false) @@ -60,19 +67,17 @@ if cc.has_link_argument('-Wl,-Bsymbolic-functions') add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c') endif +# glib doesn't support unloading, which means that unloading and reloading +# any library that registers static types will fail +if cc.has_link_argument('-Wl,-z,nodelete') + add_project_link_arguments('-Wl,-z,nodelete', language: 'c') +endif + # Symbol visibility -if cc.get_id() == 'msvc' - export_define = '__declspec(dllexport) extern' -elif cc.has_argument('-fvisibility=hidden') +if cc.has_argument('-fvisibility=hidden') add_project_arguments('-fvisibility=hidden', language: 'c') - export_define = 'extern __attribute__ ((visibility ("default")))' -else - export_define = 'extern' endif -# Passing this through the command line would be too messy -cdata.set('GST_API_EXPORT', export_define) - # Disable strict aliasing if cc.has_argument('-fno-strict-aliasing') add_project_arguments('-fno-strict-aliasing', language: 'c') @@ -105,10 +110,11 @@ if host_machine.system() != 'windows' endif gstcontroller_dep = dependency('gstreamer-controller-1.0', version : gst_req, fallback : ['gstreamer', 'gst_controller_dep']) -gstvalidate_dep = dependency('gst-validate-1.0', version : gst_req, required : get_option('validate'), +gstvalidate_dep = dependency('gstreamer-validate-1.0', version : gst_req, required : get_option('validate'), fallback : ['gst-devtools', 'validate_dep']) -gio_dep = dependency('gio-2.0', version: glib_req, fallback: ['glib', 'libgio_dep']) +gio_dep = dependency('gio-2.0', version: glib_req) +gmodule_dep = dependency('gmodule-no-export-2.0') libxml_dep = dependency('libxml-2.0', required: get_option('xptv')) cdata.set('DISABLE_XPTV', not libxml_dep.found()) @@ -167,18 +173,17 @@ elif build_gir if not cc.compiles('#include ', dependencies: [python_dep]) error_msg = 'Could not compile a simple program against python' elif pylib_loc == '' - check_path_exists = 'import os, sys; assert(os.path.exists(sys.argv[1]))' + fsmod = import('fs') pylib_loc = python.get_variable('LIBPL', '') if host_machine.system() != 'windows' and host_machine.system() != 'darwin' pylib_ldlibrary = python.get_variable('LDLIBRARY', '') - if run_command(python, '-c', check_path_exists, join_paths(pylib_loc, pylib_ldlibrary)).returncode() != 0 + if not fsmod.exists(pylib_loc / pylib_ldlibrary) # Workaround for Fedora pylib_loc = python.get_variable('LIBDIR', '') message('pylib_loc = @0@'.format(pylib_loc)) endif - res = run_command(python, '-c', check_path_exists, join_paths(pylib_loc, pylib_ldlibrary)) - if res.returncode() != 0 + if not fsmod.exists(pylib_loc / pylib_ldlibrary) error_msg = '@0@ doesn\' exist, can\'t use python'.format(join_paths(pylib_loc, pylib_ldlibrary)) endif endif @@ -190,7 +195,6 @@ elif build_gir pylib_suffix = 'dylib' endif - gmodule_dep = dependency('gmodule-2.0') libges_deps = libges_deps + [python_dep, gmodule_dep] has_python = true message('python_abi_flags = @0@'.format(python_abi_flags)) @@ -245,7 +249,6 @@ warning_flags = [ '-Wmissing-include-dirs', '-Waddress', '-Wno-multichar', - '-Wdeclaration-after-statement', '-Wvla', '-Wpointer-arith', ] @@ -261,74 +264,35 @@ pkgconfig = import('pkgconfig') pkgconfig_subdirs = ['gstreamer-1.0'] configinc = include_directories('.') -libraries = [] +gst_libraries = [] subdir('ges') subdir('plugins') -if not get_option('tools').disabled() - subdir('tools') -endif +subdir('tools') + subdir('tests') if not get_option('examples').disabled() subdir('examples') endif subdir('docs') -override_detector = ''' -import sys -import os - -prefix = sys.argv[1] -version = sys.version_info - -# If we are installing in the same prefix as PyGobject -# make sure to install in the right place. -import gi.overrides - -overrides_path = os.path.dirname(gi.overrides.__file__) -if os.path.commonprefix([overrides_path, prefix]) == prefix: - print(overrides_path) - exit(0) - -# Otherwise follow python's way of install site packages inside -# the provided prefix -if os.name == 'posix': - print(os.path.join( - prefix, 'lib', 'python%d.%d' % (version.major, version.minor), - 'site-packages', 'gi', 'overrides')) -else: - print(os.path.join( - prefix, 'Lib', 'Python%d%d' % (version.major, version.minor), - 'site-packages', 'gi', 'overrides')) -''' pygi_override_dir = get_option('pygi-overrides-dir') if pygi_override_dir == '' - cres = run_command(python3, '-c', override_detector, get_option('prefix')) - if cres.returncode() == 0 - pygi_override_dir = cres.stdout().strip() - endif - if cres.stderr() != '' - message(cres.stderr()) - endif + pygi_override_dir = python3.get_install_dir( + subdir : join_paths('gi', 'overrides') + ) endif -if pygi_override_dir != '' - message('pygobject overrides directory ' + pygi_override_dir) - subdir('bindings/python') -endif +message('pygobject overrides directory = @0@'.format(pygi_override_dir)) +subdir('bindings/python') # 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-editing-services.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 + run_result = run_command(extract_release_date, gst_version, files('gst-editing-services.doap'), check: true) + release_date = run_result.stdout().strip() + cdata.set_quoted('GST_PACKAGE_RELEASE_DATETIME', release_date) + message('Package release date: ' + release_date) endif if gio_dep.version().version_compare('< 2.67.4') @@ -336,3 +300,23 @@ if gio_dep.version().version_compare('< 2.67.4') endif configure_file(output: 'config.h', configuration: cdata) + +meson.add_dist_script('scripts/gen-changelog.py', meson.project_name(), '1.20.0', meson.project_version()) + +plugin_names = [] +gst_plugins = [] +foreach plugin: plugins + pkgconfig.generate(plugin, install_dir: plugins_pkgconfig_install_dir) + dep = declare_dependency(link_with: plugin, variables: {'full_path': plugin.full_path()}) + meson.override_dependency(plugin.name(), dep) + gst_plugins += [dep] + if plugin.name().startswith('gst') + plugin_names += [plugin.name().substring(3)] + else + plugin_names += [plugin.name()] + endif +endforeach + +summary({ + 'Plugins': plugin_names, +}, list_sep: ', ')