public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] autotools-utils: support setting prune_libtool_files mode globally.
@ 2013-03-26 19:22 Michał Górny
  2013-04-01  9:16 ` Michał Górny
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2013-03-26 19:22 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Introduces AUTOTOOLS_PRUNE_LIBTOOL_FILES variable which can be used to
control the mode of pruning .la files done in
autotools-utils_src_install.

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=462874
---
 gx86/eclass/autotools-utils.eclass | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/gx86/eclass/autotools-utils.eclass b/gx86/eclass/autotools-utils.eclass
index c847fa0..3f0d762 100644
--- a/gx86/eclass/autotools-utils.eclass
+++ b/gx86/eclass/autotools-utils.eclass
@@ -184,6 +184,23 @@ EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
 # PATCHES=( "${FILESDIR}"/${P}-mypatch.patch )
 # @CODE
 
+# @ECLASS-VARIABLE: AUTOTOOLS_PRUNE_LIBTOOL_FILES
+# @DEFAULT-UNSET
+# @DESCRIPTION:
+# Sets the mode of pruning libtool files. The values correspond to
+# prune_libtool_files parameters, with leading dashes stripped.
+#
+# Defaults to pruning the libtool files when static libraries are not
+# installed or can be linked properly without them. Libtool files
+# for modules (plugins) will be kept in case plugin loader needs them.
+#
+# If set to 'modules', the .la files for modules will be removed
+# as well. This is often the preferred option.
+#
+# If set to 'all', all .la files will be removed unconditionally. This
+# option is discouraged and shall be used only if 'modules' does not
+# remove the files.
+
 # Determine using IN or OUT source build
 _check_build_dir() {
 	: ${ECONF_SOURCE:=${S}}
@@ -511,7 +528,8 @@ autotools-utils_src_install() {
 	fi
 
 	# Remove libtool files and unnecessary static libs
-	prune_libtool_files
+	local prune_ltfiles=${AUTOTOOLS_PRUNE_LIBTOOL_FILES}
+	prune_libtool_files ${prune_ltfiles:+--${prune_ltfiles}}
 }
 
 # @FUNCTION: autotools-utils_src_test
-- 
1.8.1.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-01  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 19:22 [gentoo-dev] [PATCH] autotools-utils: support setting prune_libtool_files mode globally Michał Górny
2013-04-01  9:16 ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox