diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-05-11 16:25:46 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-05-11 16:58:33 +0300 |
commit | 6ce691f39a263ad3105441cf29524de037b953f9 (patch) | |
tree | f11cd08d5a83509b6aaeeb6816413b391a38e86e /dev-go/goversion | |
parent | dev-python/requests_download: Fix distfile name (diff) | |
download | gentoo-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/goversion')
-rw-r--r-- | dev-go/goversion/goversion-1.2.0-r1.ebuild | 33 | ||||
-rw-r--r-- | 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 -} |