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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B949E158042 for ; Fri, 25 Oct 2024 21:25:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C2FDEE097E; Fri, 25 Oct 2024 21:24:56 +0000 (UTC) Received: from mail.landless-city.net (mail.landless-city.net [95.164.19.180]) (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 1F081E0935 for ; Fri, 25 Oct 2024 21:24:55 +0000 (UTC) Received: from mail.landless-city.net (unknown [37.99.36.156]) by mail.landless-city.net (Postfix) with ESMTPSA id 561827E8A1; Sat, 26 Oct 2024 02:24:53 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landless-city.net; s=2024031301_rsa; t=1729891493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JTh4A5euGeQzqUUWYTBI3zRSE1qKzjXsSoLs+rWSkfE=; b=k30D7QI+dLX6H1pGNpzxmRlHAgFZRTqoTWEpBTlSMcz6Y2bgMsWcMXUERxbV6AQ3xG1T+/ fBKf8vfAEMl2xcOWz6FyzBDqTrQlJucwykg5TQgg6ycmYMO0YRScIVbNr6cDKktkLPstIY BMtDwa6TBbpJyHN1cTYi6s88zQiPgvZz8qG1gmusi/6ssO0DMGjM0AMjqfgPXwoI8eRRWO 08W1So82kG+sSnpi3CLbuBQXEcXNi8mfP1ACl+deUrB/pqOZgY3Ust18YfuTUqpe8Gidp+ Z1YGmJY9JG7JXqTczWCnG7lUJpqPMUIgrjZ1teBgeY5xvkYEWc+tKnyEr/I7Qg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=landless-city.net; s=2024031301_ed25519; t=1729891493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JTh4A5euGeQzqUUWYTBI3zRSE1qKzjXsSoLs+rWSkfE=; b=MFUDBKVNBL9XzFe/3WvHZhmSgsJKoT8UIKbUsa5omM9o66kG7G1Pgz1rdVReE+t5bQS+aG T0oN5hAkvDWqYwCA== From: Eric Joldasov To: gentoo-dev@lists.gentoo.org Cc: Eric Joldasov Subject: [gentoo-dev] [PATCH 4/5] dev-lang/zig: sync 9999 with 0.13.0-r1 Date: Sat, 26 Oct 2024 02:20:14 +0500 Message-ID: <20241025212431.3460-5-bratishkaerik@landless-city.net> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025212431.3460-1-bratishkaerik@landless-city.net> References: <20241024014626.31175-1-bratishkaerik@landless-city.net> <20241025212431.3460-1-bratishkaerik@landless-city.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 73bb8e8b-045b-4c8f-8ada-62a006791208 X-Archives-Hash: 466151c60e74adaea72eb381f192cf64 From: Eric Joldasov * Update to use zig-build and zig-toolchain functions instead of local get_zig_mcpu etc. functions. * Port "sys-apps/sandbox-2.39" test dependency requirement from 0.13.0 ebuild. * Stage3 compilation is unified by combining build.zig options, now both cmake (+llvm) and bootstrap.c (-llvm) build up to "zig2" target, after that we use zig-build.eclass with common options. * Before migrating to the zig-build.eclass, test steps in src_test have been ran sequentially in for-loop, which allowed logic inside each step to ran parallelly but not several steps at a time. Now we use upstream "test" step instead of separately calling all dependant steps, so that build system can now ran all of them paralelly. This means time spent in src_test is now significantly shorter. * "zig2" in both scenarios now has explicit target which is set by using zig-toolchain functions on a CBUILD/CHOST. This allows us to skip convertion logic in CMake and bootstrap.c, so that instead of patching them we can just update converter in zig-toolchain.eclass and unify target behaviour. * Disable autodocs generation for "std" module, since it can now be generated on-fly with "zig std" command. Signed-off-by: Eric Joldasov --- dev-lang/zig/zig-9999.ebuild | 244 ++++++++++++++++++----------------- 1 file changed, 125 insertions(+), 119 deletions(-) diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild index 335ac0eab28c..65650ac5c781 100644 --- a/dev-lang/zig/zig-9999.ebuild +++ b/dev-lang/zig/zig-9999.ebuild @@ -1,234 +1,240 @@ # Copyright 2019-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 LLVM_COMPAT=( 19 ) LLVM_OPTIONAL=1 -inherit check-reqs cmake edo llvm-r1 toolchain-funcs +ZIG_SLOT="$(ver_cut 1-2)" +ZIG_OPTIONAL=1 + +inherit check-reqs cmake flag-o-matic edo llvm-r1 toolchain-funcs zig-build DESCRIPTION="A robust, optimal, and maintainable programming language" -HOMEPAGE="https://ziglang.org/" +HOMEPAGE="https://ziglang.org/ https://github.com/ziglang/zig/" if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/ziglang/zig.git" inherit git-r3 else VERIFY_SIG_METHOD=minisig VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/minisig-keys/zig-software-foundation.pub inherit verify-sig SRC_URI=" https://ziglang.org/download/${PV}/${P}.tar.xz verify-sig? ( https://ziglang.org/download/${PV}/${P}.tar.xz.minisig ) " KEYWORDS="~amd64 ~arm ~arm64" BDEPEND="verify-sig? ( sec-keys/minisig-keys-zig-software-foundation )" fi # project itself: MIT # There are bunch of projects under "lib/" folder that are needed for cross-compilation. # Files that are unnecessary for cross-compilation are removed by upstream # and therefore their licenses (if any special) are not included. # lib/libunwind: Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT ) # lib/libcxxabi: Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT ) # lib/libcxx: Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT ) # lib/libc/wasi: || ( Apache-2.0-with-LLVM-exceptions Apache-2.0 MIT BSD-2 ) public-domain # lib/libc/musl: MIT BSD-2 # lib/libc/mingw: ZPL public-domain BSD-2 ISC HPND # lib/libc/glibc: BSD HPND ISC inner-net LGPL-2.1+ 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" +SLOT="${ZIG_SLOT}" +IUSE="doc +llvm test" +RESTRICT="!test? ( test )" REQUIRED_USE=" !llvm? ( !doc ) llvm? ( ${LLVM_REQUIRED_USE} ) " -BUILD_DIR="${S}/build" +# Used by both cmake and zig-build eclass. +BUILD_DIR="${WORKDIR}/${P}_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=" llvm? ( $(llvm_gen_dep ' sys-devel/clang:${LLVM_SLOT} sys-devel/lld:${LLVM_SLOT} sys-devel/llvm:${LLVM_SLOT}[zstd] ') ) " - -RDEPEND=" +BDEPEND+=" + test? ( !!