commit:     f717474a782311cf1c0632cf1692989e44bdd8e4
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 23 05:12:18 2018 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Tue Oct 23 05:15:20 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f717474a

dev-libs/crypto++: config using config.h modification

Thanks: Alexander Tsoy
Closes: https://bugs.gentoo.org/show_bug.cgi?id=669288
Signed-off-by: Alon Bar-Lev <alonbl <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11
RepoMan-Options: --force

 .../{crypto++-7.0.0-r2.ebuild => crypto++-7.0.0-r3.ebuild}  | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/dev-libs/crypto++/crypto++-7.0.0-r2.ebuild 
b/dev-libs/crypto++/crypto++-7.0.0-r3.ebuild
similarity index 78%
rename from dev-libs/crypto++/crypto++-7.0.0-r2.ebuild
rename to dev-libs/crypto++/crypto++-7.0.0-r3.ebuild
index 20edcd1e66f..00541d4446d 100644
--- a/dev-libs/crypto++/crypto++-7.0.0-r2.ebuild
+++ b/dev-libs/crypto++/crypto++-7.0.0-r3.ebuild
@@ -18,19 +18,26 @@ BDEPEND="app-arch/unzip"
 
 S="${WORKDIR}"
 
+config_uncomment() {
+       sed -i -e "s://\s*\(#define\s*$1\):\1:" config.h || die
+}
+
 pkg_setup() {
        export CXX="$(tc-getCXX)"
        export LIBDIR="${EPREFIX}/usr/$(get_libdir)"
        export PREFIX="${EPREFIX}/usr"
 }
 
-src_compile() {
+src_prepare() {
+       default
 
-       use asm || append-cxxflags -DCRYPTOPP_DISABLE_ASM
+       use asm || config_uncomment CRYPTOPP_DISABLE_ASM
 
        # ASM isn't Darwin/Mach-O ready, #479554, buildsys doesn't grok CPPFLAGS
-       [[ ${CHOST} == *-darwin* ]] && append-cxxflags -DCRYPTOPP_DISABLE_ASM
+       [[ ${CHOST} == *-darwin* ]] && config_uncomment CRYPTOPP_DISABLE_ASM
+}
 
+src_compile() {
        emake -f GNUmakefile all shared libcryptopp.pc
 }
 

Reply via email to