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 DF7FB158095 for ; Mon, 22 Aug 2022 08:18:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 97225E0958; Mon, 22 Aug 2022 08:18:09 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 2AB98E0955 for ; Mon, 22 Aug 2022 08:18:09 +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 38CD0340F5D for ; Mon, 22 Aug 2022 08:18:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9170F56C for ; Mon, 22 Aug 2022 08:18:06 +0000 (UTC) From: "Jakov Smolić" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jakov Smolić" Message-ID: <1661156167.1f53d35103da2331afeaad49718cb0703dd5f88d.jsmolic@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/zig-bin/files/, dev-lang/zig-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/zig-bin/Manifest dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch dev-lang/zig-bin/metadata.xml dev-lang/zig-bin/zig-bin-0.9.1.ebuild X-VCS-Directories: dev-lang/zig-bin/files/ dev-lang/zig-bin/ X-VCS-Committer: jsmolic X-VCS-Committer-Name: Jakov Smolić X-VCS-Revision: 1f53d35103da2331afeaad49718cb0703dd5f88d X-VCS-Branch: master Date: Mon, 22 Aug 2022 08:18:06 +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: 72cb4046-2e9f-40b7-b5b4-0b13b200ffed X-Archives-Hash: 1d57ff63be081be1b29e4d26cd5f4d6a commit: 1f53d35103da2331afeaad49718cb0703dd5f88d Author: Eric Joldasov getgoogleoff me> AuthorDate: Tue Jul 26 21:19:14 2022 +0000 Commit: Jakov Smolić gentoo org> CommitDate: Mon Aug 22 08:16:07 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f53d351 dev-lang/zig-bin: new package, add 0.9.1 Signed-off-by: Eric Joldasov getgoogleoff.me> Signed-off-by: Jakov Smolić gentoo.org> dev-lang/zig-bin/Manifest | 4 +++ .../files/zig-bin-0.9.1-fix-detecting-abi.patch | 19 +++++++++++ dev-lang/zig-bin/metadata.xml | 16 ++++++++++ dev-lang/zig-bin/zig-bin-0.9.1.ebuild | 37 ++++++++++++++++++++++ 4 files changed, 76 insertions(+) diff --git a/dev-lang/zig-bin/Manifest b/dev-lang/zig-bin/Manifest new file mode 100644 index 000000000000..65078bba09fa --- /dev/null +++ b/dev-lang/zig-bin/Manifest @@ -0,0 +1,4 @@ +DIST zig-linux-aarch64-0.9.1.tar.xz 37034860 BLAKE2B 3b984198d74ee01570e4e10175dc4471268970cc5bd66d732042f17f1cf31301cec9237df756b7fa589915ed4c4f29dcd9ba61fb8e65ce7e9b579762773fe26d SHA512 ca647f04a67a45ad9e869e335266fad9a4a0f3f377da31d54a6f022727404db6cf2386d33315df20d5da0b6883f59e27bb0d73e18856e571cf4bc8f890565639 +DIST zig-linux-armv7a-0.9.1.tar.xz 37974652 BLAKE2B 5d51260d8322d1400719d97c7cac2d12555622272900533128e20d45ea7a1c321b8a3eb9c7c406bbfd459da24d19451c65011bc2cac0b0c29a0372c56ea73a2b SHA512 239c5f02aeb1c85bc2c43374d610e27722c434d23cf3adf43b3923772dfe5800e340d6a6b3672bd307c159c2cccce5137aabb5b6648148c351e29c171de9e333 +DIST zig-linux-i386-0.9.1.tar.xz 44969172 BLAKE2B 7051242284f1ceca662a64257adf64b7383b71b475f27abd3377bdaf8335d56d8cbb9a961ebceb6ae26058258216848dcbde2f50f95a74e0b64578a9522f33d5 SHA512 5bdf0ebffe45023b5a28331137458d258048c7974311c8e8090bc610f0ec262dc0004f0a939cff443b1d94a9cca4035de8e6e98dad9d668413888da02b325b6d +DIST zig-linux-x86_64-0.9.1.tar.xz 41011464 BLAKE2B 053fc1c3d30e5798b7d30c9a4f9b5609b9b080e9f237dab52ae661b183663fca6582dcc37458e8a51dd7eb4fbd1d3a9946f7c67cb756b69460f0e23b03cc96eb SHA512 0e5f5971dc9e586911f98122a410c98d8aaef2795d2d68488a1e9468ea45135479dac7f92708c973db4f8efce78cb0c6b3759cf239fba6237052434a2120d4d3 diff --git a/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch b/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch new file mode 100644 index 000000000000..6aa2f49b379a --- /dev/null +++ b/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch @@ -0,0 +1,19 @@ +From: Eric Joldasov + +Upstream parses /usr/bin/env ELF file for detecting C ABI and the dynamic linker. +However, if sys-apps/coreutils was merged with "multicall" USE flag, it would be a script and not a ELF file. +This will raise error.UnexpectedEndOfFile, and Zig will fallback to default dynamic linker (i.e. musl), +which breaks building programs with Zig on glibc systems. This patch changes file from +/usr/bin/env to /bin/bash, because it is more reliable on Gentoo systems. + +--- a/lib/std/zig/system/NativeTargetInfo.zig ++++ b/lib/std/zig/system/NativeTargetInfo.zig +@@ -355,7 +355,7 @@ fn detectAbiAndDynamicLinker( + return result; + } + +- const env_file = std.fs.openFileAbsoluteZ("/usr/bin/env", .{}) catch |err| switch (err) { ++ const env_file = std.fs.openFileAbsoluteZ("/bin/bash", .{}) catch |err| switch (err) { + error.NoSpaceLeft => unreachable, + error.NameTooLong => unreachable, + error.PathAlreadyExists => unreachable, diff --git a/dev-lang/zig-bin/metadata.xml b/dev-lang/zig-bin/metadata.xml new file mode 100644 index 000000000000..a5a5818faae7 --- /dev/null +++ b/dev-lang/zig-bin/metadata.xml @@ -0,0 +1,16 @@ + + + + + bratishkaerik@getgoogleoff.me + Eric Joldasov + + + proxy-maint@gentoo.org + Proxy Maintainers + + + ziglang/zig + https://github.com/ziglang/zig/issues + + diff --git a/dev-lang/zig-bin/zig-bin-0.9.1.ebuild b/dev-lang/zig-bin/zig-bin-0.9.1.ebuild new file mode 100644 index 000000000000..7aa14d86a3ea --- /dev/null +++ b/dev-lang/zig-bin/zig-bin-0.9.1.ebuild @@ -0,0 +1,37 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="A robust, optimal, and maintainable programming language" +HOMEPAGE="https://ziglang.org/" +SRC_URI=" + amd64? ( https://ziglang.org/download/${PV}/zig-linux-x86_64-${PV}.tar.xz ) + arm? ( https://ziglang.org/download/${PV}/zig-linux-armv7a-${PV}.tar.xz ) + arm64? ( https://ziglang.org/download/${PV}/zig-linux-aarch64-${PV}.tar.xz ) + x86? ( https://ziglang.org/download/${PV}/zig-linux-i386-${PV}.tar.xz )" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86" + +RDEPEND="!dev-lang/zig" + +PATCHES=( "${FILESDIR}/${P}-fix-detecting-abi.patch" ) + +QA_PREBUILT="opt/${P}/zig" + +src_unpack() { + unpack ${A} + + mv "${WORKDIR}/"* "${S}" +} + +src_install() { + insinto /opt/ + doins -r "${S}" + + dosym -r /opt/${P}/doc/ /usr/share/doc/${PF} + dosym -r /opt/${P}/zig /usr/bin/zig + fperms 0755 /usr/bin/zig +}