diff --git a/gst/meson.build b/gst/meson.build index 6d1fdf3f81..15475e5f79 100644 --- a/gst/meson.build +++ b/gst/meson.build @@ -250,6 +250,14 @@ libgst = library('gstreamer-1.0', gst_sources, + platform_deps, ) +pkgconfig.generate(libgst, + libraries : [glib_dep, gobject_dep], + variables : pkgconfig_variables, + subdirs : pkgconfig_subdirs, + name : 'gstreamer-1.0', + description : 'Streaming media framework', +) + if build_gir gst_gir_extra_args = gir_init_section + ['--c-include=gst/gst.h'] if meson.is_subproject() @@ -288,3 +296,5 @@ gst_dep = declare_dependency(link_with : libgst, # Everything that uses libgst needs this built to compile sources : gst_gen_sources, ) + +meson.override_dependency('gstreamer-1.0', gst_dep) diff --git a/libs/gst/base/meson.build b/libs/gst/base/meson.build index 5315ecbaf8..d289376133 100644 --- a/libs/gst/base/meson.build +++ b/libs/gst/base/meson.build @@ -51,6 +51,14 @@ gst_base = library('gstbase-@0@'.format(apiversion), dependencies : [gobject_dep, glib_dep, gst_dep], ) +pkgconfig.generate(gst_base, + libraries : [libgst], + variables : pkgconfig_variables, + subdirs : pkgconfig_subdirs, + name : 'gstreamer-base-1.0', + description : 'Base classes for GStreamer elements', +) + if build_gir gst_gir_extra_args = gir_init_section + [ '--c-include=gst/base/base.h' ] gst_base_gir = gnome.generate_gir(gst_base, @@ -75,6 +83,8 @@ gst_base_dep = declare_dependency(link_with : gst_base, dependencies : [gst_dep], sources : gst_base_gen_sources) +meson.override_dependency('gstreamer-base-1.0', gst_base_dep) + install_headers('base.h', 'base-prelude.h', 'gstadapter.h', diff --git a/libs/gst/check/meson.build b/libs/gst/check/meson.build index 2207382510..b787238138 100644 --- a/libs/gst/check/meson.build +++ b/libs/gst/check/meson.build @@ -48,6 +48,14 @@ gst_check = library('gstcheck-@0@'.format(apiversion), dependencies : [gobject_dep, glib_dep, gst_dep], ) +pkgconfig.generate(gst_check, + libraries : [libgst], + variables : pkgconfig_variables, + subdirs : pkgconfig_subdirs, + name : 'gstreamer-check-1.0', + description : 'Unit testing helper library for GStreamer modules', +) + gst_check_gen_sources = [] if build_gir @@ -72,3 +80,5 @@ gst_check_dep = declare_dependency(link_with : gst_check, include_directories : [libsinc], dependencies : [gst_dep], sources : gst_check_gen_sources) + +meson.override_dependency('gstreamer-check-1.0', gst_check_dep) diff --git a/libs/gst/controller/meson.build b/libs/gst/controller/meson.build index e592b8193a..08857cadb6 100644 --- a/libs/gst/controller/meson.build +++ b/libs/gst/controller/meson.build @@ -48,6 +48,14 @@ gst_controller = library('gstcontroller-@0@'.format(apiversion), dependencies : [gobject_dep, glib_dep, mathlib, gst_dep], ) +pkgconfig.generate(gst_controller, + libraries : [libgst], + variables : pkgconfig_variables, + subdirs : pkgconfig_subdirs, + name : 'gstreamer-controller-1.0', + description : 'Dynamic parameter control for GStreamer elements', +) + if build_gir gst_gir_extra_args = gir_init_section + [ '--c-include=gst/controller/controller.h' ] gst_controller_gir = gnome.generate_gir(gst_controller, @@ -70,3 +78,5 @@ gst_controller_dep = declare_dependency(link_with : gst_controller, include_directories : [libsinc], sources: gst_controller_gen_sources, dependencies : [gst_dep]) + +meson.override_dependency('gstreamer-controller-1.0', gst_controller_dep) diff --git a/libs/gst/net/meson.build b/libs/gst/net/meson.build index d0605a7273..f63ae281b7 100644 --- a/libs/gst/net/meson.build +++ b/libs/gst/net/meson.build @@ -35,6 +35,14 @@ gst_net = library('gstnet-@0@'.format(apiversion), dependencies : [gio_dep, gst_base_dep], ) +pkgconfig.generate(gst_net, + libraries : [libgst], + variables : pkgconfig_variables, + subdirs : pkgconfig_subdirs, + name : 'gstreamer-net-1.0', + description : 'Network-enabled GStreamer plug-ins and clocking', +) + if build_gir gst_gir_extra_args = gir_init_section + [ '--c-include=gst/net/net.h' ] gst_net_gir = gnome.generate_gir(gst_net, @@ -57,3 +65,5 @@ gst_net_dep = declare_dependency(link_with : gst_net, include_directories : [libsinc], sources: gst_net_gen_sources, dependencies : [gst_base_dep]) + +meson.override_dependency('gstreamer-net-1.0', gst_net_dep) diff --git a/meson.build b/meson.build index 7c70bd2b96..a22578ace6 100644 --- a/meson.build +++ b/meson.build @@ -563,6 +563,16 @@ if get_option('default_library') == 'shared' # If we don't build static plugins there is no need to generate pc files plugins_pkgconfig_install_dir = disabler() endif +pkgconfig_variables = ['exec_prefix=${prefix}', + 'toolsdir=${exec_prefix}/bin', + 'pluginsdir=${libdir}/gstreamer-1.0', + 'datarootdir=${prefix}/share', + 'datadir=${datarootdir}', + 'girdir=${datadir}/gir-1.0', + 'typelibdir=${libdir}/girepository-1.0', + 'libexecdir=${prefix}/libexec', + 'pluginscannerdir=${libexecdir}/gstreamer-1.0'] +pkgconfig_subdirs = ['gstreamer-1.0'] subdir('gst') subdir('libs') @@ -570,7 +580,6 @@ subdir('plugins') if not get_option('tools').disabled() subdir('tools') endif -subdir('pkgconfig') subdir('tests') subdir('data') subdir('docs') diff --git a/pkgconfig/gstreamer-base-uninstalled.pc.in b/pkgconfig/gstreamer-base-uninstalled.pc.in deleted file mode 100644 index 08759f1c3b..0000000000 --- a/pkgconfig/gstreamer-base-uninstalled.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -# the standard variables don't make sense for an uninstalled copy -prefix= -exec_prefix= -libdir=@baselibdir@ -includedir= -girdir=@abs_top_builddir@/libs/gst/base -typelibdir=@abs_top_builddir@/libs/gst/base - -Name: GStreamer base classes, uninstalled -Description: Base classes for GStreamer elements, Not Installed -Requires: gstreamer-@GST_API_VERSION@ = @VERSION@ -Version: @VERSION@ - -Libs: -L${libdir} -lgstbase-@GST_API_VERSION@ -Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs diff --git a/pkgconfig/gstreamer-base.pc.in b/pkgconfig/gstreamer-base.pc.in deleted file mode 100644 index e24e050902..0000000000 --- a/pkgconfig/gstreamer-base.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/gstreamer-@GST_API_VERSION@ -datarootdir=${prefix}/share -datadir=${datarootdir} -girdir=${datadir}/gir-1.0 -typelibdir=${libdir}/girepository-1.0 - -Name: GStreamer base classes -Description: Base classes for GStreamer elements -Requires: gstreamer-@GST_API_VERSION@ -Version: @VERSION@ -Libs: -L${libdir} -lgstbase-@GST_API_VERSION@ -Cflags: -I${includedir} diff --git a/pkgconfig/gstreamer-check-uninstalled.pc.in b/pkgconfig/gstreamer-check-uninstalled.pc.in deleted file mode 100644 index a95daf2fbd..0000000000 --- a/pkgconfig/gstreamer-check-uninstalled.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -# the standard variables don't make sense for an uninstalled copy -prefix= -exec_prefix= -libdir=@checklibdir@ -includedir= -girdir=@abs_top_builddir@/libs/gst/check -typelibdir=@abs_top_builddir@/libs/gst/check - -Name: GStreamer check unit testing, uninstalled -Description: Unit testing helper library for GStreamer modules, Not Installed -Requires: gstreamer-@GST_API_VERSION@ = @VERSION@ -Version: @VERSION@ - -Libs: -L${libdir} -lgstcheck-@GST_API_VERSION@ @LIBM@ @LIBRT@ -Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs diff --git a/pkgconfig/gstreamer-check.pc.in b/pkgconfig/gstreamer-check.pc.in deleted file mode 100644 index dc142986e4..0000000000 --- a/pkgconfig/gstreamer-check.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/gstreamer-@GST_API_VERSION@ -datarootdir=${prefix}/share -datadir=${datarootdir} -girdir=${datadir}/gir-1.0 -typelibdir=${libdir}/girepository-1.0 - -Name: GStreamer check unit testing -Description: Unit testing helper library for GStreamer modules -Requires: gstreamer-@GST_API_VERSION@ -Version: @VERSION@ -Libs: -L${libdir} -lgstcheck-@GST_API_VERSION@ @LIBM@ @LIBRT@ -Cflags: -I${includedir} diff --git a/pkgconfig/gstreamer-controller-uninstalled.pc.in b/pkgconfig/gstreamer-controller-uninstalled.pc.in deleted file mode 100644 index 97983e7530..0000000000 --- a/pkgconfig/gstreamer-controller-uninstalled.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -# the standard variables don't make sense for an uninstalled copy -prefix= -exec_prefix= -libdir=@controllerlibdir@ -includedir= -girdir=@abs_top_builddir@/libs/gst/controller -typelibdir=@abs_top_builddir@/libs/gst/controller - -Name: GStreamer controller, uninstalled -Description: Dynamic parameter control for GStreamer elements, Not Installed -Requires: gstreamer-@GST_API_VERSION@ = @VERSION@ -Version: @VERSION@ - -Libs: -L${libdir} -lgstcontroller-@GST_API_VERSION@ -Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs diff --git a/pkgconfig/gstreamer-controller.pc.in b/pkgconfig/gstreamer-controller.pc.in deleted file mode 100644 index 5118de426f..0000000000 --- a/pkgconfig/gstreamer-controller.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/gstreamer-@GST_API_VERSION@ -datarootdir=${prefix}/share -datadir=${datarootdir} -girdir=${datadir}/gir-1.0 -typelibdir=${libdir}/girepository-1.0 - -Name: GStreamer controller -Description: Dynamic parameter control for GStreamer elements -Requires: gstreamer-@GST_API_VERSION@ -Version: @VERSION@ -Libs: -L${libdir} -lgstcontroller-@GST_API_VERSION@ -Cflags: -I${includedir} diff --git a/pkgconfig/gstreamer-net-uninstalled.pc.in b/pkgconfig/gstreamer-net-uninstalled.pc.in deleted file mode 100644 index 5d390c2673..0000000000 --- a/pkgconfig/gstreamer-net-uninstalled.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -# the standard variables don't make sense for an uninstalled copy -prefix= -exec_prefix= -libdir=@netlibdir@ -includedir= -girdir=@abs_top_builddir@/libs/gst/net -typelibdir=@abs_top_builddir@/libs/gst/net - -Name: GStreamer networking library, uninstalled -Description: Network-enabled GStreamer plug-ins and clocking, uninstalled -Requires: gstreamer-@GST_API_VERSION@ = @VERSION@ gio-2.0 -Version: @VERSION@ - -Libs: -L${libdir} -lgstnet-@GST_API_VERSION@ -Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs diff --git a/pkgconfig/gstreamer-net.pc.in b/pkgconfig/gstreamer-net.pc.in deleted file mode 100644 index aa4c3aba8c..0000000000 --- a/pkgconfig/gstreamer-net.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/gstreamer-@GST_API_VERSION@ -datarootdir=${prefix}/share -datadir=${datarootdir} -girdir=${datadir}/gir-1.0 -typelibdir=${libdir}/girepository-1.0 - -Name: GStreamer networking library -Description: Network-enabled GStreamer plug-ins and clocking -Requires: gstreamer-@GST_API_VERSION@ gio-2.0 -Version: @VERSION@ -Libs: -L${libdir} -lgstnet-@GST_API_VERSION@ -Cflags: -I${includedir} diff --git a/pkgconfig/gstreamer-uninstalled.pc.in b/pkgconfig/gstreamer-uninstalled.pc.in deleted file mode 100644 index e97ca0716e..0000000000 --- a/pkgconfig/gstreamer-uninstalled.pc.in +++ /dev/null @@ -1,21 +0,0 @@ -# the standard variables don't make sense for an uninstalled copy -prefix= -exec_prefix= -libdir=@gstlibdir@ -# includedir is builddir because it is used to find gstconfig.h in places -includedir=@abs_top_builddir@ -toolsdir=@abs_top_builddir@/tools -pluginsdir=@abs_top_builddir@/plugins -girdir=@abs_top_builddir@/gst -bashhelpersdir=@abs_top_builddir@/data/bash-completion/helpers -helpersdir=@abs_top_builddir@/libs/gst/helpers -typelibdir=@abs_top_builddir@/gst -pluginscannerdir=${helpersdir} - -Name: GStreamer Uninstalled -Description: Streaming media framework, Not Installed -Version: @VERSION@ -Requires: glib-2.0, gobject-2.0 -Requires.private: gmodule-no-export-2.0 @UNWIND_REQUIRE@ @DW_REQUIRE@ -Libs: -L${libdir} -lgstreamer-@GST_API_VERSION@ -Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/libs -I@abs_top_builddir@ -I@abs_top_builddir@/libs diff --git a/pkgconfig/gstreamer.pc.in b/pkgconfig/gstreamer.pc.in deleted file mode 100644 index 4c7c641e54..0000000000 --- a/pkgconfig/gstreamer.pc.in +++ /dev/null @@ -1,20 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libexecdir=@libexecdir@ -libdir=@libdir@ -includedir=@includedir@/gstreamer-@GST_API_VERSION@ -toolsdir=${exec_prefix}/bin -pluginsdir=@libdir@/gstreamer-@GST_API_VERSION@ -datarootdir=${prefix}/share -datadir=${datarootdir} -girdir=${datadir}/gir-1.0 -typelibdir=${libdir}/girepository-1.0 -pluginscannerdir=${libexecdir}/gstreamer-1.0 - -Name: GStreamer -Description: Streaming media framework -Version: @VERSION@ -Requires: glib-2.0, gobject-2.0 -Requires.private: gmodule-no-export-2.0 @UNWIND_REQUIRE@ @DW_REQUIRE@ -Libs: -L${libdir} -lgstreamer-@GST_API_VERSION@ -Cflags: -I${includedir} diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build deleted file mode 100644 index 2ca4aaac46..0000000000 --- a/pkgconfig/meson.build +++ /dev/null @@ -1,52 +0,0 @@ -pkgconf = configuration_data() - -pkgconf.set('prefix', join_paths(get_option('prefix'))) -pkgconf.set('exec_prefix', '${prefix}') -pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir'))) -pkgconf.set('libexecdir', '${prefix}/@0@'.format(get_option('libexecdir'))) -pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir'))) -pkgconf.set('GST_API_VERSION', apiversion) -pkgconf.set('VERSION', gst_version) -pkgconf.set('LIBM', mathlib.found() ? '-lm' : '') -pkgconf.set('LIBRT', rt_lib.found() ? '-lrt' : '') - -# Requires.private -pkgconf.set('UNWIND_REQUIRE', cdata.has('HAVE_UNWIND') ? 'libunwind' : '') -pkgconf.set('DW_REQUIRE', cdata.has('HAVE_DW') ? 'libdw' : '') - -# needed for generating -uninstalled.pc files -pkgconf.set('abs_top_builddir', join_paths(meson.current_build_dir(), '..')) -pkgconf.set('abs_top_srcdir', join_paths(meson.current_source_dir(), '..')) -pkgconf.set('gstlibdir', join_paths(meson.build_root(), libgst.outdir())) -pkgconf.set('baselibdir', join_paths(meson.build_root(), gst_base.outdir())) -pkgconf.set('controllerlibdir', join_paths(meson.build_root(), gst_controller.outdir())) -pkgconf.set('netlibdir', join_paths(meson.build_root(), gst_net.outdir())) - -pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir')) - -pkg_files = [ - 'gstreamer-base', - 'gstreamer-controller', - 'gstreamer-net', - 'gstreamer' -] - -if not get_option('check').disabled() - pkg_files += ['gstreamer-check'] - pkgconf.set('checklibdir', join_paths(meson.build_root(), gst_check.outdir())) -endif - -foreach p : pkg_files - infile = p + '.pc.in' - outfile = p + '-1.0.pc' - configure_file(input : infile, - output : outfile, - configuration : pkgconf, - install_dir : pkg_install_dir) - - infile = p + '-uninstalled.pc.in' - outfile = p + '-1.0-uninstalled.pc' - configure_file(input : infile, - output : outfile, - configuration : pkgconf) -endforeach