From: "Michal Gorny (mgorny)" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: autotools-utils.eclass
Date: Fri, 16 Sep 2011 15:33:19 +0000 (UTC) [thread overview]
Message-ID: <20110916153319.1A3202004C@flycatcher.gentoo.org> (raw)
mgorny 11/09/16 15:33:19
Modified: autotools-utils.eclass
Log:
For .la removal, look for static archives rather than USE=static-libs.
Revision Changes Path
1.14 eclass/autotools-utils.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools-utils.eclass?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools-utils.eclass?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools-utils.eclass?r1=1.13&r2=1.14
Index: autotools-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- autotools-utils.eclass 16 Sep 2011 15:29:22 -0000 1.13
+++ autotools-utils.eclass 16 Sep 2011 15:33:19 -0000 1.14
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.13 2011/09/16 15:29:22 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.14 2011/09/16 15:33:19 mgorny Exp $
# @ECLASS: autotools-utils.eclass
# @MAINTAINER:
@@ -132,13 +132,13 @@
}
# @FUNCTION: remove_libtool_files
-# @USAGE: [all|none]
+# @USAGE: [all]
# @DESCRIPTION:
# Determines unnecessary libtool files (.la) and libtool static archives (.a)
# and removes them from installation image.
+#
# To unconditionally remove all libtool files, pass 'all' as argument.
-# To leave all libtool files alone, pass 'none' as argument.
-# Unnecessary static archives are removed in any case.
+# Otherwise, libtool archives required for static linking will be preserved.
#
# In most cases it's not necessary to manually invoke this function.
# See autotools-utils_src_install for reference.
@@ -147,14 +147,17 @@
local f
find "${D}" -type f -name '*.la' -print0 | while read -r -d '' f; do
- # Keep only .la files with shouldnotlink=yes - likely plugins
local shouldnotlink=$(sed -ne '/^shouldnotlink=yes$/p' "${f}")
- if [[ "$1" == 'all' || -z ${shouldnotlink} ]]; then
- if [[ "$1" != 'none' ]]; then
- einfo "Removing unnecessary ${f#${D%/}}"
- rm -f "${f}"
- fi
+ local archivefile=${f/%.la/.a}
+
+ # Keep .la files when:
+ # - they have shouldnotlink=yes - likely plugins,
+ # - respective static archive exists.
+ if [[ "$1" == 'all' || ( -z ${shouldnotlink} && ! -f ${archivefile} ) ]]; then
+ einfo "Removing unnecessary ${f#${D%/}}"
+ rm -f "${f}"
fi
+
# Remove static libs we're not supposed to link against
if [[ -n ${shouldnotlink} ]]; then
local remove=${f/%.la/.a}
@@ -245,9 +248,7 @@
popd > /dev/null
# Remove libtool files and unnecessary static libs
- local args
- has static-libs ${IUSE//+} && ! use static-libs || args='none'
- remove_libtool_files ${args}
+ remove_libtool_files
}
# @FUNCTION: autotools-utils_src_test
next reply other threads:[~2011-09-16 15:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 15:33 Michal Gorny (mgorny) [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-07-31 23:24 [gentoo-commits] gentoo-x86 commit in eclass: autotools-utils.eclass Maciej Mrozowski (reavertm)
2012-06-08 17:50 Michal Gorny (mgorny)
2011-10-14 20:28 Michal Gorny (mgorny)
2011-09-23 7:56 Michal Gorny (mgorny)
2011-09-18 21:03 Michal Gorny (mgorny)
2011-09-18 7:57 Michal Gorny (mgorny)
2011-09-18 7:57 Michal Gorny (mgorny)
2011-09-16 15:38 Michal Gorny (mgorny)
2011-09-16 15:38 Michal Gorny (mgorny)
2011-09-16 15:38 Michal Gorny (mgorny)
2011-09-16 15:38 Michal Gorny (mgorny)
2011-09-16 15:37 Michal Gorny (mgorny)
2011-09-16 15:37 Michal Gorny (mgorny)
2011-09-16 15:29 Michal Gorny (mgorny)
2011-09-16 15:20 Michal Gorny (mgorny)
2011-09-12 20:32 Michal Gorny (mgorny)
2011-09-12 19:11 Maciej Mrozowski (reavertm)
2011-02-01 0:08 Maciej Mrozowski (reavertm)
2011-01-31 14:09 Tomas Chvatal (scarabeus)
2011-01-22 20:28 Maciej Mrozowski (reavertm)
2011-01-20 0:12 Maciej Mrozowski (reavertm)
2010-10-03 19:30 Maciej Mrozowski (reavertm)
2010-09-12 21:29 Maciej Mrozowski (reavertm)
2010-07-20 9:49 Maciej Mrozowski (reavertm)
2010-07-17 10:42 Maciej Mrozowski (reavertm)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110916153319.1A3202004C@flycatcher.gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox