diff options
Diffstat (limited to 'dev-lang/ruby')
-rw-r--r-- | dev-lang/ruby/Manifest | 11 | ||||
-rw-r--r-- | dev-lang/ruby/files/2.4/012-openssl_1.1.patch | 339 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-2.3.8-r1.ebuild (renamed from dev-lang/ruby/ruby-2.3.7.ebuild) | 2 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-2.4.5-r1.ebuild | 229 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-2.4.5.ebuild | 4 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-2.5.3.ebuild | 2 |
6 files changed, 578 insertions, 9 deletions
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest index 42af35e0c684..11e7f2aa58e8 100644 --- a/dev-lang/ruby/Manifest +++ b/dev-lang/ruby/Manifest @@ -3,18 +3,19 @@ AUX 2.4/005_no-undefined-ext.patch 479 BLAKE2B b11ae86049ed792e5f98e6e56d93468b0 AUX 2.4/009_no-gems.patch 4153 BLAKE2B c7d056d46cd769a00c3ae8b3866ad7ca7126fe008362461561693b6da7fb867c5418cc9f5fb11af242842af5edab050b68fafd349b8c6e75af208f6a36850900 SHA512 ec63fa29a6be3b86b4bde397292a2de73accbdab479ae881af9d364d7c8cb1f2a3e85c809735d47375b52923754d4abbd26a63c01616926189fda5e4a5a8a454 AUX 2.4/010-libressl_2.7.patch 638 BLAKE2B ffd6091c3d1d657d44370d4bfd84e8c40fe387483972c09dbcb7819957be78ee320c6f46d2f78493d25357072950db13e08dff6d622d2374a9c330fe97ce200f SHA512 d42f61eda8292ee5d3485ba4576fd6dbd8a3e40918f2096de3b376b92f633b476f6ad4913fb3be3f7ef356e722d8a192317b233d174563cd342a429595b0cdae AUX 2.4/011-gcc8.patch 2470 BLAKE2B d6fe2e34e7c33ca7bccf3b934092ef43b4ba8766d8c160a0548fa4946fc61a763634037c3180479896802e6e75828af043e75839fd03cc9e4b6e126c833d2cb8 SHA512 1636dc821a822ab6ec919e576ebba9e9cba64540801df6a2b4411e650930ec5cdc3ab28aeb3c5d45d3304f73af52372c2dee91833bcd9952692f3167d21007d2 +AUX 2.4/012-openssl_1.1.patch 12158 BLAKE2B b7a77180159d6e2620a148b1c8dc2b137dbad0263d4f588c2d533a0ab9775ea0e685770fc708c3d4ae7ac53c16f657b990af39032219807925e46bcf11478d6b SHA512 050eeb45f7bc8a11bcd7fea0dfabb6137a009cc8f8337aa1c62ca4cd476ff0d66723148a20764a72843a5809f3dd66fe7a607a6098e5da990c90a3d2e15a6f54 AUX 2.5/001-ia64-update-ia64-specific-code-to-use-execution-cont.patch 2501 BLAKE2B 7c166f47ce8264354272c7f74ebee5fbe038b1cf06230c6507f62d823be266959b622a0a61920845dfc38fbe7846c4ccd1cabf8e133f456e94b1da5197c49526 SHA512 72319113329c7c3c74e5bab21b67256327a65fbe01827cd32ea289de769a91b493c5d1eb35a087ed026105a9e5daf8b0bc17374c01ef1a83cb408440d6316706 AUX 2.5/005_no-undefined-ext.patch 486 BLAKE2B 715f952cab863847f420afb020cac6819e4ab4e8f5527bdf550dd51eef37e272e7e89cbda5b6f9f137fdac89dfc5e99d42be8ae5712c255f11a0628cf07dc84d SHA512 6bbded9fce0c091b7cfb170c9dc2b0882b0e8bbf8fe31eaf596f3620853c8c75aa64c2648d5a72a0208a6ab6d711eb080a2d6aa98352933eda3b874bdd39cee8 AUX 2.5/009_no-gems.patch 3454 BLAKE2B f2439a799776c39ba16f1503d573c90ea6d74fc2bad3b3874a961add6b605bb064c683080a4258ed1a0e83bca5cb67c02ba68bceb6acea7613ab7166e16a2f4c SHA512 bef8b2763993755b5b6ccba0b5cbe002fd721405d7c274f421ae3d95fa4d0d99cdf946f5fa9a907cac2c3696b2cc23f2f2e030b3a70eca93081e49b02f25a072 AUX 2.5/010-libressl_2.7.patch 638 BLAKE2B 53f5f5d275e2c5482a608a947a1b3c41e9dcdd1763cc57a075e3abd536567852387506ec0ce2f5f49f5eed2246ca9f860d56637a9f18cd17cd49fff6fc92d340 SHA512 986aff99fd35814c94581cdc169cfc5a5f75c87889db5556941809ecaf878b6af838afe2ee108dd7147ea70be6fe9e47f98cce3c1804af0a34f7c1aab8c13d89 -DIST ruby-2.3.7.tar.xz 11438124 BLAKE2B 4f7e0422291794b254cb80edd2f0841bbc1e85cd62635024b6d43b23b1bcdc512d92b57d8885b253465cc8ef3c6cbcec97a6ef239dc11cc8b252e941d25e0487 SHA512 fd91c8db3d3aa4cc962a62f27b4d1a71f6b5567ab836e6dbfbbb1553eb269d11e12faf9e36af6c489c33b54fd89dab99bfe81a563158b704877f0628d6f5bc5a DIST ruby-2.3.8.tar.xz 11465792 BLAKE2B b9c8ef5c943872e3d1426c30cbd720acc66d17cc7bc926f3294e68f17fbc78edef42f6496295800c3d4efd3ae441730723bfcfbc1111e46239359930622697d9 SHA512 06373050e6c1af9cb6a5863aef878b21c8a45fd0e68414e3d546cb73ec3028207d3acc0a9326428f172b9347a30bbe69a16f9dc0bdb739161d677adb2d888095 DIST ruby-2.4.5.tar.xz 10064712 BLAKE2B 0846125e617b43ea302b4c5309b20503577937865d445a6fee766323a188aa552d3a13740c3d38c7be812b19bffb2474021cb7b368cc144d51ea771552f62769 SHA512 658f676c623109f4c7499615e191c98c3dd72cfcaeeaf121337d0b8a33c5243145edd50ec5e2775f988e3cd19788984f105fa165e3049779066566f67172c1b4 DIST ruby-2.5.3.tar.xz 11453336 BLAKE2B 66c59448a23c22796b43f04a1f84359386b7bee7163da4255426ea75b1c7af0a7a7142991b870a75a72ded56ac49f47c51bc162ebf2be2af0d1b1608b60c02df SHA512 6dcae0e8d0bacdb2cbde636e2030596308b5af53f2eb85d3adccb67b02e6f8f9751e8117d12f8484829fdd9d995f6e327f701d9b433bcf94f1f59d13a1fd7518 -DIST ruby-patches-2.3.7.tar.bz2 3030 BLAKE2B 7c1e80ff0569a03672f53820c665933056b46bcf791c9132cb9f358f72df693749f02da65ca7469c3dd0f652d7dc7bfaa03dccd4eb900562361876023fb65b42 SHA512 54cc3f2bfd1967b8558736e5a5240b886a56b22defca5813f45b1f4dca9af169b4d59d60b327ec8411e824970ac6da1cec53cfc31833403742e9d6941e5a78f1 +DIST ruby-patches-2.3.8-r1.tar.bz2 3030 BLAKE2B 7c1e80ff0569a03672f53820c665933056b46bcf791c9132cb9f358f72df693749f02da65ca7469c3dd0f652d7dc7bfaa03dccd4eb900562361876023fb65b42 SHA512 54cc3f2bfd1967b8558736e5a5240b886a56b22defca5813f45b1f4dca9af169b4d59d60b327ec8411e824970ac6da1cec53cfc31833403742e9d6941e5a78f1 DIST ruby-patches-2.3.8.tar.bz2 3030 BLAKE2B 7c1e80ff0569a03672f53820c665933056b46bcf791c9132cb9f358f72df693749f02da65ca7469c3dd0f652d7dc7bfaa03dccd4eb900562361876023fb65b42 SHA512 54cc3f2bfd1967b8558736e5a5240b886a56b22defca5813f45b1f4dca9af169b4d59d60b327ec8411e824970ac6da1cec53cfc31833403742e9d6941e5a78f1 -EBUILD ruby-2.3.7.ebuild 6872 BLAKE2B d7cf4b0319f63d9485130c17a393671da672e4f6a4227147be161f0f3e941b8f9b2da4b43168018909ac38b002bea7348f8781fa5a7868913e0b88261dbbd874 SHA512 302d8e3feb1d532eab9e9b5e60d258ceec22a44d40c9adba4cc27d5460dc05deb932777163f06e39975756090a448a73af96c801288b0c3912cca4c591a3cd43 +EBUILD ruby-2.3.8-r1.ebuild 6877 BLAKE2B aa01c8cecf39d0ff2f221d4b51a79d258df1a31687bb3b18154ffd4b998fe73e43304339eb3d49ed6b691ac96cb821730c866a180d4199d8659dc53b24a43790 SHA512 03bfc466d6f8890c353056d702c9af7c0dd789606d3f7b3f83b087ab5bdb619fafcf6fd1021e73b5f37b78fa9214b9a473ba2b3619ea7e51a13fe2d35ad7cce0 EBUILD ruby-2.3.8.ebuild 6873 BLAKE2B 2566082717e130c2f982b5b7e0abd8791636de6321b8b27684b1da935138dde506069d2214cbfb7d3961550a2a0063093121f812951538b3fbb21a61586f0940 SHA512 c078fd91363fb0e7650bf3c6764e409be364a029ac1d3389e37b101137f8a6a59ffebc50c81c658de044ae8977bb1808ffa9f19b77524623d944f33097b1d159 -EBUILD ruby-2.4.5.ebuild 6624 BLAKE2B d05822cfaa03ef9c3d161f3996de262256e7c6795d88bb04d3340c329b691b74397e7b0aa3205b6babca7fb1dde2d822a7f7b3230c4eedfaa8f51de62332efed SHA512 c93b16d3291ddc053bb118f8442419366b1ab0f491b8e0dbcb50e909cc28f11f101a9a14b4d91ae8035babe8948df492eacf98f01163b808ff1c5605af4d8e87 -EBUILD ruby-2.5.3.ebuild 6418 BLAKE2B 40d7c916a9d83b0cee36d793c95aae501c7778e4cfe7a83a14f2a54223a4d1984b4fc8fea70712b8e65eabe31beaa98a12040ee4a3ff6f1263d9a3dfa8cca983 SHA512 826075b481abb9656c905a38bf70fbb5067b408afba0bd12f965ae129f3c6bd1f14e307bacd6f922ca212522ee1f016b6d6954a69c5b1054507d41883435a026 +EBUILD ruby-2.4.5-r1.ebuild 6631 BLAKE2B 11b247fb28a2e0eb9d9997829327991b6bb730fde51bbf6e68c2136cefa8c99c3193ebe60cac8dacb37f967af69293b2b18515638ba01a6fde9e4eb2efcd20ce SHA512 0780e2d9c06967e1d6184909b553a90d20341741a5a66ccc3096fc72b6758af6c6d66822618839d9c0fc898424cbbab8f9b4de29109ca9bf01ba103baf88cf21 +EBUILD ruby-2.4.5.ebuild 6622 BLAKE2B 0d590e9943a698ebd1f8a71b77985492988b5b0ff12868c2723117d1d63dcf4947fb7e48d5b7685f591c76db4d4efed542ff64266ced865de721dab6719daeed SHA512 ca1a75ae41fc1dea9a8a774d56743b00fc553ac76a44954637deeb8f73797fd4f694ac37d01fff3754166b9643a30b2305897c8fc1a06f9612f4169fa31ba3cf +EBUILD ruby-2.5.3.ebuild 6419 BLAKE2B 197a536b058b026cd0fa211fe4a391e4deb617d047e4ca200e5674383b94aa3d1dbccc56235303ae7caa8e405939a0e3211e6e4110cb52ae513c824ce969c8b1 SHA512 8b366d49c0e23dc5c1b1554db2238c084e39ac37d89f8a71b6c5e40b8e1025712de118ce622631f93081589c49dbcb543883ed0629d6a0b4925c18bc81b2c26d MISC metadata.xml 824 BLAKE2B e426ed390cdea118f3301d329ce93729095bafb0a04db9a64edfd709251d6f16f91153d56976f99b82d7a9df4a452513d65593732ccbd7f71332870b52f369a7 SHA512 b6f4fab5888fb9605164d7f627edc86514ec2f83d9dd8c74003ccc5a0d9b6a306986930e027e81f09928fc7ac6677a7de58cebf75c31c2ada73e2a506a447453 diff --git a/dev-lang/ruby/files/2.4/012-openssl_1.1.patch b/dev-lang/ruby/files/2.4/012-openssl_1.1.patch new file mode 100644 index 000000000000..edf344bedc8c --- /dev/null +++ b/dev-lang/ruby/files/2.4/012-openssl_1.1.patch @@ -0,0 +1,339 @@ +From 7af808153dd34a980e027a04d4490ae38019b3ed Mon Sep 17 00:00:00 2001 +From: Mark Wright <gienah@gentoo.org> +Date: Sun, 15 Oct 2017 01:24:12 +1100 +Subject: [PATCH] Fix build failure against OpenSSL 1.1 built with + no-deprecated Thanks rhenium for the code review and fixes. + +--- + ext/openssl/openssl_missing.h | 4 +++ + ext/openssl/ossl.c | 23 ++++++--------- + ext/openssl/ossl.h | 5 ++++ + ext/openssl/ossl_cipher.c | 14 ++++----- + ext/openssl/ossl_engine.c | 54 ++++++++++++++++++++++------------- + ext/openssl/ossl_ssl.c | 2 +- + ext/openssl/ossl_x509cert.c | 4 +-- + ext/openssl/ossl_x509crl.c | 4 +-- + 8 files changed, 63 insertions(+), 47 deletions(-) + +diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h +index cc31f6ac..debd25ad 100644 +--- a/ext/openssl/openssl_missing.h ++++ b/ext/openssl/openssl_missing.h +@@ -209,6 +209,10 @@ IMPL_PKEY_GETTER(EC_KEY, ec) + # define X509_get0_notAfter(x) X509_get_notAfter(x) + # define X509_CRL_get0_lastUpdate(x) X509_CRL_get_lastUpdate(x) + # define X509_CRL_get0_nextUpdate(x) X509_CRL_get_nextUpdate(x) ++# define X509_set1_notBefore(x, t) X509_set_notBefore(x, t) ++# define X509_set1_notAfter(x, t) X509_set_notAfter(x, t) ++# define X509_CRL_set1_lastUpdate(x, t) X509_CRL_set_lastUpdate(x, t) ++# define X509_CRL_set1_nextUpdate(x, t) X509_CRL_set_nextUpdate(x, t) + #endif + + #if !defined(HAVE_SSL_SESSION_GET_PROTOCOL_VERSION) +diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c +index 93ecc7d4..245385e7 100644 +--- a/ext/openssl/ossl.c ++++ b/ext/openssl/ossl.c +@@ -1109,25 +1109,14 @@ Init_openssl(void) + /* + * Init all digests, ciphers + */ +- /* CRYPTO_malloc_init(); */ +- /* ENGINE_load_builtin_engines(); */ ++#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000 ++ if (!OPENSSL_init_ssl(0, NULL)) ++ rb_raise(rb_eRuntimeError, "OPENSSL_init_ssl"); ++#else + OpenSSL_add_ssl_algorithms(); + OpenSSL_add_all_algorithms(); + ERR_load_crypto_strings(); + SSL_load_error_strings(); +- +- /* +- * FIXME: +- * On unload do: +- */ +-#if 0 +- CONF_modules_unload(1); +- destroy_ui_method(); +- EVP_cleanup(); +- ENGINE_cleanup(); +- CRYPTO_cleanup_all_ex_data(); +- ERR_remove_state(0); +- ERR_free_strings(); + #endif + + /* +@@ -1149,7 +1138,11 @@ Init_openssl(void) + /* + * Version of OpenSSL the ruby OpenSSL extension is running with + */ ++#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000 ++ rb_define_const(mOSSL, "OPENSSL_LIBRARY_VERSION", rb_str_new2(OpenSSL_version(OPENSSL_VERSION))); ++#else + rb_define_const(mOSSL, "OPENSSL_LIBRARY_VERSION", rb_str_new2(SSLeay_version(SSLEAY_VERSION))); ++#endif + + /* + * Version number of OpenSSL the ruby OpenSSL extension was built with +diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h +index f08889b2..5a15839c 100644 +--- a/ext/openssl/ossl.h ++++ b/ext/openssl/ossl.h +@@ -35,6 +35,11 @@ + #if !defined(OPENSSL_NO_OCSP) + # include <openssl/ocsp.h> + #endif ++#include <openssl/bn.h> ++#include <openssl/rsa.h> ++#include <openssl/dsa.h> ++#include <openssl/evp.h> ++#include <openssl/dh.h> + + /* + * Common Module +diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c +index bfa76c1a..e6179733 100644 +--- a/ext/openssl/ossl_cipher.c ++++ b/ext/openssl/ossl_cipher.c +@@ -508,9 +508,9 @@ ossl_cipher_set_iv(VALUE self, VALUE iv) + StringValue(iv); + GetCipher(self, ctx); + + #if defined(HAVE_AUTHENTICATED_ENCRYPTION) +- if (EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER) ++ if (EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & EVP_CIPH_FLAG_AEAD_CIPHER) + iv_len = (int)(VALUE)EVP_CIPHER_CTX_get_app_data(ctx); + #endif + if (!iv_len) + iv_len = EVP_CIPHER_CTX_iv_length(ctx); +@@ -535,7 +535,7 @@ ossl_cipher_is_authenticated(VALUE self) + + GetCipher(self, ctx); + + #if defined(HAVE_AUTHENTICATED_ENCRYPTION) +- return (EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER) ? Qtrue : Qfalse; ++ return (EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & EVP_CIPH_FLAG_AEAD_CIPHER) ? Qtrue : Qfalse; + #else + return Qfalse; + #endif +@@ -606,7 +606,7 @@ ossl_cipher_get_auth_tag(int argc, VALUE *argv, VALUE self) + + GetCipher(self, ctx); + +- if (!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER)) ++ if (!(EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & EVP_CIPH_FLAG_AEAD_CIPHER)) + ossl_raise(eCipherError, "authentication tag not supported by this cipher"); + + ret = rb_str_new(NULL, tag_len); +@@ -641,7 +641,7 @@ ossl_cipher_set_auth_tag(VALUE self, VALUE vtag) + tag_len = RSTRING_LENINT(vtag); + + GetCipher(self, ctx); +- if (!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER)) ++ if (!(EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & EVP_CIPH_FLAG_AEAD_CIPHER)) + ossl_raise(eCipherError, "authentication tag not supported by this cipher"); + + if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag_len, tag)) +@@ -668,7 +668,7 @@ ossl_cipher_set_auth_tag_len(VALUE self, VALUE vlen) + EVP_CIPHER_CTX *ctx; + + GetCipher(self, ctx); +- if (!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER)) ++ if (!(EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & EVP_CIPH_FLAG_AEAD_CIPHER)) + ossl_raise(eCipherError, "AEAD not supported by this cipher"); + + if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag_len, NULL)) +@@ -695,7 +695,7 @@ ossl_cipher_set_iv_length(VALUE self, VALUE iv_length) + EVP_CIPHER_CTX *ctx; + + GetCipher(self, ctx); +- if (!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER)) ++ if (!(EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & EVP_CIPH_FLAG_AEAD_CIPHER)) + ossl_raise(eCipherError, "cipher does not support AEAD"); + + if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, len, NULL)) +@@ -786,9 +786,9 @@ ossl_cipher_iv_length(VALUE self) + int len = 0; + + GetCipher(self, ctx); + #if defined(HAVE_AUTHENTICATED_ENCRYPTION) +- if (EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER) ++ if (EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & EVP_CIPH_FLAG_AEAD_CIPHER) + len = (int)(VALUE)EVP_CIPHER_CTX_get_app_data(ctx); + #endif + if (!len) + len = EVP_CIPHER_CTX_iv_length(ctx); +diff --git a/ext/openssl/ossl_engine.c b/ext/openssl/ossl_engine.c +index d69b5dca..5ca0d4ca 100644 +--- a/ext/openssl/ossl_engine.c ++++ b/ext/openssl/ossl_engine.c +@@ -46,13 +46,25 @@ VALUE eEngineError; + /* + * Private + */ +-#define OSSL_ENGINE_LOAD_IF_MATCH(x) \ ++#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000 ++#define OSSL_ENGINE_LOAD_IF_MATCH(engine_name, x) \ + do{\ +- if(!strcmp(#x, RSTRING_PTR(name))){\ +- ENGINE_load_##x();\ ++ if(!strcmp(#engine_name, RSTRING_PTR(name))){\ ++ if (OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_##x, NULL))\ ++ return Qtrue;\ ++ else\ ++ ossl_raise(eEngineError, "OPENSSL_init_crypto"); \ ++ }\ ++}while(0) ++#else ++#define OSSL_ENGINE_LOAD_IF_MATCH(engine_name, x) \ ++do{\ ++ if(!strcmp(#engine_name, RSTRING_PTR(name))){\ ++ ENGINE_load_##engine_name();\ + return Qtrue;\ + }\ + }while(0) ++#endif + + static void + ossl_engine_free(void *engine) +@@ -94,55 +106,55 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass) + StringValueCStr(name); + #ifndef OPENSSL_NO_STATIC_ENGINE + #if HAVE_ENGINE_LOAD_DYNAMIC +- OSSL_ENGINE_LOAD_IF_MATCH(dynamic); ++ OSSL_ENGINE_LOAD_IF_MATCH(dynamic, DYNAMIC); + #endif + #if HAVE_ENGINE_LOAD_4758CCA +- OSSL_ENGINE_LOAD_IF_MATCH(4758cca); ++ OSSL_ENGINE_LOAD_IF_MATCH(4758cca, 4758CCA); + #endif + #if HAVE_ENGINE_LOAD_AEP +- OSSL_ENGINE_LOAD_IF_MATCH(aep); ++ OSSL_ENGINE_LOAD_IF_MATCH(aep, AEP); + #endif + #if HAVE_ENGINE_LOAD_ATALLA +- OSSL_ENGINE_LOAD_IF_MATCH(atalla); ++ OSSL_ENGINE_LOAD_IF_MATCH(atalla, ATALLA); + #endif + #if HAVE_ENGINE_LOAD_CHIL +- OSSL_ENGINE_LOAD_IF_MATCH(chil); ++ OSSL_ENGINE_LOAD_IF_MATCH(chil, CHIL); + #endif + #if HAVE_ENGINE_LOAD_CSWIFT +- OSSL_ENGINE_LOAD_IF_MATCH(cswift); ++ OSSL_ENGINE_LOAD_IF_MATCH(cswift, CSWIFT); + #endif + #if HAVE_ENGINE_LOAD_NURON +- OSSL_ENGINE_LOAD_IF_MATCH(nuron); ++ OSSL_ENGINE_LOAD_IF_MATCH(nuron, NURON); + #endif + #if HAVE_ENGINE_LOAD_SUREWARE +- OSSL_ENGINE_LOAD_IF_MATCH(sureware); ++ OSSL_ENGINE_LOAD_IF_MATCH(sureware, SUREWARE); + #endif + #if HAVE_ENGINE_LOAD_UBSEC +- OSSL_ENGINE_LOAD_IF_MATCH(ubsec); ++ OSSL_ENGINE_LOAD_IF_MATCH(ubsec, UBSEC); + #endif + #if HAVE_ENGINE_LOAD_PADLOCK +- OSSL_ENGINE_LOAD_IF_MATCH(padlock); ++ OSSL_ENGINE_LOAD_IF_MATCH(padlock, PADLOCK); + #endif + #if HAVE_ENGINE_LOAD_CAPI +- OSSL_ENGINE_LOAD_IF_MATCH(capi); ++ OSSL_ENGINE_LOAD_IF_MATCH(capi, CAPI); + #endif + #if HAVE_ENGINE_LOAD_GMP +- OSSL_ENGINE_LOAD_IF_MATCH(gmp); ++ OSSL_ENGINE_LOAD_IF_MATCH(gmp, GMP); + #endif + #if HAVE_ENGINE_LOAD_GOST +- OSSL_ENGINE_LOAD_IF_MATCH(gost); ++ OSSL_ENGINE_LOAD_IF_MATCH(gost, GOST); + #endif + #if HAVE_ENGINE_LOAD_CRYPTODEV +- OSSL_ENGINE_LOAD_IF_MATCH(cryptodev); ++ OSSL_ENGINE_LOAD_IF_MATCH(cryptodev, CRYPTODEV); + #endif + #if HAVE_ENGINE_LOAD_AESNI +- OSSL_ENGINE_LOAD_IF_MATCH(aesni); ++ OSSL_ENGINE_LOAD_IF_MATCH(aesni, AESNI); + #endif + #endif + #ifdef HAVE_ENGINE_LOAD_OPENBSD_DEV_CRYPTO +- OSSL_ENGINE_LOAD_IF_MATCH(openbsd_dev_crypto); ++ OSSL_ENGINE_LOAD_IF_MATCH(openbsd_dev_crypto, OPENBSD_DEV_CRYPTO); + #endif +- OSSL_ENGINE_LOAD_IF_MATCH(openssl); ++ OSSL_ENGINE_LOAD_IF_MATCH(openssl, OPENSSL); + rb_warning("no such builtin loader for `%"PRIsVALUE"'", name); + return Qnil; + #endif /* HAVE_ENGINE_LOAD_BUILTIN_ENGINES */ +@@ -160,7 +172,9 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass) + static VALUE + ossl_engine_s_cleanup(VALUE self) + { ++#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000 + ENGINE_cleanup(); ++#endif + return Qnil; + } + +diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c +index 8e3c0c42..d32a299c 100644 +--- a/ext/openssl/ossl_ssl.c ++++ b/ext/openssl/ossl_ssl.c +@@ -379,7 +379,7 @@ ossl_call_session_get_cb(VALUE ary) + + /* this method is currently only called for servers (in OpenSSL <= 0.9.8e) */ + static SSL_SESSION * +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) + ossl_sslctx_session_get_cb(SSL *ssl, const unsigned char *buf, int len, int *copy) + #else + ossl_sslctx_session_get_cb(SSL *ssl, unsigned char *buf, int len, int *copy) +diff --git a/ext/openssl/ossl_x509cert.c b/ext/openssl/ossl_x509cert.c +index cf82a53d..8d16b9b7 100644 +--- a/ext/openssl/ossl_x509cert.c ++++ b/ext/openssl/ossl_x509cert.c +@@ -440,7 +440,7 @@ ossl_x509_set_not_before(VALUE self, VALUE time) + + GetX509(self, x509); + asn1time = ossl_x509_time_adjust(NULL, time); +- if (!X509_set_notBefore(x509, asn1time)) { ++ if (!X509_set1_notBefore(x509, asn1time)) { + ASN1_TIME_free(asn1time); + ossl_raise(eX509CertError, "X509_set_notBefore"); + } +@@ -479,7 +479,7 @@ ossl_x509_set_not_after(VALUE self, VALUE time) + + GetX509(self, x509); + asn1time = ossl_x509_time_adjust(NULL, time); +- if (!X509_set_notAfter(x509, asn1time)) { ++ if (!X509_set1_notAfter(x509, asn1time)) { + ASN1_TIME_free(asn1time); + ossl_raise(eX509CertError, "X509_set_notAfter"); + } +diff --git a/ext/openssl/ossl_x509crl.c b/ext/openssl/ossl_x509crl.c +index 5ecd7ea0..45cf7fb4 100644 +--- a/ext/openssl/ossl_x509crl.c ++++ b/ext/openssl/ossl_x509crl.c +@@ -226,7 +226,7 @@ ossl_x509crl_set_last_update(VALUE self, VALUE time) + + GetX509CRL(self, crl); + asn1time = ossl_x509_time_adjust(NULL, time); +- if (!X509_CRL_set_lastUpdate(crl, asn1time)) { ++ if (!X509_CRL_set1_lastUpdate(crl, asn1time)) { + ASN1_TIME_free(asn1time); + ossl_raise(eX509CRLError, "X509_CRL_set_lastUpdate"); + } +@@ -257,7 +257,7 @@ ossl_x509crl_set_next_update(VALUE self, VALUE time) + + GetX509CRL(self, crl); + asn1time = ossl_x509_time_adjust(NULL, time); +- if (!X509_CRL_set_nextUpdate(crl, asn1time)) { ++ if (!X509_CRL_set1_nextUpdate(crl, asn1time)) { + ASN1_TIME_free(asn1time); + ossl_raise(eX509CRLError, "X509_CRL_set_nextUpdate"); + } diff --git a/dev-lang/ruby/ruby-2.3.7.ebuild b/dev-lang/ruby/ruby-2.3.8-r1.ebuild index a65f51e5afc9..b31aace2a5e1 100644 --- a/dev-lang/ruby/ruby-2.3.7.ebuild +++ b/dev-lang/ruby/ruby-2.3.8-r1.ebuild @@ -38,7 +38,7 @@ RDEPEND=" gdbm? ( sys-libs/gdbm:= ) jemalloc? ( dev-libs/jemalloc ) ssl? ( - !libressl? ( dev-libs/openssl:0= ) + !libressl? ( <dev-libs/openssl-1.1:0= ) libressl? ( dev-libs/libressl ) ) socks5? ( >=net-proxy/dante-1.1.13 ) diff --git a/dev-lang/ruby/ruby-2.4.5-r1.ebuild b/dev-lang/ruby/ruby-2.4.5-r1.ebuild new file mode 100644 index 000000000000..1555bd43a75f --- /dev/null +++ b/dev-lang/ruby/ruby-2.4.5-r1.ebuild @@ -0,0 +1,229 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic multilib + +MY_P="${PN}-$(ver_cut 1-3)" +S=${WORKDIR}/${MY_P} + +SLOT=$(ver_cut 1-2) +MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) +RUBYVERSION=${SLOT}.0 + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" +SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz" + +LICENSE="|| ( Ruby-BSD BSD-2 )" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl ) + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + virtual/libffi:= + sys-libs/zlib + >=app-eselect/eselect-ruby-20161226 + !<dev-ruby/rdoc-3.9.4 + !<dev-ruby/rubygems-1.8.10-r1" + +DEPEND="${RDEPEND}" + +BUNDLED_GEMS=" + >=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24] + >=dev-ruby/minitest-5.10.1[ruby_targets_ruby24] + >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24] + >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24] + >=dev-ruby/rake-12.0.0[ruby_targets_ruby24] + >=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24] + >=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby24] + >=dev-ruby/json-2.0.2[ruby_targets_ruby24] + rdoc? ( >=dev-ruby/rdoc-5.1.0[ruby_targets_ruby24] ) + xemacs? ( app-xemacs/ruby-modes )" + +src_prepare() { + eapply "${FILESDIR}"/${SLOT}/{002,005,009,012}*.patch + + einfo "Unbundling gems..." + cd "$S" + # Remove bundled gems that we will install via PDEPEND, bug + # 539700. Use explicit version numbers to ensure rm fails when they + # change so we can update dependencies accordingly. + rm -f gems/{did_you_mean-1.1.0,minitest-5.10.1,net-telnet-0.1.1,power_assert-0.4.1,rake-12.0.0,test-unit-3.2.3,xmlrpc-0.2.1}.gem || die + + einfo "Removing bundled libraries..." + rm -fr ext/fiddle/libffi-3.2.1 || die + + # Fix a hardcoded lib path in configure script + sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ + configure.in || die "sed failed" + + eapply_user + + eautoreconf +} + +src_configure() { + local modules= myconf= + + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + # SuperH needs this + use sh && append-flags -mieee + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + # ipv6 hack, bug 168939. Needs --enable-ipv6. + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" + + # Determine which modules *not* to build depending in the USE flags. + if ! use berkdb ; then + modules="${modules},dbm" + fi + if ! use gdbm ; then + modules="${modules},gdbm" + fi + if ! use ssl ; then + modules="${modules},openssl" + fi + if ! use tk ; then + modules="${modules},tk" + fi + + # Provide an empty LIBPATHENV because we disable rpath but we do not + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget + # #564272 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --docdir=${EPREFIX}/usr/share/doc/${P} \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable socks5 socks) \ + $(use_enable doc install-doc) \ + --enable-ipv6 \ + $(use_enable static-libs static) \ + $(use_enable static-libs install-static-library) \ + $(use_with static-libs static-linked-ext) \ + $(use_enable debug) \ + ${myconf} \ + --enable-option-checking=no \ + || die "econf failed" +} + +src_compile() { + emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_test() { + emake -j1 V=1 test || die "make test failed" + + elog "Ruby's make test has been run. Ruby also ships with a make check" + elog "that cannot be run until after ruby has been installed." + elog + if use rubytests; then + elog "You have enabled rubytests, so they will be installed to" + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" + elog "than root, and you must place them into a writeable directory." + elog "Then call: " + elog + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" + else + elog "Enable the rubytests USE flag to install the make check tests" + fi +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + rm -rf ext/json || die + + # Ruby is involved in the install process, we don't want interference here. + unset RUBYOPT + + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + export LD_LIBRARY_PATH RUBYLIB + + emake V=1 DESTDIR="${D}" install || die "make install failed" + + # Remove installed rubygems and rdoc copy + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" + rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" + + if use doc; then + make DESTDIR="${D}" install-doc || die "make install-doc failed" + fi + + if use examples; then + insinto /usr/share/doc/${PF} + doins -r sample + fi + + dodoc ChangeLog NEWS doc/NEWS* README* || die + + if use rubytests; then + pushd test + insinto /usr/share/${PN}-${SLOT}/test + doins -r . + popd + fi +} + +pkg_postinst() { + if [[ ! -n $(readlink "${EROOT}"usr/bin/ruby) ]] ; then + eselect ruby set ruby${MY_SUFFIX} + fi + + elog + elog "To switch between available Ruby profiles, execute as root:" + elog "\teselect ruby set ruby(23|24|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/ruby/ruby-2.4.5.ebuild b/dev-lang/ruby/ruby-2.4.5.ebuild index d50cb6f5d339..20cb8ae1e078 100644 --- a/dev-lang/ruby/ruby-2.4.5.ebuild +++ b/dev-lang/ruby/ruby-2.4.5.ebuild @@ -17,8 +17,8 @@ HOMEPAGE="https://www.ruby-lang.org/" SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz" LICENSE="|| ( Ruby-BSD BSD-2 )" -KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl static-libs tk xemacs" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs" RDEPEND=" berkdb? ( sys-libs/db:= ) diff --git a/dev-lang/ruby/ruby-2.5.3.ebuild b/dev-lang/ruby/ruby-2.5.3.ebuild index b837e6034f7a..227ceca8820c 100644 --- a/dev-lang/ruby/ruby-2.5.3.ebuild +++ b/dev-lang/ruby/ruby-2.5.3.ebuild @@ -18,7 +18,7 @@ SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz" LICENSE="|| ( Ruby-BSD BSD-2 )" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl static-libs tk xemacs" +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs" RDEPEND=" berkdb? ( sys-libs/db:= ) |