1 |
commit: 06e89b240c525b560c76d5b55f2baf8173ba7f96 |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 10 23:33:05 2020 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 10 23:39:17 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06e89b24 |
7 |
|
8 |
app-admin/helm: fix build process |
9 |
|
10 |
Fix the build process where 3.1.1 did not build at all, and ensure that |
11 |
it has correct Git data in the version output. |
12 |
|
13 |
Fixes: https://bugs.gentoo.org/711852 |
14 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
15 |
|
16 |
app-admin/helm/helm-3.1.1.ebuild | 26 +++++++++++++++++++------- |
17 |
1 file changed, 19 insertions(+), 7 deletions(-) |
18 |
|
19 |
diff --git a/app-admin/helm/helm-3.1.1.ebuild b/app-admin/helm/helm-3.1.1.ebuild |
20 |
index f49619ea932..21fe413bbc9 100644 |
21 |
--- a/app-admin/helm/helm-3.1.1.ebuild |
22 |
+++ b/app-admin/helm/helm-3.1.1.ebuild |
23 |
@@ -700,17 +700,29 @@ RESTRICT+=" test" |
24 |
|
25 |
src_prepare() { |
26 |
default |
27 |
- mv ../vendor . |
28 |
- sed -i -e "s/git rev-parse HEAD/echo ${GIT_COMMIT}/"\ |
29 |
- -e "s/git rev-parse --short HEAD/echo ${GIT_COMMIT:0:7}/"\ |
30 |
- -e "s#git describe --tags --abbrev=0 --exact-match 2>/dev/null#echo v${PV}#"\ |
31 |
- -e 's/test -n "`git status --porcelain`" && echo "dirty" || //' \ |
32 |
- -e "/GOFLAGS :=/d" \ |
33 |
+ # Makefile: |
34 |
+ # - change GIT & LDFLAGS variable assignments from immediate ":=" to |
35 |
+ # deferred "=", to allow better overrides. |
36 |
+ # - Remove GOFLAGS entirely |
37 |
+ # - Remove -w & -s from LDFLAGS |
38 |
+ # - Git spec will be passed later |
39 |
+ sed -r -i \ |
40 |
+ -e '/^GIT_(COMMIT|SHA|TAG|DIRTY)/s,:?=.*,=,g' \ |
41 |
+ -e "/^GOFLAGS[[:space:]]+:?=/d" \ |
42 |
+ -e '/^LDFLAGS[[:space:]]+:?=/{s,-[ws],,g;s,:=,=,g}' \ |
43 |
Makefile || die |
44 |
} |
45 |
|
46 |
src_compile() { |
47 |
- emake GOFLAGS="-mod=vendor" LDFLAGS= build |
48 |
+ # Do not pass LDFLAGS directly here, as the upstream Makefile adds some |
49 |
+ # data to it via += |
50 |
+ emake \ |
51 |
+ GOFLAGS="${GOFLAGS}" \ |
52 |
+ GIT_SHA=${GIT_COMMIT} \ |
53 |
+ GIT_COMMIT=${GIT_COMMIT:0:7} \ |
54 |
+ GIT_TAG=v${PV} \ |
55 |
+ GIT_DIRTY=clean \ |
56 |
+ build |
57 |
bin/${PN} completion bash > ${PN}.bash || die |
58 |
bin/${PN} completion zsh > ${PN}.zsh || die |
59 |
} |