diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-06-22 02:38:35 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-06-22 02:38:35 +0000 |
commit | bece311b40eaf91bc2bf69eeb06334358cd68824 (patch) | |
tree | c92f9239e67ca30f98e51d6ee711cf930658cf40 /dev-libs/openssl | |
parent | Fix by nyhm for gcc-4.2 issues #179649 by Philipp. (diff) | |
download | gentoo-2-bece311b40eaf91bc2bf69eeb06334358cd68824.tar.gz gentoo-2-bece311b40eaf91bc2bf69eeb06334358cd68824.tar.bz2 gentoo-2-bece311b40eaf91bc2bf69eeb06334358cd68824.zip |
Fix from upstream for encfs/ssh troubles #168750 and fix from PLD Linux for gcc-4.2 troubles #158324.
(Portage version: 2.1.3_rc3)
Diffstat (limited to 'dev-libs/openssl')
-rw-r--r-- | dev-libs/openssl/ChangeLog | 10 | ||||
-rw-r--r-- | dev-libs/openssl/files/digest-openssl-0.9.8e-r1 | 3 | ||||
-rw-r--r-- | dev-libs/openssl/files/openssl-0.9.8-evp-key-len.patch | 15 | ||||
-rw-r--r-- | dev-libs/openssl/files/openssl-0.9.8-gcc42.patch | 295 | ||||
-rw-r--r-- | dev-libs/openssl/openssl-0.9.8e-r1.ebuild | 178 |
5 files changed, 500 insertions, 1 deletions
diff --git a/dev-libs/openssl/ChangeLog b/dev-libs/openssl/ChangeLog index 5b0568d7a13a..679b7d65ddf4 100644 --- a/dev-libs/openssl/ChangeLog +++ b/dev-libs/openssl/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-libs/openssl # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.213 2007/04/22 22:41:31 kloeri Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.214 2007/06/22 02:38:35 vapier Exp $ + +*openssl-0.9.8e-r1 (22 Jun 2007) + + 22 Jun 2007; Mike Frysinger <vapier@gentoo.org> + +files/openssl-0.9.8-evp-key-len.patch, +files/openssl-0.9.8-gcc42.patch, + +openssl-0.9.8e-r1.ebuild: + Fix from upstream for encfs/ssh troubles #168750 and fix from PLD Linux for + gcc-4.2 troubles #158324. 22 Apr 2007; Bryan Østergaard <kloeri@gentoo.org> openssl-0.9.8d.ebuild: Stable on Mips. diff --git a/dev-libs/openssl/files/digest-openssl-0.9.8e-r1 b/dev-libs/openssl/files/digest-openssl-0.9.8e-r1 new file mode 100644 index 000000000000..1ecd5456a79a --- /dev/null +++ b/dev-libs/openssl/files/digest-openssl-0.9.8e-r1 @@ -0,0 +1,3 @@ +MD5 3a7ff24f6ea5cd711984722ad654b927 openssl-0.9.8e.tar.gz 3341665 +RMD160 c1a498606dc0fc7219376b950fab6b53687466db openssl-0.9.8e.tar.gz 3341665 +SHA256 414e8428b95fbc51707965fda31390497d058290356426bfe084b49464a60340 openssl-0.9.8e.tar.gz 3341665 diff --git a/dev-libs/openssl/files/openssl-0.9.8-evp-key-len.patch b/dev-libs/openssl/files/openssl-0.9.8-evp-key-len.patch new file mode 100644 index 000000000000..cb03c3c2f263 --- /dev/null +++ b/dev-libs/openssl/files/openssl-0.9.8-evp-key-len.patch @@ -0,0 +1,15 @@ +fix from upstream + +http://bugs.gentoo.org/168750 + +--- crypto/evp/evp_lib.c 2006/11/29 20:47:13 1.10.2.1 ++++ crypto/evp/evp_lib.c 2007/02/27 18:42:52 1.10.2.2 +@@ -225,7 +225,7 @@ + + int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx) + { +- return ctx->cipher->key_len; ++ return ctx->key_len; + } + + int EVP_CIPHER_nid(const EVP_CIPHER *cipher) diff --git a/dev-libs/openssl/files/openssl-0.9.8-gcc42.patch b/dev-libs/openssl/files/openssl-0.9.8-gcc42.patch new file mode 100644 index 000000000000..9111de722b8b --- /dev/null +++ b/dev-libs/openssl/files/openssl-0.9.8-gcc42.patch @@ -0,0 +1,295 @@ +Ripped from PLD Linux for gcc-4.2 + +http://bugs.gentoo.org/158324 + +--- openssl-0.9.8e/crypto/asn1/asn1.h.gcc42~ 2006-02-19 14:45:22.000000000 +0100 ++++ openssl-0.9.8e/crypto/asn1/asn1.h 2007-03-04 12:35:59.000000000 +0100 +@@ -902,23 +902,26 @@ + + /* Used to implement other functions */ + void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x); ++extern const void *__ASN1_dup; + #define ASN1_dup_of(type,i2d,d2i,x) \ +- ((type *(*)(I2D_OF(type),D2I_OF(type),type *))openssl_fcast(ASN1_dup))(i2d,d2i,x) ++ ((type *(*)(I2D_OF(type),D2I_OF(type),type *))__ASN1_dup)(i2d,d2i,x) + #define ASN1_dup_of_const(type,i2d,d2i,x) \ +- ((type *(*)(I2D_OF_const(type),D2I_OF(type),type *))openssl_fcast(ASN1_dup))(i2d,d2i,x) ++ ((type *(*)(I2D_OF_const(type),D2I_OF(type),type *))__ASN1_dup)(i2d,d2i,x) + + void *ASN1_item_dup(const ASN1_ITEM *it, void *x); + + #ifndef OPENSSL_NO_FP_API + void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x); ++extern const void *__ASN1_d2i_fp; + #define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \ +- ((type *(*)(type *(*)(void),D2I_OF(type),FILE *,type **))openssl_fcast(ASN1_d2i_fp))(xnew,d2i,in,x) ++ ((type *(*)(type *(*)(void),D2I_OF(type),FILE *,type **))__ASN1_d2i_fp)(xnew,d2i,in,x) + void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x); + int ASN1_i2d_fp(i2d_of_void *i2d,FILE *out,void *x); ++extern const void *__ASN1_i2d_fp; + #define ASN1_i2d_fp_of(type,i2d,out,x) \ +- ((int (*)(I2D_OF(type),FILE *,type *))openssl_fcast(ASN1_i2d_fp))(i2d,out,x) ++ ((int (*)(I2D_OF(type),FILE *,type *))__ASN1_i2d_fp)(i2d,out,x) + #define ASN1_i2d_fp_of_const(type,i2d,out,x) \ +- ((int (*)(I2D_OF_const(type),FILE *,type *))openssl_fcast(ASN1_i2d_fp))(i2d,out,x) ++ ((int (*)(I2D_OF_const(type),FILE *,type *))__ASN1_i2d_fp)(i2d,out,x) + int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x); + int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags); + #endif +@@ -927,14 +930,16 @@ + + #ifndef OPENSSL_NO_BIO + void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x); ++extern const void *__ASN1_d2i_bio; + #define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \ +- ((type *(*)(type *(*)(void),D2I_OF(type),BIO *,type **))openssl_fcast(ASN1_d2i_bio))(xnew,d2i,in,x) ++ ((type *(*)(type *(*)(void),D2I_OF(type),BIO *,type **))__ASN1_d2i_bio)(xnew,d2i,in,x) + void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x); + int ASN1_i2d_bio(i2d_of_void *i2d,BIO *out, unsigned char *x); ++extern const void *__ASN1_i2d_bio; + #define ASN1_i2d_bio_of(type,i2d,out,x) \ +- ((int (*)(I2D_OF(type),BIO *,type *))openssl_fcast(ASN1_i2d_bio))(i2d,out,x) ++ ((int (*)(I2D_OF(type),BIO *,type *))__ASN1_i2d_bio)(i2d,out,x) + #define ASN1_i2d_bio_of_const(type,i2d,out,x) \ +- ((int (*)(I2D_OF_const(type),BIO *,const type *))openssl_fcast(ASN1_i2d_bio))(i2d,out,x) ++ ((int (*)(I2D_OF_const(type),BIO *,const type *))__ASN1_i2d_bio)(i2d,out,x) + int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); + int ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a); + int ASN1_GENERALIZEDTIME_print(BIO *fp,ASN1_GENERALIZEDTIME *a); +@@ -977,8 +982,9 @@ + void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); + ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, + ASN1_OCTET_STRING **oct); ++extern const void *__ASN1_pack_string; + #define ASN1_pack_string_of(type,obj,i2d,oct) \ +- ((ASN1_STRING *(*)(type *,I2D_OF(type),ASN1_OCTET_STRING **))openssl_fcast(ASN1_pack_string))(obj,i2d,oct) ++ ((ASN1_STRING *(*)(type *,I2D_OF(type),ASN1_OCTET_STRING **))__ASN1_pack_string)(obj,i2d,oct) + ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); + + void ASN1_STRING_set_default_mask(unsigned long mask); +--- openssl-0.9.8e/crypto/ocsp/ocsp.h.gcc42~ 2005-05-13 01:01:43.000000000 +0200 ++++ openssl-0.9.8e/crypto/ocsp/ocsp.h 2007-03-04 12:35:59.000000000 +0100 +@@ -468,8 +468,9 @@ + + ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d, + void *data, STACK_OF(ASN1_OBJECT) *sk); ++extern const void *__ASN1_STRING_encode; + #define ASN1_STRING_encode_of(type,s,i2d,data,sk) \ +-((ASN1_STRING *(*)(ASN1_STRING *,I2D_OF(type),type *,STACK_OF(ASN1_OBJECT) *))openssl_fcast(ASN1_STRING_encode))(s,i2d,data,sk) ++((ASN1_STRING *(*)(ASN1_STRING *,I2D_OF(type),type *,STACK_OF(ASN1_OBJECT) *))__ASN1_STRING_encode)(s,i2d,data,sk) + + X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim); + +--- openssl-0.9.8e/crypto/pem/pem.h.gcc42~ 2006-12-19 20:47:36.000000000 +0100 ++++ openssl-0.9.8e/crypto/pem/pem.h 2007-03-04 12:44:19.000000000 +0100 +@@ -220,19 +220,19 @@ + #define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ + type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ + { \ +-return(((type *(*)(D2I_OF(type),char *,FILE *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read))(d2i_##asn1, str,fp,x,cb,u)); \ ++return(((type *(*)(D2I_OF(type),char *,FILE *,type **,pem_password_cb *,void *))__PEM_ASN1_read)(d2i_##asn1, str,fp,x,cb,u)); \ + } + + #define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ + int PEM_write_##name(FILE *fp, type *x) \ + { \ +-return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ ++return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ + } + + #define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ + int PEM_write_##name(FILE *fp, const type *x) \ + { \ +-return(((int (*)(I2D_OF_const(type),const char *,FILE *, const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ ++return(((int (*)(I2D_OF_const(type),const char *,FILE *, const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ + } + + #define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ +@@ -240,7 +243,7 @@ + unsigned char *kstr, int klen, pem_password_cb *cb, \ + void *u) \ + { \ +- return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ ++ return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ + } + + #define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ +@@ -248,7 +252,7 @@ + unsigned char *kstr, int klen, pem_password_cb *cb, \ + void *u) \ + { \ +- return(((int (*)(I2D_OF_const(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ ++ return(((int (*)(I2D_OF_const(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ + } + + #endif +@@ -256,33 +261,33 @@ + #define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ + type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ + { \ +-return(((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read_bio))(d2i_##asn1, str,bp,x,cb,u)); \ ++return(((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))__PEM_ASN1_read_bio)(d2i_##asn1, str,bp,x,cb,u)); \ + } + + #define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ + int PEM_write_bio_##name(BIO *bp, type *x) \ + { \ +-return(((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ ++return(((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ + } + + #define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ + int PEM_write_bio_##name(BIO *bp, const type *x) \ + { \ +-return(((int (*)(I2D_OF_const(type),const char *,BIO *,const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ ++return(((int (*)(I2D_OF_const(type),const char *,BIO *,const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ + } + + #define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ + int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ + unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ + { \ +- return(((int (*)(I2D_OF(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ ++ return(((int (*)(I2D_OF(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ + } + + #define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ + int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ + unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ + { \ +- return(((int (*)(I2D_OF_const(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ ++ return(((int (*)(I2D_OF_const(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ + } + + #define IMPLEMENT_PEM_write(name, type, str, asn1) \ +@@ -545,13 +555,15 @@ + pem_password_cb *cb, void *u); + void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, + void **x, pem_password_cb *cb, void *u); ++extern const void *__PEM_ASN1_read_bio; + #define PEM_ASN1_read_bio_of(type,d2i,name,bp,x,cb,u) \ +-((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read_bio))(d2i,name,bp,x,cb,u) ++((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))__PEM_ASN1_read_bio)(d2i,name,bp,x,cb,u) + int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp,char *x, + const EVP_CIPHER *enc,unsigned char *kstr,int klen, + pem_password_cb *cb, void *u); ++extern const void *__PEM_ASN1_write_bio; + #define PEM_ASN1_write_bio_of(type,i2d,name,bp,x,enc,kstr,klen,cb,u) \ +- ((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d,name,bp,x,enc,kstr,klen,cb,u) ++ ((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d,name,bp,x,enc,kstr,klen,cb,u) + + STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); + int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc, +@@ -566,11 +566,13 @@ + int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len); + void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, + pem_password_cb *cb, void *u); ++extern const void *__PEM_ASN1_read; + int PEM_ASN1_write(i2d_of_void *i2d,const char *name,FILE *fp, + char *x,const EVP_CIPHER *enc,unsigned char *kstr, + int klen,pem_password_cb *callback, void *u); + STACK_OF(X509_INFO) * PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, + pem_password_cb *cb, void *u); ++extern const void *__PEM_ASN1_write; + #endif + + int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, +--- openssl-0.9.8e/crypto/asn1/a_d2i_fp.c.ark 2007-04-17 17:50:28.000000000 +0000 ++++ openssl-0.9.8e/crypto/asn1/a_d2i_fp.c 2007-04-17 19:17:24.000000000 +0000 +@@ -81,6 +81,7 @@ + BIO_free(b); + return(ret); + } ++const void * __attribute__((unused)) __ASN1_d2i_fp=(const void*)openssl_fcast(ASN1_d2i_fp); + #endif + + void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x) +@@ -99,6 +100,7 @@ + if (b != NULL) BUF_MEM_free(b); + return(ret); + } ++const void * __attribute__((unused)) __ASN1_d2i_bio=(const void*)openssl_fcast(ASN1_d2i_bio); + + #endif + +--- openssl-0.9.8e/crypto/asn1/a_dup.c.ark 2007-04-17 17:49:31.000000000 +0000 ++++ openssl-0.9.8e/crypto/asn1/a_dup.c 2007-04-17 17:49:59.000000000 +0000 +@@ -82,6 +82,7 @@ + OPENSSL_free(b); + return(ret); + } ++const void * __attribute__((unused)) __ASN1_dup=(const void*)openssl_fcast(ASN1_dup); + + #endif + +--- openssl-0.9.8e/crypto/asn1/a_i2d_fp.c.ark 2007-04-17 17:52:19.000000000 +0000 ++++ openssl-0.9.8e/crypto/asn1/a_i2d_fp.c 2007-04-17 19:19:29.000000000 +0000 +@@ -79,6 +79,7 @@ + BIO_free(b); + return(ret); + } ++const void * __attribute__((unused)) __ASN1_i2d_fp=(const void*)openssl_fcast(ASN1_i2d_fp); + #endif + + int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x) +@@ -113,6 +114,7 @@ + OPENSSL_free(b); + return(ret); + } ++const void * __attribute__((unused)) __ASN1_i2d_bio=(const void*)openssl_fcast(ASN1_i2d_bio); + + #endif + +--- openssl-0.9.8e/crypto/asn1/asn_pack.c.ark 2007-04-17 19:18:35.000000000 +0000 ++++ openssl-0.9.8e/crypto/asn1/asn_pack.c 2007-04-17 19:19:20.000000000 +0000 +@@ -144,6 +144,7 @@ + i2d (obj, &p); + return octmp; + } ++const void * __attribute__((unused)) __ASN1_pack_string=(const void*)openssl_fcast(ASN1_pack_string); + + #endif + +--- openssl-0.9.8e/crypto/ocsp/ocsp_ext.c.ark 2007-04-17 19:20:35.000000000 +0000 ++++ openssl-0.9.8e/crypto/ocsp/ocsp_ext.c 2007-04-17 19:21:19.000000000 +0000 +@@ -305,6 +305,7 @@ + if (b) OPENSSL_free(b); + return NULL; + } ++const void * __attribute__((unused)) __ASN1_STRING_encode=(const void*)openssl_fcast(ASN1_STRING_encode); + + /* Nonce handling functions */ + +--- openssl-0.9.8e/crypto/pem/pem_lib.c.ark 2007-04-17 19:21:44.000000000 +0000 ++++ openssl-0.9.8e/crypto/pem/pem_lib.c 2007-04-17 19:26:35.000000000 +0000 +@@ -174,6 +174,7 @@ + BIO_free(b); + return(ret); + } ++const void * __attribute__((unused)) __PEM_ASN1_read=(const void*)openssl_fcast(PEM_ASN1_read); + #endif + + static int check_pem(const char *nm, const char *name) +@@ -277,6 +278,7 @@ + BIO_free(b); + return(ret); + } ++const void * __attribute__((unused)) __PEM_ASN1_write=(const void*)openssl_fcast(PEM_ASN1_write); + #endif + + int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, +@@ -381,6 +383,7 @@ + } + return(ret); + } ++const void * __attribute__((unused)) __PEM_ASN1_write_bio=(const void*)openssl_fcast(PEM_ASN1_write_bio); + + int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen, + pem_password_cb *callback,void *u) +--- openssl-0.9.8e/crypto/pem/pem_oth.c.ark 2007-04-17 19:27:10.000000000 +0000 ++++ openssl-0.9.8e/crypto/pem/pem_oth.c 2007-04-17 19:30:00.000000000 +0000 +@@ -84,3 +84,4 @@ + OPENSSL_free(data); + return(ret); + } ++const void * __attribute__((unused)) __PEM_ASN1_read_bio=(const void*)openssl_fcast(PEM_ASN1_read_bio); diff --git a/dev-libs/openssl/openssl-0.9.8e-r1.ebuild b/dev-libs/openssl/openssl-0.9.8e-r1.ebuild new file mode 100644 index 000000000000..f6d85cc76468 --- /dev/null +++ b/dev-libs/openssl/openssl-0.9.8e-r1.ebuild @@ -0,0 +1,178 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.8e-r1.ebuild,v 1.1 2007/06/22 02:38:35 vapier Exp $ + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1" +HOMEPAGE="http://www.openssl.org/" +SRC_URI="mirror://openssl/source/${P}.tar.gz" + +LICENSE="openssl" +SLOT="0" +KEYWORDS="-* ~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="bindist emacs sse2 test zlib" + +RDEPEND="" +DEPEND="${RDEPEND} + sys-apps/diffutils + >=dev-lang/perl-5 + test? ( sys-devel/bc )" +PDEPEND="app-misc/ca-certificates" + +src_unpack() { + unpack ${A} + + cd "${S}" + + epatch "${FILESDIR}"/${PN}-0.9.8-ppc64.patch + epatch "${FILESDIR}"/${PN}-0.9.7e-gentoo.patch + epatch "${FILESDIR}"/${PN}-0.9.8-hppa-fix-detection.patch + epatch "${FILESDIR}"/${PN}-0.9.7-alpha-default-gcc.patch + epatch "${FILESDIR}"/${PN}-0.9.8b-parallel-build.patch + epatch "${FILESDIR}"/${PN}-0.9.8-make-engines-dir.patch + epatch "${FILESDIR}"/${PN}-0.9.8-toolchain.patch + epatch "${FILESDIR}"/${PN}-0.9.8b-doc-updates.patch + epatch "${FILESDIR}"/${PN}-0.9.8-makedepend.patch #149583 + epatch "${FILESDIR}"/${PN}-0.9.8-evp-key-len.patch #168750 + [[ $(gcc-version) == "4.2" ]] && epatch "${FILESDIR}"/${PN}-0.9.8-gcc42.patch #158324 + + # allow openssl to be cross-compiled + cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed" + chmod a+rx gentoo.config + + # Don't build manpages if we don't want them + has noman FEATURES \ + && sed -i '/^install:/s:install_docs::' Makefile.org \ + || sed -i '/^MANDIR=/s:=.*:=/usr/share/man:' Makefile.org + + # Try to derice users and work around broken ass toolchains + if [[ $(gcc-major-version) == "3" ]] ; then + filter-flags -fprefetch-loop-arrays -freduce-all-givs -funroll-loops + [[ $(tc-arch) == "ppc64" ]] && replace-flags -O? -O + fi + [[ $(tc-arch) == ppc* ]] && append-flags -fno-strict-aliasing + append-flags -Wa,--noexecstack + + # using a library directory other than lib requires some magic + sed -i \ + -e "s+\(\$(INSTALL_PREFIX)\$(INSTALLTOP)\)/lib+\1/$(get_libdir)+g" \ + -e "s+libdir=\$\${exec_prefix}/lib+libdir=\$\${exec_prefix}/$(get_libdir)+g" \ + Makefile.org engines/Makefile \ + || die "sed failed" + ./config --test-sanity || die "I AM NOT SANE" +} + +src_compile() { + tc-export CC AR RANLIB + + # Clean out patent-or-otherwise-encumbered code + # IDEA: 5,214,703 25/05/2010 + # RC5: 5,724,428 03/03/2015 + # EC: ????????? ??/??/2015 + local confopts="" + if use bindist ; then + confopts="no-idea no-rc5 no-ec" + else + confopts="enable-idea enable-rc5 enable-mdc2 enable-ec" + fi + use zlib && confopts="${confopts} zlib-dynamic" + use sse2 || confopts="${confopts} no-sse2" + + local sslout=$(./gentoo.config) + einfo "Use configuration ${sslout:-(openssl knows best)}" + local config="Configure" + [[ -z ${sslout} ]] && config="config" + ./${config} \ + ${sslout} \ + ${confopts} \ + --prefix=/usr \ + --openssldir=/etc/ssl \ + shared threads \ + || die "Configure failed" + + # Clean out hardcoded flags that openssl uses + local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \ + -e 's:^CFLAG=::' \ + -e 's:-fomit-frame-pointer ::g' \ + -e 's:-O[0-9] ::g' \ + -e 's:-march=[-a-z0-9]* ::g' \ + -e 's:-mcpu=[-a-z0-9]* ::g' \ + -e 's:-m[a-z0-9]* ::g' \ + ) + sed -i \ + -e "/^CFLAG/s:=.*:=${CFLAG} ${CFLAGS}:" \ + -e "/^SHARED_LDFLAGS=/s:$: ${LDFLAGS}:" \ + Makefile || die + + # depend is needed to use $confopts + # rehash is needed to prep the certs/ dir + emake -j1 depend || die "depend failed" + emake all rehash || die "make all failed" + + # force until we get all the gentoo.config kinks worked out + if has test ${FEATURES} && ! tc-is-cross-compiler ; then + src_test + fi +} + +src_test() { + # make sure sandbox doesnt die on *BSD + addpredict /dev/crypto + + make test || die "make test failed" +} + +src_install() { + emake -j1 INSTALL_PREFIX="${D}" install || die + dodoc CHANGES* FAQ NEWS README doc/*.txt + dohtml doc/* + + if use emacs ; then + insinto /usr/share/emacs/site-lisp + doins doc/c-indentation.el + fi + + # create the certs directory + dodir /etc/ssl/certs + cp -RP certs/* "${D}"/etc/ssl/certs/ || die "failed to install certs" + rm -r "${D}"/etc/ssl/certs/{demo,expired} + + # Namespace openssl programs to prevent conflicts with other man pages + cd "${D}"/usr/share/man + local m d s + for m in $(find . -type f | xargs grep -L '#include') ; do + d=${m%/*} ; d=${d#./} ; m=${m##*/} + [[ ${m} == openssl.1* ]] && continue + mv ${d}/{,ssl-}${m} + ln -s ssl-${m} ${d}/openssl-${m} + # locate any symlinks that point to this man page + for s in $(find ${d} -lname ${m}) ; do + s=${s##*/} + rm -f ${d}/${s} + ln -s ssl-${m} ${d}/ssl-${s} + ln -s ssl-${s} ${d}/openssl-${s} + done + done + + diropts -m0700 + keepdir /etc/ssl/private +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7} +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7} + + if [[ ${CHOST} == i686* ]] ; then + ewarn "Due to the way openssl is architected, you cannot" + ewarn "switch between optimized versions without breaking" + ewarn "ABI. The default i686 0.9.8 ABI was an unoptimized" + ewarn "version with horrible performance. This version uses" + ewarn "the optimized ABI. If you experience segfaults when" + ewarn "using ssl apps (like openssh), just re-emerge the" + ewarn "offending package." + fi +} |