From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/, dev-lang/zig/files/
Date: Sun, 8 Jan 2023 03:37:48 +0000 (UTC) [thread overview]
Message-ID: <1673148291.7bcf6e440e99f0d38f27011186ff98a5abe9cdc0.sam@gentoo> (raw)
commit: 7bcf6e440e99f0d38f27011186ff98a5abe9cdc0
Author: Eric Joldasov <bratishkaerik <AT> getgoogleoff <DOT> me>
AuthorDate: Sat Jan 7 11:24:21 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 8 03:24:51 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bcf6e44
dev-lang/zig: add patch from upstream for 0.10.0
Closes: https://bugs.gentoo.org/886569
Signed-off-by: Eric Joldasov <bratishkaerik <AT> getgoogleoff.me>
Closes: https://github.com/gentoo/gentoo/pull/28997
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../zig/files/zig-0.10.0-avoid-cmake-bug.patch | 63 ++++++++++++++++++++++
dev-lang/zig/zig-0.10.0.ebuild | 6 ++-
2 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/dev-lang/zig/files/zig-0.10.0-avoid-cmake-bug.patch b/dev-lang/zig/files/zig-0.10.0-avoid-cmake-bug.patch
new file mode 100644
index 000000000000..bfc8ac3fde7f
--- /dev/null
+++ b/dev-lang/zig/files/zig-0.10.0-avoid-cmake-bug.patch
@@ -0,0 +1,63 @@
+https://github.com/ziglang/zig/commit/fe2bd9dda8467b775da4fe3bd535aece9e07ee1b
+Bug https://bugs.gentoo.org/886569
+
+From fe2bd9dda8467b775da4fe3bd535aece9e07ee1b Mon Sep 17 00:00:00 2001
+From: Eric Joldasov <bratishkaerik@getgoogleoff.me>
+Date: Wed, 4 Jan 2023 01:04:48 +0600
+Subject: [PATCH] cmake: move 'continue' statement to avoid cmake bug
+
+---
+ cmake/Findllvm.cmake | 32 +++++++++++---------------------
+ 1 file changed, 11 insertions(+), 21 deletions(-)
+
+diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake
+index 60a52056d8d..d8662034579 100644
+--- a/cmake/Findllvm.cmake
++++ b/cmake/Findllvm.cmake
+@@ -79,7 +79,11 @@ if(ZIG_USE_LLVM_CONFIG)
+ OUTPUT_VARIABLE LLVM_TARGETS_BUILT_SPACES
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REPLACE " " ";" LLVM_TARGETS_BUILT "${LLVM_TARGETS_BUILT_SPACES}")
+- function(NEED_TARGET TARGET_NAME)
++
++ set(ZIG_LLVM_REQUIRED_TARGETS "AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SystemZ;VE;WebAssembly;X86;XCore")
++
++ set(ZIG_LLVM_REQUIRED_TARGETS_ENABLED TRUE)
++ foreach(TARGET_NAME IN LISTS ZIG_LLVM_REQUIRED_TARGETS)
+ list (FIND LLVM_TARGETS_BUILT "${TARGET_NAME}" _index)
+ if (${_index} EQUAL -1)
+ # Save the error message, in case this is the last llvm-config we find
+@@ -87,27 +91,13 @@ if(ZIG_USE_LLVM_CONFIG)
+
+ # Ignore this directory and try the search again
+ list(APPEND CMAKE_IGNORE_PATH "${LLVM_CONFIG_DIR}")
+- continue()
++ set(ZIG_LLVM_REQUIRED_TARGETS_ENABLED FALSE)
++ break()
+ endif()
+- endfunction(NEED_TARGET)
+- NEED_TARGET("AArch64")
+- NEED_TARGET("AMDGPU")
+- NEED_TARGET("ARM")
+- NEED_TARGET("AVR")
+- NEED_TARGET("BPF")
+- NEED_TARGET("Hexagon")
+- NEED_TARGET("Lanai")
+- NEED_TARGET("Mips")
+- NEED_TARGET("MSP430")
+- NEED_TARGET("NVPTX")
+- NEED_TARGET("PowerPC")
+- NEED_TARGET("RISCV")
+- NEED_TARGET("Sparc")
+- NEED_TARGET("SystemZ")
+- NEED_TARGET("VE")
+- NEED_TARGET("WebAssembly")
+- NEED_TARGET("X86")
+- NEED_TARGET("XCore")
++ endforeach()
++ if (NOT ZIG_LLVM_REQUIRED_TARGETS_ENABLED)
++ continue()
++ endif()
+
+ # Got it!
+ break()
diff --git a/dev-lang/zig/zig-0.10.0.ebuild b/dev-lang/zig/zig-0.10.0.ebuild
index c4a1219ddb22..fbc2bd7aee94 100644
--- a/dev-lang/zig/zig-0.10.0.ebuild
+++ b/dev-lang/zig/zig-0.10.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Gentoo Authors
+# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -47,6 +47,10 @@ QA_FLAGS_IGNORED="usr/bin/zig"
# (transpiled to C via C backend) for bootstrapping
CHECKREQS_MEMORY="10G"
+PATCHES=(
+ "${FILESDIR}/${P}-avoid-cmake-bug.patch"
+)
+
llvm_check_deps() {
has_version "sys-devel/clang:${LLVM_SLOT}"
}
next reply other threads:[~2023-01-08 3:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-08 3:37 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-16 16:29 [gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/, dev-lang/zig/files/ Sam James
2024-12-15 9:47 Sam James
2024-08-07 3:16 Sam James
2023-03-17 9:44 Florian Schmaus
2023-01-11 6:04 Sam James
2022-12-01 13:57 Michał Górny
2022-09-19 3:40 Sam James
2022-09-11 18:13 Sam James
2022-09-05 1:25 Sam James
2022-08-22 8:18 Jakov Smolić
2022-07-15 8:41 Joonas Niilola
2022-05-27 7:45 Joonas Niilola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1673148291.7bcf6e440e99f0d38f27011186ff98a5abe9cdc0.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox