summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-03-10 16:33:05 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2020-03-10 16:39:17 -0700
commit06e89b240c525b560c76d5b55f2baf8173ba7f96 (patch)
tree1e6f9fc615649e9436b7f5e553115e38223dad38
parentx11-misc/barrier: New package (diff)
downloadgentoo-06e89b24.tar.gz
gentoo-06e89b24.tar.bz2
gentoo-06e89b24.zip
app-admin/helm: fix build process
Fix the build process where 3.1.1 did not build at all, and ensure that it has correct Git data in the version output. Fixes: https://bugs.gentoo.org/711852 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--app-admin/helm/helm-3.1.1.ebuild26
1 files changed, 19 insertions, 7 deletions
diff --git a/app-admin/helm/helm-3.1.1.ebuild b/app-admin/helm/helm-3.1.1.ebuild
index f49619ea932d..21fe413bbc9a 100644
--- a/app-admin/helm/helm-3.1.1.ebuild
+++ b/app-admin/helm/helm-3.1.1.ebuild
@@ -700,17 +700,29 @@ RESTRICT+=" test"
src_prepare() {
default
- mv ../vendor .
- sed -i -e "s/git rev-parse HEAD/echo ${GIT_COMMIT}/"\
- -e "s/git rev-parse --short HEAD/echo ${GIT_COMMIT:0:7}/"\
- -e "s#git describe --tags --abbrev=0 --exact-match 2>/dev/null#echo v${PV}#"\
- -e 's/test -n "`git status --porcelain`" && echo "dirty" || //' \
- -e "/GOFLAGS :=/d" \
+ # Makefile:
+ # - change GIT & LDFLAGS variable assignments from immediate ":=" to
+ # deferred "=", to allow better overrides.
+ # - Remove GOFLAGS entirely
+ # - Remove -w & -s from LDFLAGS
+ # - Git spec will be passed later
+ sed -r -i \
+ -e '/^GIT_(COMMIT|SHA|TAG|DIRTY)/s,:?=.*,=,g' \
+ -e "/^GOFLAGS[[:space:]]+:?=/d" \
+ -e '/^LDFLAGS[[:space:]]+:?=/{s,-[ws],,g;s,:=,=,g}' \
Makefile || die
}
src_compile() {
- emake GOFLAGS="-mod=vendor" LDFLAGS= build
+ # Do not pass LDFLAGS directly here, as the upstream Makefile adds some
+ # data to it via +=
+ emake \
+ GOFLAGS="${GOFLAGS}" \
+ GIT_SHA=${GIT_COMMIT} \
+ GIT_COMMIT=${GIT_COMMIT:0:7} \
+ GIT_TAG=v${PV} \
+ GIT_DIRTY=clean \
+ build
bin/${PN} completion bash > ${PN}.bash || die
bin/${PN} completion zsh > ${PN}.zsh || die
}