diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2016-10-08 18:44:42 +0300 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2016-10-08 18:45:17 +0300 |
commit | 5df451b2110c922f0677d5f2d34cab1a709afdf0 (patch) | |
tree | 99d3b32aeac2b9e6c8709cd25e649456fb3c0ab5 /dev-libs | |
parent | kde-frameworks: version bump 5.27.0 (diff) | |
download | gentoo-5df451b2110c922f0677d5f2d34cab1a709afdf0.tar.gz gentoo-5df451b2110c922f0677d5f2d34cab1a709afdf0.tar.bz2 gentoo-5df451b2110c922f0677d5f2d34cab1a709afdf0.zip |
dev-libs/crypto++: switch to cmake
Thanks to aballier for the idea
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/crypto++/crypto++-5.6.4-r3.ebuild | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-libs/crypto++/crypto++-5.6.4-r3.ebuild b/dev-libs/crypto++/crypto++-5.6.4-r3.ebuild new file mode 100644 index 000000000000..f19fedd1f21e --- /dev/null +++ b/dev-libs/crypto++/crypto++-5.6.4-r3.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit cmake-multilib + +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 test" + +DEPEND="app-arch/unzip" + +S="${WORKDIR}" + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED=ON + -DBUILD_STATIC=$(usex static-libs ON $(usex test ON OFF)) + -DBUILD_TESTING=$(usex test ON OFF) + + # ASM isn't Darwin/Mach-O ready, #479554 + -DDISABLE_ASM=$([[ ${CHOST} == *-darwin* ]] && echo ON || echo OFF) + ) + cp config.recommend config.h || die + cmake-multilib_src_configure +} + +src_install() { + cmake-multilib_src_install + + # 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" +} |