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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DA45415815E for ; Sun, 11 Feb 2024 16:02:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0F12DE2A0E; Sun, 11 Feb 2024 16:02:38 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ECAABE2A0E for ; Sun, 11 Feb 2024 16:02:37 +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 04282343060 for ; Sun, 11 Feb 2024 16:02:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 38FAB14CB for ; Sun, 11 Feb 2024 16:02:35 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1707667079.a689d1251d826a329a937e19dae19bae823cc033.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/zig/zig-9999.ebuild X-VCS-Directories: dev-lang/zig/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: a689d1251d826a329a937e19dae19bae823cc033 X-VCS-Branch: master Date: Sun, 11 Feb 2024 16:02:35 +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: 62be1851-44ee-445b-a098-0c1e2ca6e9e3 X-Archives-Hash: a75bb293ae4babc14bde755b302c098e commit: a689d1251d826a329a937e19dae19bae823cc033 Author: Eric Joldasov getgoogleoff me> AuthorDate: Sun Feb 11 14:58:05 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Feb 11 15:57:59 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a689d125 dev-lang/zig: Migrate to llvm-r1 in 9999 Signed-off-by: Eric Joldasov getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/35273 Signed-off-by: Michał Górny gentoo.org> dev-lang/zig/zig-9999.ebuild | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) 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}" )