From 3bd85407abc9ed4434c2d3741f84fdb512638b1c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jan 2023 23:53:26 +0000 Subject: gentoo auto-resync : 14:01:2023 - 23:53:26 --- dev-lang/Manifest.gz | Bin 19517 -> 19513 bytes dev-lang/zig/Manifest | 4 +- .../zig-0.10.0-build-dir-install-stage3.patch | 24 ++++- dev-lang/zig/zig-0.10.0-r1.ebuild | 101 ++++++++++++++++++++ dev-lang/zig/zig-0.10.0.ebuild | 106 --------------------- 5 files changed, 122 insertions(+), 113 deletions(-) create mode 100644 dev-lang/zig/zig-0.10.0-r1.ebuild delete mode 100644 dev-lang/zig/zig-0.10.0.ebuild (limited to 'dev-lang') diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz index 315fdaccc171..42360ee3a5fe 100644 Binary files a/dev-lang/Manifest.gz and b/dev-lang/Manifest.gz differ diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest index 71e22f132c18..a77e84fe040f 100644 --- a/dev-lang/zig/Manifest +++ b/dev-lang/zig/Manifest @@ -1,6 +1,6 @@ AUX zig-0.10.0-avoid-cmake-bug.patch 2200 BLAKE2B 6c06d318f2da258f3c003c5d8eaf66261ec736cb4ea0a87f3b0ff3d7c350bd51523ba2f23ea2bccbaed237fe76dfd6e1b56b1741a5ac6ba3539f7551e2347f70 SHA512 8e5ff85b26fe3f5a19e73aa9ad8d9f6446f936e3c2157b50212218a77747913e1199c0b52181e884755a90dfa839b23f305da82edeba6e8d3ceaff1d20a16efd -AUX zig-0.10.0-build-dir-install-stage3.patch 927 BLAKE2B 6bf6797f04e3ad26ce9de0bf5fc388376e5ac3e5ebdf44a83ae882ba20cb3582ac10d40058ac13bec76766c6a1cd12021fde482379064ad7e9fa69981c013463 SHA512 4412f215b438409d0535f9c1668cd76bcbf2096a803a57048b301243ef4b183417339c8119d478d7eedea0ceaa0e520324cf3d40dd1f9ff5d6693c2fedd2f8c9 +AUX zig-0.10.0-build-dir-install-stage3.patch 1430 BLAKE2B cca909207cadfe1c9b31b9481a705882506363aaf41db7672f42cc66937f85f7b2f2b53346d29a4d748d1aef05e77efcc6e668ac498a7d172a6d8654034d5c4a SHA512 6704adb1f146ed78c8030aad2c739e30d0ec7ffda40273b5520914b16cc67d497afd9b1b59a1acfbb0097d7f5b0a5517973c45ef43ccbc35d8af051500577117 DIST zig-0.10.0.tar.xz 14530912 BLAKE2B 5949a44ee039b7d5a163344a0fc26af8dd9cf311ed25c7092a665bb59ec7dec8dc3cd39918d81ef02c707aa8989b038fb21dfba3927fd31153a1404739b4ea3c SHA512 9d83ce51cc0ce404c06da820179c1cc47aa50e573fb1c831a96baa12c6b5226abe85b384110f2ffc4cbdc5f24eaba1f14a4e3249ffeaa248c0d73ba29859e682 -EBUILD zig-0.10.0.ebuild 3894 BLAKE2B b8a91fcd746edad38c6f60e724ffa50dbbcc0b64281c0f1159abdef183528c570fb4b5375841bd67d7f1b876536d4a8a4832ebcc470f3d2bb0d5d280719eea83 SHA512 9bee415a98467aff89dce760ec93a96edee7f766b4d75e916095b1c62a18b18443f2cbcac66240db0a3a7db5d2207db16804091dd05c866a1e4b06acf19670c8 +EBUILD zig-0.10.0-r1.ebuild 3295 BLAKE2B 0997f58541abc6687278dd7eec16944a16b90bd58dc5a4ededea12dbfe9006264fc087c937eb5d1a4579d016df222a5aa8ed721fe42124a0fc85984fe7b38ec3 SHA512 ea1dec43578750945a3401ca1a2cefce0be9bc8da06a65c0e6da2684be6be0ff41b315f110a9ec9f8af99298c16b7369a37c21027ee1f53e82ecaceee13dce56 EBUILD zig-9999.ebuild 1671 BLAKE2B b753bbd37c7f1f60bdb2bc8fe3914d21f5b30787768460b55bd9e1980dc4727eb4f71c63a03da17a8a98c681df5e33e311b48c9c42fde8ab1b43a3bc9b3f4f90 SHA512 2b4d5a8fdfe5eba60896915b81168d5eb0aa3bcf53d6df8326c593f275556cf8652c401f0780f977325e877d36aa9348a196168f3e2c3dc3af99a8f5a1b46301 MISC metadata.xml 541 BLAKE2B 6f5c7fbf759f0430f69073a17a0dae4b8bebf335b54c3b43da6b24104dc3de05a3b686cddbbd31e4dae1fc31695a2f08d000d22437ed6f1847de8fa95e3b1952 SHA512 d49cf0a8ad76ac9a6f6fb091effddbbcd812b56f91df6d3c782e15197cb4ff4423fb1076671a232aabcb9833af19ef8c820ad6df312a1e4d72e665680314c083 diff --git a/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch b/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch index c44632f5111e..5704e4ba7921 100644 --- a/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch +++ b/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch @@ -1,18 +1,32 @@ From: Eric Joldasov Install 'zig' binary in 'build_dir/stage3' directory so that we can find it and use for testing. +Also split "add_custom_target(stage3 ALL" and command that it invokes, so that it won't retry it during installation, +as target will be considered not out-of-date. (Bug https://bugs.gentoo.org/890457 and https://bugs.gentoo.org/890459). Upstream PR https://github.com/ziglang/zig/pull/14255. + --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1094,7 +1094,7 @@ set(ZIG_BUILD_ARGS +@@ -1094,10 +1094,14 @@ set(ZIG_BUILD_ARGS ) add_custom_target(stage3 ALL - COMMAND zig2 build compile ${ZIG_BUILD_ARGS} -+ COMMAND zig2 build --prefix "${CMAKE_BINARY_DIR}/stage3" ${ZIG_BUILD_ARGS} - DEPENDS zig2 - COMMENT STATUS "Building stage3" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" +- DEPENDS zig2 +- COMMENT STATUS "Building stage3" +- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ++ DEPENDS "${CMAKE_BINARY_DIR}/stage3/bin/zig" ++) ++ ++add_custom_command( ++ OUTPUT "${CMAKE_BINARY_DIR}/stage3/bin/zig" ++ COMMAND zig2 build --prefix "${CMAKE_BINARY_DIR}/stage3" ${ZIG_BUILD_ARGS} ++ COMMENT STATUS "Building stage3" ++ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + ) + + install(CODE "set(ZIG_EXECUTABLE \"${ZIG_EXECUTABLE}\")") + --- a/build.zig +++ b/build.zig @@ -148,10 +148,6 @@ pub fn build(b: *Builder) !void { diff --git a/dev-lang/zig/zig-0.10.0-r1.ebuild b/dev-lang/zig/zig-0.10.0-r1.ebuild new file mode 100644 index 000000000000..4d9a45ee5fb0 --- /dev/null +++ b/dev-lang/zig/zig-0.10.0-r1.ebuild @@ -0,0 +1,101 @@ +# Copyright 2019-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_MAX_SLOT=15 +inherit edo cmake llvm check-reqs + +DESCRIPTION="A robust, optimal, and maintainable programming language" +HOMEPAGE="https://ziglang.org/" +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/ziglang/zig.git" + inherit git-r3 +else + SRC_URI="https://ziglang.org/download/${PV}/${P}.tar.xz" + KEYWORDS="~amd64 ~arm ~arm64" +fi + +LICENSE="MIT" +SLOT="0" + +BUILD_DIR="${S}/build" + +# Zig requires zstd and zlib compression support in LLVM, if using LLVM backend. +# (non-LLVM backends don't require these) +# They are not required "on their own", so please don't add them here. +# You can check https://github.com/ziglang/zig-bootstrap in future, to see +# options that are passed to LLVM CMake building (excluding "static" ofc). +DEPEND=" + sys-devel/clang:${LLVM_MAX_SLOT}= + sys-devel/lld:${LLVM_MAX_SLOT}= + sys-devel/llvm:${LLVM_MAX_SLOT}=[zstd] +" + +RDEPEND=" + ${DEPEND} + !dev-lang/zig-bin +" + +# see https://github.com/ziglang/zig/issues/3382 +# For now, Zig doesn't support CFLAGS/LDFLAGS/etc. +QA_FLAGS_IGNORED="usr/bin/zig" + +# see https://ziglang.org/download/0.10.0/release-notes.html#Self-Hosted-Compiler +# 0.10.0 release - ~9.6 GiB, since we use compiler written in C++ for bootstrapping +# 0.11.0 release - ~2.8 GiB, since we will (at least according to roadmap) use self-hosted compiler +# (transpiled to C via C backend) for bootstrapping +CHECKREQS_MEMORY="10G" + +PATCHES=( + "${FILESDIR}/${P}-avoid-cmake-bug.patch" + "${FILESDIR}/${P}-build-dir-install-stage3.patch" +) + +llvm_check_deps() { + has_version "sys-devel/clang:${LLVM_SLOT}" +} + +pkg_setup() { + llvm_pkg_setup + ewarn "This version requires 10G of memory for building compiler." + ewarn "If you don't have enough memory, you can wait until 0.11.0 release" + ewarn "or (if you are risky) use 9999 version (currently requires only 4GB)" + check-reqs_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -DZIG_USE_CCACHE=OFF + -DZIG_SHARED_LLVM=ON + -DCMAKE_PREFIX_PATH=$(get_llvm_prefix ${LLVM_MAX_SLOT}) + ) + + cmake_src_configure +} + +src_test() { + cd "${BUILD_DIR}" || die + local ZIG_TEST_ARGS="-Dstatic-llvm=false -Denable-llvm=true -Dskip-non-native=true -Drelease -Dtarget=native" + local ZIG_TEST_STEPS=( + test-cases test-fmt test-behavior test-compiler-rt test-universal-libc test-compare-output + test-standalone test-c-abi test-link test-stack-traces test-cli test-asm-link test-translate-c + test-run-translated-c test-std + ) + + local step + for step in "${ZIG_TEST_STEPS[@]}" ; do + edob ./stage3/bin/zig build ${step} ${ZIG_TEST_ARGS} + done +} + +pkg_postinst() { + elog "0.10.0 release introduces self-hosted compiler for general use by default" + elog "It means that your code can be un-compilable since this compiler has some new or removed features and new or fixed bugs" + elog "Upstream recommends:" + elog " * Using old compiler if experiencing such breakage (flag '-fstage1')" + elog " * Waiting for bugfix release 0.10.1" + elog " * Waiting for release 0.11.0 with old compiler removed (these changes are already merged in 9999)" + elog "Also see: https://ziglang.org/download/0.10.0/release-notes.html#Self-Hosted-Compiler" + elog "and https://ziglang.org/download/0.10.0/release-notes.html#How-to-Upgrade" +} diff --git a/dev-lang/zig/zig-0.10.0.ebuild b/dev-lang/zig/zig-0.10.0.ebuild deleted file mode 100644 index f47f22799167..000000000000 --- a/dev-lang/zig/zig-0.10.0.ebuild +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 2019-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LLVM_MAX_SLOT=15 -inherit cmake llvm check-reqs - -DESCRIPTION="A robust, optimal, and maintainable programming language" -HOMEPAGE="https://ziglang.org/" -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://github.com/ziglang/zig.git" - inherit git-r3 -else - SRC_URI="https://ziglang.org/download/${PV}/${P}.tar.xz" - KEYWORDS="~amd64 ~arm ~arm64" -fi - -LICENSE="MIT" -SLOT="0" - -BUILD_DIR="${S}/build" - -# Zig requires zstd and zlib compression support in LLVM, if using LLVM backend. -# (non-LLVM backends don't require these) -# They are not required "on their own", so please don't add them here. -# You can check https://github.com/ziglang/zig-bootstrap in future, to see -# options that are passed to LLVM CMake building (excluding "static" ofc). -DEPEND=" - sys-devel/clang:${LLVM_MAX_SLOT}= - sys-devel/lld:${LLVM_MAX_SLOT}= - sys-devel/llvm:${LLVM_MAX_SLOT}=[zstd] -" - -RDEPEND=" - ${DEPEND} - !dev-lang/zig-bin -" - -# see https://github.com/ziglang/zig/issues/3382 -# For now, Zig doesn't support CFLAGS/LDFLAGS/etc. -QA_FLAGS_IGNORED="usr/bin/zig" - -# see https://ziglang.org/download/0.10.0/release-notes.html#Self-Hosted-Compiler -# 0.10.0 release - ~9.6 GiB, since we use compiler written in C++ for bootstrapping -# 0.11.0 release - ~2.8 GiB, since we will (at least according to roadmap) use self-hosted compiler -# (transpiled to C via C backend) for bootstrapping -CHECKREQS_MEMORY="10G" - -PATCHES=( - "${FILESDIR}/${P}-avoid-cmake-bug.patch" - "${FILESDIR}/${P}-build-dir-install-stage3.patch" -) - -llvm_check_deps() { - has_version "sys-devel/clang:${LLVM_SLOT}" -} - -pkg_setup() { - llvm_pkg_setup - ewarn "This version requires 10G of memory for building compiler." - ewarn "If you don't have enough memory, you can wait until 0.11.0 release" - ewarn "or (if you are risky) use 9999 version (currently requires only 4GB)" - check-reqs_pkg_setup -} - -src_configure() { - local mycmakeargs=( - -DZIG_USE_CCACHE=OFF - -DZIG_SHARED_LLVM=ON - -DCMAKE_PREFIX_PATH=$(get_llvm_prefix ${LLVM_MAX_SLOT}) - ) - - cmake_src_configure -} - -src_test() { - cd "${BUILD_DIR}" || die - local ZIG_TESTARGS=("-Dstatic-llvm=false -Denable-llvm=true -Dskip-non-native=true -Drelease -Dtarget=native") - ./stage3/bin/zig build test-cases ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-fmt ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-behavior ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-compiler-rt ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-universal-libc ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-compare-output ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-standalone ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-c-abi ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-link ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-stack-traces ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-cli ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-asm-link ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-translate-c ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-run-translated-c ${ZIG_TESTARGS[@]} || die - ./stage3/bin/zig build test-std ${ZIG_TESTARGS[@]} || die -} - -pkg_postinst() { - elog "0.10.0 release introduces self-hosted compiler for general use by default" - elog "It means that your code can be un-compilable since this compiler has some new or removed features and new or fixed bugs" - elog "Upstream recommends:" - elog " * Using old compiler if experiencing such breakage (flag '-fstage1')" - elog " * Waiting for bugfix release 0.10.1" - elog " * Waiting for release 0.11.0 with old compiler removed (these changes are already merged in 9999)" - elog "Also see: https://ziglang.org/download/0.10.0/release-notes.html#Self-Hosted-Compiler" - elog "and https://ziglang.org/download/0.10.0/release-notes.html#How-to-Upgrade" -} -- cgit v1.2.3