You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.4 KiB
57 lines
1.4 KiB
8 years ago
|
# Copyright 1999-2016 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
# $Id$
|
||
|
|
||
|
EAPI=6
|
||
|
|
||
8 years ago
|
inherit cmake-multilib flag-o-matic
|
||
8 years ago
|
|
||
|
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"
|
||
8 years ago
|
IUSE="static-libs test"
|
||
8 years ago
|
|
||
|
DEPEND="app-arch/unzip"
|
||
|
|
||
|
S="${WORKDIR}"
|
||
8 years ago
|
|
||
8 years ago
|
src_configure() {
|
||
8 years ago
|
append-flags -fPIC # bug#597514
|
||
|
|
||
8 years ago
|
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)
|
||
|
)
|
||
8 years ago
|
cp config.recommend config.h || die
|
||
8 years ago
|
cmake-multilib_src_configure
|
||
8 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
8 years ago
|
cmake-multilib_src_install
|
||
8 years ago
|
|
||
|
# 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
|
||
|
}
|
||
8 years ago
|
|
||
|
pkg_preinst() {
|
||
|
# we switched directory to symlink
|
||
|
# make sure portage digests that
|
||
|
rm -fr "${EROOT}/usr/include/crypto++"
|
||
|
rm -fr "${EROOT}/usr/include/cryptopp"
|
||
|
}
|