From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6E9A7158086 for ; Thu, 9 Dec 2021 04:24:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8780D2BC01B; Thu, 9 Dec 2021 04:24:40 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1F3952BC007 for ; Thu, 9 Dec 2021 04:24:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0910634337A for ; Thu, 9 Dec 2021 04:24:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 135DF1DC for ; Thu, 9 Dec 2021 04:24:37 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1639023869.d9e28f40be32f76224ef0dbe2f3163e0615896f1.sam@gentoo> Subject: [gentoo-commits] proj/devmanual:master commit in: general-concepts/autotools/ X-VCS-Repository: proj/devmanual X-VCS-Files: general-concepts/autotools/text.xml X-VCS-Directories: general-concepts/autotools/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d9e28f40be32f76224ef0dbe2f3163e0615896f1 X-VCS-Branch: master Date: Thu, 9 Dec 2021 04:24:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8ef2dfdc-9f5d-44fd-b0a4-d2bff1c9534a X-Archives-Hash: 8bc43ef526b3996e01d4340031c0ae1d commit: d9e28f40be32f76224ef0dbe2f3163e0615896f1 Author: Sam James gentoo org> AuthorDate: Thu Dec 9 04:19:23 2021 +0000 Commit: Sam James gentoo org> CommitDate: Thu Dec 9 04:24:29 2021 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d9e28f40 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 gentoo.org> general-concepts/autotools/text.xml | 45 ++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 13 deletions(-) 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 +}