diff options
Diffstat (limited to 'dev-lang/zig')
-rw-r--r-- | dev-lang/zig/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/zig/zig-9999.ebuild | 29 |
2 files changed, 17 insertions, 14 deletions
diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest index d224d272d5f2..72feadd8e1d3 100644 --- a/dev-lang/zig/Manifest +++ b/dev-lang/zig/Manifest @@ -1,5 +1,5 @@ AUX zig-0.11.0-first-try-getconf.patch 5378 BLAKE2B a5bdb83e4897a0553431b333b0ee3a1fc1ed2da413c177188f6d4b1756c1f06275a548a53bb5885ef912cbf03de07d5302066078281fdd120a3bcffb1375a4d2 SHA512 20252263c52e791829d7fdf8b59f824a4a91252f771fed0b773d7b288cba93cac5ac8c3ebe3134d87b56658192bc6eb9dfde9f85d2490a596e594034c5ac251f DIST zig-0.11.0.tar.xz 15275316 BLAKE2B 603e4995a36d214ba71cf05b719a04732c8927995c8207ab8fdd574dca3410cdc5ccc8f6aa9964807afc04a5cbce1a3910a6cde4cf12e585cdf7684833217eb2 SHA512 c19a8ae6d440a16dd5e77941fc77c036d1f284f1784376625e63b65f30b4acad62f9f4217bc818c401f88c2c33f8722f26fc467c3e23c29a89178c4b1882d1c4 EBUILD zig-0.11.0-r1.ebuild 5069 BLAKE2B 7b8fa2a72d67c7c211cf228fac00ead39dbc070ab5757d7245e507d2f5006f939a763fafac70e39b56fd82d16d11cc9d2df9c209a8950de28c87d9be6503a6c5 SHA512 275589b2ac7bcc71b2a65042a3473fe41c33e9729c12450dbf9d3559ed622db73958e5ae9bf9c5d704235d9ed7642b58a81ec4bb6e65b15939b3c5922e5fd233 -EBUILD zig-9999.ebuild 6571 BLAKE2B 34bee1a457193330e9e61a7cc7fa01529951ee7dbc5103fa36f63a8854a0d0daed6f06e9f37e51c13ec749e7411af4a394bd008a2e5d67f145f2fed89bf414de SHA512 a14cb7d3cdb6792378d39042147853f31f6e683a52807ddcb7b1159fcc2a3401fc2a05bd3ed9b8daa02e8aee02197ceda9a4f1fe2b89b2e43033a980e10d517d +EBUILD zig-9999.ebuild 6559 BLAKE2B 5df86343c1803fd14bcbc9ba962080601f5b7f484d42c1d26b815a2bba6043e6ffa0fdf726cb3fa8cba208b14f30cbd938de5e1874c5e68e07e903dc55e3c3b2 SHA512 c8aeec09c6734efa4f109d83b694235000efa665edc4e177e767c1939865bedb69c4cf8b5dcf220899fec96d3836921578df8da8d06c4714883ba38310ea1571 MISC metadata.xml 631 BLAKE2B bec6fe40717f526f8153f5d4c4da47ed4daf1c359af09a43cbb592058aba9b0aff3745998c45b91c6b58ef8a4cd7b263c2f3c537ec8911377a803e8688e1b3ad SHA512 0c91bae1b6f224f177719af7cc664398d8a031934cbeaec7d08794f46ab9c1fa7a130c4cf459f738a120867367ffca186298e67aa738e7161576ea602847f52b diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild index a29f09a3db19..4628af24780a 100644 --- a/dev-lang/zig/zig-9999.ebuild +++ b/dev-lang/zig/zig-9999.ebuild @@ -1,10 +1,12 @@ -# Copyright 2019-2023 Gentoo Authors +# Copyright 2019-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -LLVM_MAX_SLOT=17 -inherit edo cmake llvm check-reqs toolchain-funcs +LLVM_COMPAT=( 17 ) +LLVM_OPTIONAL=1 + +inherit check-reqs cmake edo llvm-r1 toolchain-funcs DESCRIPTION="A robust, optimal, and maintainable programming language" HOMEPAGE="https://ziglang.org/" @@ -30,7 +32,10 @@ fi LICENSE="MIT Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT ) || ( Apache-2.0-with-LLVM-exceptions Apache-2.0 MIT BSD-2 ) public-domain BSD-2 ZPL ISC HPND BSD inner-net LGPL-2.1+" SLOT="$(ver_cut 1-2)" IUSE="doc +llvm" -REQUIRED_USE="!llvm? ( !doc )" +REQUIRED_USE=" + !llvm? ( !doc ) + llvm? ( ${LLVM_REQUIRED_USE} ) +" BUILD_DIR="${S}/build" @@ -41,9 +46,11 @@ BUILD_DIR="${S}/build" # options that are passed to LLVM CMake building (excluding "static" ofc). DEPEND=" llvm? ( - sys-devel/clang:${LLVM_MAX_SLOT}= - sys-devel/lld:${LLVM_MAX_SLOT}= - sys-devel/llvm:${LLVM_MAX_SLOT}=[zstd] + $(llvm_gen_dep ' + sys-devel/clang:${LLVM_SLOT} + sys-devel/lld:${LLVM_SLOT} + sys-devel/llvm:${LLVM_SLOT}[zstd] + ') ) " @@ -63,10 +70,6 @@ RESTRICT="!llvm? ( test )" # Zig uses self-hosted compiler only CHECKREQS_MEMORY="4G" -llvm_check_deps() { - has_version "sys-devel/clang:${LLVM_SLOT}" -} - ctarget_to_zigtarget() { # Zig's Target Format: arch-os-abi local CTARGET="${CTARGET:-${CHOST}}" @@ -114,7 +117,7 @@ pkg_setup() { export ZIG_SYS_INSTALL_DEST="${EPREFIX}/usr/$(get_libdir)/zig/${PV}" - use llvm && llvm_pkg_setup + use llvm && llvm-r1_pkg_setup check-reqs_pkg_setup } @@ -140,7 +143,7 @@ src_configure() { -DZIG_TARGET_TRIPLE="$(get_zig_target)" -DZIG_TARGET_MCPU="$(get_zig_mcpu)" -DZIG_USE_LLVM_CONFIG=ON - -DCMAKE_PREFIX_PATH="$(get_llvm_prefix ${LLVM_MAX_SLOT})" + -DCMAKE_PREFIX_PATH="$(get_llvm_prefix)" -DCMAKE_INSTALL_PREFIX="${ZIG_SYS_INSTALL_DEST}" ) |