commit:     f06f97dc9b9fe6e0d57474e0e01ed29de2c9979a
Author:     Nils Freydank <nils.freydank <AT> posteo <DOT> de>
AuthorDate: Tue Nov 10 08:59:11 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Nov 18 15:24:40 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f06f97dc

dev-vcs/git-lfs: Update the live ebuild

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Nils Freydank <holgersson <AT> posteo.de>
Closes: https://github.com/gentoo/gentoo/pull/17618
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-vcs/git-lfs/git-lfs-9999.ebuild | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/dev-vcs/git-lfs/git-lfs-9999.ebuild 
b/dev-vcs/git-lfs/git-lfs-9999.ebuild
index a48a6fe6e6c..f5a948c8f4f 100644
--- a/dev-vcs/git-lfs/git-lfs-9999.ebuild
+++ b/dev-vcs/git-lfs/git-lfs-9999.ebuild
@@ -13,7 +13,7 @@ if [[ "${PV}" = 9999* ]]; then
        inherit git-r3
 else
        SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-       KEYWORDS="~amd64 ~amd64-linux ~x86-linux"
+       KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 fi
 
 LICENSE="Apache-2.0 BSD BSD-2 BSD-4 ISC MIT"
@@ -26,12 +26,13 @@ RDEPEND="dev-vcs/git"
 RESTRICT+=" !test? ( test )"
 
 src_compile() {
-       set -- go build \
-               -ldflags="-X ${EGO_PN}/config.GitCommit=${GIT_COMMIT}" \
-               -mod vendor -v -work -x \
-               -o git-lfs git-lfs.go
-       echo "$@"
-       "$@" || die
+       # Flags -w, -s: Omit debugging information to reduce binary size,
+       # see https://golang.org/cmd/link/.
+       local mygobuildargs=(
+               -ldflags="-X ${EGO_PN}/config.GitCommit=${GIT_COMMIT} -s -w"
+               -mod vendor -v -work -x
+       )
+       go build "${mygobuildargs[@]}" -o git-lfs git-lfs.go || die
 
        if use doc; then
                ronn docs/man/*.ronn || die "man building failed"
@@ -45,12 +46,11 @@ src_install() {
 }
 
 src_test() {
-       set -- go test \
-               -ldflags="-X ${EGO_PN}/config.GitCommit=${GIT_COMMIT}" \
-               -mod vendor \
-               ./...
-       echo "$@"
-       "$@" || die
+       local mygotestargs=(
+               -ldflags="-X ${EGO_PN}/config.GitCommit=${GIT_COMMIT}"
+               -mod vendor
+       )
+       go test "${mygotestargs[@]}" ./... || die
 }
 
 pkg_postinst () {

Reply via email to