From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id F3AC21381F3 for ; Sun, 18 Nov 2012 18:50:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 974BC21C123; Sun, 18 Nov 2012 18:50:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0197521C0F3 for ; Sun, 18 Nov 2012 18:50:40 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 14D2233D8DC for ; Sun, 18 Nov 2012 18:50:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 60F05E5436 for ; Sun, 18 Nov 2012 18:50:38 +0000 (UTC) From: "Gilles Dartiguelongue" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Gilles Dartiguelongue" Message-ID: <1353264568.4c92b1eb0849f9d3669aeeadbe88b03166ecc4d0.eva@gentoo> Subject: [gentoo-commits] proj/gnome:master commit in: eclass/ X-VCS-Repository: proj/gnome X-VCS-Files: eclass/gst-plugins10.eclass X-VCS-Directories: eclass/ X-VCS-Committer: eva X-VCS-Committer-Name: Gilles Dartiguelongue X-VCS-Revision: 4c92b1eb0849f9d3669aeeadbe88b03166ecc4d0 X-VCS-Branch: master Date: Sun, 18 Nov 2012 18:50:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a5546996-bff3-4a2d-991a-ac06dac84e4c X-Archives-Hash: 2cb9ec049a1bc2bb8700b3ae3b87feb6 commit: 4c92b1eb0849f9d3669aeeadbe88b03166ecc4d0 Author: Gilles Dartiguelongue gentoo org> AuthorDate: Sun Nov 18 18:49:28 2012 +0000 Commit: Gilles Dartiguelongue gentoo org> CommitDate: Sun Nov 18 18:49:28 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=4c92b1eb eclass/gst-plugins10.eclass: make _system_link actually useful --- 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 ef4e5b3..e7986e3 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 }