diff options
Diffstat (limited to 'dev-lang/zig')
-rw-r--r-- | dev-lang/zig/Manifest | 6 | ||||
-rw-r--r-- | dev-lang/zig/files/zig-9999-stage2-fix.patch | 6 | ||||
-rw-r--r-- | dev-lang/zig/metadata.xml | 3 | ||||
-rw-r--r-- | dev-lang/zig/zig-9999.ebuild | 25 |
4 files changed, 15 insertions, 25 deletions
diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest index 28010e6d307c..68ff7750a6f3 100644 --- a/dev-lang/zig/Manifest +++ b/dev-lang/zig/Manifest @@ -1,7 +1,7 @@ AUX zig-0.9.1-fix-riscv.patch 1853 BLAKE2B 0d0c9e1d639ed1a5228ad7db3182f848d9f6deba0e8e091d993256b90fdf152def7f80446ba19aeee0bd4c6d6a87dfcba5df311a54ede2b79510b6552cb2da9c SHA512 5c85a7fed80b5d157c99f80cf9971cdd91c93477de49ad01d163956ebc17d267d6a0002212fe16f5ca04b35c96e5f4721d1be44c6f4955429940763d924cc92f AUX zig-0.9.1-fix-single-threaded.patch 390 BLAKE2B 443a5ab709aa90ed92636310c204a15cbb60a997ff39f7f7102fdd4f21f66e64bd79516653729ecbd719aeb39809457c3db2d1c3c9d0614d1fb637307cc2a892 SHA512 f4e6f87a3aae5380c3f3e1eda85f10914119a378dd08c8375d18dd038dc0b131234a62fd86f46f64cd2038e5abd787e4a7876929fceac85b01bd6e4bce3b3263 -AUX zig-9999-stage2-fix.patch 474 BLAKE2B c19bbe2200e4f2bdbc41af2ae303bd105ae728726fe77f90b21d0e16734ae5623e69ddd08e2e57f6b9215a4b319cae870da1e3d8a8d92fd909aac53ff7a3d062 SHA512 af7f7b00fda2492df643e0119aed1287580900eeccc0c03df3089e186a8797878da0a3ce6e7f2149d37454c0d1ea2fbd512c6885afa56939a677c06b5f624c9a +AUX zig-9999-stage2-fix.patch 502 BLAKE2B 9f4b8a31bac02ec2895a865f4a724b8431311c4656cbe1a19cb8f861020e2408fe9a7ce5f753ef3ca8f30adf178467b9d16e0019edbfb9b5227d7a4619345fa4 SHA512 d76b13adc6f594693099c4d45c50430cfde4c7c4b7baeededc1272c2284da81758efc91d7282b3e3a5adae4846ae697b4593e80b3e1241c0ba6b936f56c54592 DIST zig-0.9.1.tar.xz 13940828 BLAKE2B 996b0e945f61b01dddbb7c8674a9e2d2d01b93eb48fdfd2c986496330990ffa64cba15f8bd8518b90ef6f514759ba6cc3fd31d6044c5b11b92bf92e3f7f15303 SHA512 0b8a5f9b7e34e4252536f59bc91429f1e76b2bf8e01f024095919f6ecf34db56b5c86c554fbb94bdcb5255394c87f2c87519c8f34c631f53816927ec0882ae2d EBUILD zig-0.9.1.ebuild 1345 BLAKE2B 6a7b7477f9e3d8c7b54a1352870d844b3eb5655baf02fa1491c008f53591137db0347323fabdb549c97085ca67f85c7c3ffc48e7182ab8ebfb041bd234a44166 SHA512 eb3df8a8e086406305c2e00409cbf309a9cc7d518e6776360ecf6916b2a641a3640bb5321d264ccf0f454beda000d57762d81114dab0e0d1f7629c98c8d5edbf -EBUILD zig-9999.ebuild 1948 BLAKE2B a879467157e916464a5bd0848ab526495b22d6eca6f0a48ac289430cf045ef7d646d621b1814e5fff38984dcd87b126dd58989f54a74ef4734df0c42b6b72ba8 SHA512 52093e14f2ac2cc4e8fa11ebb1abb6f14d555dbb9f74a15c32bb26007f27e17f312dc05ce84a58b68f3e906cb16bfdefab223d3326a13c02fa95b672405f8dd9 -MISC metadata.xml 677 BLAKE2B d9a07783f0c9115f17c1125630fbb00be6a388e6d5526c44723795fe36884ec8123c1e4dc976f8c8347946e6f9f4249d0607978b4f0c4f6672d77f55b4fa0f23 SHA512 db452c01358b9d47695d79b360312b7f6f242e9c288dbb8f327684ba65913aec2e8250fe3cc0dba89d6831f63860bdbb67c041db7b3f89b84a0a6dc7789da222 +EBUILD zig-9999.ebuild 1852 BLAKE2B 9d22f4948566d50cdef2a8d14ef0c08e97e62c15687626c99a39ed27a734e0cc4e01c979996b471f9616189d520ab82d8147a63d065dcee622cfc112cb48d9f6 SHA512 adcfb7fa6297c131ac0f846f29c7c9475a897311acf16531c2dfbd7393af7f7355dffb45917c31550423768644688a1e79ac3cc50557349ab00feb2b65d9d892 +MISC metadata.xml 541 BLAKE2B 6f5c7fbf759f0430f69073a17a0dae4b8bebf335b54c3b43da6b24104dc3de05a3b686cddbbd31e4dae1fc31695a2f08d000d22437ed6f1847de8fa95e3b1952 SHA512 d49cf0a8ad76ac9a6f6fb091effddbbcd812b56f91df6d3c782e15197cb4ff4423fb1076671a232aabcb9833af19ef8c820ad6df312a1e4d72e665680314c083 diff --git a/dev-lang/zig/files/zig-9999-stage2-fix.patch b/dev-lang/zig/files/zig-9999-stage2-fix.patch index 610ab6b86623..a2fe945c4a39 100644 --- a/dev-lang/zig/files/zig-9999-stage2-fix.patch +++ b/dev-lang/zig/files/zig-9999-stage2-fix.patch @@ -1,12 +1,12 @@ diff --git a/build.zig b/build.zig -index ac0a161..12f7e15 100644 +index c8e757dc4..b698b5680 100644 --- a/build.zig +++ b/build.zig -@@ -562,6 +562,7 @@ fn addCmakeCfgOptionsToExe( +@@ -577,6 +577,7 @@ fn addCmakeCfgOptionsToExe( else => |e| return e, }; exe.linkSystemLibrary("unwind"); + exe.linkSystemLibrary("c_nonshared"); } else if (exe.target.isFreeBSD()) { - try addCxxKnownPath(b, cfg, exe, "libc++.a", null, need_cpp_includes); + try addCxxKnownPath(b, cfg, exe, b.fmt("libc++.{s}", .{lib_suffix}), null, need_cpp_includes); exe.linkSystemLibrary("pthread"); diff --git a/dev-lang/zig/metadata.xml b/dev-lang/zig/metadata.xml index c12ebabd226e..a5a5818faae7 100644 --- a/dev-lang/zig/metadata.xml +++ b/dev-lang/zig/metadata.xml @@ -9,9 +9,6 @@ <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> - <use> - <flag name="stage2">Install stage2 compiler (written in Zig) alongside stage1 compiler (written in C++ and Zig)</flag> - </use> <upstream> <remote-id type="github">ziglang/zig</remote-id> <bugs-to>https://github.com/ziglang/zig/issues</bugs-to> diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild index 32a064ec02fc..1574aa37588a 100644 --- a/dev-lang/zig/zig-9999.ebuild +++ b/dev-lang/zig/zig-9999.ebuild @@ -18,7 +18,7 @@ fi LICENSE="MIT" SLOT="0" -IUSE="test +stage2 +threads" +IUSE="test +threads" RESTRICT="!test? ( test )" BUILD_DIR="${S}/build" @@ -56,34 +56,27 @@ src_configure() { -DZIG_USE_CCACHE=OFF -DZIG_SHARED_LLVM=ON -DZIG_SINGLE_THREADED="$(usex !threads)" + -DCMAKE_PREFIX_PATH=$(get_llvm_prefix ${LLVM_MAX_SLOT}) + -DCMAKE_INSTALL_PREFIX="${BUILD_DIR}/stage3" ) cmake_src_configure } -src_compile() { - cmake_src_compile - - if use stage2 ; then - cd "${BUILD_DIR}" || die - ./zig build -p stage2 -Dstatic-llvm=false -Denable-llvm=true -Dsingle-threaded="$(usex threads false true)" -Dskip-install-lib-files=true --verbose || die - fi -} - src_test() { cd "${BUILD_DIR}" || die - ./zig build test || die + ./stage3/bin/zig build test -Dstatic-llvm=false -Denable-llvm=true || die } src_install() { - cmake_src_install - - use stage2 && newbin "${BUILD_DIR}/stage2/bin/zig" zig-stage2 + cd "${BUILD_DIR}" || die + DESTDIR="${D}" ./zig2 build install -Denable-stage1=true -Dstatic-llvm=false -Denable-llvm=true --prefix "${EPREFIX}"/usr || die + dodoc ../README.md } # see https://github.com/ziglang/zig/issues/3382 -QA_FLAGS_IGNORED="usr/bin/zig-stage2" +QA_FLAGS_IGNORED="usr/bin/zig" pkg_postinst() { - use stage2 && elog "You enabled stage2 USE flag, Zig stage1 was installed as /usr/bin/zig, Zig stage2 was installed as /usr/bin/zig-stage2" + elog "If you want to use stage1 backend, use -fstage1 flag" } |