diff options
author | seb <seb@pkgsrc.org> | 2003-12-08 23:15:05 +0000 |
---|---|---|
committer | seb <seb@pkgsrc.org> | 2003-12-08 23:15:05 +0000 |
commit | c1e49db845f604f944ef43ae6e06871499fb9760 (patch) | |
tree | a4ae1302a94359afd8903aec7f33284874a225ec /databases | |
parent | 748d9a927655a94386b2606f07873b6edbfd0cef (diff) | |
download | pkgsrc-c1e49db845f604f944ef43ae6e06871499fb9760.tar.gz |
Work around a f77 ICE on NetBSD/sparc64 1.6* by "disabling" f77
completely. Please note that a Fortran compiler is not needed by
this package but configure -libtool in fact- tickles it if one is
found.
Also fix build for older NetBSD/sparc64 compiler by patching SHA1
code the usual way.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/db4/Makefile | 7 | ||||
-rw-r--r-- | databases/db4/distinfo | 3 | ||||
-rw-r--r-- | databases/db4/patches/patch-ac | 102 |
3 files changed, 110 insertions, 2 deletions
diff --git a/databases/db4/Makefile b/databases/db4/Makefile index a0548716db4..48fa520eba8 100644 --- a/databases/db4/Makefile +++ b/databases/db4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2003/12/07 00:51:07 epg Exp $ +# $NetBSD: Makefile,v 1.9 2003/12/08 23:15:05 seb Exp $ DISTNAME= db-4.2.52 PKGNAME= ${DISTNAME:S/db/db4/} @@ -23,6 +23,11 @@ CONFIGURE_ARGS+= --enable-shared CONFIGURE_ARGS+= --includedir=${PREFIX}/include/db4 CONFIGURE_ARGS+= --program-transform-name=s,db_,db4_, +# NetBSD-sparc64-1.6*'s f77 makes configure failing and as f77 is not +# needed for this package the following does no harm on other platform. +FC= ${FALSE} +F77= ${FALSE} + .if defined(WITH_JAVA) && (${WITH_JAVA} == "YES") CONFIGURE_ARGS+= --enable-java . include "../../mk/java-vm.mk" diff --git a/databases/db4/distinfo b/databases/db4/distinfo index 3b4f4e128f9..b3ce1d85564 100644 --- a/databases/db4/distinfo +++ b/databases/db4/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.4 2003/12/07 02:57:04 epg Exp $ +$NetBSD: distinfo,v 1.5 2003/12/08 23:15:05 seb Exp $ SHA1 (db-4.2.52.tar.gz) = 12d21a58efd7b5fd35b56815a8fb1ac2cbab2e5c Size (db-4.2.52.tar.gz) = 4073147 bytes SHA1 (patch-aa) = 532c6616f848d3a31a034478519024e72c5fe0ce SHA1 (patch-ab) = 90171c714f1b8f57831d789036cf85158d5aed3b +SHA1 (patch-ac) = b9b52d5604afd12409261294a71b3db20b899476 diff --git a/databases/db4/patches/patch-ac b/databases/db4/patches/patch-ac new file mode 100644 index 00000000000..3d4c9c79f2e --- /dev/null +++ b/databases/db4/patches/patch-ac @@ -0,0 +1,102 @@ +$NetBSD: patch-ac,v 1.1 2003/12/08 23:15:05 seb Exp $ + +--- ../hmac/sha1.c.orig 2002-04-09 13:40:36.000000000 +0000 ++++ ../hmac/sha1.c +@@ -102,6 +102,63 @@ A million repetitions of "a" + #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); + #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); + ++typedef union { ++ unsigned char c[64]; ++ u_int32_t l[16]; ++} CHAR64LONG16; ++ ++#ifdef __sparc_v9__ ++void do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *, int is_bigendian); ++void do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *, int is_bigendian); ++void do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *, int is_bigendian); ++void do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *, int is_bigendian); ++ ++#define nR0(v,w,x,y,z,i) R0(*v,*w,*x,*y,*z,i) ++#define nR1(v,w,x,y,z,i) R1(*v,*w,*x,*y,*z,i) ++#define nR2(v,w,x,y,z,i) R2(*v,*w,*x,*y,*z,i) ++#define nR3(v,w,x,y,z,i) R3(*v,*w,*x,*y,*z,i) ++#define nR4(v,w,x,y,z,i) R4(*v,*w,*x,*y,*z,i) ++ ++void ++do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block, int is_bigendian) ++{ ++ nR0(a,b,c,d,e, 0); nR0(e,a,b,c,d, 1); nR0(d,e,a,b,c, 2); nR0(c,d,e,a,b, 3); ++ nR0(b,c,d,e,a, 4); nR0(a,b,c,d,e, 5); nR0(e,a,b,c,d, 6); nR0(d,e,a,b,c, 7); ++ nR0(c,d,e,a,b, 8); nR0(b,c,d,e,a, 9); nR0(a,b,c,d,e,10); nR0(e,a,b,c,d,11); ++ nR0(d,e,a,b,c,12); nR0(c,d,e,a,b,13); nR0(b,c,d,e,a,14); nR0(a,b,c,d,e,15); ++ nR1(e,a,b,c,d,16); nR1(d,e,a,b,c,17); nR1(c,d,e,a,b,18); nR1(b,c,d,e,a,19); ++} ++ ++void ++do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block, int is_bigendian) ++{ ++ nR2(a,b,c,d,e,20); nR2(e,a,b,c,d,21); nR2(d,e,a,b,c,22); nR2(c,d,e,a,b,23); ++ nR2(b,c,d,e,a,24); nR2(a,b,c,d,e,25); nR2(e,a,b,c,d,26); nR2(d,e,a,b,c,27); ++ nR2(c,d,e,a,b,28); nR2(b,c,d,e,a,29); nR2(a,b,c,d,e,30); nR2(e,a,b,c,d,31); ++ nR2(d,e,a,b,c,32); nR2(c,d,e,a,b,33); nR2(b,c,d,e,a,34); nR2(a,b,c,d,e,35); ++ nR2(e,a,b,c,d,36); nR2(d,e,a,b,c,37); nR2(c,d,e,a,b,38); nR2(b,c,d,e,a,39); ++} ++ ++void ++do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block, int is_bigendian) ++{ ++ nR3(a,b,c,d,e,40); nR3(e,a,b,c,d,41); nR3(d,e,a,b,c,42); nR3(c,d,e,a,b,43); ++ nR3(b,c,d,e,a,44); nR3(a,b,c,d,e,45); nR3(e,a,b,c,d,46); nR3(d,e,a,b,c,47); ++ nR3(c,d,e,a,b,48); nR3(b,c,d,e,a,49); nR3(a,b,c,d,e,50); nR3(e,a,b,c,d,51); ++ nR3(d,e,a,b,c,52); nR3(c,d,e,a,b,53); nR3(b,c,d,e,a,54); nR3(a,b,c,d,e,55); ++ nR3(e,a,b,c,d,56); nR3(d,e,a,b,c,57); nR3(c,d,e,a,b,58); nR3(b,c,d,e,a,59); ++} ++ ++void ++do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block, int is_bigendian) ++{ ++ nR4(a,b,c,d,e,60); nR4(e,a,b,c,d,61); nR4(d,e,a,b,c,62); nR4(c,d,e,a,b,63); ++ nR4(b,c,d,e,a,64); nR4(a,b,c,d,e,65); nR4(e,a,b,c,d,66); nR4(d,e,a,b,c,67); ++ nR4(c,d,e,a,b,68); nR4(b,c,d,e,a,69); nR4(a,b,c,d,e,70); nR4(e,a,b,c,d,71); ++ nR4(d,e,a,b,c,72); nR4(c,d,e,a,b,73); nR4(b,c,d,e,a,74); nR4(a,b,c,d,e,75); ++ nR4(e,a,b,c,d,76); nR4(d,e,a,b,c,77); nR4(c,d,e,a,b,78); nR4(b,c,d,e,a,79); ++} ++#endif + + #ifdef VERBOSE /* SAK */ + static void __db_SHAPrintContext __P((SHA1_CTX *, char *)); +@@ -134,10 +191,6 @@ __db_SHA1Transform(state, buffer) + unsigned char *buffer; + { + u_int32_t a, b, c, d, e; +-typedef union { +- unsigned char c[64]; +- u_int32_t l[16]; +-} CHAR64LONG16; + CHAR64LONG16* block; + static int is_bigendian = -1; + #ifdef SHA1HANDSOFF +@@ -156,6 +209,13 @@ static int is_bigendian = -1; + c = state[2]; + d = state[3]; + e = state[4]; ++ ++#ifdef __sparc_v9__ ++ do_R01(&a, &b, &c, &d, &e, block, is_bigendian); ++ do_R2(&a, &b, &c, &d, &e, block, is_bigendian); ++ do_R3(&a, &b, &c, &d, &e, block, is_bigendian); ++ do_R4(&a, &b, &c, &d, &e, block, is_bigendian); ++#else + /* 4 rounds of 20 operations each. Loop unrolled. */ + R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); + R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); +@@ -177,6 +237,8 @@ static int is_bigendian = -1; + R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); + R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); + R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); ++#endif ++ + /* Add the working vars back into context.state[] */ + state[0] += a; + state[1] += b; |