Mon Jan 13 11:44:27 2014 UTC ()
Use upstream way to fix.


(obache)
diff -r1.45 -r1.46 pkgsrc/security/libgcrypt/distinfo
diff -r1.3 -r1.4 pkgsrc/security/libgcrypt/patches/patch-cipher_bithelp.h

cvs diff -r1.45 -r1.46 pkgsrc/security/libgcrypt/distinfo (expand / switch to unified diff)

--- pkgsrc/security/libgcrypt/distinfo 2014/01/11 10:49:14 1.45
+++ pkgsrc/security/libgcrypt/distinfo 2014/01/13 11:44:27 1.46
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: distinfo,v 1.45 2014/01/11 10:49:14 ryoon Exp $ 1$NetBSD: distinfo,v 1.46 2014/01/13 11:44:27 obache Exp $
2 2
3SHA1 (libgcrypt-1.6.0.tar.bz2) = 43283c0b41c41e3d3bc13c2d8f937dfe2aaa1a77 3SHA1 (libgcrypt-1.6.0.tar.bz2) = 43283c0b41c41e3d3bc13c2d8f937dfe2aaa1a77
4RMD160 (libgcrypt-1.6.0.tar.bz2) = 33e4e45116a64999c4cd0d132a4a968612057f40 4RMD160 (libgcrypt-1.6.0.tar.bz2) = 33e4e45116a64999c4cd0d132a4a968612057f40
5Size (libgcrypt-1.6.0.tar.bz2) = 2499149 bytes 5Size (libgcrypt-1.6.0.tar.bz2) = 2499149 bytes
6SHA1 (patch-aa) = 7c46612f912d45dfd4ce4f4b510e72c00bd38585 6SHA1 (patch-aa) = 7c46612f912d45dfd4ce4f4b510e72c00bd38585
7SHA1 (patch-ab) = 6fac21daa26b7de3b13839d076f78a74400efce7 7SHA1 (patch-ab) = 6fac21daa26b7de3b13839d076f78a74400efce7
8SHA1 (patch-ad) = 19345b7d164521d526a44eb3f1a465ff09d8266c 8SHA1 (patch-ad) = 19345b7d164521d526a44eb3f1a465ff09d8266c
9SHA1 (patch-cipher_Makefile.am) = 90ec53aaba6b7efcbdaac95eefeccdbd1ed0356b 9SHA1 (patch-cipher_Makefile.am) = 90ec53aaba6b7efcbdaac95eefeccdbd1ed0356b
10SHA1 (patch-cipher_Makefile.in) = c9c98052e061df3556d660f40a6e602e1fb724c6 10SHA1 (patch-cipher_Makefile.in) = c9c98052e061df3556d660f40a6e602e1fb724c6
11SHA1 (patch-cipher_bithelp.h) = 41cd581d84b7f767435cd3305f4a64772cb86ff3 11SHA1 (patch-cipher_bithelp.h) = d624c33777ad3367cd527f4c141bcbede310df2b
12SHA1 (patch-cipher_blowfish-arm.S) = ec81170eb3a45bc160394a5835de0171c24b95ea 12SHA1 (patch-cipher_blowfish-arm.S) = ec81170eb3a45bc160394a5835de0171c24b95ea
13SHA1 (patch-cipher_serpent-armv7-neon.S) = 6941ec8dda48785961f4cb05a64724ff7298dd7b 13SHA1 (patch-cipher_serpent-armv7-neon.S) = 6941ec8dda48785961f4cb05a64724ff7298dd7b
14SHA1 (patch-configure) = c4e10bdb7e00a44d507f5b964f3e71a63828cd0a 14SHA1 (patch-configure) = c4e10bdb7e00a44d507f5b964f3e71a63828cd0a

cvs diff -r1.3 -r1.4 pkgsrc/security/libgcrypt/patches/Attic/patch-cipher_bithelp.h (expand / switch to unified diff)

--- pkgsrc/security/libgcrypt/patches/Attic/patch-cipher_bithelp.h 2014/01/08 09:39:45 1.3
+++ pkgsrc/security/libgcrypt/patches/Attic/patch-cipher_bithelp.h 2014/01/13 11:44:27 1.4
@@ -1,25 +1,58 @@ @@ -1,25 +1,58 @@
1$NetBSD: patch-cipher_bithelp.h,v 1.3 2014/01/08 09:39:45 obache Exp $ 1$NetBSD: patch-cipher_bithelp.h,v 1.4 2014/01/13 11:44:27 obache Exp $
2 2
3* NetBSD has bswap32 and bswap64 as macros. 3* NetBSD has bswap32 and bswap64 as macros.
4 https://bugs.g10code.com/gnupg/issue1600 4 https://bugs.g10code.com/gnupg/issue1600
5 5
6--- cipher/bithelp.h.orig 2013-12-09 07:48:50.000000000 +0000 6--- cipher/bithelp.h.orig 2013-12-09 07:48:50.000000000 +0000
7+++ cipher/bithelp.h 7+++ cipher/bithelp.h
8@@ -40,7 +40,7 @@ static inline u32 ror(u32 x, int n) 8@@ -39,9 +39,10 @@ static inline u32 ror(u32 x, int n)
 9 /* Byte swap for 32-bit and 64-bit integers. If available, use compiler
9 provided helpers. */ 10 provided helpers. */
10 #ifdef HAVE_BUILTIN_BSWAP32 11 #ifdef HAVE_BUILTIN_BSWAP32
11 # define bswap32 __builtin_bswap32 12-# define bswap32 __builtin_bswap32
12-#else 13+# define _gcry_bswap32 __builtin_bswap32
13+#elif !defined(__NetBSD__) && !defined(bswap32) 14 #else
14 static inline u32 bswap32(u32 x) 15-static inline u32 bswap32(u32 x)
 16+static inline u32
 17+_gcry_bswap32(u32 x)
15 { 18 {
16 return ((rol(x, 8) & 0x00ff00ffL) | (ror(x, 8) & 0xff00ff00L)); 19 return ((rol(x, 8) & 0x00ff00ffL) | (ror(x, 8) & 0xff00ff00L));
17@@ -50,7 +50,7 @@ static inline u32 bswap32(u32 x) 20 }
 21@@ -49,29 +50,30 @@ static inline u32 bswap32(u32 x)
 22
18 #ifdef HAVE_U64_TYPEDEF 23 #ifdef HAVE_U64_TYPEDEF
19 # ifdef HAVE_BUILTIN_BSWAP64 24 # ifdef HAVE_BUILTIN_BSWAP64
20 # define bswap64 __builtin_bswap64 25-# define bswap64 __builtin_bswap64
21-# else 26+# define _gcry_bswap64 __builtin_bswap64
22+# elif !defined(__NetBSD__) && !defined(bswap64) 27 # else
23 static inline u64 bswap64(u64 x) 28-static inline u64 bswap64(u64 x)
 29+static inline u64
 30+_gcry_bswap64(u64 x)
24 { 31 {
25 return ((u64)bswap32(x) << 32) | (bswap32(x >> 32)); 32- return ((u64)bswap32(x) << 32) | (bswap32(x >> 32));
 33+ return ((u64)_gcry_bswap32(x) << 32) | (_gcry_bswap32(x >> 32));
 34 }
 35 # endif
 36 #endif
 37
 38 /* Endian dependent byte swap operations. */
 39 #ifdef WORDS_BIGENDIAN
 40-# define le_bswap32(x) bswap32(x)
 41+# define le_bswap32(x) _gcry_bswap32(x)
 42 # define be_bswap32(x) ((u32)(x))
 43 # ifdef HAVE_U64_TYPEDEF
 44-# define le_bswap64(x) bswap64(x)
 45+# define le_bswap64(x) _gcry_bswap64(x)
 46 # define be_bswap64(x) ((u64)(x))
 47 # endif
 48 #else
 49 # define le_bswap32(x) ((u32)(x))
 50-# define be_bswap32(x) bswap32(x)
 51+# define be_bswap32(x) _gcry_bswap32(x)
 52 # ifdef HAVE_U64_TYPEDEF
 53 # define le_bswap64(x) ((u64)(x))
 54-# define be_bswap64(x) bswap64(x)
 55+# define be_bswap64(x) _gcry_bswap64(x)
 56 # endif
 57 #endif
 58