summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2016-04-17 06:29:34 +0200
committerJason A. Donenfeld <zx2c4@gentoo.org>2016-04-17 06:29:44 +0200
commit9960132bfacc2d44138d832c66835bfa27aa99e9 (patch)
treed6065af99ea6b550ac5c037ba4cbb17fe59a9817 /dev-libs/crypto++
parentapp-text/blogc: version bump (diff)
downloadgentoo-9960132bfacc2d44138d832c66835bfa27aa99e9.tar.gz
gentoo-9960132bfacc2d44138d832c66835bfa27aa99e9.tar.bz2
gentoo-9960132bfacc2d44138d832c66835bfa27aa99e9.zip
dev-libs/crypto++: add pkgconfig file for clementine
Read this bug report: https://github.com/clementine-player/Clementine/issues/5279 Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-libs/crypto++')
-rw-r--r--dev-libs/crypto++/crypto++-5.6.2-r4.ebuild75
-rw-r--r--dev-libs/crypto++/files/cryptopp.pc12
2 files changed, 87 insertions, 0 deletions
diff --git a/dev-libs/crypto++/crypto++-5.6.2-r4.ebuild b/dev-libs/crypto++/crypto++-5.6.2-r4.ebuild
new file mode 100644
index 000000000000..1796b2d5eed2
--- /dev/null
+++ b/dev-libs/crypto++/crypto++-5.6.2-r4.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib toolchain-funcs autotools
+
+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"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x64-macos"
+IUSE="static-libs"
+
+DEPEND="app-arch/unzip
+ sys-devel/libtool"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-r1-make.patch
+ epatch "${FILESDIR}"/${P}-cve-2015-2141.patch
+
+ # Generate our own libtool script for building.
+ cat <<-EOF > configure.ac
+ AC_INIT(lt, 0)
+ AM_INIT_AUTOMAKE
+ AC_PROG_CXX
+ LT_INIT
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+ EOF
+ touch NEWS README AUTHORS ChangeLog Makefile.am
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_compile() {
+ # higher optimizations cause problems
+ replace-flags -O? -O1
+ filter-flags -fomit-frame-pointer
+ # ASM isn't Darwin/Mach-O ready, #479554, buildsys doesn't grok CPPFLAGS
+ [[ ${CHOST} == *-darwin* ]] && append-flags -DCRYPTOPP_DISABLE_X86ASM
+
+ emake -f GNUmakefile CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" LIBDIR="$(get_libdir)" PREFIX="${EPREFIX}/usr" LIBTOOL="./libtool"
+}
+
+src_test() {
+ # ensure that all test vectors have Unix line endings
+ local file
+ for file in TestVectors/* ; do
+ edos2unix ${file}
+ done
+
+ if ! emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" 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="${D}" LIBDIR="$(get_libdir)" PREFIX="${EPREFIX}/usr" LIBTOOL="./libtool" install
+ use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.la
+ cp "${FILESDIR}/cryptopp.pc" "${WORKDIR}" || die "Could not find pkg-config file"
+ sed -i -e "s:^prefix= :prefix= ${EPREFIX}:" -e "s:/,lib,:/$(get_libdir):g" "${WORKDIR}/cryptopp.pc"
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ doins "${WORKDIR}/cryptopp.pc"
+}
diff --git a/dev-libs/crypto++/files/cryptopp.pc b/dev-libs/crypto++/files/cryptopp.pc
new file mode 100644
index 000000000000..ed60972e6ea3
--- /dev/null
+++ b/dev-libs/crypto++/files/cryptopp.pc
@@ -0,0 +1,12 @@
+prefix= /usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/,lib,
+includedir=${prefix}/include
+
+Name: libcrypto++
+Description: General purpose cryptographic shared library
+URL: http://www.cryptopp.com
+Version: %version
+Requires:
+Libs: -lcryptopp
+Cflags: