1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
7 inherit python-any-r1 versionator
9 if [[ ${PV} == 9999 ]] ; then
10 EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
14 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15 if [[ ${PV/_beta} == ${PV} ]]; then
17 SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
18 https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
20 MY_PV="$(get_major_version).$(($(get_version_component_range 2)-1))b"
23 # Alpha/beta releases are not distributed on the usual mirrors.
24 SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
26 S="${WORKDIR}/${MY_P}"
29 DESCRIPTION="Used to generate Makefile.in from Makefile.am"
30 HOMEPAGE="https://www.gnu.org/software/automake/"
33 # Use Gentoo versioning for slotting.
36 RESTRICT="!test? ( test )"
38 RDEPEND="dev-lang/perl
39 >=sys-devel/automake-wrapper-11
40 >=sys-devel/autoconf-2.69:*
44 test? ( ${PYTHON_DEPS} )"
47 use test && python-any-r1_pkg_setup
52 export WANT_AUTOCONF=2.5
53 # Don't try wrapping the autotools this thing runs as it tends
54 # to be a bit esoteric, and the script does `set -e` itself.
56 sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
59 if ! has_version sys-apps/texinfo ; then
60 touch doc/{stamp-vti,version.texi,automake.info} || die
64 # slot the info pages. do this w/out munging the source so we don't have
65 # to depend on texinfo to regen things. #464146 (among others)
67 pushd "${ED%/}"/usr/share/info >/dev/null || die
70 # Rewrite all the references to other pages.
71 # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
72 # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
73 local p pages=( *.info ) args=()
74 for p in "${pages[@]/%.info}" ; do
76 -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
77 -e "s:(${p}):(${p}-${SLOT}):g"
80 sed -i "${args[@]}" * || die
82 # Rewrite all the file references, and rename them in the process.
85 d=${f/.info/-${SLOT}.info}
86 mv "${f}" "${d}" || die
87 sed -i -e "s:${f}:${d}:g" * || die
90 popd >/dev/null || die
97 rm "${ED%/}"/usr/share/aclocal/README || die
98 rmdir "${ED%/}"/usr/share/aclocal || die
100 "${ED%/}"/usr/bin/{aclocal,automake} \
101 "${ED%/}"/usr/share/man/man1/{aclocal,automake}.1 || die
103 # remove all config.guess and config.sub files replacing them
104 # w/a symlink to a specific gnuconfig version
106 for x in guess sub ; do
107 dosym ../gnuconfig/config.${x} /usr/share/${PN}-${SLOT}/config.${x}