summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>2017-03-14 17:08:18 +0100
committerMichael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>2017-03-14 17:08:18 +0100
commitd70949815e672994bdc68a7ca11847fa96423955 (patch)
treebcf266e2f185383ecbee6f91c2a6bb1c98ea46cc
parentdev-lang/python-2: cygwinports renamed github repo to python2 (diff)
downloadprefix-d70949815e672994bdc68a7ca11847fa96423955.tar.gz
prefix-d70949815e672994bdc68a7ca11847fa96423955.tar.bz2
prefix-d70949815e672994bdc68a7ca11847fa96423955.zip
autotools.eclass: sync (cherry-pick upstream commits)
-rw-r--r--eclass/autotools.eclass49
1 files changed, 35 insertions, 14 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index cd774432b4..b6efa541de 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,6 +1,5 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.170 2014/11/21 09:17:07 vapier Exp $
# @ECLASS: autotools.eclass
# @MAINTAINER:
@@ -56,7 +55,7 @@ inherit libtool
# Do NOT change this variable in your ebuilds!
# If you want to force a newer minor version, you can specify the correct
# WANT value by using a colon: <PV>:<WANT_AUTOMAKE>
-_LATEST_AUTOMAKE=( 1.13:1.13 1.14:1.14 )
+_LATEST_AUTOMAKE=( 1.15:1.15 )
_automake_atom="sys-devel/automake"
_autoconf_atom="sys-devel/autoconf"
@@ -82,7 +81,7 @@ fi
if [[ -n ${WANT_AUTOCONF} ]] ; then
case ${WANT_AUTOCONF} in
none) _autoconf_atom="" ;; # some packages don't require autoconf at all
- 2.1) _autoconf_atom="=sys-devel/autoconf-${WANT_AUTOCONF}*" ;;
+ 2.1) _autoconf_atom="~sys-devel/autoconf-2.13" ;;
# if you change the "latest" version here, change also autotools_env_setup
latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.69" ;;
*) die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'" ;;
@@ -198,7 +197,7 @@ eautoreconf() {
intltool false "autotools_run_tool intltoolize --automake --copy --force"
gtkdoc false "autotools_run_tool --at-missing gtkdocize --copy"
gnomedoc false "autotools_run_tool --at-missing gnome-doc-prepare --copy --force"
- libtool false "_elibtoolize --install --copy --force"
+ libtool false "_elibtoolize --auto-ltdl --install --copy --force"
)
for (( i = 0; i < ${#tools[@]}; i += 3 )) ; do
if _at_uses_${tools[i]} ; then
@@ -222,7 +221,11 @@ eautoreconf() {
done
${rerun_aclocal} && eaclocal
- eautoconf
+ if [[ ${WANT_AUTOCONF} = 2.1 ]] ; then
+ eautoconf
+ else
+ eautoconf --force
+ fi
eautoheader
[[ ${AT_NOEAUTOMAKE} != "yes" ]] && FROM_EAUTORECONF="yes" eautomake ${AM_OPTS}
@@ -254,12 +257,13 @@ _at_uses_pkg() {
}
_at_uses_autoheader() { _at_uses_pkg A{C,M}_CONFIG_HEADER{S,}; }
_at_uses_automake() { _at_uses_pkg AM_INIT_AUTOMAKE; }
-_at_uses_gettext() { _at_uses_pkg AM_GNU_GETTEXT_VERSION; }
+_at_uses_gettext() { _at_uses_pkg AM_GNU_GETTEXT_{,REQUIRE_}VERSION; }
_at_uses_glibgettext() { _at_uses_pkg AM_GLIB_GNU_GETTEXT; }
_at_uses_intltool() { _at_uses_pkg {AC,IT}_PROG_INTLTOOL; }
_at_uses_gtkdoc() { _at_uses_pkg GTK_DOC_CHECK; }
_at_uses_gnomedoc() { _at_uses_pkg GNOME_DOC_INIT; }
_at_uses_libtool() { _at_uses_pkg A{C,M}_PROG_LIBTOOL LT_INIT; }
+_at_uses_libltdl() { _at_uses_pkg LT_CONFIG_LTDL_DIR; }
# @FUNCTION: eaclocal_amflags
# @DESCRIPTION:
@@ -309,6 +313,11 @@ eaclocal() {
_elibtoolize() {
local LIBTOOLIZE=${LIBTOOLIZE:-$(type -P glibtoolize > /dev/null && echo glibtoolize || echo libtoolize)}
+ if [[ $1 == "--auto-ltdl" ]] ; then
+ shift
+ _at_uses_libltdl && set -- "$@" --ltdl
+ fi
+
[[ -f GNUmakefile.am || -f Makefile.am ]] && set -- "$@" --automake
autotools_run_tool ${LIBTOOLIZE} "$@"
@@ -332,7 +341,7 @@ eautoconf() {
echo
die "No configure.{ac,in} present!"
fi
- if [[ -e configure.in ]] ; then
+ if [[ ${WANT_AUTOCONF} != "2.1" && -e configure.in ]] ; then
eqawarn "This package has a configure.in file which has long been deprecated. Please"
eqawarn "update it to use configure.ac instead as newer versions of autotools will die"
eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details."
@@ -424,7 +433,7 @@ config_rpath_update() {
# @DESCRIPTION:
# Process the WANT_AUTO{CONF,MAKE} flags.
autotools_env_setup() {
- # We do the "latest" → version switch here because it solves
+ # We do the "latest" → version switch here because it solves
# possible order problems, see bug #270010 as an example.
# During bootstrap in prefix there might be no automake merged yet
# due to --nodeps, but still available somewhere in PATH.
@@ -476,13 +485,14 @@ autotools_run_tool() {
autotools_env_setup
- local STDERR_TARGET="${T}/$1.out"
+ # Allow people to pass in full paths. #549268
+ local STDERR_TARGET="${T}/${1##*/}.out"
# most of the time, there will only be one run, but if there are
# more, make sure we get unique log filenames
if [[ -e ${STDERR_TARGET} ]] ; then
local i=1
while :; do
- STDERR_TARGET="${T}/$1-${i}.out"
+ STDERR_TARGET="${T}/${1##*/}-${i}.out"
[[ -e ${STDERR_TARGET} ]] || break
: $(( i++ ))
done
@@ -519,13 +529,13 @@ autotools_run_tool() {
# Keep a list of all the macros we might use so that we only
# have to run the trace code once. Order doesn't matter.
ALL_AUTOTOOLS_MACROS=(
- A{C,M}_PROG_LIBTOOL LT_INIT
+ A{C,M}_PROG_LIBTOOL LT_INIT LT_CONFIG_LTDL_DIR
A{C,M}_CONFIG_HEADER{S,}
AC_CONFIG_SUBDIRS
AC_CONFIG_AUX_DIR AC_CONFIG_MACRO_DIR
AM_INIT_AUTOMAKE
AM_GLIB_GNU_GETTEXT
- AM_GNU_GETTEXT_VERSION
+ AM_GNU_GETTEXT_{,REQUIRE_}VERSION
{AC,IT}_PROG_INTLTOOL
GTK_DOC_CHECK
GNOME_DOC_INIT
@@ -592,6 +602,17 @@ _autotools_m4dir_include() {
echo ${include_opts}
}
autotools_m4dir_include() { _autotools_m4dir_include ${AT_M4DIR} ; }
-autotools_m4sysdir_include() { _autotools_m4dir_include $(eval echo ${AT_SYS_M4DIR}) ; }
+autotools_m4sysdir_include() {
+ # First try to use the paths the system integrator has set up.
+ local paths=( $(eval echo ${AT_SYS_M4DIR}) )
+
+ if [[ ${#paths[@]} -eq 0 && -n ${SYSROOT} ]] ; then
+ # If they didn't give us anything, then default to the SYSROOT.
+ # This helps when cross-compiling.
+ local path="${SYSROOT}/usr/share/aclocal"
+ [[ -d ${path} ]] && paths+=( "${path}" )
+ fi
+ _autotools_m4dir_include "${paths[@]}"
+}
fi