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 E93F2158062 for ; Thu, 9 Mar 2023 10:54:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E0A8E0918; Thu, 9 Mar 2023 10:54:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 2457BE0918 for ; Thu, 9 Mar 2023 10:54:11 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 30E04335D60 for ; Thu, 9 Mar 2023 10:54:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 421AF8D8 for ; Thu, 9 Mar 2023 10:54:07 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1678359238.e2bc05c42635e53cc3f98b344b81cf50b0cc6e88.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/zig-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/zig-bin/zig-bin-0.10.1-r1.ebuild X-VCS-Directories: dev-lang/zig-bin/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: e2bc05c42635e53cc3f98b344b81cf50b0cc6e88 X-VCS-Branch: master Date: Thu, 9 Mar 2023 10:54:07 +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: 524f3754-5dcb-4dab-91da-1f664c6a122c X-Archives-Hash: e9a71626feb1a5c1ddecd9ded74d9670 commit: e2bc05c42635e53cc3f98b344b81cf50b0cc6e88 Author: Eric Joldasov getgoogleoff me> AuthorDate: Wed Jan 25 04:52:56 2023 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Thu Mar 9 10:53:58 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2bc05c4 dev-lang/zig-bin: slotting * Slot Zig and handle /usr/bin/zig via eselect-zig * Add "doc" USE flag for installing language reference and stdlib documentation Followup to previous commit 6ea1afff4a2aa9c753eb154e51decb2b5996b029. Signed-off-by: Eric Joldasov getgoogleoff.me> Signed-off-by: Florian Schmaus gentoo.org> dev-lang/zig-bin/zig-bin-0.10.1-r1.ebuild | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/dev-lang/zig-bin/zig-bin-0.10.1-r1.ebuild b/dev-lang/zig-bin/zig-bin-0.10.1-r1.ebuild new file mode 100644 index 000000000000..81c98e238a76 --- /dev/null +++ b/dev-lang/zig-bin/zig-bin-0.10.1-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 2022-2023 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 ) + riscv? ( https://ziglang.org/download/${PV}/zig-linux-riscv64-${PV}.tar.xz ) + x86? ( https://ziglang.org/download/${PV}/zig-linux-i386-${PV}.tar.xz )" + +LICENSE="MIT" +SLOT="$(ver_cut 1-2)" +KEYWORDS="-* ~amd64 ~arm ~arm64 ~riscv ~x86" +IUSE="doc" + +RDEPEND="app-eselect/eselect-zig" +# Zig provides its standard library in source form "/opt/zig-bin-{PV}/lib/", +# and all other Zig libraries are meant to be consumed in source form, +# because they can use compile-time mechanics (and it is easier for distributions to patch them) +# Here we use this feature for fixing programs that use standard library +# Note: Zig build system is also part of standard library, so we can fix it too +#PATCHES=( ) + +QA_PREBUILT="opt/${P}/zig" + +src_unpack() { + unpack ${A} + + mv "${WORKDIR}/"* "${S}" || die +} + +src_install() { + insinto /opt/ + + use doc && local HTML_DOCS=( "doc/langref.html" "doc/std/" ) + einstalldocs + rm -r ./doc/ || die + + doins -r "${S}" + fperms 0755 "/opt/${P}/zig" + dosym -r "/opt/${P}/zig" "/usr/bin/zig-bin-${PV}" +} + +pkg_postinst() { + elog "0.10.1 release uses self-hosted compiler by default and fixes some bugs from 0.10.0" + elog "But your code still can be un-compilable since some features still not implemented or bugs not fixed" + elog "Upstream recommends:" + elog " * Using old compiler if experiencing such breakage (flag '-fstage1')" + elog " * Waiting for release 0.11.0 with old compiler removed (these changes are already merged in 9999)" + elog "Also see: https://ziglang.org/download/0.10.0/release-notes.html#Self-Hosted-Compiler" + elog "and https://ziglang.org/download/0.10.0/release-notes.html#How-to-Upgrade" +}