summaryrefslogtreecommitdiff
path: root/dev-go
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-05-11 16:25:46 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-05-11 16:58:33 +0300
commit6ce691f39a263ad3105441cf29524de037b953f9 (patch)
treef11cd08d5a83509b6aaeeb6816413b391a38e86e /dev-go
parentdev-python/requests_download: Fix distfile name (diff)
downloadgentoo-6ce691f39a263ad3105441cf29524de037b953f9.tar.gz
gentoo-6ce691f39a263ad3105441cf29524de037b953f9.tar.bz2
gentoo-6ce691f39a263ad3105441cf29524de037b953f9.zip
dev-go/goversion: EAPI 6 -> 8, use go-module.eclass
Closes: https://bugs.gentoo.org/679186 Closes: https://bugs.gentoo.org/844676 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-go')
-rw-r--r--dev-go/goversion/goversion-1.2.0-r1.ebuild33
-rw-r--r--dev-go/goversion/goversion-1.2.0.ebuild29
2 files changed, 33 insertions, 29 deletions
diff --git a/dev-go/goversion/goversion-1.2.0-r1.ebuild b/dev-go/goversion/goversion-1.2.0-r1.ebuild
new file mode 100644
index 000000000000..340fc82d4009
--- /dev/null
+++ b/dev-go/goversion/goversion-1.2.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module
+
+DESCRIPTION="Print version used to build Go executables"
+HOMEPAGE="https://github.com/rsc/goversion https://rsc.io/goversion"
+SRC_URI="https://github.com/rsc/goversion/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_unpack() {
+ default
+ cat <<- EOF > "${S}"/go.mod
+ module rsc.io/goversion
+
+ go 1.17
+ EOF
+ go-module_src_unpack
+}
+
+src_compile() {
+ ego build -o ${PN} .
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc README.md
+}
diff --git a/dev-go/goversion/goversion-1.2.0.ebuild b/dev-go/goversion/goversion-1.2.0.ebuild
deleted file mode 100644
index d4c4b0f2d3b3..000000000000
--- a/dev-go/goversion/goversion-1.2.0.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-EGO_PN="rsc.io/goversion"
-
-inherit golang-build golang-vcs-snapshot bash-completion-r1
-ARCHIVE_URI="https://github.com/rsc/goversion/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-KEYWORDS="~amd64"
-
-DESCRIPTION="Print version used to build Go executables"
-HOMEPAGE="https://github.com/rsc/goversion https://rsc.io/goversion"
-SRC_URI="${ARCHIVE_URI}"
-
-LICENSE="BSD"
-SLOT="0"
-IUSE=""
-
-src_compile() {
- pushd src/${EGO_PN} || die
- GOPATH="${S}" go build -o ${PN} . || die
- popd || die
-}
-
-src_install() {
- dobin src/${EGO_PN}/${PN}
- dodoc src/${EGO_PN}/README.md
-}