public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Maciej Barć" <xgqt@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-build/bazel-buildtools/
Date: Sun, 20 Oct 2024 00:00:28 +0000 (UTC)	[thread overview]
Message-ID: <1729382425.ecb38968481cd725a8d440368c7351e6c46d8e6d.xgqt@gentoo> (raw)

commit:     ecb38968481cd725a8d440368c7351e6c46d8e6d
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 19 23:28:52 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sun Oct 20 00:00:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecb38968

dev-build/bazel-buildtools: new package; add 7.3.1

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 dev-build/bazel-buildtools/Manifest                |  2 +
 .../bazel-buildtools/bazel-buildtools-7.3.1.ebuild | 69 ++++++++++++++++++++++
 dev-build/bazel-buildtools/metadata.xml            | 19 ++++++
 3 files changed, 90 insertions(+)

diff --git a/dev-build/bazel-buildtools/Manifest b/dev-build/bazel-buildtools/Manifest
new file mode 100644
index 000000000000..baea0fd76a00
--- /dev/null
+++ b/dev-build/bazel-buildtools/Manifest
@@ -0,0 +1,2 @@
+DIST bazel-buildtools-7.3.1-deps.tar.xz 3588840 BLAKE2B 9b0766803201b9bee5329865714b9ed798b06b32b77f3b80efbd31fe9cbe8f6397f9a29c9e0947b1609ae20a697bddb8c2db934c28609aa58bfd9cf343dab923 SHA512 136c1493f688b4b90d31a7f90c3c8e3e62cc26824dcf679d321a649c99638780fcd27771c31e21d6afc0272b249cbfdaf78a07fa2335c904c1f966da1ca0b561
+DIST bazel-buildtools-7.3.1.tar.gz 330909 BLAKE2B 15d3ce94411bbc33f166b15f94699ac4fee373ff29f7f8226800776845611f29b1e0557bb62441fa62540792b63f634062de376ba1587e7c91d0504d6a66424f SHA512 3c06bdf7b6bb7cbe9a9f455e31be16bf36b97769515c761bda2e11a39d4eb12d8e65e7ea051e58ad26b782a93fadb5dd8221c30f75cc96d5ddd3abadce7fdbe2

diff --git a/dev-build/bazel-buildtools/bazel-buildtools-7.3.1.ebuild b/dev-build/bazel-buildtools/bazel-buildtools-7.3.1.ebuild
new file mode 100644
index 000000000000..5cb3d11cf6e3
--- /dev/null
+++ b/dev-build/bazel-buildtools/bazel-buildtools-7.3.1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+APP_PN="buildtools"
+
+inherit go-module
+
+DESCRIPTION="Tools for working with Google's Bazel BUILD files."
+HOMEPAGE="https://github.com/bazelbuild/buildtools/"
+
+if [[ "${PV}" == *9999* ]] ; then
+	inherit git-r3
+
+	EGIT_REPO_URI="https://github.com/bazelbuild/${APP_PN}.git"
+else
+	SRC_URI="https://github.com/bazelbuild/${APP_PN}/archive/refs/tags/v${PV}.tar.gz
+		-> ${P}.tar.gz"
+	S="${WORKDIR}/${APP_PN}-${PV}"
+
+	KEYWORDS="~amd64 ~x86"
+fi
+
+SRC_URI+="
+	https://dev.gentoo.org/~xgqt/distfiles/deps/${P}-deps.tar.xz
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+DOCS=( README.md WARNINGS.md )
+
+src_prepare() {
+	default
+
+	rm ./warn/docs/docs.go || die
+}
+
+src_compile() {
+	local -r go_ldopts="
+		-X main.buildScmRevision=v${PV}
+		-X main.buildVersion=${PV}
+	"
+	local -a -r go_buildopts=(
+		-ldflags "${go_ldopts}"
+		-o ./bin/
+	)
+	ego build "${go_buildopts[@]}" ./...
+}
+
+src_install() {
+	exeinto /usr/bin
+	doexe ./bin/{buildifier{,2},buildozer}
+	newexe ./bin/generatetables bazel-generatetables
+	newexe ./bin/unused_deps bazel-unused_deps
+
+	local app=""
+	for app in buildifier buildozer unused_deps ; do
+		newdoc "${S}/${app}/README.md" "${app}.md"
+	done
+
+	einstalldocs
+}
+
+pkg_postinst() {
+	einfo 'The "generatetables" binary is installed as "bazel-generatetables"'
+	einfo 'and the "unused_deps" binary is installed as "bazel-unused_deps"'.
+}

diff --git a/dev-build/bazel-buildtools/metadata.xml b/dev-build/bazel-buildtools/metadata.xml
new file mode 100644
index 000000000000..ee281bf6fe20
--- /dev/null
+++ b/dev-build/bazel-buildtools/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+  <maintainer type="person">
+    <email>xgqt@gentoo.org</email>
+    <name>Maciej Barć</name>
+  </maintainer>
+  <longdescription>
+    Bazel buildtools contain: 1. buildifier - for formatting BUILD,
+    BUILD.bazel and BUCK files in a standard way, 2. buildozer - for doing
+    command-line operations on these files, 3. unused_deps - for finding
+    unneeded dependencies in java_library rules.
+  </longdescription>
+  <upstream>
+    <bugs-to>https://github.com/bazelbuild/buildtools/issues/</bugs-to>
+    <remote-id type="github">bazelbuild/buildtools</remote-id>
+  </upstream>
+</pkgmetadata>


             reply	other threads:[~2024-10-20  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-20  0:00 Maciej Barć [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-24  8:05 [gentoo-commits] repo/gentoo:master commit in: dev-build/bazel-buildtools/ Arthur Zamarin
2025-01-11  2:02 Maciej Barć
2025-01-11  6:37 Sam James
2025-01-11  6:37 Sam James
2025-01-21 23:04 Maciej Barć
2025-02-04 12:52 Maciej Barć
2025-02-09 20:50 Maciej Barć
2025-02-09 20:50 Maciej Barć
2025-02-23 16:09 Arthur Zamarin
2025-02-23 16:09 Arthur Zamarin
2025-03-07 19:34 Maciej Barć
2025-03-07 19:34 Maciej Barć

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1729382425.ecb38968481cd725a8d440368c7351e6c46d8e6d.xgqt@gentoo \
    --to=xgqt@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox