diff options
author | 2012-11-18 19:49:28 +0100 | |
---|---|---|
committer | 2012-11-18 19:49:28 +0100 | |
commit | 4c92b1eb0849f9d3669aeeadbe88b03166ecc4d0 (patch) | |
tree | a9e26c41b45a60f016c762ac96c18ace83f0ef6a /eclass | |
parent | eclass/gst-*: clean up code (diff) | |
download | gnome-4c92b1eb0849f9d3669aeeadbe88b03166ecc4d0.tar.gz gnome-4c92b1eb0849f9d3669aeeadbe88b03166ecc4d0.tar.bz2 gnome-4c92b1eb0849f9d3669aeeadbe88b03166ecc4d0.zip |
eclass/gst-plugins10.eclass: make _system_link actually useful
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/gst-plugins10.eclass | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/eclass/gst-plugins10.eclass b/eclass/gst-plugins10.eclass index ef4e5b37..e7986e32 100644 --- a/eclass/gst-plugins10.eclass +++ b/eclass/gst-plugins10.eclass @@ -26,7 +26,7 @@ # XXX: what was GST_ORC intended for. Isn't it better to leave it to the # ebuild reponsability ? -inherit eutils multilib versionator +inherit eutils multilib toolchain-funcs versionator GST_EXPF="" case "${EAPI:-0}" in @@ -170,15 +170,26 @@ gst-plugins10_find_plugin_dir() { } # @FUNCTION: gst-plugins10_system_link +# @USAGE: gst-plugins10_system_link gst-libs/gst/audio:gstreamer-audio [...] # @DESCRIPTION: # Walks through makefiles in order to make sure build will link against system # librairies. +# Takes a list of path fragments and corresponding pkgconfig libraries +# separated by colon (:). Will replace the path fragment by the output of +# pkgconfig. gst-plugins10_system_link() { - local directory lib - for directory in $@ ; do - lib=$(basename $directory) - sed -e "s:\$(top_builddir)gst-libs/gst/${directory}:${ROOT}/usr/$(get_libdir)/${lib}:" \ - -i Makefile.am Makefile.in + local directory libs pkgconfig pc tuple + pkgconfig=$(tc-getPKG_CONFIG) + + gst-plugins10_find_plugin_dir + + for tuple in $@ ; do + directory="$(echo ${tuple} | cut -f1 -d':')" + pc="$(echo ${tuple} | cut -f2 -d':')-${SLOT}" + libs="$(${pkgconfig} --libs-only-l ${pc})" + + sed -e "s:\$(top_builddir)/${directory}/.*\.la:${libs}:" \ + -i Makefile.am Makefile.in || die done } |