From d9e28f40be32f76224ef0dbe2f3163e0615896f1 Mon Sep 17 00:00:00 2001
From: Sam James
Date: Thu, 9 Dec 2021 04:19:23 +0000
Subject: general-concepts/autotools: use EAPI 8 in examples and
autotools.eclass helpers
- Use EAPI 8 in examples
- Use eaclocal, eautoconf
- Define WANT_AUTOCONF/WANT_AUTOMAKE in global scope before inheriting
autotools.eclass. The eclass declares these as @PRE_INHERIT which
is necessary for e.g. ensuring dependencies are set.
Signed-off-by: Sam James
---
general-concepts/autotools/text.xml | 45 ++++++++++++++++++++++++++-----------
1 file changed, 32 insertions(+), 13 deletions(-)
(limited to 'general-concepts')
diff --git a/general-concepts/autotools/text.xml b/general-concepts/autotools/text.xml
index b7170ba..11cacf3 100644
--- a/general-concepts/autotools/text.xml
+++ b/general-concepts/autotools/text.xml
@@ -116,23 +116,28 @@ either Makefile.am or configure.ac:
-EAPI=5
+EAPI=8
+WANT_AUTOCONF=2.5
+WANT_AUTOMAKE=1.9
inherit autotools
+IUSE="nls"
+
+BDEPEND="nls? ( sys-devel/gettext )"
+
src_prepare() {
+ default
+
# Remove problematic LDFLAGS declaration
sed -i -e '/^LDFLAGS/d' src/Makefile.am || die
# Rerun autotools
- einfo "Regenerating autotools files..."
- WANT_AUTOCONF=2.5 eautoconf
- WANT_AUTOMAKE=1.9 eautomake
+ eautoreconf
}
-src_compile() {
+src_configure() {
econf $(use_enable nls)
- emake
}
@@ -591,10 +596,17 @@ In the first case you usually want to do something like:
-einfo "Regenerating autotools files..."
-cp "${WORKDIR}/gentoo-m4" "${S}/m4" || die "m4 copy failed"
-WANT_AUTOCONF="2.5" aclocal -I "${S}/m4" || die "aclocal failed"
-WANT_AUTOCONF="2.5" autoconf || die "autoconf failed"
+WANT_AUTOCONF="2.5"
+inherit autotools
+
+src_prepare() {
+ default
+
+ einfo "Regenerating autotools files..."
+ cp "${WORKDIR}/gentoo-m4" "${S}/m4" || die "m4 copy failed"
+ eaclocal -I "${S}/m4"
+ eautoconf
+}
@@ -602,9 +614,16 @@ and so on. In the second case you can simplify it in this way:
-einfo "Regenerating autotools files..."
-WANT_AUTOCONF="2.5" aclocal -I "${WORKDIR}/gentoo-m4" || die "aclocal failed"
-WANT_AUTOCONF="2.5" autoconf || die "autoconf failed"
+WANT_AUTOCONF="2.5"
+inherit autotools
+
+src_prepare() {
+ default
+
+ einfo "Regenerating autotools files..."
+ eaclocal -I "${WORKDIR}/gentoo-m4"
+ eautoconf
+}
--
cgit v1.2.3-65-gdbad