1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="Used to generate Makefile.in from Makefile.am"
9 HOMEPAGE="https://www.gnu.org/software/automake/"
10 SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
13 # Use Gentoo versioning for slotting.
15 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sparc x86"
18 RDEPEND="dev-lang/perl
19 >=sys-devel/automake-wrapper-10
20 >=sys-devel/autoconf-2.69
25 export WANT_AUTOCONF=2.5
26 epatch "${FILESDIR}"/${P}-test-fixes.patch #159557
27 epatch "${FILESDIR}"/${PN}-1.10-ccnoco-ldflags.patch #203914
28 epatch "${FILESDIR}"/${PN}-1.5-CVE-2009-4029.patch #295357
29 epatch "${FILESDIR}"/${PN}-1.5-perl-5.11.patch
32 # slot the info pages. do this w/out munging the source so we don't have
33 # to depend on texinfo to regen things. #464146 (among others)
35 pushd "${ED}"/usr/share/info >/dev/null
38 # Rewrite all the references to other pages.
39 # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
40 # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
41 local p pages=( *.info ) args=()
42 for p in "${pages[@]/%.info}" ; do
44 -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
45 -e "s:(${p}):(${p}-${SLOT}):g"
48 sed -i "${args[@]}" * || die
50 # Rewrite all the file references, and rename them in the process.
53 d=${f/.info/-${SLOT}.info}
54 mv "${f}" "${d}" || die
55 sed -i -e "s:${f}:${d}:g" * || die
64 rm -f "${ED}"/usr/bin/{aclocal,automake}
66 # remove all config.guess and config.sub files replacing them
67 # w/a symlink to a specific gnuconfig version
69 for x in guess sub ; do
70 dosym ../gnuconfig/config.${x} /usr/share/${PN}-${SLOT}/config.${x}