commit:     6ce691f39a263ad3105441cf29524de037b953f9
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat May 11 13:25:46 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat May 11 13:58:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ce691f3

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 <AT> gentoo.org>

 dev-go/goversion/goversion-1.2.0-r1.ebuild | 33 ++++++++++++++++++++++++++++++
 dev-go/goversion/goversion-1.2.0.ebuild    | 29 --------------------------
 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
-}

Reply via email to