mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2026-05-06 07:27:03 -04:00
aff53c19c3
This is done by rebuilding for the build system. These can be generated as the target system using -exec, but this can still trigger rebuilds, so it can be slower in practise. Also drop CGO_CFLAGS/CGO_LDFLAGS handling as this isn't needed anymore. Closes: https://bugs.gentoo.org/967481 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
61 lines
1.5 KiB
Bash
61 lines
1.5 KiB
Bash
# Copyright 1999-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit shell-completion go-env go-module toolchain-funcs
|
|
MY_PV=${PV/_/-}
|
|
|
|
# update this on every bump
|
|
GIT_COMMIT=f52814d454173982e6692dd7e290a41b828d9cbc
|
|
|
|
DESCRIPTION="the command line binary for docker"
|
|
HOMEPAGE="https://www.docker.com/"
|
|
SRC_URI="https://github.com/docker/cli/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
|
|
S="${WORKDIR}/cli-${PV}"
|
|
|
|
LICENSE="Apache-2.0"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
|
|
IUSE="selinux"
|
|
|
|
RDEPEND="selinux? ( sec-policy/selinux-docker )"
|
|
BDEPEND="dev-go/go-md2man"
|
|
|
|
RESTRICT="installsources strip test"
|
|
|
|
src_prepare() {
|
|
default
|
|
sed -i 's@dockerd\?\.exe@@g' contrib/completion/bash/docker || die
|
|
ln -s vendor.mod go.mod
|
|
ln -s vendor.sum go.sum
|
|
}
|
|
|
|
src_compile() {
|
|
export DISABLE_WARN_OUTSIDE_CONTAINER=1
|
|
|
|
myemakeargs=(
|
|
VERSION="${PV}"
|
|
GITCOMMIT="${GIT_COMMIT}"
|
|
)
|
|
|
|
emake "${myemakeargs[@]}" dynbinary
|
|
tc-env_build go-env_run emake "${myemakeargs[@]}" manpages
|
|
}
|
|
|
|
src_install() {
|
|
dobin build/docker
|
|
doman man/man?/*
|
|
dobashcomp contrib/completion/bash/docker
|
|
bashcomp_alias docker dockerd
|
|
dofishcomp contrib/completion/fish/docker.fish
|
|
dozshcomp contrib/completion/zsh/_*
|
|
}
|
|
|
|
pkg_postinst() {
|
|
has_version "app-containers/docker-buildx" && return
|
|
ewarn "the 'docker build' command is deprecated and will be removed in a"
|
|
ewarn "future release. If you need this functionality, install"
|
|
ewarn "app-containers/docker-buildx."
|
|
}
|