summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>2021-07-03 20:55:52 +0300
committerSam James <sam@gentoo.org>2021-07-10 18:28:27 +0100
commit7ec8ec4a6a650b1de58b59d2d8de34794a6b46c0 (patch)
tree2f1d7e343bc3a0387d11da3293f6225241e136e9 /eclass/gstreamer-meson.eclass
parentdev-lang/ruby: stable 2.6.8 for sparc, bug #801061 (diff)
downloadgentoo-7ec8ec4a6a650b1de58b59d2d8de34794a6b46c0.tar.gz
gentoo-7ec8ec4a6a650b1de58b59d2d8de34794a6b46c0.tar.bz2
gentoo-7ec8ec4a6a650b1de58b59d2d8de34794a6b46c0.zip
gstreamer-meson.eclass: Add plugin dependency override helpers
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/gstreamer-meson.eclass')
-rw-r--r--eclass/gstreamer-meson.eclass50
1 files changed, 50 insertions, 0 deletions
diff --git a/eclass/gstreamer-meson.eclass b/eclass/gstreamer-meson.eclass
index f1962073fd2b..421227f412fb 100644
--- a/eclass/gstreamer-meson.eclass
+++ b/eclass/gstreamer-meson.eclass
@@ -79,6 +79,56 @@ gstreamer_get_plugins() {
)
}
+# @FUNCTION: gstreamer_system_package
+# @USAGE: <gstaudio_dep:gstreamer-audio> [...]
+# @DESCRIPTION:
+# Walks through meson.build in order to make sure build will link against system
+# libraries.
+# Takes a list of path fragments and corresponding pkgconfig libraries
+# separated by colon (:). Will replace the path fragment by the output of
+# pkgconfig.
+gstreamer_system_package() {
+ local pdir directory libs pkgconfig pc tuple
+ pkgconfig=$(tc-getPKG_CONFIG)
+
+ for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do
+ pdir=$(gstreamer_get_plugin_dir ${plugin_dir})
+
+ for tuple in $@ ; do
+ dependency=${tuple%:*}
+ pc=${tuple#*:}-${SLOT}
+ #libs="$(${pkgconfig} --libs-only-l ${pc} || die)"
+ sed -e "1i${dependency} = dependency('${pc}', required : true)" \
+ -i "${pdir}"/meson.build || die
+ done
+ done
+}
+
+# @FUNCTION: gstreamer_system_library
+# @USAGE: <gstbasecamerabin_dep:libgstbasecamerabinsrc> [...]
+# @DESCRIPTION:
+# Walks through meson.build in order to make sure build will link against system
+# libraries.
+# Takes a list of path fragments and corresponding pkgconfig libraries
+# separated by colon (:). Will replace the path fragment by the output of
+# pkgconfig.
+gstreamer_system_library() {
+ local pdir directory libs pkgconfig pc tuple
+ pkgconfig=$(tc-getPKG_CONFIG)
+
+ for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do
+ pdir=$(gstreamer_get_plugin_dir ${plugin_dir})
+
+ for tuple in $@ ; do
+ dependency=${tuple%:*}
+ pc=${tuple#*:}-${SLOT}
+ #libs="$(${pkgconfig} --libs-only-l ${pc} || die)"
+ sed -e "1i${dependency} = cc.find_library('${pc}', required : true)" \
+ -i "${pdir}"/meson.build || die
+ done
+ done
+}
+
# @ECLASS-VARIABLE: GST_PLUGINS_BUILD_DIR
# @DESCRIPTION:
# Actual build directories of the plugins.