sys-devel/automake: Sync with Gentoo

It's from Gentoo commit 1cf0eee856a8a6425af5b38a9f55cd9b24d7cefb.
This commit is contained in:
Flatcar Buildbot 2023-10-23 07:15:24 +00:00 committed by Krzesimir Nowak
parent 9e1ee1df34
commit 21294d2ae5
11 changed files with 69 additions and 153 deletions

View File

@ -30,9 +30,9 @@ BDEPEND="
"
PATCHES=(
"${FILESDIR}"/${PN}-1.10-perl-5.16.patch #424453
"${FILESDIR}"/${PN}-1.11-install-sh-avoid-low-risk-race-in-tmp.patch
"${FILESDIR}"/${PN}-1.13-perl-escape-curly-bracket-r1.patch
"${FILESDIR}"/${P}-perl-5.16.patch #424453
"${FILESDIR}"/${P}-install-sh-avoid-low-risk-race-in-tmp.patch
"${FILESDIR}"/${P}-perl-escape-curly-bracket-r1.patch
)
src_prepare() {

View File

@ -15,7 +15,7 @@ else
MY_P="${P}"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
else
MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
MY_P="${PN}-${MY_PV}"
@ -53,9 +53,11 @@ BDEPEND="
"
PATCHES=(
"${FILESDIR}"/automake-1.16.2-py3-compile.patch
"${FILESDIR}"/automake-1.16.2-fix-instmany-python.sh-test.patch
"${FILESDIR}"/automake-1.16.2-fix-py-compile-basedir.sh-test.patch
"${FILESDIR}"/${PN}-1.16.5-py3-compile.patch
"${FILESDIR}"/${PN}-1.16.5-fix-instmany-python.sh-test.patch
"${FILESDIR}"/${PN}-1.16.5-fix-py-compile-basedir.sh-test.patch
# upstreamed
"${FILESDIR}"/${PN}-1.16.5-apostrophe-in-tests.patch
)
pkg_setup() {

View File

@ -1,138 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{10..11} )
inherit python-any-r1
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
inherit git-r3
else
if [[ ${PV/_beta} == ${PV} ]]; then
MY_P="${P}"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
else
MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
MY_P="${PN}-${MY_PV}"
# Alpha/beta releases are not distributed on the usual mirrors.
SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
fi
S="${WORKDIR}/${MY_P}"
fi
DESCRIPTION="Used to generate Makefile.in from Makefile.am"
HOMEPAGE="https://www.gnu.org/software/automake/"
LICENSE="GPL-2"
# Use Gentoo versioning for slotting.
SLOT="${PV:0:4}"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
>=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-11
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig
"
DEPEND="${RDEPEND}"
BDEPEND="
app-alternatives/gzip
sys-apps/help2man
test? (
${PYTHON_DEPS}
dev-util/dejagnu
)
"
PATCHES=(
"${FILESDIR}"/automake-1.16.2-py3-compile.patch
"${FILESDIR}"/automake-1.16.2-fix-instmany-python.sh-test.patch
"${FILESDIR}"/automake-1.16.2-fix-py-compile-basedir.sh-test.patch
)
pkg_setup() {
# Avoid python-any-r1_pkg_setup
:
}
src_prepare() {
default
export WANT_AUTOCONF=2.5
# Don't try wrapping the autotools - this thing runs as it tends
# to be a bit esoteric, and the script does `set -e` itself.
./bootstrap || die
sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
# bug #628912
if ! has_version -b sys-apps/texinfo ; then
touch doc/{stamp-vti,version.texi,automake.info} || die
fi
}
src_configure() {
use test && python_setup
default
}
# Slot the info pages. Do this w/out munging the source so we don't have
# to depend on texinfo to regen things. bug #464146 (among others)
slot_info_pages() {
pushd "${ED}"/usr/share/info >/dev/null || die
rm -f dir
# Rewrite all the references to other pages.
# before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
# after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
local p pages=( *.info ) args=()
for p in "${pages[@]/%.info}" ; do
args+=(
-e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
-e "s:(${p}):(${p}-${SLOT}):g"
)
done
sed -i "${args[@]}" * || die
# Rewrite all the file references, and rename them in the process.
local f d
for f in * ; do
d=${f/.info/-${SLOT}.info}
mv "${f}" "${d}" || die
sed -i -e "s:${f}:${d}:g" * || die
done
popd >/dev/null || die
}
src_install() {
default
slot_info_pages
rm "${ED}"/usr/share/aclocal/README || die
rmdir "${ED}"/usr/share/aclocal || die
rm \
"${ED}"/usr/bin/{aclocal,automake} \
"${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
# remove all config.guess and config.sub files replacing them
# w/a symlink to a specific gnuconfig version
local x
for x in guess sub ; do
dosym ../gnuconfig/config.${x} \
/usr/share/${PN}-${SLOT}/config.${x}
done
# Avoid QA message about pre-compressed file in docs
local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
if [[ -f "${tarfile}" ]] ; then
gunzip "${tarfile}" || die
fi
}

View File

@ -0,0 +1,51 @@
From ed1368e8803e8934a8bbab52a38753484dba2a37 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 12 Dec 2022 14:50:33 -0800
Subject: test: avoid apostrophe in test document.
From automake patch https://bugs.gnu.org/59989
(though a different solution), suggestion by Frederic Berat.
* t/txinfo-include.sh: avoid apostrophes in test document,
since Texinfo 7.0 turns them into UTF-8 by default.
---
t/txinfo-include.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/t/txinfo-include.sh b/t/txinfo-include.sh
index 8a15f01..10fff07 100644
--- a/t/txinfo-include.sh
+++ b/t/txinfo-include.sh
@@ -28,6 +28,9 @@ main_TEXINFOS = one.texi two.texi three.texi
sub_more_TEXINFOS = sub/desc.texi sub/hist.texi
END
+# We avoid apostrophes in the test document since Texinfo
+# turns them into UTF-8, which is not easy to grep.
+#
cat > main.texi << 'END'
\input texinfo
@setfilename main.info
@@ -61,8 +64,8 @@ END
cat > three.texi << 'END'
@node three
-@chapter Chapter two
-GNU's Not Unix.
+@chapter Chapter three
+Quux quux quux.
END
mkdir sub
@@ -106,7 +109,7 @@ check_info_contents ()
srcdir=${1-.}
$FGREP "Foo bar, baz." $srcdir/main.info
$FGREP "Blah Blah Blah." $srcdir/main.info
- $FGREP "GNU's Not Unix." $srcdir/main.info
+ $FGREP "Quux quux quux." $srcdir/main.info
$FGREP 'It does something, really.' $srcdir/sub/more.info
$FGREP 'It was written somehow.' $srcdir/sub/more.info
}
--
cgit v1.1

View File

@ -68,6 +68,6 @@ index e56d98d6e..5b9ae5d5d 100755
+ py_compile.compile(filepath, $import_call(filepath), path)
else:
py_compile.compile(filepath, filepath + 'o', path)
sys.stdout.write('\n')" 2>/dev/null || :
sys.stdout.write('\n')" 2>/dev/null || exit $?
--
2.25.2

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:automake</remote-id>
</upstream>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:automake</remote-id>
</upstream>
</pkgmetadata>