project('gst-editing-services', 'c',
- version : '1.16.0',
- meson_version : '>= 0.47',
+ version : '1.19.0.1',
+ meson_version : '>= 0.54',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
libversion = '@0@.@1@.0'.format(soversion, curversion)
osxversion = curversion + 1
-glib_req = '>= 2.40.0'
+glib_req = '>= 2.56.0'
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
cc = meson.get_compiler('c')
+mathlib = cc.find_library('m', required : false)
cdata = configuration_data()
+prefix = get_option('prefix')
+datadir = prefix / get_option('datadir')
+
# Ignore several spurious warnings for things gstreamer does very commonly
# If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
# If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once
cdata.set('VERSION', '"@0@"'.format(gst_version))
cdata.set('PACKAGE', '"gst-editing-services"')
cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
-cdata.set('PACKAGE_BUGREPORT', '"http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer"')
+cdata.set('PACKAGE_BUGREPORT', '"https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/new"')
cdata.set('PACKAGE_NAME', '"GStreamer Editing Services"')
cdata.set('GST_PACKAGE_NAME', '"GStreamer Editing Services"')
cdata.set('GST_PACKAGE_ORIGIN', '"Unknown package origin"')
fallback : ['gst-plugins-base', 'pbutils_dep'])
gstvideo_dep = dependency('gstreamer-video-' + apiversion, version : gst_req,
fallback : ['gst-plugins-base', 'video_dep'])
+gstaudio_dep = dependency('gstreamer-audio-' + apiversion, version : gst_req,
+ fallback : ['gst-plugins-base', 'audio_dep'])
gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_base_dep'])
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 : false,
+gstvalidate_dep = dependency('gst-validate-1.0', version : gst_req, required : get_option('validate'),
fallback : ['gst-devtools', 'validate_dep'])
-gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'])
+gio_dep = dependency('gio-2.0', version: glib_req, fallback: ['glib', 'libgio_dep'])
libxml_dep = dependency('libxml-2.0', required: get_option('xptv'))
cdata.set('DISABLE_XPTV', not libxml_dep.found())
# gtk_dep = dependency('gtk+-3.0', required : false)
libges_deps = [gst_dep, gstbase_dep, gstvideo_dep, gstpbutils_dep,
- gstcontroller_dep, gio_dep, libxml_dep]
+ gstcontroller_dep, gio_dep, libxml_dep, mathlib]
if gstvalidate_dep.found()
libges_deps = libges_deps + [gstvalidate_dep]
cdata.set('HAVE_GST_VALIDATE', 1)
endif
-configure_file(output : 'config.h', configuration : cdata)
-
-
gir = find_program('g-ir-scanner', required : get_option('introspection'))
gnome = import('gnome')
# Fixme, not very elegant.
-build_gir = gir.found() and not meson.is_cross_build()
+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
gir_init_section = [ '--add-init-section=' + \
'extern void gst_init(gint*,gchar**);' + \
'extern void ges_init(void);' + \
'gst_init(NULL,NULL);' + \
'ges_init();', '--quiet']
+has_python = false
+if build_gir
+ pymod = import('python')
+ python = pymod.find_installation(required: get_option('python'))
+ if python.found()
+ # Workaround for https://github.com/mesonbuild/meson/issues/5629
+ pythonver = python.language_version()
+ python_dep = dependency('python-@0@-embed'.format(pythonver), version: '>=3', required: false)
+ if not python_dep.found()
+ python_dep = python.dependency(required : get_option('python'))
+ endif
+ else
+ python_dep = dependency('', required: false)
+ endif
+ if python_dep.found()
+ python_abi_flags = python.get_variable('ABIFLAGS', '')
+ pylib_loc = get_option('libpython-dir')
+
+ error_msg = ''
+ if not cc.compiles('#include <Python.h>', 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]))'
+ 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
+ # 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
+ error_msg = '@0@ doesn\' exist, can\'t use python'.format(join_paths(pylib_loc, pylib_ldlibrary))
+ endif
+ endif
+ if error_msg == ''
+ pylib_suffix = 'so'
+ if host_machine.system() == 'windows'
+ pylib_suffix = 'dll'
+ elif host_machine.system() == 'darwin'
+ 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))
+ message('pylib_loc = @0@'.format(pylib_loc))
+ cdata.set('HAS_PYTHON', true)
+ cdata.set('PY_LIB_LOC', '"@0@"'.format(pylib_loc))
+ cdata.set('PY_ABI_FLAGS', '"@0@"'.format(python_abi_flags))
+ cdata.set('PY_LIB_SUFFIX', '"@0@"'.format(pylib_suffix))
+ cdata.set('PYTHON_VERSION', '"@0@"'.format(python_dep.version()))
+ else
+ if get_option('python').enabled()
+ error(error_msg)
+ else
+ message(error_msg)
+ endif
+ endif
+ endif
+ endif
+endif
+
ges_c_args = ['-DHAVE_CONFIG_H', '-DG_LOG_DOMAIN="GES"']
plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
endif
endforeach
+python3 = import('python').find_installation()
+pkgconfig = import('pkgconfig')
+pkgconfig_subdirs = ['gstreamer-1.0']
+
configinc = include_directories('.')
subdir('ges')
subdir('plugins')
-subdir('tools')
-subdir('pkgconfig')
+if not get_option('tools').disabled()
+ subdir('tools')
+endif
subdir('tests')
-subdir('examples')
+if not get_option('examples').disabled()
+ subdir('examples')
+endif
+subdir('docs')
override_detector = '''
import sys
prefix, 'Lib', 'Python%d%d' % (version.major, version.minor),
'site-packages', 'gi', 'overrides'))
'''
-python3 = import('python').find_installation()
pygi_override_dir = get_option('pygi-overrides-dir')
if pygi_override_dir == ''
cres = run_command(python3, '-c', override_detector, get_option('prefix'))
subdir('bindings/python')
endif
-if build_machine.system() == 'windows'
- message('Disabling gtk-doc while building on Windows')
-else
- if find_program('gtkdoc-scan', required : get_option('gtk_doc')).found()
- 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-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
- message('Not building documentation as gtk-doc was not found')
+ # 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)
+
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')