From: Zac Medico Date: Fri, 6 Sep 2019 23:25:20 +0000 (-0700) Subject: app-emulation/skopeo: Fix compile with go-1.13 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=f34ce87c547ed6082b39044e2bee993325db98d8;p=gentoo.git app-emulation/skopeo: Fix compile with go-1.13 This fix is conditional on go-1.13 since -mod=vendor fails with go-1.12 like this: build flag -mod=vendor only valid when using modules Package-Manager: Portage-2.3.75, Repoman-2.3.17 Signed-off-by: Zac Medico --- diff --git a/app-emulation/skopeo/skopeo-0.1.39.ebuild b/app-emulation/skopeo/skopeo-0.1.39.ebuild index 49a0b85e5876..80e35c4d984b 100644 --- a/app-emulation/skopeo/skopeo-0.1.39.ebuild +++ b/app-emulation/skopeo/skopeo-0.1.39.ebuild @@ -31,7 +31,8 @@ RESTRICT="test" src_compile() { local BUILDTAGS="containers_image_ostree_stub" set -- env -u GOCACHE -u XDG_CACHE_HOME GOPATH="${WORKDIR}/${P}" \ - go build -ldflags "-X main.gitCommit=${COMMIT}" \ + go build $(has_version -b '>=dev-lang/go-1.13' && printf -- -mod=vendor) \ + -ldflags "-X main.gitCommit=${COMMIT}" \ -gcflags "${GOGCFLAGS}" -tags "${BUILDTAGS}" \ -o skopeo ./cmd/skopeo echo "$@"