commit:     5917f76438cba881d0e8dbf8ccb1670b453ca0bb
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  3 14:00:55 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep  3 14:01:02 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5917f764

dev-libs/capstone: respect gentoo toolchain overrides, bug #592778

Respect AR, CC, CFLAGS, LDFLAGS, RANLIB, $libdir.
Thanks to Mike Auty who provided an example fix.

Reported-by: Mike Auty
Bug: https://bugs.gentoo.org/592778

Package-Manager: portage-2.3.0

 ...ne-3.0.4-r1.ebuild => capstone-3.0.4-r2.ebuild} | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/dev-libs/capstone/capstone-3.0.4-r1.ebuild 
b/dev-libs/capstone/capstone-3.0.4-r2.ebuild
similarity index 55%
rename from dev-libs/capstone/capstone-3.0.4-r1.ebuild
rename to dev-libs/capstone/capstone-3.0.4-r2.ebuild
index 018e9db..41855d1 100644
--- a/dev-libs/capstone/capstone-3.0.4-r1.ebuild
+++ b/dev-libs/capstone/capstone-3.0.4-r2.ebuild
@@ -4,6 +4,8 @@
 
 EAPI=6
 
+inherit toolchain-funcs
+
 DESCRIPTION="disassembly/disassembler framework + bindings"
 HOMEPAGE="http://www.capstone-engine.org/";
 SRC_URI="https://github.com/aquynh/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
@@ -14,3 +16,23 @@ KEYWORDS="~amd64 ~x86"
 
 RDEPEND=""
 DEPEND="${RDEPEND}"
+
+src_configure() {
+       {
+               cat <<-EOF
+               # Gentoo overrides:
+               #   verbose build
+               V = 1
+               #   toolchain
+               AR = $(tc-getAR)
+               CC = $(tc-getCC)
+               RANLIB = $(tc-getRANLIB)
+               #  toolchain flags
+               CFLAGS = ${CFLAGS}
+               LDFLAGS = ${LDFLAGS}
+               #  libs
+               LIBDIRARCH = $(get_libdir)
+               EOF
+       } >> config.mk || die
+
+}

Reply via email to