summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-containers/docker-buildx')
-rw-r--r--app-containers/docker-buildx/Manifest1
-rw-r--r--app-containers/docker-buildx/docker-buildx-0.10.2.ebuild58
-rw-r--r--app-containers/docker-buildx/docker-buildx-9999.ebuild58
3 files changed, 117 insertions, 0 deletions
diff --git a/app-containers/docker-buildx/Manifest b/app-containers/docker-buildx/Manifest
index 4dd392c88801..dccbd1ca8baf 100644
--- a/app-containers/docker-buildx/Manifest
+++ b/app-containers/docker-buildx/Manifest
@@ -1 +1,2 @@
+DIST docker-buildx-0.10.2.tar.gz 9187634 BLAKE2B 9a43a7bcb224f33d718928ef3070449cac4db87c951f4337368d0c994f211d4c3db3a5e9c309ce10e357ab24746bed2507e2867c9fdab3b51a5423787362fee1 SHA512 ba6b8baae1a8e24bf9ddc58d5e2451270fa6e3891bae83112ca00ae56b7a4842b45ec970898ec27a2123e312885bf0d8c58cc600d8462787242eb878f45cd877
DIST docker-buildx-0.9.1.tar.gz 8705505 BLAKE2B 75a56b1edda71fd1e0b4312e72695efd67e6e5144e064cc27ae1729e3155d8a605b315fdb6d32055fc9cb86151057f5afd57eaea9a5f4aaa6ac4ecc52a6a5161 SHA512 1d672ae9daa0f1c830fc56c2c3638389312a87c645aed97f4a0ee56eaef936ab833c04d11969a423e0d5ab5388f29db20d7a1fe6c9b0ec7d981123243b4eaa4b
diff --git a/app-containers/docker-buildx/docker-buildx-0.10.2.ebuild b/app-containers/docker-buildx/docker-buildx-0.10.2.ebuild
new file mode 100644
index 000000000000..4c9132f3eb3f
--- /dev/null
+++ b/app-containers/docker-buildx/docker-buildx-0.10.2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module
+
+MY_PN="buildx"
+DESCRIPTION="Docker CLI plugin for extended build capabilities with BuildKit"
+HOMEPAGE="https://github.com/docker/buildx"
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/docker/buildx.git"
+else
+ SRC_URI="https://github.com/docker/buildx/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64"
+ S="${WORKDIR}/${MY_PN}-${PV}"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+# This gives us the ability to neatly `-skip` tests.
+# not required once ::gentoo is all > 1.20
+RESTRICT="!test? ( test )"
+IUSE="test"
+
+BDEPEND="
+ test? ( >=dev-lang/go-1.20 )
+"
+DEPEND="app-containers/docker"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ local _buildx_r='github.com/docker/buildx'
+ ego build -mod=vendor -o docker-buildx \
+ -ldflags "-linkmode=external \
+ -X $_buildx_r/version.Version=${PV} \
+ -X $_buildx_r/version.Revision=$(date -u +%FT%T%z) \
+ -X $_buildx_r/version.Package=$_buildx_r" \
+ ./cmd/buildx
+}
+
+src_test() {
+ # TestGit can't work in a source tarball; TestReadTargets fails seemingly due to parallelism.
+ if [[ ${PV} == 9999 ]]; then
+ ego test ./... -skip "TestReadTargets"
+ else
+ ego test ./... -skip "TestGit|TestReadTargets"
+ fi
+}
+
+src_install() {
+ exeinto /usr/libexec/docker/cli-plugins
+ doexe docker-buildx
+
+ dodoc README.md
+}
diff --git a/app-containers/docker-buildx/docker-buildx-9999.ebuild b/app-containers/docker-buildx/docker-buildx-9999.ebuild
new file mode 100644
index 000000000000..4c9132f3eb3f
--- /dev/null
+++ b/app-containers/docker-buildx/docker-buildx-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module
+
+MY_PN="buildx"
+DESCRIPTION="Docker CLI plugin for extended build capabilities with BuildKit"
+HOMEPAGE="https://github.com/docker/buildx"
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/docker/buildx.git"
+else
+ SRC_URI="https://github.com/docker/buildx/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64"
+ S="${WORKDIR}/${MY_PN}-${PV}"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+# This gives us the ability to neatly `-skip` tests.
+# not required once ::gentoo is all > 1.20
+RESTRICT="!test? ( test )"
+IUSE="test"
+
+BDEPEND="
+ test? ( >=dev-lang/go-1.20 )
+"
+DEPEND="app-containers/docker"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ local _buildx_r='github.com/docker/buildx'
+ ego build -mod=vendor -o docker-buildx \
+ -ldflags "-linkmode=external \
+ -X $_buildx_r/version.Version=${PV} \
+ -X $_buildx_r/version.Revision=$(date -u +%FT%T%z) \
+ -X $_buildx_r/version.Package=$_buildx_r" \
+ ./cmd/buildx
+}
+
+src_test() {
+ # TestGit can't work in a source tarball; TestReadTargets fails seemingly due to parallelism.
+ if [[ ${PV} == 9999 ]]; then
+ ego test ./... -skip "TestReadTargets"
+ else
+ ego test ./... -skip "TestGit|TestReadTargets"
+ fi
+}
+
+src_install() {
+ exeinto /usr/libexec/docker/cli-plugins
+ doexe docker-buildx
+
+ dodoc README.md
+}