Skip to content

Commit

Permalink
dev-libs/crypto++: version bump
Browse files Browse the repository at this point in the history
revert cmake build as upstream does not think it is ready

Package-Manager: portage-2.3.0
  • Loading branch information
alonbl committed Oct 22, 2016
1 parent 68f5d2f commit fcd7654
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-libs/crypto++/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST cryptopp562.zip 1137964 SHA256 5cbfd2fcb4a6b3aab35902e2e0f3b59d9171fee12b3fc2b363e1801dfec53574 SHA512 016ca7ebad1091d67ad0bc5ccb7549d96d4af6b563d9d5a612cae27b3d1a3514c41b954e319fed91c820e8c701e3aa43da186e0864bf959ce4afd1539248ebbe WHIRLPOOL e31203da48a31b09e6ea48a75aa64fe5fd27fd370a1a609c4387526f09daab7582716563b688c0c81a8c3b200b8ffa7bdb2b981e5911640e5f1c172d6027f6ac
DIST cryptopp564.zip 4214797 SHA256 be430377b05c15971d5ccb6e44b4d95470f561024ed6d701fe3da3a188c84ad7 SHA512 d9f0ce92f5f95794b5a43d5ae865bfe7bae555f1565210dd4fd9fa9d44b2f801d947e216042099f7d40dd83e3d385a6346343b05431f05bf04276ba85b7ff63f WHIRLPOOL 344354e2b4a822eb1f431137678067f6a042e710c13ab70e53dca2523f29b8bcf2227e6973f67e69079ddde789f1af764c0913a0e73808e784cec195ef722ce4
DIST cryptopp565.zip 4220843 SHA256 a75ef486fe3128008bbb201efee3dcdcffbe791120952910883b26337ec32c34 SHA512 f13718d02ca69b0129aaf9e767c9d2e0333aa7538355f9c63d9eaf1ff369062084a18dc01489439ebf37797b3ea81b01beb072057d47ec962bfb824ddc72abc7 WHIRLPOOL 376e8d7ad497d03f19542fd183181f26c83f38dfef800529cb5d5ce7238978f005d36e3e7cce63322af9b7dfc3a69fdb615c435bcf092bbd6abf6781dfd6d8a3
74 changes: 74 additions & 0 deletions dev-libs/crypto++/crypto++-5.6.5.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

inherit flag-o-matic toolchain-funcs

DESCRIPTION="C++ class library of cryptographic schemes"
HOMEPAGE="http://cryptopp.com"
SRC_URI="mirror://sourceforge/cryptopp/cryptopp${PV//.}.zip"

LICENSE="Boost-1.0"
SLOT="0/5.6" # subslot is so version
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x64-macos"
IUSE="static-libs"

DEPEND="app-arch/unzip"

S="${WORKDIR}"

PATCHES=(
"${FILESDIR}/${PN}-5.6.4-nonative.patch"
)

pkg_setup() {
export CXX="$(tc-getCXX)"
export LIBDIR="${EPREFIX}/usr/$(get_libdir)"
export PREFIX="${EPREFIX}/usr"
}

src_compile() {
# higher optimizations cause problems
replace-flags -O3 -O2
# 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_test() {
# ensure that all test vectors have Unix line endings
local file
for file in TestVectors/* ; do
edos2unix "${file}"
done

if ! emake test; then
eerror "Crypto++ self-tests failed."
eerror "Try to remove some optimization flags and reemerge Crypto++."
die "emake test failed"
fi
}

src_install() {
default

# remove leftovers as build system sucks
rm -fr "${ED}"/usr/bin "${ED}"/usr/share/cryptopp
use static-libs || rm -f "${ED}${EPREFIX}"/usr/$(get_libdir)/*.a

# compatibility
dosym cryptopp "${EPREFIX}"/usr/include/crypto++
for f in "${ED}${EPREFIX}"/usr/$(get_libdir)/*; do
ln -s "$(basename "${f}")" "$(echo "${f}" | sed 's/cryptopp/crypto++/')" || die
done
}

pkg_preinst() {
# we switched directory to symlink
# make sure portage digests that
rm -fr "${EROOT}/usr/include/crypto++"
rm -fr "${EROOT}/usr/include/cryptopp"
}

0 comments on commit fcd7654

Please sign in to comment.