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 CF01B1581FB for ; Tue, 27 Aug 2024 15:16:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D2BDDE29FC; Tue, 27 Aug 2024 15:16:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C66CDE29E9 for ; Tue, 27 Aug 2024 15:16:17 +0000 (UTC) From: David Seifert To: gentoo-dev@lists.gentoo.org Cc: David Seifert Subject: [gentoo-dev] [PATCH 02/50] autotools.eclass: drop support for EAPI 6 Date: Tue, 27 Aug 2024 17:14:47 +0200 Message-ID: <20240827151553.210835-2-soap@gentoo.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827151553.210835-1-soap@gentoo.org> References: <20240827151553.210835-1-soap@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 27219e20-e53e-406b-8371-267634285689 X-Archives-Hash: 59d15bbc24be7edd3cf02733d9fb6eea Signed-off-by: David Seifert --- eclass/autotools.eclass | 69 +++++++++-------------------------------- 1 file changed, 15 insertions(+), 54 deletions(-) diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index 3c9e89bda90e..74f259276960 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -4,7 +4,7 @@ # @ECLASS: autotools.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Regenerates auto* build scripts # @DESCRIPTION: # This eclass is for safely handling autotooled software packages that need to @@ -14,7 +14,7 @@ # from the GNU version of m4 without worrying about other variants (i.e. BSD). case ${EAPI} in - 6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -31,8 +31,6 @@ fi if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then _AUTOTOOLS_ECLASS=1 -[[ ${EAPI} == 6 ]] && inherit eqawarn - GNUCONFIG_AUTO_DEPEND=no inherit gnuconfig libtool @@ -180,12 +178,7 @@ RDEPEND="" # ebuilds form conditional depends by using ${AUTOTOOLS_DEPEND} in # their own DEPEND string. : "${AUTOTOOLS_AUTO_DEPEND:=yes}" -if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then - case ${EAPI} in - 6) DEPEND=${AUTOTOOLS_DEPEND} ;; - *) BDEPEND=${AUTOTOOLS_DEPEND} ;; - esac -fi +[[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] && BDEPEND=${AUTOTOOLS_DEPEND} _AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass unset _automake_atom _autoconf_atom @@ -388,22 +381,16 @@ eaclocal() { # - ${BROOT}/usr/share/aclocal # - ${ESYSROOT}/usr/share/aclocal # See bug #677002 - if [[ ${EAPI} != 6 ]] ; then - if [[ ! -f "${T}"/aclocal/dirlist ]] ; then - mkdir "${T}"/aclocal || die - cat <<- EOF > "${T}"/aclocal/dirlist || die - ${BROOT}/usr/share/aclocal - ${ESYSROOT}/usr/share/aclocal - EOF - fi - - local system_acdir=" --system-acdir=${T}/aclocal" - else - local system_acdir="" + if [[ ! -f "${T}"/aclocal/dirlist ]] ; then + mkdir "${T}"/aclocal || die + cat <<- EOF > "${T}"/aclocal/dirlist || die + ${BROOT}/usr/share/aclocal + ${ESYSROOT}/usr/share/aclocal + EOF fi [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ - autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) ${system_acdir} + autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) --system-acdir="${T}"/aclocal } # @FUNCTION: _elibtoolize @@ -445,7 +432,7 @@ eautoconf() { if [[ ${WANT_AUTOCONF} != "2.1" && -e configure.in ]] ; then case ${EAPI} in - 6|7) + 7) eqawarn "This package has a configure.in file which has long been deprecated. Please" eqawarn "update it to use configure.ac instead as newer versions of autotools will die" eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details." @@ -533,21 +520,13 @@ eautopoint() { # use gettext directly. So we have to copy it in manually since # we can't let `autopoint` do it for us. config_rpath_update() { - local dst src - - case ${EAPI} in - 6) - src="${EPREFIX}/usr/share/gettext/config.rpath" - ;; - *) - src="${BROOT}/usr/share/gettext/config.rpath" - ;; - esac + local src="${BROOT}/usr/share/gettext/config.rpath" [[ $# -eq 0 ]] && set -- $(find -name config.rpath) [[ $# -eq 0 ]] && return 0 einfo "Updating all config.rpath files" + local dst for dst in "$@" ; do einfo " ${dst}" cp "${src}" "${dst}" || die @@ -565,16 +544,7 @@ autotools_env_setup() { local pv for pv in ${_LATEST_AUTOMAKE[@]/#*:} ; do # Break on first hit to respect _LATEST_AUTOMAKE order. - local hv_args="" - case ${EAPI} in - 6) - hv_args="--host-root" - ;; - *) - hv_args="-b" - ;; - esac - has_version ${hv_args} "=dev-build/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break + has_version -b "=dev-build/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break done # During bootstrap in prefix there might be no automake merged yet @@ -594,16 +564,7 @@ autotools_env_setup() { local pv for pv in ${_LATEST_AUTOCONF[@]/#*:} ; do # Break on first hit to respect _LATEST_AUTOCONF order. - local hv_args="" - case ${EAPI} in - 6) - hv_args="--host-root" - ;; - *) - hv_args="-b" - ;; - esac - has_version ${hv_args} "=dev-build/autoconf-${pv}*" && export WANT_AUTOCONF="${pv}" && break + has_version -b "=dev-build/autoconf-${pv}*" && export WANT_AUTOCONF="${pv}" && break done # During bootstrap in prefix there might be no autoconf merged yet -- 2.46.0