diff options
author | Sam James <sam@gentoo.org> | 2024-11-20 15:56:43 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-12-17 10:53:15 +0000 |
commit | cae8f6ff8f9a857ba3a07371d6b2d5d8996afb5f (patch) | |
tree | def4231c0f4c2111997b8fcda0975d9b1827b95a /dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild | |
parent | dev-python/nbclient: add missing pytest-rerunfailures bdepend for USE=test (diff) | |
download | gentoo-cae8f6ff8f9a857ba3a07371d6b2d5d8996afb5f.tar.gz gentoo-cae8f6ff8f9a857ba3a07371d6b2d5d8996afb5f.tar.bz2 gentoo-cae8f6ff8f9a857ba3a07371d6b2d5d8996afb5f.zip |
dev-lang/ada-bootstrap: add 14
This adds bootstrap tarballs for GNAT for the following platforms:
* aarch64-unknown-linux-gnu
* armv6j-softfp-linux-gnueabi
* armv6j-unknown-linux-gnueabihf
* armv7a-softfp-linux-gnueabi
* armv7a-unknown-linux-gnueabihf
* powerpc-unknown-linux-gnu
* powerpc64-unknown-linux-gnu
* powerpc64le-unknown-linux-gnu
* sparc64-unknown-linux-gnu
More are planned (like HPPA, but I had an issue there when using the
built tarball; I don't think the tarball was to blame, rather some
deeper issue needing investigation) but this feels like a decent set
to start with.
We should also of course build a fresh one for amd64 and also x86.
They were built using a script [0] using stage3-amd64-hardened-systemd-20241214T201851Z.tar.xz
with ::gentoo state around 16th November 2024 (I say "around" as I synced
in-between to get an eclass fix).
NOTE: I've only added ~arm64 for now as I've tested the binary there
to bootstrap GNAT natively. I'll add other keywords once tested.
[0] https://github.com/thesamesam/sam-gentoo-scripts/blob/91558fb51c56a661d6f374507888ff67725ca660/build-ada-bootstraps
Bug: https://bugs.gentoo.org/940472
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild')
-rw-r--r-- | dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild b/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild new file mode 100644 index 000000000000..a6dd8124af93 --- /dev/null +++ b/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild @@ -0,0 +1,84 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +BINPKG=gcc-14.2.1_p20241116-1 + +# The binaries in SRC_URI are generated by the following (roughly): +# * taking an amd64 stage3 +# * adding USE=ada to make.conf +# * running `crossdev ${CHOST} --ex-gcc -S` +# * running `USE=ada ${CHOST}-emerge -v1 gcc` +# * copy /usr/${CHOST}/var/cache/binpkgs/sys-devel/gcc* into +# ada-bootstrap-${PV}-${CHOST}.gpkg.tar +# +# The full script is at https://github.com/thesamesam/sam-gentoo-scripts/blob/91558fb51c56a661d6f374507888ff67725ca660/build-ada-bootstraps. +# +# Binaries in SRC_URI are regular Gentoo binpkgs in the GPKG format. +# +# Note: of course, the used GCC on both CBUILD and CHOST +# must be the same version, correspond to ${PV} in ada-bootstrap, +# and be at most the newest stable GCC (ideally older). +inherit unpacker + +DESCRIPTION="Binary bootstrap compiler for GNAT (Ada compiler)" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Ada" +SRC_URI=" + arm64? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-aarch64-unknown-linux-gnu.gpkg.tar + ) + arm? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-armv6j-softfp-linux-gnueabi.gpkg.tar + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-armv6j-unknown-linux-gnueabihf.gpkg.tar + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-armv7a-softfp-linux-gnueabi.gpkg.tar + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-armv7a-unknown-linux-gnueabihf.gpkg.tar + ) + ppc? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-powerpc-unknown-linux-gnu.gpkg.tar + ) + ppc64? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-powerpc64le-unknown-linux-gnu.gpkg.tar + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-powerpc64-unknown-linux-gnu.gpkg.tar + ) + sparc? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-sparc64-unknown-linux-gnu.gpkg.tar + ) +" +S=${WORKDIR} + +LICENSE="GPL-2 GPL-3" +SLOT="0" +KEYWORDS="-* ~arm64" + +RDEPEND=" + >=dev-libs/gmp-4.3.2:= + >=dev-libs/mpfr-2.4.2:= + >=dev-libs/mpc-0.8.1:= + sys-libs/zlib + virtual/libiconv +" + +src_install() { + local chost=${A/${P}-} + chost=${chost%%.gpkg.tar} + + dodir /usr/lib/ada-bootstrap + mv "${WORKDIR}"/${BINPKG}/image/usr/ "${ED}"/usr/lib/ada-bootstrap || die + + # Make `gcc-config`-style symlinks + insinto /usr/lib/ada-bootstrap/bin + local tool + for tool in gcc gnat{,bind,chop,clean,kr,link,ls,make,name,prep} ; do + dosym -r /usr/lib/ada-bootstrap/usr/${chost}/gcc-bin/${PV}/${tool} /usr/lib/ada-bootstrap/bin/${tool} + dosym -r /usr/lib/ada-bootstrap/usr/${chost}/gcc-bin/${PV}/${tool} /usr/lib/ada-bootstrap/bin/${chost}-${tool} + dosym -r /usr/lib/ada-bootstrap/usr/${chost}/gcc-bin/${PV}/${tool} /usr/lib/ada-bootstrap/bin/${chost}-${tool}-${PV} + done + + rm -rf "${ED}"/usr/lib/ada-bootstrap/usr/bin || die + # This gives us the same layout as older dev-lang/ada-bootstrap + dosym -r /usr/lib/ada-bootstrap/bin /usr/lib/ada-bootstrap/usr/bin + dosym -r /usr/lib/ada-bootstrap/usr/libexec /usr/lib/ada-bootstrap/libexec +} + +# TODO: pkg_postinst warning/log? |