logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://anongit.hacktivis.me/git/overlay.git/
commit: 66df55c3405785113940fcd40c652314a1f66d99
parent 406cb1e9d891da70db764dc8f8aaa0f594356082
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 15 Aug 2025 15:51:37 +0200

dev-go/sys: add 0.35.0

Diffstat:

Mdev-go/sys/Manifest1+
Adev-go/sys/sys-0.35.0.ebuild44++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/dev-go/sys/Manifest b/dev-go/sys/Manifest @@ -1 +1,2 @@ DIST sys-0.22.0.tar.gz 1498230 BLAKE2B 7817ac6abc782f22f8eb7382239e1cbd6dbd22c1b3fb73882b9b7663374d1f469328c6edd33a65046de83e70de45e0fb598a212f9ea4b7c37b112a3f915a4e33 SHA512 fa90b75f007d264357ca32e58ddf803183c81be2f4f340bf637eb6870c2d0ad3d726f73a0b9bdc9fbad5fb1e385a122442c19eed667db7faa6a055f9bdb3cdcd +DIST sys-0.35.0.tar.gz 1531316 BLAKE2B 00f03ca74c559549214dc4db4877a20a017d88a2c74c43972cd80690753df6cd5847e17e43427030d91f8ee784045eb910c9271d380a2f7cb21fc916e36df40f SHA512 bbcd98494887421133869f1cd276af5457423c0876017feecefaca87377e033f077adc1d1bad526c6e4a549212ab99f4cc8b1f5cd50ee5918404355ffd9868bf diff --git a/dev-go/sys/sys-0.35.0.ebuild b/dev-go/sys/sys-0.35.0.ebuild @@ -0,0 +1,44 @@ +# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +EGO_PN="golang.org/x/sys" + +DESCRIPTION="supplemental Go packages for low-level interactions with the operating system" +HOMEPAGE="https://golang.org/x/sys" +SRC_URI="https://github.com/golang/sys/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="test" + +RESTRICT="!test? ( test )" + +DEPEND="test? ( dev-lang/go )" + +src_prepare() { + default + + mkdir -p "$(dirname "${WORKDIR}/src/${EGO_PN}")" || die + mv "${S}/${P}" "${WORKDIR}/src/${EGO_PN}" || die +} + +src_test() { + # disable module-aware mode + export GO111MODULE=off + + # With GO111MODULE=off WORKDIR needs to be included + export GOPATH="${WORKDIR}:${EPREFIX}/usr/lib/go-gentoo" + + # `go test` doesn't recurses in directories by itself + go test "${EGO_PN}/cpu" "${EGO_PN}/execabs" "${EGO_PN}/unix" || die +} + +src_install() { + mkdir -p "${ED}/usr/lib/go-gentoo/" || die + cp -r "${WORKDIR}/src" "${ED}/usr/lib/go-gentoo/src" || die + test -f "${ED}/usr/lib/go-gentoo/src/${EGO_PN}/go.mod" || die +}