From 57e5f28a918bb8c926d294a2eb2acb406382f186 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Sat, 8 Oct 2016 10:59:41 +0300 Subject: dev-libs/crypto++: fix symlink/directory collision for update Bug: 596500 Package-Manager: portage-2.3.0 --- dev-libs/crypto++/crypto++-5.6.4-r1.ebuild | 71 --------------------------- dev-libs/crypto++/crypto++-5.6.4-r2.ebuild | 79 ++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 71 deletions(-) delete mode 100644 dev-libs/crypto++/crypto++-5.6.4-r1.ebuild create mode 100644 dev-libs/crypto++/crypto++-5.6.4-r2.ebuild (limited to 'dev-libs/crypto++') diff --git a/dev-libs/crypto++/crypto++-5.6.4-r1.ebuild b/dev-libs/crypto++/crypto++-5.6.4-r1.ebuild deleted file mode 100644 index ef464877de44..000000000000 --- a/dev-libs/crypto++/crypto++-5.6.4-r1.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# 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}/${P}-nonative.patch" -) - -pkg_setup() { - export CXX="$(tc-getCXX)" - export LIBDIR="${EPREFIX}/usr/$(get_libdir)" - export PREFIX="${EPREFIX}/usr" -} - -src_configure() { - cp config.recommend config.h || die -} - -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-flags -DCRYPTOPP_DISABLE_X86ASM - - 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() { - emake DESTDIR="${ED}" 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 -} diff --git a/dev-libs/crypto++/crypto++-5.6.4-r2.ebuild b/dev-libs/crypto++/crypto++-5.6.4-r2.ebuild new file mode 100644 index 000000000000..b21a0040628f --- /dev/null +++ b/dev-libs/crypto++/crypto++-5.6.4-r2.ebuild @@ -0,0 +1,79 @@ +# 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}/${P}-nonative.patch" +) + +pkg_setup() { + export CXX="$(tc-getCXX)" + export LIBDIR="${EPREFIX}/usr/$(get_libdir)" + export PREFIX="${EPREFIX}/usr" +} + +src_configure() { + default + cp config.recommend config.h || die +} + +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-flags -DCRYPTOPP_DISABLE_X86ASM + + 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" +} -- cgit v1.2.3-65-gdbad