diff options
author | Ryan Phillips <rphillips@gentoo.org> | 2004-04-30 17:43:41 +0000 |
---|---|---|
committer | Ryan Phillips <rphillips@gentoo.org> | 2004-04-30 17:43:41 +0000 |
commit | d57603a14b957f57cd04a70d51fba64427ec0999 (patch) | |
tree | 19d676c3f7bc4f7fe9de70135177d4f50c990df7 /dev-libs/crypto++ | |
parent | Version bumped. Added lynxkeymap IUSE flag. Thanks to Tom Martin <tom@edgeoft... (diff) | |
download | historical-d57603a14b957f57cd04a70d51fba64427ec0999.tar.gz historical-d57603a14b957f57cd04a70d51fba64427ec0999.tar.bz2 historical-d57603a14b957f57cd04a70d51fba64427ec0999.zip |
Added Thomas Weidner's GCC 3.4 patch and AMD64 patch
Diffstat (limited to 'dev-libs/crypto++')
-rw-r--r-- | dev-libs/crypto++/ChangeLog | 6 | ||||
-rw-r--r-- | dev-libs/crypto++/Manifest | 7 | ||||
-rw-r--r-- | dev-libs/crypto++/crypto++-5.1-r1.ebuild | 15 | ||||
-rw-r--r-- | dev-libs/crypto++/files/crypto++-5.1-amd64.diff | 78 | ||||
-rw-r--r-- | dev-libs/crypto++/files/digest-crypto++-5.1-r1 | 1 |
5 files changed, 101 insertions, 6 deletions
diff --git a/dev-libs/crypto++/ChangeLog b/dev-libs/crypto++/ChangeLog index 7c7ec2262c23..c33bdbd4c447 100644 --- a/dev-libs/crypto++/ChangeLog +++ b/dev-libs/crypto++/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-libs/crypto++ # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/crypto++/ChangeLog,v 1.3 2004/03/29 13:46:17 dholm Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/crypto++/ChangeLog,v 1.4 2004/04/30 17:43:41 rphillips Exp $ + + 30 Apr 2004; Ryan Phillips <rphillips@gentoo.org> crypto++-5.1-r1.ebuild, + files/crypto++-5.1-amd64.diff: + Added Thomas Weidner's patches for amd64, and gcc 3.4. Fixes #49034 and 49449 29 Mar 2004; David Holm <dholm@gentoo.org> crypto++-5.1-r1.ebuild: Added to ~ppc. diff --git a/dev-libs/crypto++/Manifest b/dev-libs/crypto++/Manifest index 87905bd12b2b..8909a8ad9d46 100644 --- a/dev-libs/crypto++/Manifest +++ b/dev-libs/crypto++/Manifest @@ -1,6 +1,7 @@ -MD5 c05be320e8608a0fb261d33bd0d88107 crypto++-5.1-r1.ebuild 1204 +MD5 32ede175282bbeba0607bf84ff21a430 crypto++-5.1-r1.ebuild 1413 MD5 96313ae46ebc87c866c609b51bc4d5f2 crypto++-5.1.ebuild 751 -MD5 3cfff50624f574d66674a57699607ae8 ChangeLog 697 +MD5 b22968844a2ce58092a42bb93f69bd12 ChangeLog 891 MD5 059733ad92a101895ce18a1120b6eb55 metadata.xml 225 MD5 3dcbaaecd6190695d3a148ad81f08e30 files/digest-crypto++-5.1 57 -MD5 3dcbaaecd6190695d3a148ad81f08e30 files/digest-crypto++-5.1-r1 57 +MD5 b4145af67715a24873b7843b68fb0273 files/digest-crypto++-5.1-r1 126 +MD5 04a9a9a0aab549dfb7ec96bfe3b82cd6 files/crypto++-5.1-amd64.diff 3070 diff --git a/dev-libs/crypto++/crypto++-5.1-r1.ebuild b/dev-libs/crypto++/crypto++-5.1-r1.ebuild index 5711b45ad823..c2b863587968 100644 --- a/dev-libs/crypto++/crypto++-5.1-r1.ebuild +++ b/dev-libs/crypto++/crypto++-5.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/crypto++/crypto++-5.1-r1.ebuild,v 1.2 2004/03/29 13:46:17 dholm Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/crypto++/crypto++-5.1-r1.ebuild,v 1.3 2004/04/30 17:43:41 rphillips Exp $ inherit flag-o-matic @@ -9,7 +9,8 @@ replace-flags -O3 -O2 DESCRIPTION="Crypto++ is a C++ class library of cryptographic schemes" HOMEPAGE="http://cryptopp.com" -SRC_URI="mirror://sourceforge/cryptopp/crypto${PV//.}.zip" +SRC_URI="mirror://sourceforge/cryptopp/crypto${PV//.}.zip + mirror://gentoo/distfiles/crypto++-gcc-3.4.diff.bz2" LICENSE="cryptopp" SLOT="0" @@ -18,7 +19,17 @@ IUSE="" S=${WORKDIR} +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/crypto++-5.1-amd64.diff + + unpack crypto++-gcc-3.4.diff.bz2 + epatch crypto++-gcc-3.4.diff +} + src_compile() { + emake -f GNUmakefile CXXFLAGS="${CXXFLAGS}" || die if ! ./cryptest.exe v then diff --git a/dev-libs/crypto++/files/crypto++-5.1-amd64.diff b/dev-libs/crypto++/files/crypto++-5.1-amd64.diff new file mode 100644 index 000000000000..783007335b2b --- /dev/null +++ b/dev-libs/crypto++/files/crypto++-5.1-amd64.diff @@ -0,0 +1,78 @@ +Only in crypto++-5.1.amd64/: adhoc.cpp +diff -ru crypto++-5.1/config.h crypto++-5.1.amd64/config.h +--- crypto++-5.1/config.h 2003-03-20 02:24:11.000000000 +0100 ++++ crypto++-5.1.amd64/config.h 2004-04-26 15:37:37.000000000 +0200 +@@ -100,7 +100,7 @@ + NAMESPACE_BEGIN(CryptoPP)
+
+ typedef unsigned short word16;
+-#if defined(__alpha) && !defined(_MSC_VER)
++#if (defined(__alpha) || defined(__x86_64__)) && !defined(_MSC_VER)
+ typedef unsigned int word32;
+ #else
+ typedef unsigned long word32;
+@@ -124,7 +124,7 @@ + // word should have the same size as your CPU registers
+ // dword should be twice as big as word
+
+-#if (defined(__GNUC__) && !defined(__alpha)) || defined(__MWERKS__)
++#if (defined(__GNUC__) && !defined(__alpha)) && !defined(__x86_64__) || defined(__MWERKS__)
+ typedef unsigned long word;
+ typedef unsigned long long dword;
+ #elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)
+diff -ru crypto++-5.1/misc.cpp crypto++-5.1.amd64/misc.cpp +--- crypto++-5.1/misc.cpp 2002-10-04 19:31:51.000000000 +0200 ++++ crypto++-5.1.amd64/misc.cpp 2004-04-26 15:37:37.000000000 +0200 +@@ -16,7 +16,7 @@ +
+ void xorbuf(byte *buf, const byte *mask, unsigned int count)
+ {
+- if (((unsigned int)buf | (unsigned int)mask | count) % WORD_SIZE == 0)
++ if (((uintptr_t)buf | (uintptr_t)mask | count) % WORD_SIZE == 0)
+ XorWords((word *)buf, (const word *)mask, count/WORD_SIZE);
+ else
+ {
+@@ -27,7 +27,7 @@ +
+ void xorbuf(byte *output, const byte *input, const byte *mask, unsigned int count)
+ {
+- if (((unsigned int)output | (unsigned int)input | (unsigned int)mask | count) % WORD_SIZE == 0)
++ if (((uintptr_t)output | (uintptr_t)input | (uintptr_t)mask | count) % WORD_SIZE == 0)
+ XorWords((word *)output, (const word *)input, (const word *)mask, count/WORD_SIZE);
+ else
+ {
+diff -ru crypto++-5.1/misc.h crypto++-5.1.amd64/misc.h +--- crypto++-5.1/misc.h 2002-10-04 19:31:52.000000000 +0200 ++++ crypto++-5.1.amd64/misc.h 2004-04-26 15:37:37.000000000 +0200 +@@ -5,6 +5,7 @@ + #include "cryptlib.h"
+ #include <assert.h>
+ #include <string.h> // CodeWarrior doesn't have memory.h
++#include <inttypes.h>
+ #include <algorithm>
+ #include <string>
+
+@@ -142,7 +143,7 @@ +
+ inline bool IsAlignedOn(const void *p, unsigned int alignment)
+ {
+- return IsPowerOf2(alignment) ? ModPowerOf2((unsigned int)p, alignment) == 0 : (unsigned int)p % alignment == 0;
++ return IsPowerOf2(alignment) ? ModPowerOf2((uintptr_t)p, alignment) == 0 : (uintptr_t)p % alignment == 0;
+ }
+
+ template <class T>
+diff -ru crypto++-5.1/serpent.cpp crypto++-5.1.amd64/serpent.cpp +--- crypto++-5.1/serpent.cpp 2002-10-04 19:31:57.000000000 +0200 ++++ crypto++-5.1.amd64/serpent.cpp 2004-04-26 15:38:39.000000000 +0200 +@@ -428,7 +428,9 @@ + word32 *k = m_key;
+ GetUserKey(LITTLE_ENDIAN_ORDER, k, 8, userKey, keylen);
+
+- word32 i,a,b,c,d,e;
++ word32 a,b,c,d,e;
++ // word32 is an unsigned integral type,so it will underflow
++ int i;
+
+ if (keylen < 32)
+ k[keylen/4] |= word32(1) << ((keylen%4)*8);
+Only in crypto++-5.1.amd64/: serpent.cpp~ diff --git a/dev-libs/crypto++/files/digest-crypto++-5.1-r1 b/dev-libs/crypto++/files/digest-crypto++-5.1-r1 index d3625c273a47..728b5fb0cdba 100644 --- a/dev-libs/crypto++/files/digest-crypto++-5.1-r1 +++ b/dev-libs/crypto++/files/digest-crypto++-5.1-r1 @@ -1 +1,2 @@ MD5 f4bfd4ac39dc1b7f0764d61a1ec4df16 crypto51.zip 829560 +MD5 70790a6dea63b6a02f1b1d3b5d26ae1a crypto++-gcc-3.4.diff.bz2 13033 |