From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E358315800F for ; Sun, 8 Jan 2023 03:37:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D8469E07C9; Sun, 8 Jan 2023 03:37:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BEA15E07C9 for ; Sun, 8 Jan 2023 03:37:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BEABC34102F for ; Sun, 8 Jan 2023 03:37:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 187EC803 for ; Sun, 8 Jan 2023 03:37:48 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1673148291.7bcf6e440e99f0d38f27011186ff98a5abe9cdc0.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/, dev-lang/zig/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/zig/files/zig-0.10.0-avoid-cmake-bug.patch dev-lang/zig/zig-0.10.0.ebuild X-VCS-Directories: dev-lang/zig/ dev-lang/zig/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 7bcf6e440e99f0d38f27011186ff98a5abe9cdc0 X-VCS-Branch: master Date: Sun, 8 Jan 2023 03:37:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 744ad900-ff41-4122-b11d-5f20db56de72 X-Archives-Hash: 4580053bea8e8b7b9eae32e5389518d0 commit: 7bcf6e440e99f0d38f27011186ff98a5abe9cdc0 Author: Eric Joldasov getgoogleoff me> AuthorDate: Sat Jan 7 11:24:21 2023 +0000 Commit: Sam James gentoo 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 getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/28997 Signed-off-by: Sam James 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 +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}" }