1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic toolchain-funcs
8 DESCRIPTION="C++ class library of cryptographic schemes"
9 HOMEPAGE="https://cryptopp.com"
10 SRC_URI="https://www.cryptopp.com/cryptopp${PV//.}.zip"
13 SLOT="0/8" # subslot is so version
14 KEYWORDS="alpha amd64 ~arm ~arm64 hppa ppc ppc64 sparc x86 ~x64-macos"
15 IUSE="+asm static-libs"
17 BDEPEND="app-arch/unzip"
22 sed -i -e "s://\s*\(#define\s*$1\):\1:" config.h || die
26 export CXX="$(tc-getCXX)"
27 export LIBDIR="${EPREFIX}/usr/$(get_libdir)"
28 export PREFIX="${EPREFIX}/usr"
34 use asm || config_uncomment CRYPTOPP_DISABLE_ASM
36 # ASM isn't Darwin/Mach-O ready, #479554, buildsys doesn't grok CPPFLAGS
37 [[ ${CHOST} == *-darwin* ]] && config_uncomment CRYPTOPP_DISABLE_ASM
41 emake -f GNUmakefile all shared libcryptopp.pc
47 use static-libs || rm -f "${ED}${EPREFIX}"/usr/$(get_libdir)/*.a