commit:     0bbe59f19e3cd7cb2941dbdbf740514b23098971
Author:     Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
AuthorDate: Thu Apr 29 21:41:34 2021 +0000
Commit:     Ronny Gutbrod <gentoo <AT> tastytea <DOT> de>
CommitDate: Thu Apr 29 21:42:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0bbe59f1

dev-lang/quickjs: Remove hard-coded tools, make it respect flags.

Closes: https://bugs.gentoo.org/784941
Closes: https://bugs.gentoo.org/781008
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>

 dev-lang/quickjs/quickjs-2020.11.08.ebuild | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dev-lang/quickjs/quickjs-2020.11.08.ebuild 
b/dev-lang/quickjs/quickjs-2020.11.08.ebuild
index 7b32fafd7..1a296d589 100644
--- a/dev-lang/quickjs/quickjs-2020.11.08.ebuild
+++ b/dev-lang/quickjs/quickjs-2020.11.08.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=7
 
+inherit toolchain-funcs
+
 MY_P="${PN}-${PV//./-}"
 
 DESCRIPTION="Small embeddable Javascript engine"
@@ -19,5 +21,14 @@ src_prepare() {
                -e '/$(STRIP) .*/d' \
                Makefile || die "Failed setting prefix"
 
+       sed -Ei '/^\s*(CC|AR)=/d' Makefile \
+               || die "Failed to remove hard-coded tools."
+
+       sed -Ei 's/(^\s*(C|LD)FLAGS)=/\1\+=/' Makefile \
+               || die "Failed to change build flag assignment into addition."
+
+       export CC="$(tc-getCC)"
+       export AR="$(tc-getAR)"
+
        default
 }

Reply via email to