summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2018-10-23 08:12:18 +0300
committerAlon Bar-Lev <alonbl@gentoo.org>2018-10-23 08:15:20 +0300
commitf717474a782311cf1c0632cf1692989e44bdd8e4 (patch)
treefb779ca593dfead497160700689f5c6531503cff /dev-libs/crypto++/crypto++-7.0.0-r3.ebuild
parentdev-ruby/logue: add 1.0.16 (diff)
downloadgentoo-f717474a782311cf1c0632cf1692989e44bdd8e4.tar.gz
gentoo-f717474a782311cf1c0632cf1692989e44bdd8e4.tar.bz2
gentoo-f717474a782311cf1c0632cf1692989e44bdd8e4.zip
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@gentoo.org> Package-Manager: Portage-2.3.49, Repoman-2.3.11 RepoMan-Options: --force
Diffstat (limited to 'dev-libs/crypto++/crypto++-7.0.0-r3.ebuild')
-rw-r--r--dev-libs/crypto++/crypto++-7.0.0-r3.ebuild48
1 files changed, 48 insertions, 0 deletions
diff --git a/dev-libs/crypto++/crypto++-7.0.0-r3.ebuild b/dev-libs/crypto++/crypto++-7.0.0-r3.ebuild
new file mode 100644
index 000000000000..00541d4446d0
--- /dev/null
+++ b/dev-libs/crypto++/crypto++-7.0.0-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="C++ class library of cryptographic schemes"
+HOMEPAGE="https://cryptopp.com"
+SRC_URI="https://www.cryptopp.com/cryptopp${PV//.}.zip"
+
+LICENSE="Boost-1.0"
+SLOT="0/7" # subslot is so version
+KEYWORDS="alpha amd64 ~arm arm64 hppa ppc ppc64 ~sparc x86 ~x64-macos"
+IUSE="+asm static-libs"
+
+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_prepare() {
+ default
+
+ use asm || config_uncomment CRYPTOPP_DISABLE_ASM
+
+ # ASM isn't Darwin/Mach-O ready, #479554, buildsys doesn't grok CPPFLAGS
+ [[ ${CHOST} == *-darwin* ]] && config_uncomment CRYPTOPP_DISABLE_ASM
+}
+
+src_compile() {
+ emake -f GNUmakefile all shared libcryptopp.pc
+}
+
+src_install() {
+ default
+
+ use static-libs || rm -f "${ED}${EPREFIX}"/usr/$(get_libdir)/*.a
+}