mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
- Update ruby 1.8 to p302.
PR: ports/151712 Reported by: Pavel Argentov <argentoff@gmail.com>
This commit is contained in:
parent
190aae9821
commit
99f91988ea
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=264904
@ -171,9 +171,9 @@ RUBY?= ${LOCALBASE}/bin/${RUBY_NAME}
|
||||
# Ruby 1.8
|
||||
#
|
||||
RUBY_RELVERSION= 1.8.7
|
||||
RUBY_PORTREVISION= 5
|
||||
RUBY_PORTREVISION= 0
|
||||
RUBY_PORTEPOCH= 1
|
||||
RUBY_PATCHLEVEL= 248
|
||||
RUBY_PATCHLEVEL= 302
|
||||
|
||||
. if ${RUBY_PATCHLEVEL} == 0
|
||||
RUBY_VERSION?= ${RUBY_RELVERSION}
|
||||
|
@ -1,3 +1,2 @@
|
||||
MD5 (ruby/ruby-1.8.7-p248.tar.bz2) = 37e19d46b7d4b845f57d3389084b94a6
|
||||
SHA256 (ruby/ruby-1.8.7-p248.tar.bz2) = 3d238c4cf0988797d33169ab05829f1a483194e7cacae4232f3a0e2cc01b6bfc
|
||||
SIZE (ruby/ruby-1.8.7-p248.tar.bz2) = 4153123
|
||||
SHA256 (ruby/ruby-1.8.7-p302.tar.bz2) = 3537cc81cc2378a2bc319cd16c4237ddee14a2839cfd1515b27dce108d061a68
|
||||
SIZE (ruby/ruby-1.8.7-p302.tar.bz2) = 4184764
|
||||
|
@ -1,24 +0,0 @@
|
||||
--- eval.c.orig 2010-04-27 01:09:22.000000000 -0700
|
||||
+++ eval.c 2010-04-27 01:11:14.000000000 -0700
|
||||
@@ -12343,7 +12343,7 @@
|
||||
safe_mutex_lock(&time_thread.lock);
|
||||
if (pthread_create(&time_thread.thread, 0, thread_timer, args) == 0) {
|
||||
thread_init = 1;
|
||||
- pthread_atfork(0, 0, rb_thread_stop_timer);
|
||||
+ pthread_atfork(0, 0, rb_thread_stop_timer_fake);
|
||||
pthread_cond_wait(&start, &time_thread.lock);
|
||||
}
|
||||
pthread_cleanup_pop(1);
|
||||
@@ -12359,6 +12359,12 @@
|
||||
pthread_cleanup_pop(1);
|
||||
pthread_join(time_thread.thread, NULL);
|
||||
}
|
||||
+
|
||||
+void
|
||||
+rb_thread_stop_timer_fake()
|
||||
+{
|
||||
+ thread_init = 0;
|
||||
+}
|
||||
#elif defined(HAVE_SETITIMER)
|
||||
static void
|
||||
catch_timer(sig)
|
@ -1,23 +0,0 @@
|
||||
Index: io.c
|
||||
===================================================================
|
||||
--- io.c (revision 26252)
|
||||
+++ io.c (revision 26253)
|
||||
@@ -122,6 +122,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#define preserving_errno(stmts) \
|
||||
+ do {int saved_errno = errno; stmts; errno = saved_errno;} while (0)
|
||||
+
|
||||
VALUE rb_cIO;
|
||||
VALUE rb_eEOFError;
|
||||
VALUE rb_eIOError;
|
||||
@@ -490,7 +493,7 @@
|
||||
r = write(fileno(f), RSTRING(str)->ptr+offset, l);
|
||||
TRAP_END;
|
||||
#if BSD_STDIO
|
||||
- fseeko(f, lseek(fileno(f), (off_t)0, SEEK_CUR), SEEK_SET);
|
||||
+ preserving_errno(fseeko(f, lseek(fileno(f), (off_t)0, SEEK_CUR), SEEK_SET));
|
||||
#endif
|
||||
if (r == n) return len;
|
||||
if (0 <= r) {
|
@ -1,10 +0,0 @@
|
||||
--- intern.h.orig 2010-04-27 01:11:20.000000000 -0700
|
||||
+++ intern.h 2010-04-27 01:11:30.000000000 -0700
|
||||
@@ -209,6 +209,7 @@
|
||||
void rb_gc_mark_threads _((void));
|
||||
void rb_thread_start_timer _((void));
|
||||
void rb_thread_stop_timer _((void));
|
||||
+void rb_thread_stop_timer_fake _((void));
|
||||
void rb_thread_schedule _((void));
|
||||
void rb_thread_wait_fd _((int));
|
||||
int rb_thread_fd_writable _((int));
|
@ -1,11 +0,0 @@
|
||||
--- lib/webrick/httpresponse.rb.orig 2010-08-17 18:54:44.000000000 -0700
|
||||
+++ lib/webrick/httpresponse.rb 2010-08-17 18:54:58.000000000 -0700
|
||||
@@ -209,7 +209,7 @@
|
||||
@keep_alive = false
|
||||
self.status = HTTPStatus::RC_INTERNAL_SERVER_ERROR
|
||||
end
|
||||
- @header['content-type'] = "text/html"
|
||||
+ @header['content-type'] = "text/html; charset=ISO-8859-1"
|
||||
|
||||
if respond_to?(:create_error_page)
|
||||
create_error_page()
|
@ -1,14 +0,0 @@
|
||||
--- process.c.orig 2008-06-29 02:34:43.000000000 -0700
|
||||
+++ process.c 2010-04-28 12:05:10.000000000 -0700
|
||||
@@ -920,7 +920,11 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SETITIMER
|
||||
+#if defined(_THREAD_SAFE)
|
||||
+#define before_exec() rb_thread_stop_timer_fake()
|
||||
+#else
|
||||
#define before_exec() rb_thread_stop_timer()
|
||||
+#endif
|
||||
#define after_exec() rb_thread_start_timer()
|
||||
#else
|
||||
#define before_exec()
|
@ -1,207 +0,0 @@
|
||||
commit 76526d091f1caeebf65667b8299eac12d63a36ca
|
||||
Author: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
|
||||
Date: Fri Jan 15 21:53:20 2010 +0900
|
||||
|
||||
OpenSSL
|
||||
|
||||
diff --git a/ext/openssl/ossl.c ext/openssl/ossl.c
|
||||
index d4a2dc1..85ba654 100644
|
||||
--- a/ext/openssl/ossl.c
|
||||
+++ 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 --git a/ext/openssl/ossl.h ext/openssl/ossl.h
|
||||
index 9ac1525..4bb18d5 100644
|
||||
--- a/ext/openssl/ossl.h
|
||||
+++ ext/openssl/ossl.h
|
||||
@@ -104,6 +104,13 @@ extern VALUE eOSSLError;
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
+ * Compatibility
|
||||
+ */
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
+#define STACK _STACK
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
* String to HEXString conversion
|
||||
*/
|
||||
int string2hex(const unsigned char *, int, char **, int *);
|
||||
diff --git a/ext/openssl/ossl_pkcs7.c ext/openssl/ossl_pkcs7.c
|
||||
index fe1ef7c..b0cc656 100644
|
||||
--- a/ext/openssl/ossl_pkcs7.c
|
||||
+++ ext/openssl/ossl_pkcs7.c
|
||||
@@ -572,12 +572,11 @@ ossl_pkcs7_add_certificate(VALUE self, VALUE cert)
|
||||
return self;
|
||||
}
|
||||
|
||||
-static STACK *
|
||||
-pkcs7_get_certs_or_crls(VALUE self, int want_certs)
|
||||
+static STACK_OF(X509) *
|
||||
+pkcs7_get_certs(VALUE self)
|
||||
{
|
||||
PKCS7 *pkcs7;
|
||||
STACK_OF(X509) *certs;
|
||||
- STACK_OF(X509_CRL) *crls;
|
||||
int i;
|
||||
|
||||
GetPKCS7(self, pkcs7);
|
||||
@@ -585,17 +584,38 @@ pkcs7_get_certs_or_crls(VALUE self, int want_certs)
|
||||
switch(i){
|
||||
case NID_pkcs7_signed:
|
||||
certs = pkcs7->d.sign->cert;
|
||||
- crls = pkcs7->d.sign->crl;
|
||||
break;
|
||||
case NID_pkcs7_signedAndEnveloped:
|
||||
certs = pkcs7->d.signed_and_enveloped->cert;
|
||||
+ break;
|
||||
+ default:
|
||||
+ certs = NULL;
|
||||
+ }
|
||||
+
|
||||
+ return certs;
|
||||
+}
|
||||
+
|
||||
+static STACK_OF(X509_CRL) *
|
||||
+pkcs7_get_crls(VALUE self)
|
||||
+{
|
||||
+ PKCS7 *pkcs7;
|
||||
+ STACK_OF(X509_CRL) *crls;
|
||||
+ int i;
|
||||
+
|
||||
+ GetPKCS7(self, pkcs7);
|
||||
+ i = OBJ_obj2nid(pkcs7->type);
|
||||
+ switch(i){
|
||||
+ case NID_pkcs7_signed:
|
||||
+ crls = pkcs7->d.sign->crl;
|
||||
+ break;
|
||||
+ case NID_pkcs7_signedAndEnveloped:
|
||||
crls = pkcs7->d.signed_and_enveloped->crl;
|
||||
break;
|
||||
default:
|
||||
- certs = crls = NULL;
|
||||
+ crls = NULL;
|
||||
}
|
||||
|
||||
- return want_certs ? certs : crls;
|
||||
+ return crls;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
@@ -610,7 +630,7 @@ ossl_pkcs7_set_certificates(VALUE self, VALUE ary)
|
||||
STACK_OF(X509) *certs;
|
||||
X509 *cert;
|
||||
|
||||
- certs = pkcs7_get_certs_or_crls(self, 1);
|
||||
+ certs = pkcs7_get_certs(self);
|
||||
while((cert = sk_X509_pop(certs))) X509_free(cert);
|
||||
rb_block_call(ary, rb_intern("each"), 0, 0, ossl_pkcs7_set_certs_i, self);
|
||||
|
||||
@@ -620,7 +640,7 @@ ossl_pkcs7_set_certificates(VALUE self, VALUE ary)
|
||||
static VALUE
|
||||
ossl_pkcs7_get_certificates(VALUE self)
|
||||
{
|
||||
- return ossl_x509_sk2ary(pkcs7_get_certs_or_crls(self, 1));
|
||||
+ return ossl_x509_sk2ary(pkcs7_get_certs(self));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
@@ -650,7 +670,7 @@ ossl_pkcs7_set_crls(VALUE self, VALUE ary)
|
||||
STACK_OF(X509_CRL) *crls;
|
||||
X509_CRL *crl;
|
||||
|
||||
- crls = pkcs7_get_certs_or_crls(self, 0);
|
||||
+ crls = pkcs7_get_crls(self);
|
||||
while((crl = sk_X509_CRL_pop(crls))) X509_CRL_free(crl);
|
||||
rb_block_call(ary, rb_intern("each"), 0, 0, ossl_pkcs7_set_crls_i, self);
|
||||
|
||||
@@ -660,7 +680,7 @@ ossl_pkcs7_set_crls(VALUE self, VALUE ary)
|
||||
static VALUE
|
||||
ossl_pkcs7_get_crls(VALUE self)
|
||||
{
|
||||
- return ossl_x509crl_sk2ary(pkcs7_get_certs_or_crls(self, 0));
|
||||
+ return ossl_x509crl_sk2ary(pkcs7_get_crls(self));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
diff --git a/ext/openssl/ossl_ssl.c ext/openssl/ossl_ssl.c
|
||||
index 97c5583..fe6e74f 100644
|
||||
--- a/ext/openssl/ossl_ssl.c
|
||||
+++ ext/openssl/ossl_ssl.c
|
||||
@@ -1403,10 +1403,10 @@ ossl_ssl_get_peer_cert_chain(VALUE self)
|
||||
}
|
||||
chain = SSL_get_peer_cert_chain(ssl);
|
||||
if(!chain) return Qnil;
|
||||
- num = sk_num(chain);
|
||||
+ num = sk_X509_num(chain);
|
||||
ary = rb_ary_new2(num);
|
||||
for (i = 0; i < num; i++){
|
||||
- cert = (X509*)sk_value(chain, i);
|
||||
+ cert = sk_X509_value(chain, i);
|
||||
rb_ary_push(ary, ossl_x509_new(cert));
|
||||
}
|
||||
|
||||
diff --git a/ext/openssl/ossl_x509attr.c ext/openssl/ossl_x509attr.c
|
||||
index 1f817cd..2a4c481 100644
|
||||
--- a/ext/openssl/ossl_x509attr.c
|
||||
+++ ext/openssl/ossl_x509attr.c
|
||||
@@ -218,8 +218,9 @@ ossl_x509attr_get_value(VALUE self)
|
||||
ossl_str_adjust(str, p);
|
||||
}
|
||||
else{
|
||||
- length = i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, NULL,
|
||||
- i2d_ASN1_TYPE, V_ASN1_SET, V_ASN1_UNIVERSAL, 0);
|
||||
+ length = i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set,
|
||||
+ (unsigned char **) NULL, i2d_ASN1_TYPE,
|
||||
+ V_ASN1_SET, V_ASN1_UNIVERSAL, 0);
|
||||
str = rb_str_new(0, length);
|
||||
p = (unsigned char *)RSTRING_PTR(str);
|
||||
i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, &p,
|
||||
diff --git a/ext/openssl/ossl_x509crl.c ext/openssl/ossl_x509crl.c
|
||||
index 1be9640..818fdba 100644
|
||||
--- a/ext/openssl/ossl_x509crl.c
|
||||
+++ ext/openssl/ossl_x509crl.c
|
||||
@@ -264,7 +264,7 @@ ossl_x509crl_get_revoked(VALUE self)
|
||||
VALUE ary, revoked;
|
||||
|
||||
GetX509CRL(self, crl);
|
||||
- num = sk_X509_CRL_num(X509_CRL_get_REVOKED(crl));
|
||||
+ num = sk_X509_REVOKED_num(X509_CRL_get_REVOKED(crl));
|
||||
if (num < 0) {
|
||||
OSSL_Debug("num < 0???");
|
||||
return rb_ary_new();
|
||||
@@ -272,7 +272,7 @@ ossl_x509crl_get_revoked(VALUE self)
|
||||
ary = rb_ary_new2(num);
|
||||
for(i=0; i<num; i++) {
|
||||
/* NO DUP - don't free! */
|
||||
- rev = (X509_REVOKED *)sk_X509_CRL_value(X509_CRL_get_REVOKED(crl), i);
|
||||
+ rev = sk_X509_REVOKED_value(X509_CRL_get_REVOKED(crl), i);
|
||||
revoked = ossl_x509revoked_new(rev);
|
||||
rb_ary_push(ary, revoked);
|
||||
}
|
@ -394,7 +394,9 @@ lib/lib%%RUBY_NAME%%.so.%%RUBY_SHLIBVER%%
|
||||
%%RUBY_LIBDIR%%/openssl/digest.rb
|
||||
%%RUBY_LIBDIR%%/openssl/pkcs7.rb
|
||||
%%RUBY_LIBDIR%%/openssl/ssl.rb
|
||||
%%RUBY_LIBDIR%%/openssl/ssl-internal.rb
|
||||
%%RUBY_LIBDIR%%/openssl/x509.rb
|
||||
%%RUBY_LIBDIR%%/openssl/x509-internal.rb
|
||||
%%RUBY_LIBDIR%%/openssl.rb
|
||||
%%RUBY_LIBDIR%%/optparse/date.rb
|
||||
%%RUBY_LIBDIR%%/optparse/shellwords.rb
|
||||
|
Loading…
Reference in New Issue
Block a user