commit: 792a99abf12ba28bcc3c572e24586b32ad6fc363 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Dec 10 20:19:12 2020 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Dec 10 20:19:24 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=792a99ab
dev-lang/ruby: moved to ::gentoo Signed-off-by: Sam James <sam <AT> gentoo.org> dev-lang/ruby/Manifest | 5 - dev-lang/ruby/files/2.4/002_windows_crossdev.patch | 64 ---- dev-lang/ruby/files/2.4/005_no-undefined-ext.patch | 11 - dev-lang/ruby/files/2.4/009_no-gems.patch | 112 ------- dev-lang/ruby/files/2.4/010-libressl_2.7.patch | 15 - dev-lang/ruby/files/2.4/011-gcc8.patch | 64 ---- dev-lang/ruby/files/2.4/012-openssl_1.1.patch | 339 --------------------- ...-ia64-specific-code-to-use-execution-cont.patch | 67 ---- dev-lang/ruby/files/2.5/005_no-undefined-ext.patch | 11 - dev-lang/ruby/files/2.5/009_no-gems.patch | 95 ------ dev-lang/ruby/files/2.5/010-libressl_2.7.patch | 15 - dev-lang/ruby/files/2.5/011-no-gems.patch | 85 ------ dev-lang/ruby/files/2.6/005_no-undefined-ext.patch | 11 - dev-lang/ruby/files/2.6/009_no-gems.patch | 39 --- .../ruby/files/2.6/010-default-gem-location.patch | 20 -- .../ruby/files/2.7/010-default-gem-location.patch | 20 -- dev-lang/ruby/files/auto_gem.rb | 10 - dev-lang/ruby/files/ruby-1.8.6-memory-leak.diff | 60 ---- dev-lang/ruby/files/ruby-1.8.6-uclibc-udp.patch | 21 -- .../ruby/files/ruby-1.8.6_p36-only-ncurses.patch | 10 - dev-lang/ruby/files/ruby-1.8.6_p36-prefix.patch | 11 - .../files/ruby-1.8.7-darwin9-getsetcontext.patch | 33 -- .../ruby-1.8.7-glibc-2.14-fclose-behaviour.patch | 38 --- dev-lang/ruby/files/ruby-1.8.7_p160-solaris.patch | 15 - .../files/ruby-1.8.7_p249-pthread-linking.patch | 27 -- .../ruby/files/ruby-1.8.7_p370-mint-sha2.patch | 123 -------- dev-lang/ruby/files/ruby-1.8.7_p370-mint.patch | 14 - dev-lang/ruby/files/ruby-1.9.1-only-ncurses.patch | 11 - dev-lang/ruby/files/ruby-1.9.1-prefix.patch | 22 -- dev-lang/ruby/files/ruby-mkconfig.patch | 14 - .../ruby/files/ruby18-mkmf-parallel-install.patch | 14 - dev-lang/ruby/metadata.xml | 13 - dev-lang/ruby/ruby-2.4.10.ebuild | 242 --------------- dev-lang/ruby/ruby-2.5.8-r1.ebuild | 236 -------------- dev-lang/ruby/ruby-2.6.6-r2.ebuild | 248 --------------- dev-lang/ruby/ruby-2.7.1-r2.ebuild | 251 --------------- dev-lang/ruby/ruby-2.7.2.ebuild | 251 --------------- 37 files changed, 2637 deletions(-) diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest deleted file mode 100644 index f031e77a67..0000000000 --- a/dev-lang/ruby/Manifest +++ /dev/null @@ -1,5 +0,0 @@ -DIST ruby-2.4.10.tar.xz 10100664 BLAKE2B 7301f34b94bb6d88c0d049eed4220ddb290c877b130e90c822226bc454b3e72c90ae151db0e828068c8fe02b21cd41c8f3cd43d4e95ab688d2cd6f3f3840ea9d SHA512 11c7a9ea1353f752763b189815ac34674cc8ebf7141517838b7f040823e892780d94ec3091c1f5d1415f9bc1b838b7f6f9de13a706df7bef80ce3b146a7d6660 -DIST ruby-2.5.8.tar.xz 11298404 BLAKE2B 3256c0448e72b63c0bd89f89a27fa9c09c8feed54d42cd79899b7d5cfe9dbc29ca708d12c630b3f52ff85b0c6a4011ae7ff0483d64b2fd445700a72a91028035 SHA512 2886be764a454425c5beef2777c64a70ee0d048b07896b327633d904f5077fea4299526689f9e2ac4dcd2fc4811cf9a6c8ce75367ed35d29dfe1a54222872e0d -DIST ruby-2.6.6.tar.xz 11567284 BLAKE2B 45e910dd9b128c46bff3003834c4fdcbbc2e2e4d3e44f298ff4356a285de2c375d6b6021a3aa28d89336b32a1655fa4a7c086d07f4a0f6bcd578a11dd4a894da SHA512 86caf93dbf61d03781767ab5375a7edf4761f13ba08ccfefe16c0a7550499237e7390c2f72a95d42670d4fe76b2401b4218936187c62ec1572799e9e04c50d62 -DIST ruby-2.7.1.tar.xz 12003684 BLAKE2B 90a35c3e246cfe982a146be29a3d121d6e2c251ed96703dbc46b98c21e0e43e5445132e6119e584ae35f7193f063ff1b14822f947a4e07037c37fbba5e4038da SHA512 79f98b1ea98e0b10ec79da1883e8fc84d48ffe5c09ae945cbebde94365e35a589d919aac965f74d70ca7e21370ecee631ac5a8f9c4eac61d62f5aa629f27bf31 -DIST ruby-2.7.2.tar.xz 12037052 BLAKE2B a4ad22295b3fed4e8064fc6e77adb8642d1fa7ae1f4ef912d7bde19c735cb25b1a3e3aefba53dad944046d844d608bcefba61c314cf1e52747f50d7d91f4c436 SHA512 7972278b096aa768c7adf2befd26003e18781a29ca317640317d30d93d6e963ded197724c8e2f1dfe1e838c5647176d414a74732a62e931fb50d6f2e0f777349 diff --git a/dev-lang/ruby/files/2.4/002_windows_crossdev.patch b/dev-lang/ruby/files/2.4/002_windows_crossdev.patch deleted file mode 100644 index 7e290d434f..0000000000 --- a/dev-lang/ruby/files/2.4/002_windows_crossdev.patch +++ /dev/null @@ -1,64 +0,0 @@ -Bug: https://bugs.gentoo.org/show_bug.cgi?id=618878 - -A few patches to make crossdev for mingw-w64 play nice with ruby's ebuilds. -Basic gist is that without the following patch to configure.in ruby-2.4.1 -hardcodes 240 into the shared, static, and import library names, which when -built with the current ruby ebuilds results in names like libx64-msvcrt-ruby24240.dll and so on. The patch is in ruby-trunk[1], but may take a while -to hit the tarballs that gentoo uses. - -Index: configure.in -=================================================================== ---- a/configure.in (revision 57824) -+++ b/configure.in (revision 57825) -@@ -3825,7 +3825,23 @@ - - AC_ARG_WITH(soname, - AS_HELP_STRING([--with-soname=SONAME], [base name of shared library]), -- [RUBY_SO_NAME=$withval], [RUBY_SO_NAME='$(RUBY_BASE_NAME)']) -+ [RUBY_SO_NAME=$withval], -+ [ -+ AS_CASE(["$target_os"], -+ [darwin*], [ -+ RUBY_SO_NAME='$(RUBY_BASE_NAME).$(RUBY_PROGRAM_VERSION)' -+ ], -+ [cygwin*], [ -+ RUBY_SO_NAME='$(RUBY_BASE_NAME)$(MAJOR)$(MINOR)0' -+ ], -+ [mingw*], [ -+ RUBY_SO_NAME="${rb_cv_msvcrt}"'-$(RUBY_BASE_NAME)$(MAJOR)$(MINOR)0' -+ AS_IF([test x"${target_cpu}" != xi386], [ -+ RUBY_SO_NAME="${target_cpu}-${RUBY_SO_NAME}" -+ ]) -+ ], -+ [RUBY_SO_NAME='$(RUBY_BASE_NAME)']) -+ ]) - - LIBRUBY_LDSHARED=$LDSHARED - LIBRUBY_DLDFLAGS=$DLDFLAGS -@@ -3925,7 +3941,6 @@ - SOLIBS='-lm -lc' - ], - [darwin*], [ -- RUBY_SO_NAME="$RUBY_SO_NAME"'.$(RUBY_PROGRAM_VERSION)' - LIBRUBY_LDSHARED='$(CC) -dynamiclib' - if test "$load_relative" = yes; then - libprefix="@executable_path/../${libdir_basename}" -@@ -4157,7 +4172,6 @@ - fi - ], - [cygwin*|mingw*], [ -- RUBY_SO_NAME="${RUBY_SO_NAME}"'$(MAJOR)$(MINOR)0' - LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)' - AS_CASE(["$target_os"], - [cygwin*], [ -@@ -4167,10 +4181,6 @@ - fi - ], - [mingw*], [ -- RUBY_SO_NAME="${rb_cv_msvcrt}-${RUBY_SO_NAME}" -- if test x"${target_cpu}" != xi386; then -- RUBY_SO_NAME="${target_cpu}-${RUBY_SO_NAME}" -- fi - if test x"$enable_shared" = xyes; then - LIBRUBY_SO='$(RUBY_SO_NAME)'.dll - LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)' diff --git a/dev-lang/ruby/files/2.4/005_no-undefined-ext.patch b/dev-lang/ruby/files/2.4/005_no-undefined-ext.patch deleted file mode 100644 index f279932401..0000000000 --- a/dev-lang/ruby/files/2.4/005_no-undefined-ext.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ruby-1.9.3-preview1.orig/configure.in -+++ ruby-1.9.3-preview1/configure.in -@@ -2038,7 +2038,7 @@ if test "$with_dln_a_out" != yes; then - [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [ - : ${LDSHARED='$(CC) -shared'} - if test "$rb_cv_binary_elf" = yes; then -- LDFLAGS="$LDFLAGS -Wl,-export-dynamic" -+ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined" - fi - rb_cv_dlopen=yes], - [interix*], [ : ${LDSHARED='$(CC) -shared'} diff --git a/dev-lang/ruby/files/2.4/009_no-gems.patch b/dev-lang/ruby/files/2.4/009_no-gems.patch deleted file mode 100644 index 6e4e2643d4..0000000000 --- a/dev-lang/ruby/files/2.4/009_no-gems.patch +++ /dev/null @@ -1,112 +0,0 @@ ---- a/tool/rbinstall.rb.~1~ 2016-10-17 09:17:07.000000000 +0200 -+++ b/tool/rbinstall.rb 2016-12-25 08:20:07.873491045 +0100 -@@ -695,107 +695,11 @@ - # :startdoc: - - install?(:ext, :comm, :gem) do -- gem_dir = Gem.default_dir -- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) -- prepare "default gems", gem_dir, directories -- -- spec_dir = File.join(gem_dir, directories.grep(/^spec/)[0]) -- default_spec_dir = "#{spec_dir}/default" -- makedirs(default_spec_dir) -- -- gems = Dir.glob(srcdir+"/{lib,ext}/**/*.gemspec").map {|src| -- spec = Gem::Specification.load(src) || raise("invalid spec in #{src}") -- file_collector = RbInstall::Specs::FileCollector.new(File.dirname(src)) -- files = file_collector.collect -- next if files.empty? -- spec.files = files -- spec -- } -- gems.compact.sort_by(&:name).each do |gemspec| -- full_name = "#{gemspec.name}-#{gemspec.version}" -- -- puts "#{" "*30}#{gemspec.name} #{gemspec.version}" -- gemspec_path = File.join(default_spec_dir, "#{full_name}.gemspec") -- open_for_install(gemspec_path, $data_mode) do -- gemspec.to_ruby -- end -- -- unless gemspec.executables.empty? then -- bin_dir = File.join(gem_dir, 'gems', full_name, gemspec.bindir) -- makedirs(bin_dir) -- -- execs = gemspec.executables.map {|exec| File.join(srcdir, 'bin', exec)} -- install(execs, bin_dir, :mode => $script_mode) -- end -- end -+ # gems are unbundled in Gentoo - end - - install?(:ext, :comm, :gem) do -- gem_dir = Gem.default_dir -- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) -- prepare "bundle gems", gem_dir, directories -- install_dir = with_destdir(gem_dir) -- installed_gems = {} -- options = { -- :install_dir => install_dir, -- :bin_dir => with_destdir(bindir), -- :domain => :local, -- :ignore_dependencies => true, -- :dir_mode => $dir_mode, -- :data_mode => $data_mode, -- :prog_mode => $prog_mode, -- :wrappers => true, -- :format_executable => true, -- } -- gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}" -- extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir -- Gem::Specification.each_gemspec([srcdir+'/gems/*']) do |path| -- dir = File.dirname(path) -- spec = Dir.chdir(dir) { -- Gem::Specification.load(File.basename(path)) -- } -- next unless spec.platform == Gem::Platform::RUBY -- next unless spec.full_name == path[srcdir.size..-1][/\A\/gems\/([^\/]+)/, 1] -- spec.extension_dir = "#{extensions_dir}/#{spec.full_name}" -- if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}") -- spec.extensions[0] ||= "-" -- end -- ins = RbInstall::UnpackedInstaller.new(spec, options) -- puts "#{" "*30}#{spec.name} #{spec.version}" -- ins.install -- File.chmod($data_mode, File.join(install_dir, "specifications", "#{spec.full_name}.gemspec")) -- unless spec.extensions.empty? -- install_recursive(ext, spec.extension_dir) -- end -- installed_gems[spec.full_name] = true -- end -- installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| installed_gems.key?(File.basename(gem, '.gem'))} -- unless installed_gems.empty? -- install installed_gems, gem_dir+"/cache" -- end -- next if gems.empty? -- if defined?(Zlib) -- Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name))) -- silent = Gem::SilentUI.new -- gems.each do |gem| -- inst = Gem::Installer.new(gem, options) -- inst.spec.extension_dir = with_destdir(inst.spec.extension_dir) -- begin -- Gem::DefaultUserInteraction.use_ui(silent) {inst.install} -- rescue Gem::InstallError => e -- next -- end -- gemname = File.basename(gem) -- puts "#{" "*30}#{gemname}" -- end -- # fix directory permissions -- # TODO: Gem.install should accept :dir_mode option or something -- File.chmod($dir_mode, *Dir.glob(install_dir+"/**/")) -- # fix .gemspec permissions -- File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec")) -- else -- puts "skip installing bundle gems because of lacking zlib" -- end -+ # gems are unbundled in Gentoo - end - - parse_args() diff --git a/dev-lang/ruby/files/2.4/010-libressl_2.7.patch b/dev-lang/ruby/files/2.4/010-libressl_2.7.patch deleted file mode 100644 index 2e25ab0958..0000000000 --- a/dev-lang/ruby/files/2.4/010-libressl_2.7.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/ext/openssl/extconf.rb.orig 2017-09-08 14:38:12 UTC -+++ b/ext/openssl/extconf.rb -@@ -157,8 +157,11 @@ OpenSSL.check_func_or_macro("SSL_get_ser - have_func("SSL_is_server") - - # added in 1.1.0 -+if !have_struct_member("SSL", "ctx", "openssl/ssl.h") || -+ try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x2070000fL", "openssl/opensslv.h") -+ $defs.push("-DHAVE_OPAQUE_OPENSSL") -+end - have_func("CRYPTO_lock") || $defs.push("-DHAVE_OPENSSL_110_THREADING_API") --have_struct_member("SSL", "ctx", "openssl/ssl.h") || $defs.push("-DHAVE_OPAQUE_OPENSSL") - have_func("BN_GENCB_new") - have_func("BN_GENCB_free") - have_func("BN_GENCB_get_arg") diff --git a/dev-lang/ruby/files/2.4/011-gcc8.patch b/dev-lang/ruby/files/2.4/011-gcc8.patch deleted file mode 100644 index cb2443631d..0000000000 --- a/dev-lang/ruby/files/2.4/011-gcc8.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 027b576b31cd12bad575b3a39476726273f58c41 Mon Sep 17 00:00:00 2001 -From: naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> -Date: Mon, 18 Dec 2017 09:03:59 +0000 -Subject: [PATCH] suppress warning: 'const' attribute on function returning - 'void' - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - include/ruby/intern.h | 4 ++-- - include/ruby/ruby.h | 2 +- - internal.h | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/include/ruby/intern.h b/include/ruby/intern.h -index 5684b3230a67..a711b861159f 100644 ---- a/include/ruby/intern.h -+++ b/include/ruby/intern.h -@@ -249,9 +249,9 @@ PRINTF_ARGS(NORETURN(void rb_name_error_str(VALUE, const char*, ...)), 2, 3); - NORETURN(void rb_invalid_str(const char*, const char*)); - NORETURN(void rb_error_frozen(const char*)); - NORETURN(void rb_error_frozen_object(VALUE)); --CONSTFUNC(void rb_error_untrusted(VALUE)); -+void rb_error_untrusted(VALUE); - void rb_check_frozen(VALUE); --CONSTFUNC(void rb_check_trusted(VALUE)); -+void rb_check_trusted(VALUE); - #define rb_check_frozen_internal(obj) do { \ - VALUE frozen_obj = (obj); \ - if (OBJ_FROZEN(frozen_obj)) { \ -diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h -index 9c7d2fb68439..3210103c648a 100644 ---- a/include/ruby/ruby.h -+++ b/include/ruby/ruby.h -@@ -628,7 +628,7 @@ int ruby_safe_level_2_warning(void) __attribute__((const,warning("$SAFE=2 to 4 a - # define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level, error)) - #endif - void rb_set_safe_level_force(int); --CONSTFUNC(void rb_secure_update(VALUE)); -+void rb_secure_update(VALUE); - NORETURN(void rb_insecure_operation(void)); - - VALUE rb_errinfo(void); -diff --git a/internal.h b/internal.h -index d0257a8d8ba0..4ccf3218c6ca 100644 ---- a/internal.h -+++ b/internal.h -@@ -1110,7 +1110,7 @@ VALUE rb_invcmp(VALUE, VALUE); - struct rb_block; - int rb_dvar_defined(ID, const struct rb_block *); - int rb_local_defined(ID, const struct rb_block *); --CONSTFUNC(const char * rb_insns_name(int i)); -+const char * rb_insns_name(int i); - VALUE rb_insns_name_array(void); - - /* complex.c */ -@@ -1136,7 +1136,7 @@ void Init_ext(void); - - /* encoding.c */ - ID rb_id_encoding(void); --CONSTFUNC(void rb_gc_mark_encodings(void)); -+void rb_gc_mark_encodings(void); - rb_encoding *rb_enc_get_from_index(int index); - rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2); - int rb_encdb_replicate(const char *alias, const char *orig); 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 deleted file mode 100644 index edf344bedc..0000000000 --- a/dev-lang/ruby/files/2.4/012-openssl_1.1.patch +++ /dev/null @@ -1,339 +0,0 @@ -From 7af808153dd34a980e027a04d4490ae38019b3ed Mon Sep 17 00:00:00 2001 -From: Mark Wright <[email protected]> -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/files/2.5/001-ia64-update-ia64-specific-code-to-use-execution-cont.patch b/dev-lang/ruby/files/2.5/001-ia64-update-ia64-specific-code-to-use-execution-cont.patch deleted file mode 100644 index 2ade8b8d42..0000000000 --- a/dev-lang/ruby/files/2.5/001-ia64-update-ia64-specific-code-to-use-execution-cont.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 5af43b1ec2674e9f86090790bc61abdb96be14ff Mon Sep 17 00:00:00 2001 -From: hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> -Date: Tue, 30 Jan 2018 05:43:42 +0000 -Subject: [PATCH] ia64: update ia64-specific code to use execution context - -This change follows commit 837fd5e494731d7d44786f29e7d6e8c27029806f -in '#ifdef __ia64' branches. - -Noticed as a build failure by John Paul Adrian Glaubitz: - -``` - cont.c:502:50: error: 'rb_thread_t {aka struct rb_thread_struct}' - has no member named 'machine' - size = cont->machine.register_stack_size = - th->machine.register_stack_end - th->machine.register_stack_start; - ^~ -``` - -The change is trivial: update 'th->machine' usage to 'th->ec->machine'. -Signed-off-by: Sergei Trofimovich <[email protected]> - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - cont.c | 6 +++--- - thread.c | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/cont.c b/cont.c -index f48fd2e52b..93a64f8fe6 100644 ---- a/cont.c -+++ b/cont.c -@@ -475,7 +475,7 @@ cont_save_machine_stack(rb_thread_t *th, rb_context_t *cont) - - SET_MACHINE_STACK_END(&th->ec->machine.stack_end); - #ifdef __ia64 -- th->machine.register_stack_end = rb_ia64_bsp(); -+ th->ec->machine.register_stack_end = rb_ia64_bsp(); - #endif - - if (th->ec->machine.stack_start > th->ec->machine.stack_end) { -@@ -499,8 +499,8 @@ cont_save_machine_stack(rb_thread_t *th, rb_context_t *cont) - - #ifdef __ia64 - rb_ia64_flushrs(); -- size = cont->machine.register_stack_size = th->machine.register_stack_end - th->machine.register_stack_start; -- cont->machine.register_stack_src = th->machine.register_stack_start; -+ size = cont->machine.register_stack_size = th->ec->machine.register_stack_end - th->ec->machine.register_stack_start; -+ cont->machine.register_stack_src = th->ec->machine.register_stack_start; - if (cont->machine.register_stack) { - REALLOC_N(cont->machine.register_stack, VALUE, size); - } -diff --git a/thread.c b/thread.c -index acb53354fd..23957eba09 100644 ---- a/thread.c -+++ b/thread.c -@@ -133,7 +133,7 @@ static inline void blocking_region_end(rb_thread_t *th, struct rb_blocking_regio - - #ifdef __ia64 - #define RB_GC_SAVE_MACHINE_REGISTER_STACK(th) \ -- do{(th)->machine.register_stack_end = rb_ia64_bsp();}while(0) -+ do{(th)->ec->machine.register_stack_end = rb_ia64_bsp();}while(0) - #else - #define RB_GC_SAVE_MACHINE_REGISTER_STACK(th) - #endif --- -2.16.1 - diff --git a/dev-lang/ruby/files/2.5/005_no-undefined-ext.patch b/dev-lang/ruby/files/2.5/005_no-undefined-ext.patch deleted file mode 100644 index 1f0fdda08d..0000000000 --- a/dev-lang/ruby/files/2.5/005_no-undefined-ext.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac.~1~ 2017-12-15 10:43:40.000000000 +0100 -+++ b/configure.ac 2017-12-25 11:02:19.099076831 +0100 -@@ -3233,7 +3233,7 @@ - [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku*], [ - : ${LDSHARED='$(CC) -shared'} - AS_IF([test "$rb_cv_binary_elf" = yes], [ -- LDFLAGS="$LDFLAGS -Wl,-export-dynamic" -+ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined" - ]) - rb_cv_dlopen=yes], - [interix*], [ : ${LDSHARED='$(CC) -shared'} diff --git a/dev-lang/ruby/files/2.5/009_no-gems.patch b/dev-lang/ruby/files/2.5/009_no-gems.patch deleted file mode 100644 index e12429a432..0000000000 --- a/dev-lang/ruby/files/2.5/009_no-gems.patch +++ /dev/null @@ -1,95 +0,0 @@ ---- a/tool/rbinstall.rb.~1~ 2017-10-30 06:45:20.000000000 +0100 -+++ b/tool/rbinstall.rb 2017-12-25 11:06:53.340432435 +0100 -@@ -700,20 +700,10 @@ - # :startdoc: - - install?(:ext, :comm, :gem, :'default-gems', :'default-gems-comm') do -- install_default_gem('lib', srcdir) -+ # Gems are unbundled in Gentoo - end - install?(:ext, :arch, :gem, :'default-gems', :'default-gems-arch') do -- install_default_gem('ext', srcdir) do |path| -- # assume that gemspec and extconf.rb are placed in the same directory -- success = false -- begin -- IO.foreach(File.dirname(path[(srcdir.size+1)..-1]) + "/Makefile") do |l| -- break success = true if /^TARGET\s*=/ =~ l -- end -- rescue Errno::ENOENT -- end -- success -- end -+ # Gems are unbundled in Gentoo - end - - def load_gemspec(file) -@@ -765,68 +755,7 @@ - end - - install?(:ext, :comm, :gem, :'bundled-gems') do -- gem_dir = Gem.default_dir -- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) -- prepare "bundled gems", gem_dir, directories -- install_dir = with_destdir(gem_dir) -- installed_gems = {} -- options = { -- :install_dir => install_dir, -- :bin_dir => with_destdir(bindir), -- :domain => :local, -- :ignore_dependencies => true, -- :dir_mode => $dir_mode, -- :data_mode => $data_mode, -- :prog_mode => $prog_mode, -- :wrappers => true, -- :format_executable => true, -- } -- gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}" -- extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir -- Gem::Specification.each_gemspec([srcdir+'/gems/*']) do |path| -- spec = load_gemspec(path) -- next unless spec.platform == Gem::Platform::RUBY -- next unless spec.full_name == path[srcdir.size..-1][/\A\/gems\/([^\/]+)/, 1] -- spec.extension_dir = "#{extensions_dir}/#{spec.full_name}" -- if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}") -- spec.extensions[0] ||= "-" -- end -- ins = RbInstall::UnpackedInstaller.new(spec, options) -- puts "#{INDENT}#{spec.name} #{spec.version}" -- ins.install -- File.chmod($data_mode, File.join(install_dir, "specifications", "#{spec.full_name}.gemspec")) -- unless spec.extensions.empty? -- install_recursive(ext, spec.extension_dir) -- end -- installed_gems[spec.full_name] = true -- end -- installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| installed_gems.key?(File.basename(gem, '.gem'))} -- unless installed_gems.empty? -- install installed_gems, gem_dir+"/cache" -- end -- next if gems.empty? -- if defined?(Zlib) -- Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name))) -- silent = Gem::SilentUI.new -- gems.each do |gem| -- inst = Gem::Installer.new(gem, options) -- inst.spec.extension_dir = with_destdir(inst.spec.extension_dir) -- begin -- Gem::DefaultUserInteraction.use_ui(silent) {inst.install} -- rescue Gem::InstallError => e -- next -- end -- gemname = File.basename(gem) -- puts "#{INDENT}#{gemname}" -- end -- # fix directory permissions -- # TODO: Gem.install should accept :dir_mode option or something -- File.chmod($dir_mode, *Dir.glob(install_dir+"/**/")) -- # fix .gemspec permissions -- File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec")) -- else -- puts "skip installing bundled gems because of lacking zlib" -- end -+ # Gems are unbundled in Gentoo - end - - parse_args() diff --git a/dev-lang/ruby/files/2.5/010-libressl_2.7.patch b/dev-lang/ruby/files/2.5/010-libressl_2.7.patch deleted file mode 100644 index 150f43c9e5..0000000000 --- a/dev-lang/ruby/files/2.5/010-libressl_2.7.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/ext/openssl/extconf.rb.orig 2018-04-02 09:57:14 UTC -+++ b/ext/openssl/extconf.rb -@@ -122,8 +122,11 @@ OpenSSL.check_func_or_macro("SSL_get_ser - have_func("SSL_is_server") - - # added in 1.1.0 -+if !have_struct_member("SSL", "ctx", "openssl/ssl.h") || -+ try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x2070000fL", "openssl/opensslv.h") -+ $defs.push("-DHAVE_OPAQUE_OPENSSL") -+end - have_func("CRYPTO_lock") || $defs.push("-DHAVE_OPENSSL_110_THREADING_API") --have_struct_member("SSL", "ctx", "openssl/ssl.h") || $defs.push("-DHAVE_OPAQUE_OPENSSL") - have_func("BN_GENCB_new") - have_func("BN_GENCB_free") - have_func("BN_GENCB_get_arg") diff --git a/dev-lang/ruby/files/2.5/011-no-gems.patch b/dev-lang/ruby/files/2.5/011-no-gems.patch deleted file mode 100644 index 2ebe064c8a..0000000000 --- a/dev-lang/ruby/files/2.5/011-no-gems.patch +++ /dev/null @@ -1,85 +0,0 @@ ---- a/tool/rbinstall.rb.~1~ 2017-10-30 06:45:20.000000000 +0100 -+++ b/tool/rbinstall.rb 2017-12-25 11:06:53.340432435 +0100 -@@ -700,10 +700,10 @@ - # :startdoc: - - install?(:ext, :comm, :gem, :'default-gems', :'default-gems-comm') do -- install_default_gem('lib', srcdir) -+ # Gems are unbundled in Gentoo - end - install?(:ext, :arch, :gem, :'default-gems', :'default-gems-arch') do -- install_default_gem('ext', srcdir) -+ # Gems are unbundled in Gentoo - end - - def load_gemspec(file) -@@ -765,68 +755,7 @@ - end - - install?(:ext, :comm, :gem, :'bundled-gems') do -- gem_dir = Gem.default_dir -- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) -- prepare "bundled gems", gem_dir, directories -- install_dir = with_destdir(gem_dir) -- installed_gems = {} -- options = { -- :install_dir => install_dir, -- :bin_dir => with_destdir(bindir), -- :domain => :local, -- :ignore_dependencies => true, -- :dir_mode => $dir_mode, -- :data_mode => $data_mode, -- :prog_mode => $prog_mode, -- :wrappers => true, -- :format_executable => true, -- } -- gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}" -- extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir -- Gem::Specification.each_gemspec([srcdir+'/gems/*']) do |path| -- spec = load_gemspec(path) -- next unless spec.platform == Gem::Platform::RUBY -- next unless spec.full_name == path[srcdir.size..-1][/\A\/gems\/([^\/]+)/, 1] -- spec.extension_dir = "#{extensions_dir}/#{spec.full_name}" -- if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}") -- spec.extensions[0] ||= "-" -- end -- ins = RbInstall::UnpackedInstaller.new(spec, options) -- puts "#{INDENT}#{spec.name} #{spec.version}" -- ins.install -- File.chmod($data_mode, File.join(install_dir, "specifications", "#{spec.full_name}.gemspec")) -- unless spec.extensions.empty? -- install_recursive(ext, spec.extension_dir) -- end -- installed_gems[spec.full_name] = true -- end -- installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| installed_gems.key?(File.basename(gem, '.gem'))} -- unless installed_gems.empty? -- install installed_gems, gem_dir+"/cache" -- end -- next if gems.empty? -- if defined?(Zlib) -- Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name))) -- silent = Gem::SilentUI.new -- gems.each do |gem| -- inst = Gem::Installer.new(gem, options) -- inst.spec.extension_dir = with_destdir(inst.spec.extension_dir) -- begin -- Gem::DefaultUserInteraction.use_ui(silent) {inst.install} -- rescue Gem::InstallError => e -- next -- end -- gemname = File.basename(gem) -- puts "#{INDENT}#{gemname}" -- end -- # fix directory permissions -- # TODO: Gem.install should accept :dir_mode option or something -- File.chmod($dir_mode, *Dir.glob(install_dir+"/**/")) -- # fix .gemspec permissions -- File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec")) -- else -- puts "skip installing bundled gems because of lacking zlib" -- end -+ # Gems are unbundled in Gentoo - end - - parse_args() diff --git a/dev-lang/ruby/files/2.6/005_no-undefined-ext.patch b/dev-lang/ruby/files/2.6/005_no-undefined-ext.patch deleted file mode 100644 index 1f0fdda08d..0000000000 --- a/dev-lang/ruby/files/2.6/005_no-undefined-ext.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac.~1~ 2017-12-15 10:43:40.000000000 +0100 -+++ b/configure.ac 2017-12-25 11:02:19.099076831 +0100 -@@ -3233,7 +3233,7 @@ - [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku*], [ - : ${LDSHARED='$(CC) -shared'} - AS_IF([test "$rb_cv_binary_elf" = yes], [ -- LDFLAGS="$LDFLAGS -Wl,-export-dynamic" -+ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined" - ]) - rb_cv_dlopen=yes], - [interix*], [ : ${LDSHARED='$(CC) -shared'} diff --git a/dev-lang/ruby/files/2.6/009_no-gems.patch b/dev-lang/ruby/files/2.6/009_no-gems.patch deleted file mode 100644 index f98801d503..0000000000 --- a/dev-lang/ruby/files/2.6/009_no-gems.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/tool/rbinstall.rb.~1~ 2018-12-27 07:43:59.938638174 +0100 -+++ b/tool/rbinstall.rb 2018-12-27 07:51:09.096382161 +0100 -@@ -723,17 +723,7 @@ - # :startdoc: - - install?(:ext, :arch, :gem, :'default-gems', :'default-gems-arch') do -- install_default_gem('ext', srcdir) do |path| -- # assume that gemspec and extconf.rb are placed in the same directory -- success = false -- begin -- IO.foreach(File.dirname(path[(srcdir.size+1)..-1]) + "/Makefile") do |l| -- break success = true if /^TARGET\s*=/ =~ l -- end -- rescue Errno::ENOENT -- end -- success -- end -+ # Gems are unbundled in Gentoo - end - - def load_gemspec(file) -@@ -743,7 +743,7 @@ - end - - def install_default_gem(dir, srcdir) -- gem_dir = Gem.default_dir -+ gem_dir = ENV['GEM_DESTDIR'] ; puts "gem_dir for default gems = #{gem_dir}" - directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) - prepare "default gems from #{dir}", gem_dir, directories - -@@ -777,7 +777,7 @@ - end - - install?(:ext, :comm, :gem, :'bundled-gems') do -- gem_dir = Gem.default_dir -+ gem_dir = ENV['GEM_DESTDIR'] - directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) - prepare "bundled gems", gem_dir, directories - install_dir = with_destdir(gem_dir) diff --git a/dev-lang/ruby/files/2.6/010-default-gem-location.patch b/dev-lang/ruby/files/2.6/010-default-gem-location.patch deleted file mode 100644 index 7a50c35ff6..0000000000 --- a/dev-lang/ruby/files/2.6/010-default-gem-location.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/tool/rbinstall.rb.~1~ 2019-01-24 02:00:07.000000000 +0100 -+++ b/tool/rbinstall.rb 2019-02-03 08:39:49.778007118 +0100 -@@ -806,7 +806,7 @@ - end - - def install_default_gem(dir, srcdir) -- gem_dir = Gem.default_dir -+ gem_dir = ENV['GEM_DESTDIR'] - directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) - prepare "default gems from #{dir}", gem_dir, directories - -@@ -844,7 +844,7 @@ - end - - install?(:ext, :comm, :gem, :'bundled-gems') do -- gem_dir = Gem.default_dir -+ gem_dir = ENV['GEM_DESTDIR'] - directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) - prepare "bundled gems", gem_dir, directories - install_dir = with_destdir(gem_dir) diff --git a/dev-lang/ruby/files/2.7/010-default-gem-location.patch b/dev-lang/ruby/files/2.7/010-default-gem-location.patch deleted file mode 100644 index 7a50c35ff6..0000000000 --- a/dev-lang/ruby/files/2.7/010-default-gem-location.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/tool/rbinstall.rb.~1~ 2019-01-24 02:00:07.000000000 +0100 -+++ b/tool/rbinstall.rb 2019-02-03 08:39:49.778007118 +0100 -@@ -806,7 +806,7 @@ - end - - def install_default_gem(dir, srcdir) -- gem_dir = Gem.default_dir -+ gem_dir = ENV['GEM_DESTDIR'] - directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) - prepare "default gems from #{dir}", gem_dir, directories - -@@ -844,7 +844,7 @@ - end - - install?(:ext, :comm, :gem, :'bundled-gems') do -- gem_dir = Gem.default_dir -+ gem_dir = ENV['GEM_DESTDIR'] - directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) - prepare "bundled gems", gem_dir, directories - install_dir = with_destdir(gem_dir) diff --git a/dev-lang/ruby/files/auto_gem.rb b/dev-lang/ruby/files/auto_gem.rb deleted file mode 100644 index e7d564264d..0000000000 --- a/dev-lang/ruby/files/auto_gem.rb +++ /dev/null @@ -1,10 +0,0 @@ -# DO NOT USE THIS FILE! -# --------------------- -# This file is a placebo for Ruby 1.9 to work with a legacy feature, Gentoo -# added to Ruby 1.8 and earlier, loading rubygems automatically (auto_gem). -# It is no longer needed, but ruby19 needs this file to operate properly on -# a system containing older versions of Ruby and thus the legacy feature. -# -# REMOVAL NOTE: -# You may remove this file if you are running a Ruby >=1.9.1 *only* system -# or have disabled the Gentoo auto_gem.rb/RUBYOPT=auto_gem magic. diff --git a/dev-lang/ruby/files/ruby-1.8.6-memory-leak.diff b/dev-lang/ruby/files/ruby-1.8.6-memory-leak.diff deleted file mode 100644 index b71f4088f5..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.6-memory-leak.diff +++ /dev/null @@ -1,60 +0,0 @@ -Index: ptr.c -=================================================================== ---- ptr.c (revision 12047) -+++ ptr.c (working copy) -@@ -53,6 +53,8 @@ - void - dlptr_free(struct ptr_data *data) - { -+ if (!data) -+ return; - if (data->ptr) { - DEBUG_CODE({ - printf("dlptr_free(): removing the pointer `0x%x' from the MemorySpace\n", -@@ -69,4 +71,5 @@ - if (data->stype) dlfree(data->stype); - if (data->ssize) dlfree(data->ssize); - if (data->ids) dlfree(data->ids); -+ dlfree(data); - } - - void -Index: sym.c -=================================================================== ---- sym.c (revision 12047) -+++ sym.c (working copy) -@@ -57,6 +57,8 @@ - void - dlsym_free(struct sym_data *data) - { -+ if(!data) -+ return; - if( data->name ){ - DEBUG_CODE({ - printf("dlsym_free(): free(data->name:%s)\n",data->name); -@@ -69,4 +71,5 @@ - }); - free(data->type); - } -+ dlfree(data); - } - - VALUE -Index: handle.c -=================================================================== ---- handle.c (revision 12047) -+++ handle.c (working copy) -@@ -10,7 +10,10 @@ - void - dlhandle_free(struct dl_handle *dlhandle) - { -+ if (!dlhandle) -+ return; - if (dlhandle->ptr && dlhandle->open && dlhandle->enable_close) { -- dlclose(dlhandle->ptr); -+ dlclose(dlhandle->ptr); - } -+ dlfree(dlhandle); - } - - VALUE diff --git a/dev-lang/ruby/files/ruby-1.8.6-uclibc-udp.patch b/dev-lang/ruby/files/ruby-1.8.6-uclibc-udp.patch deleted file mode 100644 index 07919d273d..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.6-uclibc-udp.patch +++ /dev/null @@ -1,21 +0,0 @@ -Patch for bug 260760. Fixes UDP sockets on uClibc systems. - -diff --exclude '*~' -uNr ruby-1.8.6-p36.orig/configure.in ruby-1.8.6-p36/configure.in ---- configure.in.orig 2007-05-22 19:19:07.000000000 +0100 -+++ configure.in 2007-08-29 09:42:47.000000000 +0100 -@@ -707,6 +707,7 @@ - __ptr dnl - bufpos dnl - _p dnl -+ __bufpos dnl - ; do - AC_TRY_COMPILE([#include <stdio.h> - ], -@@ -726,6 +727,7 @@ - [for frend in dnl - _IO_read_end dnl - bufread dnl -+ __bufread dnl - ; do - AC_TRY_COMPILE([#include <stdio.h> - ], diff --git a/dev-lang/ruby/files/ruby-1.8.6_p36-only-ncurses.patch b/dev-lang/ruby/files/ruby-1.8.6_p36-only-ncurses.patch deleted file mode 100644 index ba26b65bbb..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.6_p36-only-ncurses.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- ext/curses/extconf.rb -+++ ext/curses/extconf.rb -@@ -6,7 +6,7 @@ - make=false - have_library("mytinfo", "tgetent") if /bow/ =~ RUBY_PLATFORM --have_library("tinfo", "tgetent") or have_library("termcap", "tgetent") -+have_library("tinfo", "tgetent") - if have_header(*curses=%w"ncurses.h") and have_library("ncurses", "initscr") - make=true - elsif have_header(*curses=%w"ncurses/curses.h") and have_library("ncurses", "initscr") diff --git a/dev-lang/ruby/files/ruby-1.8.6_p36-prefix.patch b/dev-lang/ruby/files/ruby-1.8.6_p36-prefix.patch deleted file mode 100644 index 5ec089e530..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.6_p36-prefix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.in -+++ configure.in -@@ -1620,7 +1620,7 @@ - esac - ]) - if test -z "$MANTYPE"; then -- AC_PATH_PROGS(NROFF, nroff awf, /bin/false, "/usr/bin:/usr/ucb") -+ AC_PATH_PROGS(NROFF, nroff awf, /bin/false) - if ${NROFF} -mdoc ${srcdir}/ruby.1 >/dev/null 2>&1; then - MANTYPE=doc - else diff --git a/dev-lang/ruby/files/ruby-1.8.7-darwin9-getsetcontext.patch b/dev-lang/ruby/files/ruby-1.8.7-darwin9-getsetcontext.patch deleted file mode 100644 index b8b16e6f41..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.7-darwin9-getsetcontext.patch +++ /dev/null @@ -1,33 +0,0 @@ -http://www.ruby-forum.com/topic/131149 - -In Leopard, the setcontext/getcontext functions have been modified to -confirm to the UNIX norm, however, their implementation changed to not -use the default structure by default, which makes Ruby segfaulting -during initialization. This patch just force the non-set/getcontext -code path for Leopard environments, but use set/getcontext for systems -below. - - ---- node.h -+++ node.h -@@ -375,9 +375,17 @@ - void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t)); - int rb_remove_event_hook _((rb_event_hook_func_t)); - --#if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT) --#include <ucontext.h> --#define USE_CONTEXT -+#if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT) -+# if defined(__APPLE__) -+# include <AvailabilityMacros.h> -+# if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 -+# include <ucontext.h> -+# define USE_CONTEXT -+# endif -+# else -+# include <ucontext.h> -+# define USE_CONTEXT -+# endif - #endif - #include <setjmp.h> - #include "st.h" diff --git a/dev-lang/ruby/files/ruby-1.8.7-glibc-2.14-fclose-behaviour.patch b/dev-lang/ruby/files/ruby-1.8.7-glibc-2.14-fclose-behaviour.patch deleted file mode 100644 index 4a70ec1c30..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.7-glibc-2.14-fclose-behaviour.patch +++ /dev/null @@ -1,38 +0,0 @@ -http://bugs.ruby-lang.org/issues/5108 -Patch from Csaba Henk - -diff --git a/lib/mkmf.rb b/lib/mkmf.rb -index c9e738a..7a8004d 100644 ---- a/lib/mkmf.rb -+++ b/lib/mkmf.rb -@@ -201,20 +201,26 @@ end - module Logging - @log = nil - @logfile = 'mkmf.log' -- @orgerr = $stderr.dup -- @orgout = $stdout.dup - @postpone = 0 - @quiet = $extmk - - def self::open - @log ||= File::open(@logfile, 'w') - @log.sync = true -+ orgerr = $stderr.dup -+ orgout = $stdout.dup - $stderr.reopen(@log) - $stdout.reopen(@log) - yield - ensure -- $stderr.reopen(@orgerr) -- $stdout.reopen(@orgout) -+ if orgerr -+ $stderr.reopen(orgerr) -+ orgerr.close -+ end -+ if orgout -+ $stdout.reopen(orgout) -+ orgout.close -+ end - end - - def self::message(*s) diff --git a/dev-lang/ruby/files/ruby-1.8.7_p160-solaris.patch b/dev-lang/ruby/files/ruby-1.8.7_p160-solaris.patch deleted file mode 100644 index 7fc78fcc87..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.7_p160-solaris.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://redmine.ruby-lang.org/issues/show/1444 - ---- ruby-1.8.7-p160/file.c -+++ ruby-1.8.7-p160/file.c -@@ -20,6 +20,10 @@ - #include <sys/cygwin.h> - #endif - -+#if defined (__SVR4) && defined (__sun) -+#include <fcntl.h> -+#endif -+ - #include "ruby.h" - #include "rubyio.h" - #include "rubysig.h" diff --git a/dev-lang/ruby/files/ruby-1.8.7_p249-pthread-linking.patch b/dev-lang/ruby/files/ruby-1.8.7_p249-pthread-linking.patch deleted file mode 100644 index 025531f833..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.7_p249-pthread-linking.patch +++ /dev/null @@ -1,27 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=307159 -http://redmine.ruby-lang.org/issues/show/2826 - -E.g. on Solaris you can't just do -lpthread, even though you can find -symbols there. In general, GCC knows best how to properly do it, so let -it do it for us, instead of relying on our own deviced logic. - ---- configure.in -+++ configure.in -@@ -1018,10 +1018,14 @@ - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) - AC_DEFINE(HAVE_LIBPTHREAD) -- case $pthread_lib in -- c) -+ case $pthread_lib::$GCC in -+ *::yes) -+ # GCC knows best, let it handle it -+ LIBS="-pthread $LIBS" -+ ;; -+ c::*) - ;; -- c_r) -+ c_r::*) - MAINLIBS="-pthread $MAINLIBS" - ;; - *) diff --git a/dev-lang/ruby/files/ruby-1.8.7_p370-mint-sha2.patch b/dev-lang/ruby/files/ruby-1.8.7_p370-mint-sha2.patch deleted file mode 100644 index 140772616a..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.7_p370-mint-sha2.patch +++ /dev/null @@ -1,123 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=449976 - ---- ext/digest/sha2/sha2.c -+++ ext/digest/sha2/sha2.c -@@ -176,8 +176,8 @@ - * only. - */ - void SHA512_Last(SHA512_CTX*); --void SHA256_Transform(SHA256_CTX*, const sha2_word32*); --void SHA512_Transform(SHA512_CTX*, const sha2_word64*); -+void _SHA256_Transform(SHA256_CTX*, const sha2_word32*); -+void _SHA512_Transform(SHA512_CTX*, const sha2_word64*); - - - /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/ -@@ -329,7 +329,7 @@ - (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ - j++ - --void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { -+void _SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { - sha2_word32 a, b, c, d, e, f, g, h, s0, s1; - sha2_word32 T1, *W256; - int j; -@@ -387,7 +387,7 @@ - - #else /* SHA2_UNROLL_TRANSFORM */ - --void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { -+void _SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { - sha2_word32 a, b, c, d, e, f, g, h, s0, s1; - sha2_word32 T1, T2, *W256; - int j; -@@ -489,7 +489,7 @@ - context->bitcount += freespace << 3; - len -= freespace; - data += freespace; -- SHA256_Transform(context, (sha2_word32*)context->buffer); -+ _SHA256_Transform(context, (sha2_word32*)context->buffer); - } else { - /* The buffer is not yet full */ - MEMCPY_BCOPY(&context->buffer[usedspace], data, len); -@@ -501,7 +501,7 @@ - } - while (len >= SHA256_BLOCK_LENGTH) { - /* Process as many complete blocks as we can */ -- SHA256_Transform(context, (const sha2_word32*)data); -+ _SHA256_Transform(context, (const sha2_word32*)data); - context->bitcount += SHA256_BLOCK_LENGTH << 3; - len -= SHA256_BLOCK_LENGTH; - data += SHA256_BLOCK_LENGTH; -@@ -541,7 +541,7 @@ - MEMSET_BZERO(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace); - } - /* Do second-to-last transform: */ -- SHA256_Transform(context, (sha2_word32*)context->buffer); -+ _SHA256_Transform(context, (sha2_word32*)context->buffer); - - /* And set-up for the last transform: */ - MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH); -@@ -557,7 +557,7 @@ - *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; - - /* Final transform: */ -- SHA256_Transform(context, (sha2_word32*)context->buffer); -+ _SHA256_Transform(context, (sha2_word32*)context->buffer); - - #ifndef WORDS_BIGENDIAN - { -@@ -624,7 +624,7 @@ - (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \ - j++ - --void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) { -+void _SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) { - sha2_word64 a, b, c, d, e, f, g, h, s0, s1; - sha2_word64 T1, *W512 = (sha2_word64*)context->buffer; - int j; -@@ -679,7 +679,7 @@ - - #else /* SHA2_UNROLL_TRANSFORM */ - --void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) { -+void _SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) { - sha2_word64 a, b, c, d, e, f, g, h, s0, s1; - sha2_word64 T1, T2, *W512 = (sha2_word64*)context->buffer; - int j; -@@ -779,7 +779,7 @@ - ADDINC128(context->bitcount, freespace << 3); - len -= freespace; - data += freespace; -- SHA512_Transform(context, (const sha2_word64*)context->buffer); -+ _SHA512_Transform(context, (const sha2_word64*)context->buffer); - } else { - /* The buffer is not yet full */ - MEMCPY_BCOPY(&context->buffer[usedspace], data, len); -@@ -791,7 +791,7 @@ - } - while (len >= SHA512_BLOCK_LENGTH) { - /* Process as many complete blocks as we can */ -- SHA512_Transform(context, (const sha2_word64*)data); -+ _SHA512_Transform(context, (const sha2_word64*)data); - ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3); - len -= SHA512_BLOCK_LENGTH; - data += SHA512_BLOCK_LENGTH; -@@ -826,7 +826,7 @@ - MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace); - } - /* Do second-to-last transform: */ -- SHA512_Transform(context, (const sha2_word64*)context->buffer); -+ _SHA512_Transform(context, (const sha2_word64*)context->buffer); - - /* And set-up for the last transform: */ - MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2); -@@ -843,7 +843,7 @@ - *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0]; - - /* Final transform: */ -- SHA512_Transform(context, (const sha2_word64*)context->buffer); -+ _SHA512_Transform(context, (const sha2_word64*)context->buffer); - } - - void SHA512_Finish(SHA512_CTX* context, sha2_byte digest[]) { diff --git a/dev-lang/ruby/files/ruby-1.8.7_p370-mint.patch b/dev-lang/ruby/files/ruby-1.8.7_p370-mint.patch deleted file mode 100644 index df77a58884..0000000000 --- a/dev-lang/ruby/files/ruby-1.8.7_p370-mint.patch +++ /dev/null @@ -1,14 +0,0 @@ -http://bugs.ruby-lang.org/issues/7652 -https://bugs.gentoo.org/show_bug.cgi?id=449976 - ---- configure.in -+++ configure.in -@@ -1175,7 +1175,7 @@ - openstep*) CCDLFLAGS="$CCDLFLAGS -fno-common";; - rhapsody*) CCDLFLAGS="$CCDLFLAGS -fno-common";; - darwin*) CCDLFLAGS="$CCDLFLAGS -fno-common";; -- human*|bsdi*|beos*|cygwin*|mingw*|aix*|interix*) ;; -+ human*|bsdi*|beos*|cygwin*|mingw*|aix*|interix*|mint*) ;; - *) CCDLFLAGS="$CCDLFLAGS -fPIC";; - esac - else diff --git a/dev-lang/ruby/files/ruby-1.9.1-only-ncurses.patch b/dev-lang/ruby/files/ruby-1.9.1-only-ncurses.patch deleted file mode 100644 index f992f5978f..0000000000 --- a/dev-lang/ruby/files/ruby-1.9.1-only-ncurses.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ext/curses/extconf.rb -+++ ext/curses/extconf.rb -@@ -7,7 +7,7 @@ - make=false - headers = [] - have_library("mytinfo", "tgetent") if /bow/ =~ RUBY_PLATFORM --have_library("tinfo", "tgetent") or have_library("termcap", "tgetent") -+have_library("tinfo", "tgetent") - if have_header(*curses=%w"ncurses.h") and (have_library("ncursesw", "initscr") or have_library("ncurses", "initscr")) - make=true - elsif have_header(*curses=%w"ncurses/curses.h") and have_library("ncurses", "initscr") diff --git a/dev-lang/ruby/files/ruby-1.9.1-prefix.patch b/dev-lang/ruby/files/ruby-1.9.1-prefix.patch deleted file mode 100644 index 322dd56e0f..0000000000 --- a/dev-lang/ruby/files/ruby-1.9.1-prefix.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/configure.in -+++ b/configure.in -@@ -2111,7 +2111,7 @@ - esac - ]) - if test -z "$MANTYPE"; then -- AC_PATH_PROGS(NROFF, nroff awf, /bin/false, "/usr/bin:/usr/ucb") -+ AC_PATH_PROGS(NROFF, nroff awf, /bin/false) - if ${NROFF} -mdoc ${srcdir}/man/ruby.1 >/dev/null 2>&1; then - MANTYPE=doc - else ---- a/configure -+++ b/configure -@@ -22605,7 +22605,7 @@ - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --as_dummy=""/usr/bin:/usr/ucb"" -+as_dummy= - for as_dir in $as_dummy - do - IFS=$as_save_IFS diff --git a/dev-lang/ruby/files/ruby-mkconfig.patch b/dev-lang/ruby/files/ruby-mkconfig.patch deleted file mode 100644 index 4426ef90d7..0000000000 --- a/dev-lang/ruby/files/ruby-mkconfig.patch +++ /dev/null @@ -1,14 +0,0 @@ -Fix for mkconfig to be able to handle empty continued lines. -Patch from [ruby-core:20420] via bug 234877. - ---- mkconfig.rb.orig 2008-06-08 01:37:10.000000000 +0900 -+++ mkconfig.rb 2009-02-12 13:39:02.000000000 +0900 -@@ -54,7 +54,7 @@ - continued_name = name - next - end -- when /^"(.+)"\s*(\\)?$/ -+ when /^"(.*)"\s*(\\)?$/ - if continued_line - continued_line << $1 - unless $2 diff --git a/dev-lang/ruby/files/ruby18-mkmf-parallel-install.patch b/dev-lang/ruby/files/ruby18-mkmf-parallel-install.patch deleted file mode 100644 index 26c05bbde3..0000000000 --- a/dev-lang/ruby/files/ruby18-mkmf-parallel-install.patch +++ /dev/null @@ -1,14 +0,0 @@ - Patch for bug 239101 by Matsuu Takuto, via Redmine issue 1337 (yes, really). - Backported for 1.8.* by Alex Legler. - ---- lib/mkmf.orig 2009-04-03 13:04:17.000000000 +0200 -+++ lib/mkmf.rb 2009-04-03 13:04:30.000000000 +0200 -@@ -1500,7 +1500,7 @@ - dest = "#{dir}/#{f}" - mfile.puts dir, "install-so: #{dest}" - unless $extout -- mfile.print "#{dest}: #{f}\n" -+ mfile.print "#{dest}: #{dir} #{f}\n" - if (sep = config_string('BUILD_FILE_SEPARATOR')) - f.gsub!("/", sep) - dir.gsub!("/", sep) diff --git a/dev-lang/ruby/metadata.xml b/dev-lang/ruby/metadata.xml deleted file mode 100644 index 3a5415201c..0000000000 --- a/dev-lang/ruby/metadata.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>[email protected]</email> - <name>Gentoo Ruby Project</name> - </maintainer> - <use> - <flag name="rubytests">Install ruby tests that can only be run after ruby is installed</flag> - <flag name="rdoc">Install <pkg>dev-ruby/rdoc</pkg> after installing Ruby.</flag> - <flag name="systemtap">Enable SystemTAP/DTrace tracing</flag> - </use> -</pkgmetadata> diff --git a/dev-lang/ruby/ruby-2.4.10.ebuild b/dev-lang/ruby/ruby-2.4.10.ebuild deleted file mode 100644 index ff56701602..0000000000 --- a/dev-lang/ruby/ruby-2.4.10.ebuild +++ /dev/null @@ -1,242 +0,0 @@ -# Copyright 1999-2020 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="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" - -LICENSE="|| ( Ruby-BSD BSD-2 )" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -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 - dev-libs/libffi:= - sys-libs/readline:0= - 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-r1[ruby_targets_ruby24] ) - xemacs? ( app-xemacs/ruby-modes )" - -src_prepare() { - eapply "${FILESDIR}/${PN}-1.9.1-prefix.patch" - 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" - # Fix hardcoded SHELL var in mkmf library - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die - # avoid symlink loop on Darwin (?!) - sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).dylib//' \ - configure.in || die - # make ar/libtool hack for Darwin work - sed -i \ - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ - configure.in || die - # Fix using installed ruby - sed -i -e '/^libs << File.expand_path("lib", srcdir)/s/^/#/' \ - tool/runruby.rb || die - - 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 - - # 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 \ - --disable-dtrace \ - --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} \ - --with-readline-dir="${EPREFIX}"/usr \ - --enable-option-checking=no -} - -src_compile() { - emake V=1 EXTLDFLAGS="${LDFLAGS}" -} - -src_test() { - emake -j1 V=1 test - - 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}" - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_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 DYLD_LIBRARY_PATH RUBYLIB - - emake V=1 DESTDIR="${D}" install - - # 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 - dodoc -r sample - fi - - dodoc ChangeLog NEWS doc/NEWS* README* - - 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.5.8-r1.ebuild b/dev-lang/ruby/ruby-2.5.8-r1.ebuild deleted file mode 100644 index 7d10e481d9..0000000000 --- a/dev-lang/ruby/ruby-2.5.8-r1.ebuild +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright 1999-2020 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="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" - -LICENSE="|| ( Ruby-BSD BSD-2 )" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs systemtap 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 ) - systemtap? ( dev-util/systemtap ) - tk? ( - dev-lang/tcl:0=[threads] - dev-lang/tk:0=[threads] - ) - dev-libs/libyaml - dev-libs/libffi:= - sys-libs/readline:0= - sys-libs/zlib - >=app-eselect/eselect-ruby-20171225 -" - -DEPEND="${RDEPEND}" - -BUNDLED_GEMS=" - >=dev-ruby/did_you_mean-1.2.0:2.5[ruby_targets_ruby25] - >=dev-ruby/minitest-5.10.3[ruby_targets_ruby25] - >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby25] - >=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25] - >=dev-ruby/rake-12.3.0[ruby_targets_ruby25] - >=dev-ruby/test-unit-3.2.7[ruby_targets_ruby25] - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby25] -" - -PDEPEND=" - ${BUNDLED_GEMS} - virtual/rubygems[ruby_targets_ruby25] - >=dev-ruby/json-2.0.2[ruby_targets_ruby25] - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby25] ) - xemacs? ( app-xemacs/ruby-modes )" - -src_prepare() { - eapply "${FILESDIR}"/${SLOT}/{001,005,011}*.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.2.0,minitest-5.10.3,net-telnet-0.1.1,power_assert-1.1.1,rake-12.3.0,test-unit-3.2.7,xmlrpc-0.3.0}.gem || die - - einfo "Removing bundled libraries..." - rm -fr ext/fiddle/libffi-3.2.1 || die - - # Fix hardcoded SHELL var in mkmf library - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die - # avoid symlink loop on Darwin (?!) - sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ - configure.ac || die - # make ar/libtool hack for Darwin work - sed -i \ - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ - configure.ac || die - - 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 - - # 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 \ - --disable-dtrace \ - --with-out-ext="${modules}" \ - $(use_with jemalloc jemalloc) \ - $(use_enable socks5 socks) \ - $(use_enable systemtap dtrace) \ - $(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} \ - --with-readline-dir="${EPREFIX}"/usr \ - --enable-option-checking=no -} - -src_compile() { - emake V=1 EXTLDFLAGS="${LDFLAGS}" -} - -src_test() { - emake -j1 V=1 test - - 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}" - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_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 DYLD_LIBRARY_PATH RUBYLIB - - emake V=1 DESTDIR="${D}" install - - # 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 - dodoc -r sample - fi - - dodoc ChangeLog NEWS doc/NEWS* README* - - 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.6.6-r2.ebuild b/dev-lang/ruby/ruby-2.6.6-r2.ebuild deleted file mode 100644 index acacc0035c..0000000000 --- a/dev-lang/ruby/ruby-2.6.6-r2.ebuild +++ /dev/null @@ -1,248 +0,0 @@ -# Copyright 1999-2020 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="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" - -LICENSE="|| ( Ruby-BSD BSD-2 )" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" - -RDEPEND=" - berkdb? ( sys-libs/db:= ) - gdbm? ( sys-libs/gdbm:= ) - jemalloc? ( dev-libs/jemalloc ) - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl ) - ) - socks5? ( >=net-proxy/dante-1.1.13 ) - systemtap? ( dev-util/systemtap ) - tk? ( - dev-lang/tcl:0=[threads] - dev-lang/tk:0=[threads] - ) - dev-libs/libyaml - dev-libs/libffi:= - sys-libs/readline:0= - sys-libs/zlib - >=app-eselect/eselect-ruby-20181225 -" - -DEPEND="${RDEPEND}" - -BUNDLED_GEMS=" - >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26] - >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26] - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26] - >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26] - >=dev-ruby/rake-12.3.2[ruby_targets_ruby26] - >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26] - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26] -" - -PDEPEND=" - ${BUNDLED_GEMS} - virtual/rubygems[ruby_targets_ruby26] - >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26] - >=dev-ruby/json-2.0.2[ruby_targets_ruby26] - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] ) - xemacs? ( app-xemacs/ruby-modes )" - -src_prepare() { - # 005 does not compile bigdecimal and is questionable because it - # compiles ruby in a non-standard way, may be dropped - eapply "${FILESDIR}"/2.6/010*.patch - - einfo "Unbundling gems..." - cd "$S" - # Remove bundled gems that we will install via PDEPEND, bug - # 539700. - rm -fr gems/* || die - - einfo "Removing bundled libraries..." - rm -fr ext/fiddle/libffi-3.2.1 || die - - # Fix hardcoded SHELL var in mkmf library - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die - # avoid symlink loop on Darwin (?!) - sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ - configure.ac || die - # make ar/libtool hack for Darwin work - sed -i \ - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ - configure.ac || die - - 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 - - # 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 \ - --disable-dtrace \ - --with-out-ext="${modules}" \ - $(use_with jemalloc jemalloc) \ - $(use_enable jit jit-support ) \ - $(use_enable socks5 socks) \ - $(use_enable systemtap dtrace) \ - $(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} \ - --with-readline-dir="${EPREFIX}"/usr \ - --enable-option-checking=no - - # Makefile is broken because it lacks -ldl - rm -rf ext/-test-/popen_deadlock || die -} - -src_compile() { - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" -} - -src_test() { - emake -j1 V=1 test - - 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 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || 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}" - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_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 DYLD_LIBRARY_PATH RUBYLIB - - # Create directory for the default gems - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" - - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install - - # 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/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" - - if use doc; then - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc - fi - - if use examples; then - dodoc -r sample - fi - - dodoc ChangeLog NEWS doc/NEWS* README* - - 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.7.1-r2.ebuild b/dev-lang/ruby/ruby-2.7.1-r2.ebuild deleted file mode 100644 index eba19f4fd6..0000000000 --- a/dev-lang/ruby/ruby-2.7.1-r2.ebuild +++ /dev/null @@ -1,251 +0,0 @@ -# Copyright 1999-2020 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="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" - -LICENSE="|| ( Ruby-BSD BSD-2 )" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" - -RDEPEND=" - berkdb? ( sys-libs/db:= ) - gdbm? ( sys-libs/gdbm:= ) - jemalloc? ( dev-libs/jemalloc ) - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl ) - ) - socks5? ( >=net-proxy/dante-1.1.13 ) - systemtap? ( dev-util/systemtap ) - tk? ( - dev-lang/tcl:0=[threads] - dev-lang/tk:0=[threads] - ) - dev-libs/libyaml - dev-libs/libffi:= - sys-libs/readline:0= - sys-libs/zlib - >=app-eselect/eselect-ruby-20191222 -" - -DEPEND="${RDEPEND}" - -BUNDLED_GEMS=" - >=dev-ruby/minitest-5.13.0[ruby_targets_ruby27] - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27] - >=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27] - >=dev-ruby/rake-13.0.1[ruby_targets_ruby27] - >=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27] - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27] -" - -PDEPEND=" - ${BUNDLED_GEMS} - virtual/rubygems[ruby_targets_ruby27] - >=dev-ruby/bundler-2.1.4[ruby_targets_ruby27] - >=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27] - >=dev-ruby/json-2.0.2[ruby_targets_ruby27] - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] ) - xemacs? ( app-xemacs/ruby-modes )" - -src_prepare() { - # 005 does not compile bigdecimal and is questionable because it - # compiles ruby in a non-standard way, may be dropped - eapply "${FILESDIR}"/2.7/010*.patch - - einfo "Unbundling gems..." - cd "$S" - # Remove bundled gems that we will install via PDEPEND, bug - # 539700. - rm -fr gems/* || die - # Don't install CLI tools since they will clash with the gem - rm -f bin/{racc,racc2y,y2racc} || die - sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die - - einfo "Removing bundled libraries..." - rm -fr ext/fiddle/libffi-3.2.1 || die - - # Fix hardcoded SHELL var in mkmf library - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die - # avoid symlink loop on Darwin (?!) - sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ - configure.ac || die - # make ar/libtool hack for Darwin work - sed -i \ - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ - configure.ac || die - - 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 - - # 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 \ - --disable-dtrace \ - --with-out-ext="${modules}" \ - $(use_with jemalloc jemalloc) \ - $(use_enable jit jit-support ) \ - $(use_enable socks5 socks) \ - $(use_enable systemtap dtrace) \ - $(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} \ - --with-readline-dir="${EPREFIX}"/usr \ - --enable-option-checking=no - - # Makefile is broken because it lacks -ldl - rm -rf ext/-test-/popen_deadlock || die -} - -src_compile() { - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" -} - -src_test() { - emake -j1 V=1 test - - 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 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || 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}" - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_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 DYLD_LIBRARY_PATH RUBYLIB - - # Create directory for the default gems - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" - - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install - - # 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/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" - - if use doc; then - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc - fi - - if use examples; then - dodoc -r sample - fi - - dodoc ChangeLog NEWS doc/NEWS* README* - - 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.7.2.ebuild b/dev-lang/ruby/ruby-2.7.2.ebuild deleted file mode 100644 index 22c548221c..0000000000 --- a/dev-lang/ruby/ruby-2.7.2.ebuild +++ /dev/null @@ -1,251 +0,0 @@ -# Copyright 1999-2020 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="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" - -LICENSE="|| ( Ruby-BSD BSD-2 )" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" - -RDEPEND=" - berkdb? ( sys-libs/db:= ) - gdbm? ( sys-libs/gdbm:= ) - jemalloc? ( dev-libs/jemalloc ) - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl ) - ) - socks5? ( >=net-proxy/dante-1.1.13 ) - systemtap? ( dev-util/systemtap ) - tk? ( - dev-lang/tcl:0=[threads] - dev-lang/tk:0=[threads] - ) - dev-libs/libyaml - dev-libs/libffi:= - sys-libs/readline:0= - sys-libs/zlib - >=app-eselect/eselect-ruby-20191222 -" - -DEPEND="${RDEPEND}" - -BUNDLED_GEMS=" - >=dev-ruby/minitest-5.13.0[ruby_targets_ruby27] - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27] - >=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27] - >=dev-ruby/rake-13.0.1[ruby_targets_ruby27] - >=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27] - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27] -" - -PDEPEND=" - ${BUNDLED_GEMS} - virtual/rubygems[ruby_targets_ruby27] - >=dev-ruby/bundler-2.1.4[ruby_targets_ruby27] - >=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27] - >=dev-ruby/json-2.0.2[ruby_targets_ruby27] - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] ) - xemacs? ( app-xemacs/ruby-modes )" - -src_prepare() { - # 005 does not compile bigdecimal and is questionable because it - # compiles ruby in a non-standard way, may be dropped - eapply "${FILESDIR}"/2.7/010*.patch - - einfo "Unbundling gems..." - cd "$S" - # Remove bundled gems that we will install via PDEPEND, bug - # 539700. - rm -fr gems/* || die - # Don't install CLI tools since they will clash with the gem - rm -f bin/{racc,racc2y,y2racc} || die - sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die - - einfo "Removing bundled libraries..." - rm -fr ext/fiddle/libffi-3.2.1 || die - - # Fix hardcoded SHELL var in mkmf library - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die - # avoid symlink loop on Darwin (?!) - sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ - configure.ac || die - # make ar/libtool hack for Darwin work - sed -i \ - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ - configure.ac || die - - 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 - - # 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 \ - --disable-dtrace \ - --with-out-ext="${modules}" \ - $(use_with jemalloc jemalloc) \ - $(use_enable jit jit-support ) \ - $(use_enable socks5 socks) \ - $(use_enable systemtap dtrace) \ - $(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} \ - --with-readline-dir="${EPREFIX}"/usr \ - --enable-option-checking=no - - # Makefile is broken because it lacks -ldl - rm -rf ext/-test-/popen_deadlock || die -} - -src_compile() { - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" -} - -src_test() { - emake -j1 V=1 test - - 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 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || 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}" - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_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 DYLD_LIBRARY_PATH RUBYLIB - - # Create directory for the default gems - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" - - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install - - # 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/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" - - if use doc; then - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc - fi - - if use examples; then - dodoc -r sample - fi - - dodoc ChangeLog NEWS doc/NEWS* README* - - 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 -}
