From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1430851-garchives=archives.gentoo.org@lists.gentoo.org> 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 15558158094 for <garchives@archives.gentoo.org>; Fri, 26 Aug 2022 22:54:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E46D7E08C4; Fri, 26 Aug 2022 22:54:44 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BD43CE08C4 for <gentoo-commits@lists.gentoo.org>; Fri, 26 Aug 2022 22:54:44 +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 8842F341215 for <gentoo-commits@lists.gentoo.org>; Fri, 26 Aug 2022 22:54:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BC8B359E for <gentoo-commits@lists.gentoo.org>; Fri, 26 Aug 2022 22:54:41 +0000 (UTC) From: "Sam James" <sam@gentoo.org> 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" <sam@gentoo.org> Message-ID: <1661554456.0b7f9ad4c4d57b4348cf7a8a1f058f29ea21a42e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/readline/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/readline/readline-8.1_p2-r1.ebuild sys-libs/readline/readline-8.2_rc3.ebuild sys-libs/readline/readline-9999.ebuild X-VCS-Directories: sys-libs/readline/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 0b7f9ad4c4d57b4348cf7a8a1f058f29ea21a42e X-VCS-Branch: master Date: Fri, 26 Aug 2022 22:54:41 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6580ded0-4afa-4797-a9fc-59c719699179 X-Archives-Hash: 0ae19670b28091d5b6d90c119b466aee commit: 0b7f9ad4c4d57b4348cf7a8a1f058f29ea21a42e Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Aug 26 22:54:16 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Aug 26 22:54:16 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b7f9ad4 sys-libs/readline: drop use of 'eval' for newer versions for patch generation Use similar approach as dev-libs/mpfr and sys-libs/readline for generating SRC_URI & patch list. Signed-off-by: Sam James <sam <AT> gentoo.org> ...ne-8.2_rc3.ebuild => readline-8.1_p2-r1.ebuild} | 105 +++++++++------------ sys-libs/readline/readline-8.2_rc3.ebuild | 51 ++++++---- sys-libs/readline/readline-9999.ebuild | 51 ++++++---- 3 files changed, 110 insertions(+), 97 deletions(-) diff --git a/sys-libs/readline/readline-8.2_rc3.ebuild b/sys-libs/readline/readline-8.1_p2-r1.ebuild similarity index 72% copy from sys-libs/readline/readline-8.2_rc3.ebuild copy to sys-libs/readline/readline-8.1_p2-r1.ebuild index 934a8b1ce368..2732f7d7ae6a 100644 --- a/sys-libs/readline/readline-8.2_rc3.ebuild +++ b/sys-libs/readline/readline-8.1_p2-r1.ebuild @@ -3,10 +3,6 @@ EAPI=7 -# There's no standard way of versioning the point releases upstream -# make anyway, so while this was added for RC versions, it's fine -# in general. -QA_PKGCONFIG_VERSION=$(ver_cut 1-2) VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/chetramey.asc inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript verify-sig @@ -16,53 +12,49 @@ PLEVEL="${PV##*_p}" MY_PV="${PV/_p*}" MY_PV="${MY_PV/_/-}" MY_P="${PN}-${MY_PV}" -is_release() { - case ${PV} in - 9999|*_alpha*|*_beta*|*_rc*) return 1 ;; - *) return 0 ;; - esac -} +MY_PATCHES=() + [[ ${PV} != *_p* ]] && PLEVEL=0 -patches() { - [[ ${PLEVEL} -eq 0 ]] && return 1 - local opt=$1 - eval set -- {1..${PLEVEL}} - set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") - if [[ ${opt} == -s ]] ; then - echo "${@/#/${DISTDIR}/}" - else - local u - for u in mirror://gnu/${PN} ftp://ftp.cwru.edu/pub/bash ; do - printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" - printf "${u}/${PN}-${MY_PV}-patches/%s.sig " "$@" - done - fi -} DESCRIPTION="Another cute console display library" -HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git" - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/git/readline.git" - EGIT_BRANCH=devel - inherit git-r3 -elif is_release ; then - SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" - SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )" -else - SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" - SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )" -fi - -if ! is_release ; then - inherit autotools -fi +HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html" + +case ${PV} in + *_alpha*|*_beta*|*_rc*) + SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" + SRC_URI+=" verify-sig? ( ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )" + ;; + + *) + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz" + SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )" + + if [[ ${PLEVEL} -gt 0 ]] ; then + # bash-5.1 -> bash51 + my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2)) + + patch_url= + my_patch_index= + + for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do + for url in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do + patch_url=$(printf "${url}/${PN}-$(ver_cut 1-2)-patches/${my_p}-%03d" ${my_patch_index}) + SRC_URI+=" ${patch_url}" + SRC_URI+=" verify-sig? ( ${patch_url}.sig )" + done + + MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) ) + done + + unset my_pn patch_url my_patch_index + fi + ;; +esac LICENSE="GPL-3" SLOT="0/8" # subslot matches SONAME major -if is_release ; then - 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" -fi +[[ ${PV} == *_rc* ]] || \ +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" IUSE="static-libs +unicode utils" RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]" @@ -77,27 +69,22 @@ PATCHES=( "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 "${FILESDIR}"/${PN}-7.0-headers.patch "${FILESDIR}"/${PN}-8.0-headers.patch - - # TODO: rebase - #"${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch + "${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch + "${FILESDIR}"/${PN}-8.1-windows-signals.patch ) +# Needed because we don't want the patches being unpacked +# (which emits annoying and useless error messages) src_unpack() { - if [[ ${PV} == 9999 ]] ; then - git-r3_src_unpack - else - # Needed because we don't want the patches being unpacked - # (which emits annoying and useless error messages) - verify-sig_src_unpack - unpack ${MY_P}.tar.gz - fi + verify-sig_src_unpack + + unpack ${MY_P}.tar.gz } src_prepare() { - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) - default + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}" - is_release || eautoreconf + default if use prefix && [[ ! -x "${BROOT}"/usr/bin/pkg-config ]] ; then # If we're bootstrapping, make a guess. We don't have pkg-config diff --git a/sys-libs/readline/readline-8.2_rc3.ebuild b/sys-libs/readline/readline-8.2_rc3.ebuild index 934a8b1ce368..6ab39201ac56 100644 --- a/sys-libs/readline/readline-8.2_rc3.ebuild +++ b/sys-libs/readline/readline-8.2_rc3.ebuild @@ -16,28 +16,20 @@ PLEVEL="${PV##*_p}" MY_PV="${PV/_p*}" MY_PV="${MY_PV/_/-}" MY_P="${PN}-${MY_PV}" +MY_PATCHES=() + is_release() { case ${PV} in - 9999|*_alpha*|*_beta*|*_rc*) return 1 ;; - *) return 0 ;; + 9999|*_alpha*|*_beta*|*_rc*) + return 1 + ;; + *) + return 0 + ;; esac } + [[ ${PV} != *_p* ]] && PLEVEL=0 -patches() { - [[ ${PLEVEL} -eq 0 ]] && return 1 - local opt=$1 - eval set -- {1..${PLEVEL}} - set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") - if [[ ${opt} == -s ]] ; then - echo "${@/#/${DISTDIR}/}" - else - local u - for u in mirror://gnu/${PN} ftp://ftp.cwru.edu/pub/bash ; do - printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" - printf "${u}/${PN}-${MY_PV}-patches/%s.sig " "$@" - done - fi -} DESCRIPTION="Another cute console display library" HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git" @@ -47,8 +39,28 @@ if [[ ${PV} == 9999 ]] ; then EGIT_BRANCH=devel inherit git-r3 elif is_release ; then - SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz" SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )" + + if [[ ${PLEVEL} -gt 0 ]] ; then + # bash-5.1 -> bash51 + my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2)) + + patch_url= + my_patch_index= + + for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do + for url in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do + patch_url=$(printf "${url}/${PN}-$(ver_cut 1-2)-patches/${my_p}-%03d" ${my_patch_index}) + SRC_URI+=" ${patch_url}" + SRC_URI+=" verify-sig? ( ${patch_url}.sig )" + done + + MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) ) + done + + unset my_pn patch_url my_patch_index + fi else SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )" @@ -94,7 +106,8 @@ src_unpack() { } src_prepare() { - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}" + default is_release || eautoreconf diff --git a/sys-libs/readline/readline-9999.ebuild b/sys-libs/readline/readline-9999.ebuild index 934a8b1ce368..6ab39201ac56 100644 --- a/sys-libs/readline/readline-9999.ebuild +++ b/sys-libs/readline/readline-9999.ebuild @@ -16,28 +16,20 @@ PLEVEL="${PV##*_p}" MY_PV="${PV/_p*}" MY_PV="${MY_PV/_/-}" MY_P="${PN}-${MY_PV}" +MY_PATCHES=() + is_release() { case ${PV} in - 9999|*_alpha*|*_beta*|*_rc*) return 1 ;; - *) return 0 ;; + 9999|*_alpha*|*_beta*|*_rc*) + return 1 + ;; + *) + return 0 + ;; esac } + [[ ${PV} != *_p* ]] && PLEVEL=0 -patches() { - [[ ${PLEVEL} -eq 0 ]] && return 1 - local opt=$1 - eval set -- {1..${PLEVEL}} - set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") - if [[ ${opt} == -s ]] ; then - echo "${@/#/${DISTDIR}/}" - else - local u - for u in mirror://gnu/${PN} ftp://ftp.cwru.edu/pub/bash ; do - printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" - printf "${u}/${PN}-${MY_PV}-patches/%s.sig " "$@" - done - fi -} DESCRIPTION="Another cute console display library" HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git" @@ -47,8 +39,28 @@ if [[ ${PV} == 9999 ]] ; then EGIT_BRANCH=devel inherit git-r3 elif is_release ; then - SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz" SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )" + + if [[ ${PLEVEL} -gt 0 ]] ; then + # bash-5.1 -> bash51 + my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2)) + + patch_url= + my_patch_index= + + for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do + for url in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do + patch_url=$(printf "${url}/${PN}-$(ver_cut 1-2)-patches/${my_p}-%03d" ${my_patch_index}) + SRC_URI+=" ${patch_url}" + SRC_URI+=" verify-sig? ( ${patch_url}.sig )" + done + + MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) ) + done + + unset my_pn patch_url my_patch_index + fi else SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )" @@ -94,7 +106,8 @@ src_unpack() { } src_prepare() { - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}" + default is_release || eautoreconf