diff options
author | Sam James <sam@gentoo.org> | 2024-12-17 12:21:42 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-12-17 12:21:42 +0000 |
commit | 5bb8b81487743b3e643c5a332d256cb69aca4569 (patch) | |
tree | f5316fcfdc2b05aab7df54cd97ca64654ad26f38 /dev-lang | |
parent | dev-libs/date: update for pkgmoved clang (diff) | |
download | gentoo-5bb8b81487743b3e643c5a332d256cb69aca4569.tar.gz gentoo-5bb8b81487743b3e643c5a332d256cb69aca4569.tar.bz2 gentoo-5bb8b81487743b3e643c5a332d256cb69aca4569.zip |
dev-lang/ada-bootstrap: handle arches where we have multiple tarballs available
Otherwise, we might have ${A} containing more than one and then we unpack
the last one listed (which isn't necessarily right at all) and also fail
w/ wrong number of args to dosym.
Bug: https://bugs.gentoo.org/940472
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild b/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild index 09b42c8b122b..56e5fd4b54d1 100644 --- a/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild +++ b/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild @@ -59,8 +59,30 @@ RDEPEND=" virtual/libiconv " +src_unpack() { + # We want to unpack only the appropriate tarball for CHOST (e.g. on arm). + TARBALL_TO_UNPACK= + + local archive + for archive in ${A} ; do + local tarball_chost=${archive/${P}-} + tarball_chost=${tarball_chost%%.gpkg.tar} + + if [[ ${tarball_chost} == ${CHOST} ]] ; then + TARBALL_TO_UNPACK=${archive} + break + fi + done + + if [[ -z ${TARBALL_TO_UNPACK} ]] ; then + die "No tarball found for CHOST=${CHOST}. Please file a bug at bugs.gentoo.org." + fi + + unpack_gpkg "${TARBALL_TO_UNPACK}" +} + src_install() { - local chost=${A/${P}-} + local chost=${TARBALL_TO_UNPACK/${P}-} chost=${chost%%.gpkg.tar} dodir /usr/lib/ada-bootstrap |