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 E3D28158042 for ; Thu, 24 Oct 2024 01:47:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54010E0A91; Thu, 24 Oct 2024 01:46:32 +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 B0640E0A5D for ; Thu, 24 Oct 2024 01:46:31 +0000 (UTC) Received: from mail.landless-city.net (unknown [37.99.36.187]) by mail.landless-city.net (Postfix) with ESMTPSA id D94047E8A1; Thu, 24 Oct 2024 06:46:29 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landless-city.net; s=2024031301_rsa; t=1729734389; 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=Opahor6efdlPcq9iJxUmEdKGUBC73kKCAHjtUR9VwDw=; b=lHFf9tCWQu3ZrqufiszBRexy/vaXLcXpSjTH442lmKOMUyIg0Rt8FLiW7GO4cG04qpaleq ZITJqRoIv1qgphiDfsH2fWeWKp0ICe78cO/r4LaHzkxJzEF1hPWr2X6vGsU49J8WCJ/akx asy7T/ck89/CgVvkLkn7fTGQl+YC349YIbONrEYf9FVkMK6+XUe1kK110cCSqjQfIqO3YD RnilT9xywvwZcQw5/1wLYVsg1RTg9ggYfJsKSq9S1wcHaD/wcgNrRGUExTjZHvFoUG2Fl0 5DTjFFU0ylUHvEoipPI1aSCdlIOCC884aWTHVPBOGmNZKDiE+zldKgp94nHylg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=landless-city.net; s=2024031301_ed25519; t=1729734389; 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=Opahor6efdlPcq9iJxUmEdKGUBC73kKCAHjtUR9VwDw=; b=JcJuRMOEngtSbFRgTQTG2WdGYfTSL/8/SJ/86Phlw5cpAEXO98mOJgjm5n2A9rn4/39obK +1dYdTzqlw4hrHDg== 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: Thu, 24 Oct 2024 06:46:17 +0500 Message-ID: <20241024014626.31175-5-bratishkaerik@landless-city.net> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241024014626.31175-1-bratishkaerik@landless-city.net> References: <20241024014626.31175-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: 2163bffa-434b-4976-9427-6a5a1fa68c3d X-Archives-Hash: c035bab236a68f9f49bf7f97c417aeb6 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 | 239 ++++++++++++++++++----------------- 1 file changed, 121 insertions(+), 118 deletions(-) diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild index 335ac0eab28c..380bb83a3dac 100644 --- a/dev-lang/zig/zig-9999.ebuild +++ b/dev-lang/zig/zig-9999.ebuild @@ -1,234 +1,237 @@ # Copyright 2019-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -LLVM_COMPAT=( 19 ) +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? ( !!