summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-01-06 21:06:17 +0000
committerMike Frysinger <vapier@gentoo.org>2012-01-06 21:06:17 +0000
commit945bcfd7fe87707d7a712b2976a00ccdbca348dd (patch)
tree35c8bfe84c94242b7b99f1458d5dbf5cd7059ba4 /eclass/autotools.eclass
parentAdded 5.4.0 RC5 (diff)
downloadgentoo-2-945bcfd7fe87707d7a712b2976a00ccdbca348dd.tar.gz
gentoo-2-945bcfd7fe87707d7a712b2976a00ccdbca348dd.tar.bz2
gentoo-2-945bcfd7fe87707d7a712b2976a00ccdbca348dd.zip
add a helper for updating config.rpath files for projects that dont use gettext
Diffstat (limited to 'eclass/autotools.eclass')
-rw-r--r--eclass/autotools.eclass21
1 files changed, 20 insertions, 1 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 79791e0de275..62662fd74b71 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.117 2012/01/04 22:00:27 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.118 2012/01/06 21:06:17 vapier Exp $
# @ECLASS: autotools.eclass
# @MAINTAINER:
@@ -297,6 +297,25 @@ eautopoint() {
autotools_run_tool autopoint "$@"
}
+# @FUNCTION: config_rpath_update
+# @USAGE: [destination]
+# @DESCRIPTION:
+# Some packages utilize the config.rpath helper script, but don't
+# use gettext directly. So we have to copy it in manually since
+# we can't let `autopoint` do it for us.
+config_rpath_update() {
+ local dst src=$(type -P gettext | sed 's:bin/gettext:share/gettext/config.rpath:')
+
+ [[ $# -eq 0 ]] && set -- $(find -name config.rpath)
+ [[ $# -eq 0 ]] && return 0
+
+ einfo "Updating all config.rpath files"
+ for dst in "$@" ; do
+ einfo " ${dst}"
+ cp "${src}" "${dst}" || die
+ done
+}
+
# Internal function to run an autotools' tool
autotools_env_setup() {
# We do the “latest” → version switch here because it solves