diff options
author | drochner <drochner@pkgsrc.org> | 2009-12-18 18:54:24 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2009-12-18 18:54:24 +0000 |
commit | 24c9b736c715f615bc9493724b894f7a58d061d1 (patch) | |
tree | 1cfec7a0a1273ee82762806024dd30b586ba9ef4 /security/libgcrypt | |
parent | 3b935903e3255d97cfeb682655e4141b584743c8 (diff) | |
download | pkgsrc-24c9b736c715f615bc9493724b894f7a58d061d1.tar.gz |
put back the (non-default) "idea" option which got lost a while ago
Diffstat (limited to 'security/libgcrypt')
-rw-r--r-- | security/libgcrypt/Makefile | 5 | ||||
-rw-r--r-- | security/libgcrypt/distinfo | 14 | ||||
-rw-r--r-- | security/libgcrypt/files/idea-patch | 53 | ||||
-rw-r--r-- | security/libgcrypt/options.mk | 22 | ||||
-rw-r--r-- | security/libgcrypt/patches/patch-ba | 15 | ||||
-rw-r--r-- | security/libgcrypt/patches/patch-bb | 12 | ||||
-rw-r--r-- | security/libgcrypt/patches/patch-bc | 13 |
7 files changed, 127 insertions, 7 deletions
diff --git a/security/libgcrypt/Makefile b/security/libgcrypt/Makefile index 9107d2eb84a..37683a9b0c1 100644 --- a/security/libgcrypt/Makefile +++ b/security/libgcrypt/Makefile @@ -1,10 +1,13 @@ -# $NetBSD: Makefile,v 1.45 2009/12/15 10:40:11 wiz Exp $ +# $NetBSD: Makefile,v 1.46 2009/12/18 18:54:24 drochner Exp $ DISTNAME= libgcrypt-1.4.5 CATEGORIES= security MASTER_SITES= ftp://ftp.gnupg.org/gcrypt/libgcrypt/ \ http://gd.tuwien.ac.at/privacy/gnupg/libgcrypt/ EXTRACT_SUFX= .tar.bz2 +# don't remove this -- see options.mk +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} +DIST_SUBDIR= ${PKGNAME_NOREV} MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://directory.fsf.org/security/libgcrypt.html diff --git a/security/libgcrypt/distinfo b/security/libgcrypt/distinfo index 387a710846a..1c7f8ad5fed 100644 --- a/security/libgcrypt/distinfo +++ b/security/libgcrypt/distinfo @@ -1,11 +1,17 @@ -$NetBSD: distinfo,v 1.29 2009/12/15 10:40:11 wiz Exp $ +$NetBSD: distinfo,v 1.30 2009/12/18 18:54:24 drochner Exp $ -SHA1 (libgcrypt-1.4.5.tar.bz2) = ef7ecbd3a03a7978094366bcd1257b3654608d28 -RMD160 (libgcrypt-1.4.5.tar.bz2) = 5f43147cb40beb903cc1a620d2706eb08c66a889 -Size (libgcrypt-1.4.5.tar.bz2) = 1148382 bytes +SHA1 (libgcrypt-1.4.5/gcrypt.tar.bz2) = 5d402e4e4e6831f74b738f1a022cf024bcb24ecd +RMD160 (libgcrypt-1.4.5/gcrypt.tar.bz2) = d1032e66bd4b6f51e437993a7178d14b09a2955a +Size (libgcrypt-1.4.5/gcrypt.tar.bz2) = 4231 bytes +SHA1 (libgcrypt-1.4.5/libgcrypt-1.4.5.tar.bz2) = ef7ecbd3a03a7978094366bcd1257b3654608d28 +RMD160 (libgcrypt-1.4.5/libgcrypt-1.4.5.tar.bz2) = 5f43147cb40beb903cc1a620d2706eb08c66a889 +Size (libgcrypt-1.4.5/libgcrypt-1.4.5.tar.bz2) = 1148382 bytes SHA1 (patch-aa) = 27db0d01f6a95566ccf0471a12f9a16dd7f994eb SHA1 (patch-ab) = eb6d759e98acdce7aebc9ca28fff84e07a06e11c SHA1 (patch-ac) = b8333a4c7a4a6d34c2e6840a5dd3af070280b42a SHA1 (patch-ad) = f32281612b51c5bb3788cf03c6f5615bdfc0d3e8 SHA1 (patch-ae) = 7199ed8fe571b8c892d6eafb868820d625c2b7fa SHA1 (patch-af) = e6d33b3e9c25a560c1df11843c6be3c9319bd018 +SHA1 (patch-ba) = f20a6c954339151cde8e0ada1c833491eeb2f2c8 +SHA1 (patch-bb) = 76ac3399ac26ee4c631bc608225b708273beb2af +SHA1 (patch-bc) = 837eefee38382eb47068a965d378c1dfb2c7b82b diff --git a/security/libgcrypt/files/idea-patch b/security/libgcrypt/files/idea-patch new file mode 100644 index 00000000000..8fcd65152c2 --- /dev/null +++ b/security/libgcrypt/files/idea-patch @@ -0,0 +1,53 @@ +$NetBSD: idea-patch,v 1.1 2009/12/18 18:54:24 drochner Exp $ + +--- idea.c.orig 2006-11-15 15:43:12.000000000 +0000 ++++ idea.c +@@ -49,8 +49,11 @@ typedef struct { + int have_dk; + } IDEA_context; + ++static void expand_key(const byte *, u16 *); ++static void invert_key(u16 *, u16[IDEA_KEYLEN]); ++ + static int +-do_idea_setkey( IDEA_context *c, byte *key, unsigned int keylen ) ++do_idea_setkey( IDEA_context *c, const byte *key, unsigned int keylen ) + { + assert(keylen == 16); + c->have_dk = 0; +@@ -98,7 +101,7 @@ mul_inv( u16 x ) + + + static void +-expand_key( byte *userkey, u16 *ek ) ++expand_key( const byte *userkey, u16 *ek ) + { + int i,j; + +@@ -161,7 +164,7 @@ invert_key( u16 *ek, u16 dk[IDEA_KEYLEN] + + + static void +-cipher( byte *outbuf, byte *inbuf, u16 *key ) ++cipher( byte *outbuf, const byte *inbuf, u16 *key ) + { + u16 x1, x2, x3,x4, s2, s3; + u16 *in, *out; +@@ -237,7 +240,7 @@ cipher( byte *outbuf, byte *inbuf, u16 * + } + + static void +-do_idea_encrypt( IDEA_context *c, byte *outbuf, byte *inbuf ) ++do_idea_encrypt( IDEA_context *c, byte *outbuf, const byte *inbuf ) + { + cipher( outbuf, inbuf, c->ek ); + } +@@ -251,7 +254,7 @@ idea_encrypt (void *context, byte *out, + } + + static void +-do_idea_decrypt( IDEA_context *c, byte *outbuf, byte *inbuf ) ++do_idea_decrypt( IDEA_context *c, byte *outbuf, const byte *inbuf ) + { + if( !c->have_dk ) { + c->have_dk = 1; diff --git a/security/libgcrypt/options.mk b/security/libgcrypt/options.mk index 1c80a364088..c4a8d9df187 100644 --- a/security/libgcrypt/options.mk +++ b/security/libgcrypt/options.mk @@ -1,7 +1,7 @@ -# $NetBSD: options.mk,v 1.4 2009/01/31 08:53:14 adam Exp $ +# $NetBSD: options.mk,v 1.5 2009/12/18 18:54:24 drochner Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.libgcrypt -PKG_SUPPORTED_OPTIONS= +PKG_SUPPORTED_OPTIONS= idea .include "../../mk/bsd.prefs.mk" @@ -21,3 +21,21 @@ PKG_SUGGESTED_OPTIONS+= via-padlock # Disable VIA Padlock support. CONFIGURE_ARGS+= --disable-padlock-support .endif + +.if !empty(PKG_OPTIONS:Midea) +# use of IDEA as crypto function +LICENSE= idea-license +RESTRICTED= Commercial distribution is claimed to require a license. +NO_SRC_ON_CDROM= ${RESTRICTED} +NO_BIN_ON_CDROM= ${RESTRICTED} + +DISTFILES+= gcrypt.tar.bz2 +SITES.gcrypt.tar.bz2= http://www.kfwebs.com/ +CFLAGS+= -DUSE_IDEA +MAKE_ENV+= IDEAOBJECT=idea.lo +USE_TOOLS+= patch +post-patch: ideapatch +ideapatch: + cd ${WRKDIR} && ${PATCH} <${FILESDIR}/idea-patch && \ + ${CP} idea.c ${WRKSRC}/cipher +.endif diff --git a/security/libgcrypt/patches/patch-ba b/security/libgcrypt/patches/patch-ba new file mode 100644 index 00000000000..d72062cfd2a --- /dev/null +++ b/security/libgcrypt/patches/patch-ba @@ -0,0 +1,15 @@ +$NetBSD: patch-ba,v 1.1 2009/12/18 18:54:24 drochner Exp $ + +--- cipher/cipher.c.orig 2009-04-02 09:25:34.000000000 +0000 ++++ cipher/cipher.c +@@ -109,6 +109,10 @@ static struct cipher_table_entry + { &_gcry_cipher_spec_camellia256, + &dummy_extra_spec, GCRY_CIPHER_CAMELLIA256 }, + #endif ++#if USE_IDEA ++ { &_gcry_cipher_spec_idea, ++ &dummy_extra_spec, GCRY_CIPHER_IDEA }, ++#endif + { NULL } + }; + diff --git a/security/libgcrypt/patches/patch-bb b/security/libgcrypt/patches/patch-bb new file mode 100644 index 00000000000..27e4c8d505f --- /dev/null +++ b/security/libgcrypt/patches/patch-bb @@ -0,0 +1,12 @@ +$NetBSD: patch-bb,v 1.1 2009/12/18 18:54:24 drochner Exp $ + +--- src/cipher.h.orig 2009-04-02 09:25:32.000000000 +0000 ++++ src/cipher.h +@@ -94,6 +94,7 @@ extern gcry_cipher_spec_t _gcry_cipher_s + extern gcry_cipher_spec_t _gcry_cipher_spec_camellia128; + extern gcry_cipher_spec_t _gcry_cipher_spec_camellia192; + extern gcry_cipher_spec_t _gcry_cipher_spec_camellia256; ++extern gcry_cipher_spec_t _gcry_cipher_spec_idea; + + extern cipher_extra_spec_t _gcry_cipher_extraspec_tripledes; + extern cipher_extra_spec_t _gcry_cipher_extraspec_aes; diff --git a/security/libgcrypt/patches/patch-bc b/security/libgcrypt/patches/patch-bc new file mode 100644 index 00000000000..b1140dec374 --- /dev/null +++ b/security/libgcrypt/patches/patch-bc @@ -0,0 +1,13 @@ +$NetBSD: patch-bc,v 1.1 2009/12/18 18:54:24 drochner Exp $ + +--- cipher/Makefile.in.orig 2009-12-11 15:43:29.000000000 +0000 ++++ cipher/Makefile.in +@@ -237,7 +237,7 @@ EXTRA_DIST = Manifest + AM_CPPFLAGS = -I../src -I$(top_srcdir)/src + AM_CFLAGS = $(GPG_ERROR_CFLAGS) + noinst_LTLIBRARIES = libcipher.la +-GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ @GCRYPT_DIGESTS@ ++GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ @GCRYPT_DIGESTS@ ${IDEAOBJECT} + libcipher_la_DEPENDENCIES = $(GCRYPT_MODULES) + libcipher_la_LIBADD = $(GCRYPT_MODULES) + libcipher_la_SOURCES = \ |