pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ruby18-base * Make Ruby's OpenSSL library compati...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0e7a881c5140
branches:  trunk
changeset: 397392:0e7a881c5140
user:      taca <taca%pkgsrc.org@localhost>
date:      Tue Aug 11 14:26:58 2009 +0000

description:
* Make Ruby's OpenSSL library compatible with OpenSSL 1.0.0 and later,
  focusing to PR pkg/41829.
* Add comments to patches.

Bump PKGREVISION.

diffstat:

 lang/ruby18-base/Makefile         |    6 +-
 lang/ruby18-base/distinfo         |   23 +++++-
 lang/ruby18-base/patches/patch-aa |    4 +-
 lang/ruby18-base/patches/patch-ab |    4 +-
 lang/ruby18-base/patches/patch-ac |    4 +-
 lang/ruby18-base/patches/patch-bd |   33 +++++++++
 lang/ruby18-base/patches/patch-be |   24 ++++++
 lang/ruby18-base/patches/patch-dj |   24 ++++++
 lang/ruby18-base/patches/patch-dk |   68 ++++++++++++++++++
 lang/ruby18-base/patches/patch-dl |  139 ++++++++++++++++++++++++++++++++++++++
 lang/ruby18-base/patches/patch-dm |  116 +++++++++++++++++++++++++++++++
 lang/ruby18-base/patches/patch-dn |   15 ++++
 lang/ruby18-base/patches/patch-do |   15 ++++
 lang/ruby18-base/patches/patch-dp |  100 +++++++++++++++++++++++++++
 lang/ruby18-base/patches/patch-dq |   82 ++++++++++++++++++++++
 lang/ruby18-base/patches/patch-dr |   15 ++++
 lang/ruby18-base/patches/patch-ds |   15 ++++
 lang/ruby18-base/patches/patch-dt |   24 ++++++
 lang/ruby18-base/patches/patch-du |   15 ++++
 lang/ruby18-base/patches/patch-dv |   15 ++++
 20 files changed, 731 insertions(+), 10 deletions(-)

diffs (truncated from 850 to 300 lines):

diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/Makefile
--- a/lang/ruby18-base/Makefile Tue Aug 11 14:07:01 2009 +0000
+++ b/lang/ruby18-base/Makefile Tue Aug 11 14:26:58 2009 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.51 2009/08/04 19:47:16 hasso Exp $
+# $NetBSD: Makefile,v 1.52 2009/08/11 14:26:58 taca Exp $
 #
 
 DISTNAME=      ${RUBY_DISTNAME}
 PKGNAME=       ${RUBY_PKGPREFIX}-base-${RUBY_VERSION_SUFFIX}
 CATEGORIES=    lang ruby
 MASTER_SITES=  ${MASTER_SITE_RUBY}
-PKGREVISION=   1
+PKGREVISION=   2
 
 MAINTAINER=    taca%NetBSD.org@localhost
 HOMEPAGE=      ${RUBY_HOMEPAGE}
@@ -28,7 +28,7 @@
 CONFIGURE_ARGS+= --enable-shared \
                --with-ssl-include="${BUILDLINK_PREFIX.openssl}/include" \
                --with-ssl-lib="${BUILDLINK_PREFIX.openssl}/lib"
-CONFIGURE_ENV+=                PREFIX=${PREFIX:Q}
+CONFIGURE_ENV+=                PREFIX=${PREFIX}
 WRKSRC=                ${RUBY_WRKSRC}
 
 .include "../../mk/compiler.mk"
diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/distinfo
--- a/lang/ruby18-base/distinfo Tue Aug 11 14:07:01 2009 +0000
+++ b/lang/ruby18-base/distinfo Tue Aug 11 14:26:58 2009 +0000
@@ -1,8 +1,23 @@
-$NetBSD: distinfo,v 1.39 2009/06/16 15:08:38 taca Exp $
+$NetBSD: distinfo,v 1.40 2009/08/11 14:26:58 taca Exp $
 
 SHA1 (ruby-1.8.7-p174.tar.bz2) = 9e84b49ad545ad54b8e7dc3c227eaaefeb1041aa
 RMD160 (ruby-1.8.7-p174.tar.bz2) = f854d456003af1e31d50330c88c3cb152c434249
 Size (ruby-1.8.7-p174.tar.bz2) = 4144807 bytes
-SHA1 (patch-aa) = 59f4462dada7e7b00c7a773c8a95454f3dc4f994
-SHA1 (patch-ab) = 239872c5faf95c05d2a94fe5f40af5b8541423c7
-SHA1 (patch-ac) = eb4dd068729ba2a2c7d4d659f6bcdb1410227f3b
+SHA1 (patch-aa) = 88e4a338c4ca40b32f9e3748eb825769631c3e76
+SHA1 (patch-ab) = 93a3dc95ee5e5cd6c7584240a285fa39b6f21efd
+SHA1 (patch-ac) = 77c3ba81bb65d13475bf7ea64328fbc35fe788bf
+SHA1 (patch-bd) = fb1a6a6724210c2fd84464d028932e78890ad7da
+SHA1 (patch-be) = 79cd592267068820fa2225242034819ba38aa0b1
+SHA1 (patch-dj) = 436c3c0704b878427d947b2e27e5ce0a057eebeb
+SHA1 (patch-dk) = 2d436ac4089aa7d818b337de81f405fc5836c9af
+SHA1 (patch-dl) = 687803dc966594479467fc4b5e7bd45e767daa2b
+SHA1 (patch-dm) = ab3063fecee241420a66d5d6f4ef8bf37440e70d
+SHA1 (patch-dn) = f63e0cb7dbd86b4a2c022156fddd22c1ccdd5666
+SHA1 (patch-do) = f9eda9e784da02dff203fd47e8f1ee6871a6a9d4
+SHA1 (patch-dp) = 0b50909072159937c62944a38763fd18ce3181db
+SHA1 (patch-dq) = f5a605c49afb29b2c3963a82d844ff4cdf3a8846
+SHA1 (patch-dr) = e0fa1dc8674c6412d73bc4ccd2cfc8b4acad744a
+SHA1 (patch-ds) = 5344a63980b88d83e279cee50398312b90d5c2da
+SHA1 (patch-dt) = 3dd34a91cbffcb8e432d926c9490372f238e7f2e
+SHA1 (patch-du) = 55f021e2eb780743e35ecf70141f7738b04f4b62
+SHA1 (patch-dv) = 25e779444c16717c7aaf800ebf68988878ed636f
diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/patches/patch-aa
--- a/lang/ruby18-base/patches/patch-aa Tue Aug 11 14:07:01 2009 +0000
+++ b/lang/ruby18-base/patches/patch-aa Tue Aug 11 14:26:58 2009 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-aa,v 1.12 2008/06/20 15:39:29 taca Exp $
+$NetBSD: patch-aa,v 1.13 2009/08/11 14:26:58 taca Exp $
+
+* Adding Interix support.
 
 --- configure.in.orig  2008-06-09 03:23:46.000000000 +0900
 +++ configure.in
diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/patches/patch-ab
--- a/lang/ruby18-base/patches/patch-ab Tue Aug 11 14:07:01 2009 +0000
+++ b/lang/ruby18-base/patches/patch-ab Tue Aug 11 14:26:58 2009 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-ab,v 1.12 2008/06/20 15:39:29 taca Exp $
+$NetBSD: patch-ab,v 1.13 2009/08/11 14:26:58 taca Exp $
+
+* Adding Interix support.
 
 --- configure.orig     2008-06-09 18:38:04.000000000 +0900
 +++ configure
diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/patches/patch-ac
--- a/lang/ruby18-base/patches/patch-ac Tue Aug 11 14:07:01 2009 +0000
+++ b/lang/ruby18-base/patches/patch-ac Tue Aug 11 14:26:58 2009 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-ac,v 1.6 2007/10/28 02:33:24 taca Exp $
+$NetBSD: patch-ac,v 1.7 2009/08/11 14:26:58 taca Exp $
+
+* Accept db3 or db4 as include/library.
 
 --- ext/dbm/extconf.rb.orig    2007-02-13 08:01:19.000000000 +0900
 +++ ext/dbm/extconf.rb
diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/patches/patch-bd
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby18-base/patches/patch-bd Tue Aug 11 14:26:58 2009 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-bd,v 1.3 2009/08/11 14:26:58 taca Exp $
+
+* Use modern OpenSSL API to catch up OpenSSL 1.0.0 and later.
+
+--- ext/openssl/ossl.c.orig    2007-06-09 00:02:04.000000000 +0900
++++ ext/openssl/ossl.c
+@@ -92,7 +92,7 @@ ossl_x509_ary2sk(VALUE ary)
+ 
+ #define OSSL_IMPL_SK2ARY(name, type)          \
+ VALUE                                         \
+-ossl_##name##_sk2ary(STACK *sk)                       \
++ossl_##name##_sk2ary(STACK_OF(type) *sk)      \
+ {                                             \
+     type *t;                                  \
+     int i, num;                                       \
+@@ -102,7 +102,7 @@ ossl_##name##_sk2ary(STACK *sk)                    \
+       OSSL_Debug("empty sk!");                \
+       return Qnil;                            \
+     }                                         \
+-    num = sk_num(sk);                         \
++    num = sk_##type##_num(sk);                        \
+     if (num < 0) {                            \
+       OSSL_Debug("items in sk < -1???");      \
+       return rb_ary_new();                    \
+@@ -110,7 +110,7 @@ ossl_##name##_sk2ary(STACK *sk)                    \
+     ary = rb_ary_new2(num);                   \
+                                               \
+     for (i=0; i<num; i++) {                   \
+-      t = (type *)sk_value(sk, i);            \
++      t = sk_##type##_value(sk, i);           \
+       rb_ary_push(ary, ossl_##name##_new(t)); \
+     }                                         \
+     return ary;                                       \
diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/patches/patch-be
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby18-base/patches/patch-be Tue Aug 11 14:26:58 2009 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-be,v 1.3 2009/08/11 14:26:58 taca Exp $
+
+* Constify.
+
+--- ext/openssl/ossl_cipher.c.orig     2007-06-09 00:02:04.000000000 +0900
++++ ext/openssl/ossl_cipher.c
+@@ -186,7 +186,7 @@ ossl_cipher_init(int argc, VALUE *argv, 
+        * We deprecated the arguments for this method, but we decided
+        * keeping this behaviour for backward compatibility.
+        */
+-      char *cname  = rb_class2name(rb_obj_class(self));
++      const char *cname  = rb_class2name(rb_obj_class(self));
+       rb_warn("argumtents for %s#encrypt and %s#decrypt were deprecated; "
+                 "use %s#pkcs5_keyivgen to derive key and IV",
+                 cname, cname, cname);
+@@ -307,7 +307,7 @@ ossl_cipher_pkcs5_keyivgen(int argc, VAL
+ static VALUE
+ ossl_cipher_update_deprecated(VALUE self, VALUE data)
+ {
+-    char *cname;
++    const char *cname;
+ 
+     cname = rb_class2name(rb_obj_class(self));
+     rb_warning("%s#<< is deprecated; use %s#update instead", cname, cname);
diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/patches/patch-dj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby18-base/patches/patch-dj Tue Aug 11 14:26:58 2009 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-dj,v 1.4 2009/08/11 14:26:58 taca Exp $
+
+* Constify.
+
+--- ext/openssl/ossl_ocsp.c.orig       2009-03-09 20:59:27.000000000 +0900
++++ ext/openssl/ossl_ocsp.c
+@@ -103,7 +103,7 @@ static VALUE
+ ossl_ocspreq_initialize(int argc, VALUE *argv, VALUE self)
+ {
+     VALUE arg;
+-    unsigned char *p;
++    const unsigned char *p;
+ 
+     rb_scan_args(argc, argv, "01", &arg);
+     if(!NIL_P(arg)){
+@@ -310,7 +310,7 @@ static VALUE
+ ossl_ocspres_initialize(int argc, VALUE *argv, VALUE self)
+ {
+     VALUE arg;
+-    unsigned char *p;
++    const unsigned char *p;
+ 
+     rb_scan_args(argc, argv, "01", &arg);
+     if(!NIL_P(arg)){
diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/patches/patch-dk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby18-base/patches/patch-dk Tue Aug 11 14:26:58 2009 +0000
@@ -0,0 +1,68 @@
+$NetBSD: patch-dk,v 1.1 2009/08/11 14:26:58 taca Exp $
+
+* Decrease warning from Ruby's repositry.
+
+--- ext/openssl/openssl_missing.h.orig 2008-08-04 13:44:17.000000000 +0900
++++ ext/openssl/openssl_missing.h
+@@ -18,6 +18,9 @@ extern "C" {
+ #ifndef TYPEDEF_D2I_OF
+ typedef char *d2i_of_void();
+ #endif
++#ifndef TYPEDEF_I2D_OF
++typedef int i2d_of_void();
++#endif
+ 
+ /*
+  * These functions are not included in headers of OPENSSL <= 0.9.6b
+@@ -25,39 +28,39 @@ typedef char *d2i_of_void();
+ 
+ #if !defined(PEM_read_bio_DSAPublicKey)
+ # define PEM_read_bio_DSAPublicKey(bp,x,cb,u) (DSA *)PEM_ASN1_read_bio( \
+-        (char *(*)())d2i_DSAPublicKey,PEM_STRING_DSA_PUBLIC,bp,(char **)x,cb,u)
++        (d2i_of_void *)d2i_DSAPublicKey,PEM_STRING_DSA_PUBLIC,bp,x,cb,u)
+ #endif
+ 
+ #if !defined(PEM_write_bio_DSAPublicKey)
+ # define PEM_write_bio_DSAPublicKey(bp,x) \
+-      PEM_ASN1_write_bio((int (*)())i2d_DSAPublicKey,\
++      PEM_ASN1_write_bio((i2d_of_void *)i2d_DSAPublicKey,\
+               PEM_STRING_DSA_PUBLIC,\
+               bp,(char *)x, NULL, NULL, 0, NULL, NULL)
+ #endif
+ 
+ #if !defined(DSAPrivateKey_dup)
+-# define DSAPrivateKey_dup(dsa) (DSA *)ASN1_dup((int (*)())i2d_DSAPrivateKey, \
+-      (char *(*)())d2i_DSAPrivateKey,(char *)dsa)
++# define DSAPrivateKey_dup(dsa) (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPrivateKey, \
++      (d2i_of_void *)d2i_DSAPrivateKey,(char *)dsa)
+ #endif
+ 
+ #if !defined(DSAPublicKey_dup)
+-# define DSAPublicKey_dup(dsa) (DSA *)ASN1_dup((int (*)())i2d_DSAPublicKey, \
+-      (char *(*)())d2i_DSAPublicKey,(char *)dsa)
++# define DSAPublicKey_dup(dsa) (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPublicKey, \
++      (d2i_of_void *)d2i_DSAPublicKey,(char *)dsa)
+ #endif
+ 
+ #if !defined(X509_REVOKED_dup)
+-# define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((int (*)())i2d_X509_REVOKED, \
+-      (char *(*)())d2i_X509_REVOKED, (char *)rev)
++# define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((i2d_of_void *)i2d_X509_REVOKED, \
++      (d2i_of_void *)d2i_X509_REVOKED, (char *)rev)
+ #endif
+ 
+ #if !defined(PKCS7_SIGNER_INFO_dup)
+-#  define PKCS7_SIGNER_INFO_dup(si) (PKCS7_SIGNER_INFO *)ASN1_dup((int (*)())i2d_PKCS7_SIGNER_INFO, \
+-      (char *(*)())d2i_PKCS7_SIGNER_INFO, (char *)si)
++#  define PKCS7_SIGNER_INFO_dup(si) (PKCS7_SIGNER_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_SIGNER_INFO, \
++      (d2i_of_void *)d2i_PKCS7_SIGNER_INFO, (char *)si)
+ #endif
+ 
+ #if !defined(PKCS7_RECIP_INFO_dup)
+-#  define PKCS7_RECIP_INFO_dup(ri) (PKCS7_RECIP_INFO *)ASN1_dup((int (*)())i2d_PKCS7_RECIP_INFO, \
+-      (char *(*)())d2i_PKCS7_RECIP_INFO, (char *)ri)
++#  define PKCS7_RECIP_INFO_dup(ri) (PKCS7_RECIP_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_RECIP_INFO, \
++      (d2i_of_void *)d2i_PKCS7_RECIP_INFO, (char *)ri)
+ #endif
+ 
+ #if !defined(HAVE_EVP_MD_CTX_INIT)
diff -r 8cbc1872ad36 -r 0e7a881c5140 lang/ruby18-base/patches/patch-dl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby18-base/patches/patch-dl Tue Aug 11 14:26:58 2009 +0000
@@ -0,0 +1,139 @@
+$NetBSD: patch-dl,v 1.1 2009/08/11 14:26:58 taca Exp $
+
+* Constify.
+
+--- ext/openssl/ossl_asn1.c.orig       2007-06-09 00:02:04.000000000 +0900
++++ ext/openssl/ossl_asn1.c
+@@ -304,10 +304,10 @@ obj_to_asn1derstr(VALUE obj)
+  * DER to Ruby converters
+  */
+ static VALUE
+-decode_bool(unsigned char* der, int length)
++decode_bool(const unsigned char* der, int length)
+ {
+     int bool;
+-    unsigned char *p;
++    const unsigned char *p;
+ 
+     p = der;
+     if((bool = d2i_ASN1_BOOLEAN(NULL, &p, length)) < 0)
+@@ -317,10 +317,10 @@ decode_bool(unsigned char* der, int leng
+ }
+ 
+ static VALUE
+-decode_int(unsigned char* der, int length)
++decode_int(const unsigned char* der, int length)
+ {
+     ASN1_INTEGER *ai;
+-    unsigned char *p;
++    const unsigned char *p;
+     VALUE ret; 
+     int status = 0;
+ 
+@@ -336,10 +336,11 @@ decode_int(unsigned char* der, int lengt
+ }
+ 
+ static VALUE
+-decode_bstr(unsigned char* der, int length, long *unused_bits)
++decode_bstr(const unsigned char* der, int length, long *unused_bits)
+ {
+     ASN1_BIT_STRING *bstr;
+-    unsigned char *p, *buf;



Home | Main Index | Thread Index | Old Index