Created
September 2, 2010 11:33
-
-
Save heftig/562177 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -u -Nr ruby/openssl-1.0.patch ruby-new/openssl-1.0.patch | |
--- ruby/openssl-1.0.patch 2010-09-02 12:25:05.313122264 +0200 | |
+++ ruby-new/openssl-1.0.patch 1970-01-01 01:00:00.000000000 +0100 | |
@@ -1,176 +0,0 @@ | |
-diff -Nura ruby-1.9.1-p378.orig/ext/openssl/ossl.c ruby-1.9.1-p378/ext/openssl/ossl.c | |
---- ruby-1.9.1-p378.orig/ext/openssl/ossl.c 2009-01-15 16:39:30.000000000 +0100 | |
-+++ ruby-1.9.1-p378/ext/openssl/ossl.c 2010-04-01 07:41:19.397603813 +0200 | |
-@@ -92,7 +92,7 @@ | |
- | |
- #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_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 @@ | |
- 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 -Nura ruby-1.9.1-p378.orig/ext/openssl/ossl_pkcs7.c ruby-1.9.1-p378/ext/openssl/ossl_pkcs7.c | |
---- ruby-1.9.1-p378.orig/ext/openssl/ossl_pkcs7.c 2008-07-22 17:34:23.000000000 +0200 | |
-+++ ruby-1.9.1-p378/ext/openssl/ossl_pkcs7.c 2010-04-01 07:41:19.415105324 +0200 | |
-@@ -572,12 +572,11 @@ | |
- 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 @@ | |
- 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 @@ | |
- 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 @@ | |
- 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 @@ | |
- 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 @@ | |
- 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 -Nura ruby-1.9.1-p378.orig/ext/openssl/ossl_ssl.c ruby-1.9.1-p378/ext/openssl/ossl_ssl.c | |
---- ruby-1.9.1-p378.orig/ext/openssl/ossl_ssl.c 2009-04-19 15:32:18.000000000 +0200 | |
-+++ ruby-1.9.1-p378/ext/openssl/ossl_ssl.c 2010-04-01 07:41:19.450937427 +0200 | |
-@@ -88,12 +88,18 @@ | |
- | |
- ID ID_callback_state; | |
- | |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L | |
-+#define OSSL_MORE_CONST const | |
-+#define STACK _STACK | |
-+#else | |
-+#define OSSL_MORE_CONST | |
-+#endif | |
- /* | |
- * SSLContext class | |
- */ | |
- struct { | |
- const char *name; | |
-- SSL_METHOD *(*func)(void); | |
-+ OSSL_MORE_CONST SSL_METHOD *(*func)(void); | |
- } ossl_ssl_method_tab[] = { | |
- #define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method } | |
- OSSL_SSL_METHOD_ENTRY(TLSv1), | |
-@@ -142,7 +148,7 @@ | |
- static VALUE | |
- ossl_sslctx_set_ssl_version(VALUE self, VALUE ssl_method) | |
- { | |
-- SSL_METHOD *method = NULL; | |
-+ OSSL_MORE_CONST SSL_METHOD *method = NULL; | |
- const char *s; | |
- int i; | |
- | |
-@@ -585,7 +591,7 @@ | |
- } | |
- | |
- static VALUE | |
--ossl_ssl_cipher_to_ary(SSL_CIPHER *cipher) | |
-+ossl_ssl_cipher_to_ary(OSSL_MORE_CONST SSL_CIPHER *cipher) | |
- { | |
- VALUE ary; | |
- int bits, alg_bits; | |
-@@ -1213,7 +1219,7 @@ | |
- ossl_ssl_get_cipher(VALUE self) | |
- { | |
- SSL *ssl; | |
-- SSL_CIPHER *cipher; | |
-+ OSSL_MORE_CONST SSL_CIPHER *cipher; | |
- | |
- Data_Get_Struct(self, SSL, ssl); | |
- if (!ssl) { | |
diff -u -Nr ruby/PKGBUILD ruby-new/PKGBUILD | |
--- ruby/PKGBUILD 2010-09-02 12:25:05.313122264 +0200 | |
+++ ruby-new/PKGBUILD 2010-09-02 13:13:25.194556407 +0200 | |
@@ -6,12 +6,13 @@ | |
pkgname=('ruby' 'ruby-docs') | |
pkgver=1.9.2_p0 | |
_pkgver=1.9.2-p0 | |
-pkgrel=2 | |
+pkgrel=3 | |
pkgdesc="An object-oriented language for quick and easy programming" | |
arch=('i686' 'x86_64') | |
url="http://www.ruby-lang.org/en/" | |
license=('custom') | |
-makedepends=('gdbm' 'db' 'openssl' 'zlib' 'readline' 'tk') | |
+makedepends=('gdbm' 'db' 'openssl' 'zlib' 'readline' 'tk' 'libffi' | |
+ 'doxygen' 'graphviz') | |
options=('!emptydirs') | |
source=("ftp://ftp.ruby-lang.org/pub/ruby/1.9/${pkgname}-${_pkgver}.tar.bz2") | |
md5sums=('d8a02cadf57d2571cd4250e248ea7e4b') | |
@@ -28,7 +29,7 @@ | |
package_ruby() | |
{ | |
- depends=('gdbm' 'db' 'openssl' 'zlib' 'readline') | |
+ depends=('gdbm' 'db' 'openssl' 'zlib' 'readline' 'libffi') | |
provides=('rubygems' 'rake') | |
conflicts=('rubygems' 'rake') | |
optdepends=('tk: for Ruby/TK') | |
@@ -45,6 +46,6 @@ | |
depends=('ruby') | |
cd "${srcdir}/${pkgname}-${_pkgver}" | |
- make -j1 DESTDIR="${pkgdir}" install-doc | |
+ make -j1 DESTDIR="${pkgdir}" install-doc install-capi | |
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/ruby-docs/COPYING" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment