summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-libs/crypto++
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-libs/crypto++')
-rw-r--r--dev-libs/crypto++/Manifest1
-rw-r--r--dev-libs/crypto++/crypto++-5.6.2-r1.ebuild70
-rw-r--r--dev-libs/crypto++/crypto++-5.6.2-r2.ebuild71
-rw-r--r--dev-libs/crypto++/files/crypto++-5.6.2-cve-2015-2141.patch32
-rw-r--r--dev-libs/crypto++/files/crypto++-5.6.2-r1-make.patch150
-rw-r--r--dev-libs/crypto++/metadata.xml8
6 files changed, 332 insertions, 0 deletions
diff --git a/dev-libs/crypto++/Manifest b/dev-libs/crypto++/Manifest
new file mode 100644
index 000000000000..dfd907ca44eb
--- /dev/null
+++ b/dev-libs/crypto++/Manifest
@@ -0,0 +1 @@
+DIST cryptopp562.zip 1137964 SHA256 5cbfd2fcb4a6b3aab35902e2e0f3b59d9171fee12b3fc2b363e1801dfec53574 SHA512 016ca7ebad1091d67ad0bc5ccb7549d96d4af6b563d9d5a612cae27b3d1a3514c41b954e319fed91c820e8c701e3aa43da186e0864bf959ce4afd1539248ebbe WHIRLPOOL e31203da48a31b09e6ea48a75aa64fe5fd27fd370a1a609c4387526f09daab7582716563b688c0c81a8c3b200b8ffa7bdb2b981e5911640e5f1c172d6027f6ac
diff --git a/dev-libs/crypto++/crypto++-5.6.2-r1.ebuild b/dev-libs/crypto++/crypto++-5.6.2-r1.ebuild
new file mode 100644
index 000000000000..e3496e8639f9
--- /dev/null
+++ b/dev-libs/crypto++/crypto++-5.6.2-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 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
+
+ # 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
+}
diff --git a/dev-libs/crypto++/crypto++-5.6.2-r2.ebuild b/dev-libs/crypto++/crypto++-5.6.2-r2.ebuild
new file mode 100644
index 000000000000..57b4f460310d
--- /dev/null
+++ b/dev-libs/crypto++/crypto++-5.6.2-r2.ebuild
@@ -0,0 +1,71 @@
+# 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
+}
diff --git a/dev-libs/crypto++/files/crypto++-5.6.2-cve-2015-2141.patch b/dev-libs/crypto++/files/crypto++-5.6.2-cve-2015-2141.patch
new file mode 100644
index 000000000000..32c5164609e9
--- /dev/null
+++ b/dev-libs/crypto++/files/crypto++-5.6.2-cve-2015-2141.patch
@@ -0,0 +1,32 @@
+From 9425e16437439e68c7d96abef922167d68fafaff Mon Sep 17 00:00:00 2001
+From: Jeffrey Walton <noloader@gmail.com>
+Date: Sat, 27 Jun 2015 17:56:01 -0400
+Subject: [PATCH] Fix for CVE-2015-2141. Thanks to Evgeny Sidorov for
+ reporting. Squaring to satisfy Jacobi requirements suggested by JPM.
+
+---
+ rw.cpp | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/rw.cpp b/rw.cpp
+index cdd9f2d..0b9318b 100644
+--- a/rw.cpp
++++ b/rw.cpp
+@@ -126,10 +126,16 @@ Integer InvertibleRWFunction::CalculateInverse(RandomNumberGenerator &rng, const
+ DoQuickSanityCheck();
+ ModularArithmetic modn(m_n);
+ Integer r, rInv;
+- do { // do this in a loop for people using small numbers for testing
++
++ // do this in a loop for people using small numbers for testing
++ do {
+ r.Randomize(rng, Integer::One(), m_n - Integer::One());
++ // Fix for CVE-2015-2141. Thanks to Evgeny Sidorov for reporting.
++ // Squaring to satisfy Jacobi requirements suggested by JPM.
++ r = modn.Square(r);
+ rInv = modn.MultiplicativeInverse(r);
+ } while (rInv.IsZero());
++
+ Integer re = modn.Square(r);
+ re = modn.Multiply(re, x); // blind
+
diff --git a/dev-libs/crypto++/files/crypto++-5.6.2-r1-make.patch b/dev-libs/crypto++/files/crypto++-5.6.2-r1-make.patch
new file mode 100644
index 000000000000..854d8d79dba5
--- /dev/null
+++ b/dev-libs/crypto++/files/crypto++-5.6.2-r1-make.patch
@@ -0,0 +1,150 @@
+--- cryptopp562/GNUmakefile
++++ cryptopp562/GNUmakefile
+@@ -1,3 +1,5 @@
++LIBTOOL = libtool
++LIBDIR = lib
+ CXXFLAGS = -DNDEBUG -g -O2
+ # -O3 fails to link on Cygwin GCC version 4.5.3
+ # -fPIC is supported. Please report any breakage of -fPIC as a bug.
+@@ -7,8 +9,9 @@
+ # LDFLAGS += -Wl,--gc-sections
+ ARFLAGS = -cr # ar needs the dash on OpenBSD
+ RANLIB = ranlib
+-CP = cp
++LN_S = ln -s
+ MKDIR = mkdir
++INSTALL = install
+ EGREP = egrep
+ UNAME = $(shell uname)
+ ISX86 = $(shell uname -m | $(EGREP) -c "i.86|x86|i86|amd64")
+@@ -79,8 +82,11 @@
+ LDLIBS += -lws2_32
+ endif
+
++THREAD_LIBS =
++
+ ifeq ($(IS_LINUX),1)
+ LDFLAGS += -pthread
++THREAD_LIBS += -lpthread
+ ifneq ($(shell uname -i | $(EGREP) -c "(_64|d64)"),0)
+ M32OR64 = -m64
+ endif
+@@ -126,54 +132,52 @@
+ SRCS = $(shell echo *.cpp)
+ endif
+
+-OBJS = $(SRCS:.cpp=.o)
+-# test.o needs to be after bench.o for cygwin 1.1.4 (possible ld bug?)
+-TESTOBJS = bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o
++OBJS = $(SRCS:.cpp=.lo)
++# test.lo needs to be after bench.lo for cygwin 1.1.4 (possible ld bug?)
++TESTOBJS = bench.lo bench2.lo test.lo validat1.lo validat2.lo validat3.lo adhoc.lo datatest.lo regtest.lo fipsalgt.lo dlltest.lo
+ LIBOBJS = $(filter-out $(TESTOBJS),$(OBJS))
+
+ DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
+-DLLOBJS = $(DLLSRCS:.cpp=.export.o)
+-LIBIMPORTOBJS = $(LIBOBJS:.o=.import.o)
+-TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o)
+-DLLTESTOBJS = dlltest.dllonly.o
+-
+-all: cryptest.exe
+-static: libcryptopp.a
+-dynamic: libcryptopp.so
++DLLOBJS = $(DLLSRCS:.cpp=.export.lo)
++LIBIMPORTOBJS = $(LIBOBJS:.lo=.import.lo)
++TESTIMPORTOBJS = $(TESTOBJS:.lo=.import.lo)
++DLLTESTOBJS = dlltest.dllonly.lo
++
++all: libcrypto++.la
+
+-test: cryptest.exe
+- ./cryptest.exe v
++test: cryptest
++ ./cryptest v
+
+ clean:
+- -$(RM) cryptest.exe libcryptopp.a libcryptopp.so $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTI MPORTOBJS) $(DLLTESTOBJS)
++ $(RM) -f .libs cryptest libcrypto++.* libcryptopp.* $(LIBOBJS) $(TESTOBJS) cryptopp.dll cryptest.import dlltest $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
++
+
+ install:
+- $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
+- -$(CP) *.h $(PREFIX)/include/cryptopp
+- -$(CP) *.a $(PREFIX)/lib
+- -$(CP) *.so $(PREFIX)/lib
+- -$(CP) *.exe $(PREFIX)/bin
++ $(MKDIR) -p $(DESTDIR)$(PREFIX)/include/crypto++ $(DESTDIR)$(PREFIX)/$(LIBDIR)
++ $(INSTALL) -m 644 *.h $(DESTDIR)$(PREFIX)/include/crypto++
++ $(LN_S) crypto++ $(DESTDIR)$(PREFIX)/include/cryptopp
++ $(LIBTOOL) --mode=install $(INSTALL) libcrypto++.la $(DESTDIR)$(PREFIX)/$(LIBDIR)
++ set -e; \
++ for f in $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcrypto++*; do \
++ $(LN_S) $${f##*/} `echo $$f | sed "s:libcrypto++:libcryptopp:"`; \
++ done
+
+ remove:
+- -$(RM) -rf $(PREFIX)/include/cryptopp
+- -$(RM) $(PREFIX)/lib/libcryptopp.a
+- -$(RM) $(PREFIX)/lib/libcryptopp.so
+- -$(RM) $(PREFIX)/bin/cryptest.exe
+-
+-libcryptopp.a: $(LIBOBJS)
+- $(AR) $(ARFLAGS) $@ $(LIBOBJS)
+- $(RANLIB) $@
++ $(RM) -rf $(DESTDIR)$(PREFIX)/include/crypto++
++ $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.*
++ $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcrypto++.*
++ $(RM) $(DESTDIR)$(PREFIX)/bin/cryptest
+
+-libcryptopp.so: $(LIBOBJS)
+- $(CXX) -shared -o $@ $(LIBOBJS)
++libcrypto++.la: $(LIBOBJS)
++ $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(LDFLAGS) -rpath $(PREFIX)/$(LIBDIR) -o $@ $(LIBOBJS) $(THREAD_LIBS)
+
+-cryptest.exe: libcryptopp.a $(TESTOBJS)
+- $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
++cryptest: libcrypto++.la $(TESTOBJS)
++ $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(LDFLAGS) -o $@ $(TESTOBJS) -L. -lcrypto++ $(LDLIBS) $(THREAD_LIBS)
+
+ nolib: $(OBJS) # makes it faster to test changes
+- $(CXX) -o ct $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
++ $(LIBTOOL) --tag=CXX --mode=link $(CXX) -o ct $(LDFLAGS) $(OBJS) $(LDLIBS) $(THREAD_LIBS)
+
+-dll: cryptest.import.exe dlltest.exe
++dll: cryptest.import dlltest
+
+ cryptopp.dll: $(DLLOBJS)
+ $(CXX) -shared -o $@ $(CXXFLAGS) $(DLLOBJS) $(LDFLAGS) $(LDLIBS) -Wl,--out-implib=libcryptopp.dll.a
+@@ -182,10 +186,10 @@
+ $(AR) $(ARFLAGS) $@ $(LIBIMPORTOBJS)
+ $(RANLIB) $@
+
+-cryptest.import.exe: cryptopp.dll libcryptopp.import.a $(TESTIMPORTOBJS)
++cryptest.import: cryptopp.dll libcryptopp.import.a $(TESTIMPORTOBJS)
+ $(CXX) -o $@ $(CXXFLAGS) $(TESTIMPORTOBJS) -L. -lcryptopp.dll -lcryptopp.import $(LDFLAGS) $(LDLIBS)
+
+-dlltest.exe: cryptopp.dll $(DLLTESTOBJS)
++dlltest: cryptopp.dll $(DLLTESTOBJS)
+ $(CXX) -o $@ $(CXXFLAGS) $(DLLTESTOBJS) -L. -lcryptopp.dll $(LDFLAGS) $(LDLIBS)
+
+ adhoc.cpp: adhoc.cpp.proto
+@@ -195,14 +199,14 @@
+ touch adhoc.cpp
+ endif
+
+-%.dllonly.o : %.cpp
++%.dllonly.lo : %.cpp
+ $(CXX) $(CXXFLAGS) -DCRYPTOPP_DLL_ONLY -c $< -o $@
+
+-%.import.o : %.cpp
++%.import.lo : %.cpp
+ $(CXX) $(CXXFLAGS) -DCRYPTOPP_IMPORTS -c $< -o $@
+
+-%.export.o : %.cpp
++%.export.lo : %.cpp
+ $(CXX) $(CXXFLAGS) -DCRYPTOPP_EXPORTS -c $< -o $@
+
+-%.o : %.cpp
+- $(CXX) $(CXXFLAGS) -c $<
++%.lo : %.cpp
++ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(CXXFLAGS) -c $<
diff --git a/dev-libs/crypto++/metadata.xml b/dev-libs/crypto++/metadata.xml
new file mode 100644
index 000000000000..a7483fddbd80
--- /dev/null
+++ b/dev-libs/crypto++/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>crypto</herd>
+ <upstream>
+ <remote-id type="sourceforge">cryptopp</remote-id>
+ </upstream>
+</pkgmetadata>