* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog eutils.eclass
@ 2012-08-29 13:42 99% Michal Gorny (mgorny)
0 siblings, 0 replies; 1+ results
From: Michal Gorny (mgorny) @ 2012-08-29 13:42 UTC (permalink / raw
To: gentoo-commits
mgorny 12/08/29 13:42:43
Modified: ChangeLog eutils.eclass
Log:
prune_libtool_files: run pkg-config code only if necessary.
Revision Changes Path
1.383 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.383&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.383&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.382&r2=1.383
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.382
retrieving revision 1.383
diff -u -r1.382 -r1.383
--- ChangeLog 28 Aug 2012 15:28:01 -0000 1.382
+++ ChangeLog 29 Aug 2012 13:42:42 -0000 1.383
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.382 2012/08/28 15:28:01 mpagano Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.383 2012/08/29 13:42:42 mgorny Exp $
+
+ 29 Aug 2012; Michał Górny <mgorny@gentoo.org> eutils.eclass:
+ prune_libtool_files: run pkg-config code only if necessary.
28 Aug 2012; Michael Pagano <mpagano@gentoo.org> linux-mod.eclass:
Remove deprecated and unrecommended parameter -r from depmod
1.402 eclass/eutils.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/eutils.eclass?rev=1.402&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/eutils.eclass?rev=1.402&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/eutils.eclass?r1=1.401&r2=1.402
Index: eutils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v
retrieving revision 1.401
retrieving revision 1.402
diff -u -r1.401 -r1.402
--- eutils.eclass 20 Aug 2012 19:45:57 -0000 1.401
+++ eutils.eclass 29 Aug 2012 13:42:42 -0000 1.402
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.401 2012/08/20 19:45:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.402 2012/08/29 13:42:42 mgorny Exp $
# @ECLASS: eutils.eclass
# @MAINTAINER:
@@ -1395,8 +1395,8 @@
# that they should not be linked to, i.e. whenever these files
# correspond to plugins.
#
-# Note: if your package installs any .pc files, this function implicitly
-# calls pkg-config. You should add it to your DEPEND in that case.
+# Note: if your package installs both static libraries and .pc files,
+# you need to add pkg-config to your DEPEND.
prune_libtool_files() {
debug-print-function ${FUNCNAME} "$@"
@@ -1411,25 +1411,6 @@
esac
done
- # Create a list of all .pc-covered libs.
- local pc_libs=()
- if [[ ! ${removing_all} ]]; then
- local f
- local tf=${T}/prune-lt-files.pc
- local pkgconf=$(tc-getPKG_CONFIG)
-
- while IFS= read -r -d '' f; do # for all .pc files
- local arg
-
- sed -e '/^Requires:/d' "${f}" > "${tf}"
- for arg in $("${pkgconf}" --libs "${tf}"); do
- [[ ${arg} == -l* ]] && pc_libs+=( lib${arg#-l}.la )
- done
- done < <(find "${D}" -type f -name '*.pc' -print0)
-
- rm -f "${tf}"
- fi
-
local f
while IFS= read -r -d '' f; do # for all .la files
local archivefile=${f/%.la/.a}
@@ -1453,17 +1434,40 @@
# - respective static archive doesn't exist,
# - they are covered by a .pc file already,
# - they don't provide any new information (no libs & no flags).
- local reason
+ local reason pkgconfig_scanned
if [[ ${removing_all} ]]; then
reason='requested'
elif [[ ! -f ${archivefile} ]]; then
reason='no static archive'
- elif has "${f##*/}" "${pc_libs[@]}"; then
- reason='covered by .pc'
elif [[ ! $(sed -nre \
"s/^(dependency_libs|inherited_linker_flags)='(.*)'$/\2/p" \
"${f}") ]]; then
reason='no libs & flags'
+ else
+ if [[ ! ${pkgconfig_scanned} ]]; then
+ # Create a list of all .pc-covered libs.
+ local pc_libs=()
+ if [[ ! ${removing_all} ]]; then
+ local f
+ local tf=${T}/prune-lt-files.pc
+ local pkgconf=$(tc-getPKG_CONFIG)
+
+ while IFS= read -r -d '' f; do # for all .pc files
+ local arg
+
+ sed -e '/^Requires:/d' "${f}" > "${tf}"
+ for arg in $("${pkgconf}" --libs "${tf}"); do
+ [[ ${arg} == -l* ]] && pc_libs+=( lib${arg#-l}.la )
+ done
+ done < <(find "${D}" -type f -name '*.pc' -print0)
+
+ rm -f "${tf}"
+ fi
+
+ pkgconfig_scanned=1
+ fi
+
+ has "${f##*/}" "${pc_libs[@]}" && reason='covered by .pc'
fi
if [[ ${reason} ]]; then
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-08-29 13:42 99% [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog eutils.eclass Michal Gorny (mgorny)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox