summaryrefslogtreecommitdiff
path: root/dev-go
diff options
context:
space:
mode:
Diffstat (limited to 'dev-go')
-rw-r--r--dev-go/Manifest.gzbin4888 -> 5052 bytes
-rw-r--r--dev-go/go-dep-tarball/Manifest3
-rw-r--r--dev-go/go-dep-tarball/files/go-dep-tarball-059
-rw-r--r--dev-go/go-dep-tarball/go-dep-tarball-0.ebuild17
-rw-r--r--dev-go/go-dep-tarball/metadata.xml8
-rw-r--r--dev-go/goversion/Manifest2
-rw-r--r--dev-go/goversion/goversion-1.2.0-r1.ebuild33
-rw-r--r--dev-go/goversion/goversion-1.2.0.ebuild29
8 files changed, 121 insertions, 30 deletions
diff --git a/dev-go/Manifest.gz b/dev-go/Manifest.gz
index 791114964812..ef19d00e70ba 100644
--- a/dev-go/Manifest.gz
+++ b/dev-go/Manifest.gz
Binary files differ
diff --git a/dev-go/go-dep-tarball/Manifest b/dev-go/go-dep-tarball/Manifest
new file mode 100644
index 000000000000..275a05ca01de
--- /dev/null
+++ b/dev-go/go-dep-tarball/Manifest
@@ -0,0 +1,3 @@
+AUX go-dep-tarball-0 2287 BLAKE2B 4fd20a155a4e15a3674652cde136e7f70318eb7d2234ae3f5118f345f4fe94deec0572be657abd2698a84d910799f83fd558b461e74c14e5e6bee65dc104c46c SHA512 055c795046b669470dffa45f50aedbe7797993d510f544b32e0c73f2e43c482fc2f9938fc31e2c9fff6141e7944a61642923da3755e62557b891c8fe93825f6a
+EBUILD go-dep-tarball-0.ebuild 397 BLAKE2B 3699ba38f3aee0eebf26028fb538a850fe86f5c3043c11db15922dbb4fc5cfb4ffc707c8ab07a749e81a701922fb658a257a8ad02cba51b9b7abd4598e423b91 SHA512 f3c2616db1cdbcbe8dbb8b0d265e59586b90657cf550562be4452d6f4f99f4ea88d856970f6ce89ea3bb5c9e05f547016ffae35c5a5ff77f5a659f418c2175dc
+MISC metadata.xml 243 BLAKE2B 63665ae2020bc799fa6ebd6e1fca6755be6498803fdbc17cc630f9f4ffa03fbd46a9ad396e70adc3bc1c32b0a746fe4bab1c6291f32e68e636251207bca9e95c SHA512 78eab20831018fcf4957171a83aaaca9ced53380e01f083c07450c30fa1adfc02dd50ff2fa9f491dd62802f6e779264add1c47a09ade0a35cda558c1d5529ad0
diff --git a/dev-go/go-dep-tarball/files/go-dep-tarball-0 b/dev-go/go-dep-tarball/files/go-dep-tarball-0
new file mode 100644
index 000000000000..d630445fa770
--- /dev/null
+++ b/dev-go/go-dep-tarball/files/go-dep-tarball-0
@@ -0,0 +1,59 @@
+#!/bin/bash
+# Copyright (c) 2024, William Hubbs
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+set -e
+shopt -s lastpipe
+
+if [[ -z $1 ]]; then
+printf "%s\n" "no tarball name specified" >&2
+exit 1
+fi
+
+if [[ ! -f go.mod ]]; then
+printf "%s %s\n" "${PWD}" "does not contain a go project" >&2
+exit 1
+fi
+
+work=$(mktemp -d -p '' dep-tarball-XXXXXX)
+export GOMODCACHE="${work}"/go-mod
+go mod download -modcacherw
+mapfile -t mod_paths < <(find . -mindepth 2 -name go.mod -print)
+for p in "${mod_paths[@]}"; do
+ printf "entering %s\n" "${p%/go.mod}"
+ pushd "${p%/go.mod}" > /dev/null
+ go mod download -modcacherw
+ popd > /dev/null
+done
+find "${GOMODCACHE}/cache/download" -type f -name '*.zip' -delete
+(
+cd "${work}"
+XZ_OPT='-T0 -9' \
+tar --owner 0 --group 0 --posix -acf "${1}"-deps.tar.xz go-mod
+rm -fr go-mod
+)
+mv "${work}"/*xz .
diff --git a/dev-go/go-dep-tarball/go-dep-tarball-0.ebuild b/dev-go/go-dep-tarball/go-dep-tarball-0.ebuild
new file mode 100644
index 000000000000..33119de78872
--- /dev/null
+++ b/dev-go/go-dep-tarball/go-dep-tarball-0.ebuild
@@ -0,0 +1,17 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="script to package go dependencies"
+HOMEPAGE=""
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+
+S="${WORKDIR}"
+
+src_install() {
+ newbin "${FILESDIR}/go-dep-tarball-0" go-dep-tarball
+}
diff --git a/dev-go/go-dep-tarball/metadata.xml b/dev-go/go-dep-tarball/metadata.xml
new file mode 100644
index 000000000000..3b2a9c591010
--- /dev/null
+++ b/dev-go/go-dep-tarball/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>williamh@gentoo.org</email>
+<name>William Hubbs</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-go/goversion/Manifest b/dev-go/goversion/Manifest
index daa6e86ba901..b878e42f37cb 100644
--- a/dev-go/goversion/Manifest
+++ b/dev-go/goversion/Manifest
@@ -1,3 +1,3 @@
DIST goversion-1.2.0.tar.gz 8586 BLAKE2B 76001c1ebbf55bf742a20f7434d7b28da3aaa8e24e2cb6d14c182192735d16184aabbfc47aedb5872ed2610c81c4e6d637f425597cebaacbbd7095f18cd715f4 SHA512 27a8ebe71679c9161556c8aa49356c2da54c7e7b3bf580aa18518e49bb919ea836a9958ae9fc8fdc86c3750afc900d6e1c17d87dea406366467a6ea9c8ed8931
-EBUILD goversion-1.2.0.ebuild 668 BLAKE2B add958badbe000255239501c3d772742b4de8eac1f0ae855becd01c37f2621ffa011b4c763072813855a84101a40bb8087cbc10e41212128d8593229daa332df SHA512 5e29999f85b32534e8cee9a0bd439e1ec37a745826f4e603c177470b2f36a1419b19aa349e630eccfd8c694a644edc9c6a9d5d9fc162f3b4ea693dec062d66ea
+EBUILD goversion-1.2.0-r1.ebuild 590 BLAKE2B 5d38539dc10d1c28f4cbbf0026fbbc2453220c235eba1e61380fb7cda12a6125b444fc565d656a80f58a33774a71e2cd092d3a654201225b321bf8b2d27dc0c1 SHA512 8ae9eb7000cc8601418e55aa82680c2e28f32faeb2df649b379e899e2c8391c3bd652357503757ccc690e6583300aa4e194c6f95209f7d5c4cde325eaedf7733
MISC metadata.xml 246 BLAKE2B 02325989f671c96e8250e0c4507b8c71e1a13b1526e3c23e54a19f307ce0547c69d8af2d50c6de97a501c0e88a1bf3c4eb23c0b2562826c5c949c2068faf88ca SHA512 f0f3e3fb00c908a0ae886e83d797f2801f66be2a41fe4f1b8cc68a16db353b815b1e3ea5d69d0b1bf5aa2356df2383d3401211389fc4a32ddbdfdcd6c7bbb122
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
-}