From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1520351-garchives=archives.gentoo.org@lists.gentoo.org>
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 B5E1C15806E
	for <garchives@archives.gentoo.org>; Sun, 21 May 2023 19:32:53 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id DC641E083E;
	Sun, 21 May 2023 19:32:52 +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) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id BD194E083E
	for <gentoo-commits@lists.gentoo.org>; Sun, 21 May 2023 19:32:52 +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 985273409C8
	for <gentoo-commits@lists.gentoo.org>; Sun, 21 May 2023 19:32:51 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id D8218A4A
	for <gentoo-commits@lists.gentoo.org>; Sun, 21 May 2023 19:32:49 +0000 (UTC)
From: "Jason Zaman" <perfinion@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" <perfinion@gentoo.org>
Message-ID: <1684697557.fff6e7099ea6a9cf790d54fcd5aef3105111ab97.perfinion@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bazel/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-util/bazel/Manifest dev-util/bazel/bazel-6.2.0.ebuild
X-VCS-Directories: dev-util/bazel/
X-VCS-Committer: perfinion
X-VCS-Committer-Name: Jason Zaman
X-VCS-Revision: fff6e7099ea6a9cf790d54fcd5aef3105111ab97
X-VCS-Branch: master
Date: Sun, 21 May 2023 19:32:49 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 6b5afa9f-f8bd-4317-9166-e3772a37d10b
X-Archives-Hash: 89aa9891dc48d4a0571d23817db9594d

commit:     fff6e7099ea6a9cf790d54fcd5aef3105111ab97
Author:     Tomas Fabrizio Orsi <torsi <AT> fi <DOT> uba <DOT> ar>
AuthorDate: Thu May 11 18:30:39 2023 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun May 21 19:32:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fff6e709

dev-util/bazel: version bump

Closes: https://bugs.gentoo.org/906160
Closes: https://github.com/gentoo/gentoo/pull/31001
Bug: https://bugs.gentoo.org/906065

Signed-off-by: Tomas Fabrizio Orsi <torsi <AT> fi.uba.ar>
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 dev-util/bazel/Manifest           |  1 +
 dev-util/bazel/bazel-6.2.0.ebuild | 96 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+)

diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest
index 1a96cdd89dff..a1316accb541 100644
--- a/dev-util/bazel/Manifest
+++ b/dev-util/bazel/Manifest
@@ -3,3 +3,4 @@ DIST bazel-4.2.2-dist.zip 279304631 BLAKE2B 2a32838e50b63c4b6400aced10085c6c9aac
 DIST bazel-5.0.0-dist.zip 235894565 BLAKE2B 3798eb9111772809f0345e0c74bef38d8f9d44a7f20844f20aad187a2e177f4999ffa0e1cc1719e4284cdc7c72295bb903d32ce56821c72ee2908f4d939d0769 SHA512 2a9a972d1cce6b50f959fec3d37506914208169c8aa36e5ec5f9a27942e9beff1080a544a18e9bd5eb13dc434c1864cda0594e6da5b78c2f41085abf808c22d7
 DIST bazel-5.1.1-dist.zip 236073335 BLAKE2B dacc98db99a4877bcda743058f8d34c276d893bec14a595155587f9d0a2716caf106e1d08917f8103b9c15c45433285cce2063f15a2653d3d1a4a6b67242876f SHA512 84e2f72df1838fc88a39853afc510bca835fea28590e9aac2138b5416d2f8d9aefd082c81012a2066194fdc440b00b44f9f188b5c896461acebfeb9cd40efc7c
 DIST bazel-5.3.0-dist.zip 235314819 BLAKE2B 771a940e083d569b0297d37877e6d52c16f698bc5141e2c9c895d5d6cdd9e93203fbc941eca7daa4b40026551c25a5bf45d0862b8b13993bc40434aa6bb99dd3 SHA512 6c98e904596764a309e98ea2453c751dc0bf27c683462c5654b72076f8537bccf6c5103ccea60fa3a3dffeaa76b07db80a594feb96ed566282d10bb04f0e1455
+DIST bazel-6.2.0-dist.zip 196992916 BLAKE2B 9516deae60f4193e68687909e3dff0539030d55ee220973890c41c82bb390f04327411fc2a4f0f6782279ae3c2d127498283a86ecc86c2fcdf424b3bd10bad93 SHA512 c2ff9cafd07553bf7e6f4ed2b561bd217f5ec6dda173269cc5a1885f5ec2fea09855cc09f63b62e653135b9babbedbf280e928bf0f3a1404b7066ba5bbecf18f

diff --git a/dev-util/bazel/bazel-6.2.0.ebuild b/dev-util/bazel/bazel-6.2.0.ebuild
new file mode 100644
index 000000000000..36ee3e954ac0
--- /dev/null
+++ b/dev-util/bazel/bazel-6.2.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 bazel java-pkg-2 multiprocessing
+
+DESCRIPTION="Fast and correct automated build system"
+HOMEPAGE="https://bazel.build/"
+
+SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples tools"
+# strip corrupts the bazel binary
+# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794)
+RESTRICT="strip test"
+RDEPEND=">=virtual/jre-11:*"
+DEPEND="
+	virtual/jdk:11
+	app-arch/unzip
+	app-arch/zip"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+	if has ccache ${FEATURES}; then
+		ewarn "${PN} usually fails to compile with ccache, you have been warned"
+	fi
+	java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+	# Only unpack the main distfile
+	unpack ${P}-dist.zip
+}
+
+src_prepare() {
+	default
+
+	# F: fopen_wr
+	# S: deny
+	# P: /proc/self/setgroups
+	# A: /proc/self/setgroups
+	# R: /proc/24939/setgroups
+	# C: /usr/lib/systemd/systemd
+	addpredict /proc
+}
+
+src_compile() {
+	export JAVA_HOME=$(java-config --jre-home) # so keepwork works
+	export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) $(bazel_get_flags)
+		--java_runtime_version=local_jdk
+		--tool_java_runtime_version=local_jdk"
+	VERBOSE=yes ./compile.sh || die "Failed compiling bazel"
+
+	./scripts/generate_bash_completion.sh \
+		--bazel=output/bazel \
+		--output=bazel-complete.bash \
+		--prepend=scripts/bazel-complete-header.bash \
+		--prepend=scripts/bazel-complete-template.bash || die "Failed to generate bash completions"
+}
+
+src_test() {
+	output/bazel test \
+		--verbose_failures \
+		--spawn_strategy=standalone \
+		--genrule_strategy=standalone \
+		--verbose_test_summary \
+		examples/cpp:hello-success_test || die
+	output/bazel shutdown
+}
+
+src_install() {
+	dobin output/bazel
+	newbashcomp bazel-complete.bash ${PN}
+	bashcomp_alias ${PN} ibazel
+	insinto /usr/share/zsh/site-functions
+	doins scripts/zsh_completion/_bazel
+
+	if use examples; then
+		docinto examples
+		dodoc -r examples/*
+		docompress -x /usr/share/doc/${PF}/examples
+	fi
+	# could really build tools but I don't know which ones
+	# are actually used
+	if use tools; then
+		docinto tools
+		dodoc -r tools/*
+		docompress -x /usr/share/doc/${PF}/tools
+		docompress -x /usr/share/doc/${PF}/tools/build_defs/pkg/testdata
+	fi
+}