From 197bd36ddb1266b9d6e0586b3c318b9f147073e8 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 9 Jan 2023 13:31:27 +0100 Subject: [PATCH] sys-apps/gawk: Sync with Gentoo It's from Gentoo commit 638eafa4e1eef002d0296826dfe7c647e17cd08e. --- .../portage-stable/sys-apps/gawk/Manifest | 3 +- .../{gawk-5.1.0.ebuild => gawk-5.2.1.ebuild} | 61 ++++++++++++++++--- .../portage-stable/sys-apps/gawk/metadata.xml | 23 ++++--- 3 files changed, 70 insertions(+), 17 deletions(-) rename sdk_container/src/third_party/portage-stable/sys-apps/gawk/{gawk-5.1.0.ebuild => gawk-5.2.1.ebuild} (52%) diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/Manifest index e2478d636d..a962eb7471 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/Manifest @@ -1 +1,2 @@ -DIST gawk-5.1.0.tar.xz 3154564 BLAKE2B a969b03f45e1d830d2b3760d75530de97eb521a35ac448cf441d7fd2d1a8c1059bd9240cb9571f58ef6ec122864ced3d274a07453c3138177deda895ac3433d9 SHA512 971e6a7617eb051d587984f64be2ff830e49eb60721c3401e8944401e3c3a7cd3334f0334b6e28bfc9283aaff15d83b0933f1fd77b0f8c7059068fa3f94c3cb4 +DIST gawk-5.2.1.tar.xz 3411420 BLAKE2B 5dbbfe92ed4c11a38b2f995e9267dd2e392a9f393af1c63aaf3c5dd6d1681c01db900e05a118831125f914fcffe2218de7f30891ccc6f64abc5f572aef5feeff SHA512 f81da3e61987d1460326dc79fdbabacfd4660219bf66ec8ba18877500fd24e160761e401a5b868067f82bec46a6a808098f3f6a1f4c8b710e439cd3f99ffa56c +DIST gawk-5.2.1.tar.xz.sig 488 BLAKE2B 5dcdc9ae90d4744a968cc750526a9c1c38915f85c56c2eca80b219ba8519c927ab55b7f569d55054b0499f7bf37d3413b97e9d3cf36f5573f9ecd4855663064e SHA512 97a9cfb069f235bef31892ec6e5c56ee6a8733129ae3d02e871d5407de4d7a6140fc0a87001b2b21e3cffd714d1b4d164876de47144dfdce6dea92c670ed0217 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.1.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.2.1.ebuild similarity index 52% rename from sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.1.0.ebuild rename to sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.2.1.ebuild index 5599ce73b0..20e0b2120e 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.1.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.2.1.ebuild @@ -1,21 +1,50 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 + +GAWK_IS_BETA=no DESCRIPTION="GNU awk pattern-matching language" HOMEPAGE="https://www.gnu.org/software/gawk/gawk.html" -SRC_URI="mirror://gnu/gawk/${P}.tar.xz" -LICENSE="GPL-2" +if [[ ${GAWK_IS_BETA} == yes || ${PV} == *_beta* ]] ; then + if [[ ${PV} == *_beta* ]] ; then + # Beta versioning is sometimes for the release prior, e.g. + # 5.2.1_beta is labelled upstream as 5.2.0b. + MY_PV=${PV/_beta/b} + MY_PV=$(ver_cut 1-2 ${MY_PV}).$(($(ver_cut 3 ${MY_PV}) - 1))$(ver_cut 4- ${MY_PV}) + MY_P=${PN}-${MY_PV} + + S="${WORKDIR}"/${MY_P} + else + MY_P=${P} + fi + + SRC_URI="https://www.skeeve.com/gawk/${MY_P}.tar.gz" +else + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gawk.asc + inherit verify-sig + + SRC_URI="mirror://gnu/gawk/${P}.tar.xz" + SRC_URI+=" verify-sig? ( mirror://gnu/gawk/${P}.tar.xz.sig )" + + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-3+" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="mpfr nls readline" +# While tempting to enable mpfr by default as e.g. Fedora do, as of 5.2.x, +# MPFR support is "on parole" and may be removed: +# https://www.gnu.org/software/gawk/manual/html_node/MPFR-On-Parole.html. +IUSE="mpfr pma nls readline" RDEPEND=" - dev-libs/gmp:0= - mpfr? ( dev-libs/mpfr:0= ) - readline? ( sys-libs/readline:0= ) + mpfr? ( + dev-libs/gmp:= + dev-libs/mpfr:= + ) + readline? ( sys-libs/readline:= ) " DEPEND="${RDEPEND}" BDEPEND=" @@ -24,6 +53,10 @@ BDEPEND=" nls? ( sys-devel/gettext ) " +if [[ ${GAWK_IS_BETA} != yes ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-gawk )" +fi + src_prepare() { default @@ -49,10 +82,17 @@ src_configure() { # Avoid automagic dependency on libsigsegv export ac_cv_libsigsegv=no + # README says gawk may not work properly if built with non-Bison. + # We already BDEPEND on Bison, so just unset YACC rather than + # guessing if we need to do yacc.bison or bison -y. + unset YACC + local myeconfargs=( + --cache-file="${S}"/config.cache --libexec='$(libdir)/misc' $(use_with mpfr) $(use_enable nls) + $(use_enable pma) $(use_with readline) ) @@ -84,6 +124,9 @@ pkg_postinst() { done if ! [[ -e ${EROOT}/bin/awk ]] ; then + # /bin might not exist yet (stage1) + [[ -d "${EROOT}/bin" ]] || mkdir "${EROOT}/bin" || die + ln -s "../usr/bin/gawk" "${EROOT}/bin/awk" || die fi fi diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/metadata.xml index fda45f78db..66b0edfce4 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/metadata.xml @@ -1,11 +1,20 @@ - - base-system@gentoo.org - Gentoo Base System - - - use mpfr for high precision arithmetic (-M / --bignum) - + + base-system@gentoo.org + Gentoo Base System + + + + Use dev-libs/mpfr for high precision arithmetic (-M / --bignum) + + + Experimental Persistent Memory Allocator (PMA) support which allows persistence + of variables, arrays, and user-defined functions across runs. + + + + gawk +