summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-06-02 22:19:59 +0100
committerSam James <sam@gentoo.org>2023-06-02 22:46:30 +0100
commit3a5856cbd1379c26f1af82ebeea52252d194487a (patch)
tree216f4cb68564933caa947e5aca676de2bf22830a /sys-libs
parentapp-shells/bash: optimise SRC_URI generation (diff)
downloadgentoo-3a5856cbd1379c26f1af82ebeea52252d194487a.tar.gz
gentoo-3a5856cbd1379c26f1af82ebeea52252d194487a.tar.bz2
gentoo-3a5856cbd1379c26f1af82ebeea52252d194487a.zip
sys-libs/readline: sync SRC_URI generation with app-shells/bash
It's an optimisation here too, but it's less impactful than it was for bash. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/readline/readline-8.1_p2-r1.ebuild21
-rw-r--r--sys-libs/readline/readline-8.2_p1.ebuild21
-rw-r--r--sys-libs/readline/readline-9999.ebuild21
3 files changed, 42 insertions, 21 deletions
diff --git a/sys-libs/readline/readline-8.1_p2-r1.ebuild b/sys-libs/readline/readline-8.1_p2-r1.ebuild
index 8ea92d520d24..8e926747c368 100644
--- a/sys-libs/readline/readline-8.1_p2-r1.ebuild
+++ b/sys-libs/readline/readline-8.1_p2-r1.ebuild
@@ -36,17 +36,24 @@ case ${PV} in
patch_url=
my_patch_index=
+ upstream_url_base="mirror://gnu/bash"
+ mirror_url_base="ftp://ftp.cwru.edu/pub/bash"
+
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
+ printf -v mangled_patch_ver ${my_p}-%03d ${my_patch_index}
+ patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
+
+ SRC_URI+=" ${patch_url}"
+ SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
+
+ # Add in the mirror URL too.
+ SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}"
+ SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}} )"
- MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) )
+ MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
done
- unset my_pn patch_url my_patch_index
+ unset my_p patch_url my_patch_index upstream_url_base mirror_url_base
fi
;;
esac
diff --git a/sys-libs/readline/readline-8.2_p1.ebuild b/sys-libs/readline/readline-8.2_p1.ebuild
index b9f1a3da0874..29aa8e80be60 100644
--- a/sys-libs/readline/readline-8.2_p1.ebuild
+++ b/sys-libs/readline/readline-8.2_p1.ebuild
@@ -49,17 +49,24 @@ elif is_release ; then
patch_url=
my_patch_index=
+ upstream_url_base="mirror://gnu/bash"
+ mirror_url_base="ftp://ftp.cwru.edu/pub/bash"
+
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
+ printf -v mangled_patch_ver ${my_p}-%03d ${my_patch_index}
+ patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
+
+ SRC_URI+=" ${patch_url}"
+ SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
+
+ # Add in the mirror URL too.
+ SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}"
+ SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}} )"
- MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) )
+ MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
done
- unset my_pn patch_url my_patch_index
+ unset my_p patch_url my_patch_index upstream_url_base mirror_url_base
fi
else
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
diff --git a/sys-libs/readline/readline-9999.ebuild b/sys-libs/readline/readline-9999.ebuild
index b9f1a3da0874..29aa8e80be60 100644
--- a/sys-libs/readline/readline-9999.ebuild
+++ b/sys-libs/readline/readline-9999.ebuild
@@ -49,17 +49,24 @@ elif is_release ; then
patch_url=
my_patch_index=
+ upstream_url_base="mirror://gnu/bash"
+ mirror_url_base="ftp://ftp.cwru.edu/pub/bash"
+
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
+ printf -v mangled_patch_ver ${my_p}-%03d ${my_patch_index}
+ patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
+
+ SRC_URI+=" ${patch_url}"
+ SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
+
+ # Add in the mirror URL too.
+ SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}"
+ SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}} )"
- MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) )
+ MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
done
- unset my_pn patch_url my_patch_index
+ unset my_p patch_url my_patch_index upstream_url_base mirror_url_base
fi
else
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"