dev-libs/crypto++: version bump
authorAlon Bar-Lev <alonbl@gentoo.org>
Tue, 1 May 2018 19:14:02 +0000 (22:14 +0300)
committerAlon Bar-Lev <alonbl@gentoo.org>
Tue, 1 May 2018 19:15:35 +0000 (22:15 +0300)
Closes: https://bugs.gentoo.org/show_bug.cgi?id=654550
Package-Manager: Portage-2.3.24, Repoman-2.3.6

dev-libs/crypto++/Manifest
dev-libs/crypto++/crypto++-7.0.0.ebuild [new file with mode: 0644]
dev-libs/crypto++/metadata.xml

index cb6b22921e23b952f841de183512a11849648b37..ddba9587a28a020484d63dae0b44e0a3c4f24f00 100644 (file)
@@ -1 +1,2 @@
 DIST cryptopp565.zip 4220843 BLAKE2B 0c42da3564cdd175c2f2c5c4272caf826f21e47d2271c7f54acab86f5f79dcdad8d6cb946bc88f55fde6189bb2d24ad8fb03dda6b3b8c6f105434b55b8b217d0 SHA512 f13718d02ca69b0129aaf9e767c9d2e0333aa7538355f9c63d9eaf1ff369062084a18dc01489439ebf37797b3ea81b01beb072057d47ec962bfb824ddc72abc7
+DIST cryptopp700.zip 7296665 BLAKE2B 1b1a60e240a9d94b4edfea16beef0ec48ec26c61f7f9a3d89d29bd2e77b13a83ce942f81467bb90d3086253560a3c4acd6b89178dcb416ed4328340ad5222dfd SHA512 8fd8d680e5ceaf10b3c32cb1504bda4b32abc9fcaa2c6e61e3b5e67aca805c792579884bc6a749c29a99105304c421d03d7fe7909fc58f750b3155c7c5cec8ec
diff --git a/dev-libs/crypto++/crypto++-7.0.0.ebuild b/dev-libs/crypto++/crypto++-7.0.0.ebuild
new file mode 100644 (file)
index 0000000..cc4036e
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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"
+IUSE_CPU_FLAGS=" aes sse3 sse4_1 sse4_2"
+IUSE+=" ${IUSE_CPU_FLAGS// / cpu_flags_x86_}"
+
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+       export CXX="$(tc-getCXX)"
+       export LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+       export PREFIX="${EPREFIX}/usr"
+}
+
+src_compile() {
+
+       use asm || append-cxxflags -DCRYPTOPP_DISABLE_ASM
+       use cpu_flags_x86_aes || append-cxxflags -DCRYPTOPP_DISABLE_AESNI
+       use cpu_flags_x86_sse3 || append-cxxflags -DCRYPTOPP_DISABLE_SSSE3
+       use cpu_flags_x86_sse4_1 || append-cxxflags -DCRYPTOPP_DISABLE_SSE4
+       use cpu_flags_x86_sse4_2 || append-cxxflags -DCRYPTOPP_DISABLE_SSE4
+
+       # ASM isn't Darwin/Mach-O ready, #479554, buildsys doesn't grok CPPFLAGS
+       [[ ${CHOST} == *-darwin* ]] && append-cxxflags -DCRYPTOPP_DISABLE_ASM
+
+       emake -f GNUmakefile all shared
+}
+
+src_install() {
+       default
+
+       use static-libs || rm -f "${ED}${EPREFIX}"/usr/$(get_libdir)/*.a
+}
index da25a4da7d7d51ffa3e138719fe038ea9aceb8de..3227b3be7c78f9dc979cb8dd4711169d07bce7f2 100644 (file)
@@ -9,7 +9,13 @@
                <email>noloader@gmail.com</email>
                <name>Jeffrey Walton</name>
        </maintainer>
+       <use>
+               <flag name="asm">Support assembly hand optimized crypto functions (i.e. faster run time)</flag>
+       </use>
        <upstream>
                <remote-id type="github">weidai11/cryptopp</remote-id>
        </upstream>
+       <slots>
+               <subslots>so version</subslots>
+       </slots>
 </pkgmetadata>