Send Ruby 2.7 to the Attic

This commit is contained in:
jeremy 2023-01-22 20:59:47 +00:00
parent 9274a6d0bd
commit 8b23484abd
25 changed files with 0 additions and 20963 deletions

View File

@ -1,47 +0,0 @@
VERSION = 2.7.7
DISTNAME = ruby-${VERSION}
SHARED_LIBS = ruby27 0.0
NEXTVER = 2.8
PKGSPEC-main ?= ruby->=2.7.0,<${NEXTVER}
# Backport fix for regression in 2.7.2+ to avoid crash in ffi_closure_free
PATCHFILES = ruby-2.7-ffi-closure-fix{040cfc89b9a110cd0fb2abdcd35e8215b4a71f60}.patch:0
PSEUDO_FLAVORS= no_ri_docs bootstrap
# Do not build the RI docs on slow arches
.if ${MACHINE_ARCH:Malpha} || ${MACHINE_ARCH:Marm} || ${MACHINE_ARCH:Mhppa}
FLAVOR?= no_ri_docs bootstrap
.else
FLAVOR?=
.endif
MULTI_PACKAGES = -main -gdbm -ri_docs
.include <bsd.port.arch.mk>
.if ${BUILD_PACKAGES:M-ri_docs}
ALL_TARGET += rdoc
INSTALL_TARGET += install-doc
.endif
# Fix path for JIT compiler to not use shims in ports obj bin dir
CONFIGURE_ENV += ac_cv_path_MJIT_CC=`which ${CC}` \
rb_cv_function_name_string=__func__
WANTLIB-main += curses yaml-0
post-extract:
${POST_EXTRACT}
pre-configure:
${FIX_RIPPER}
pre-install:
${PRE_INSTALL}
post-install:
${FIX_RBCONFIG}
do-test:
cd ${WRKSRC} && make check
.include <bsd.port.mk>

View File

@ -1,4 +0,0 @@
SHA256 (ruby-2.7-ffi-closure-fix.patch) = 4MKbiJzsl+VKRd24hZ4wWmiRQnEJgMKGcZS2KUsN1TU=
SHA256 (ruby-2.7.7.tar.gz) = 4QEn22kdf/NkAs/oj0GMjQJaPx7qkgRLFi3XLwuMe5A=
SIZE (ruby-2.7-ffi-closure-fix.patch) = 1033
SIZE (ruby-2.7.7.tar.gz) = 16947579

View File

@ -1,34 +0,0 @@
Enable verbose mode when building.
Don't regenerate rdoc documentation during install.
Index: common.mk
--- common.mk.orig
+++ common.mk
@@ -7,7 +7,7 @@ dll: $(LIBRUBY_SO)
.SUFFIXES: .rbinc .rb .inc .h .c .y .i .$(ASMEXT) .$(DTRACE_EXT)
# V=0 quiet, V=1 verbose. other values don't work.
-V = 0
+V = 1
Q1 = $(V:1=)
Q = $(Q1:0=@)
ECHO0 = $(ECHO1:0=echo)
@@ -292,7 +292,7 @@ ext/configure-ext.mk: $(PREP) all-incs $(MKFILES) $(RB
configure-ext: $(EXTS_MK)
build-ext: $(EXTS_MK)
- $(Q)$(MAKE) -f $(EXTS_MK) $(mflags) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) \
+ $(Q)$(MAKE) -f $(EXTS_MK) V=1 $(mflags) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) \
EXTENCS="$(ENCOBJS)" UPDATE_LIBRARIES=no $(EXTSTATIC)
$(Q)$(MAKE) $(EXTS_NOTE)
@@ -536,7 +536,7 @@ dont-install-man: $(PREP)
post-no-install-man::
@$(NULLCMD)
-install-doc: rdoc pre-install-doc do-install-doc post-install-doc
+install-doc: pre-install-doc do-install-doc post-install-doc
pre-install-doc:: install-prereq
do-install-doc: $(PROGRAM) pre-install-doc
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc $(INSTALL_DOC_OPTS)

View File

@ -1,17 +0,0 @@
Disable peephole optimizer on mips64 and sparc64, since it occasionally
segfaults.
Index: compile.c
--- compile.c.orig
+++ compile.c
@@ -2699,6 +2699,10 @@ static int
iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcallopt)
{
INSN *const iobj = (INSN *)list;
+#if defined(__mips64__) || defined(__sparc64__)
+ return COMPILE_OK;
+#endif
+
again:
optimize_checktype(iseq, iobj);

View File

@ -1,26 +0,0 @@
Set correct shared library name.
Override the arch setting to remove OpenBSD version from it,
so ports don't have to be bumped when OpenBSD version changes.
Index: configure
--- configure.orig
+++ configure
@@ -29967,7 +29967,7 @@ fi
;; #(
openbsd*|mirbsd*) :
- LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.'${LIBruby27_VERSION}
;; #(
solaris*) :
@@ -31603,7 +31603,7 @@ fi
else $as_nop
- arch="${target_cpu}-${target_os}"
+ arch="${target_cpu}-openbsd"
printf "%s\n" "#define RUBY_PLATFORM \"$arch\"" >>confdefs.h

View File

@ -1,13 +0,0 @@
Index: coroutine/copy/Context.h
--- coroutine/copy/Context.h.orig
+++ coroutine/copy/Context.h
@@ -12,7 +12,9 @@
#include <setjmp.h>
#include <string.h>
#include <stdlib.h>
+#if defined(HAVE_ALLOCA_H)
#include <alloca.h>
+#endif
#define COROUTINE __attribute__((noreturn)) void

View File

@ -1,23 +0,0 @@
Use shadow versions of password functions.
Index: ext/etc/etc.c
--- ext/etc/etc.c.orig
+++ ext/etc/etc.c
@@ -189,7 +189,7 @@ etc_getpwuid(int argc, VALUE *argv, VALUE obj)
else {
uid = getuid();
}
- pwd = getpwuid(uid);
+ pwd = getpwuid_shadow(uid);
if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %d", (int)uid);
return setup_passwd(pwd);
#else
@@ -219,7 +219,7 @@ etc_getpwnam(VALUE obj, VALUE nam)
struct passwd *pwd;
const char *p = StringValueCStr(nam);
- pwd = getpwnam(p);
+ pwd = getpwnam_shadow(p);
if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %"PRIsVALUE, nam);
return setup_passwd(pwd);
#else

View File

@ -1,14 +0,0 @@
Build extensions in verbose mode by default.
Index: ext/extmk.rb
--- ext/extmk.rb.orig
+++ ext/extmk.rb
@@ -649,7 +649,7 @@ exts.map! {|d| "#{ext_prefix}/#{d}/."}
FileUtils.makedirs(File.dirname($command_output))
begin
atomic_write_open($command_output) do |mf|
- mf.puts "V = 0"
+ mf.puts "V = 1"
mf.puts "Q1 = $(V:1=)"
mf.puts "Q = $(Q1:0=@)"
mf.puts "ECHO1 = $(V:1=@:)"

View File

@ -1,11 +0,0 @@
Index: ext/openssl/extconf.rb
--- ext/openssl/extconf.rb.orig
+++ ext/openssl/extconf.rb
@@ -151,6 +151,7 @@ have_func("HMAC_CTX_free")
OpenSSL.check_func("RAND_pseudo_bytes", "openssl/rand.h") # deprecated
have_func("X509_STORE_get_ex_data")
have_func("X509_STORE_set_ex_data")
+have_func("X509_STORE_get_ex_new_index")
have_func("X509_CRL_get0_signature")
have_func("X509_REQ_get0_signature")
have_func("X509_REVOKED_get0_serialNumber")

View File

@ -1,29 +0,0 @@
Index: ext/openssl/openssl_missing.h
--- ext/openssl/openssl_missing.h.orig
+++ ext/openssl/openssl_missing.h
@@ -72,6 +72,9 @@ void ossl_HMAC_CTX_free(HMAC_CTX *);
#if !defined(HAVE_X509_STORE_SET_EX_DATA)
# define X509_STORE_set_ex_data(x, idx, data) \
CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data))
+#endif
+
+#if !defined(HAVE_X509_STORE_GET_EX_NEW_INDEX)
# define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \
(newf), (dupf), (freef))
@@ -145,6 +148,7 @@ void ossl_X509_REQ_get0_signature(const X509_REQ *, co
#endif
#if !defined(HAVE_OPAQUE_OPENSSL)
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL
#define IMPL_PKEY_GETTER(_type, _name) \
static inline _type *EVP_PKEY_get0_##_type(EVP_PKEY *pkey) { \
return pkey->pkey._name; }
@@ -196,6 +200,7 @@ IMPL_PKEY_GETTER(EC_KEY, ec)
#undef IMPL_PKEY_GETTER
#undef IMPL_KEY_ACCESSOR2
#undef IMPL_KEY_ACCESSOR3
+#endif
#endif /* HAVE_OPAQUE_OPENSSL */
#if !defined(EVP_CTRL_AEAD_GET_TAG)

View File

@ -1,16 +0,0 @@
Fix build with opaque OCSP_BASICRESP in LibreSSL 3.5.
The bug this works around should be fixed since LibreSSL 2.4.2
as far as I can tell.
Index: ext/openssl/ossl_ocsp.c
--- ext/openssl/ossl_ocsp.c.orig
+++ ext/openssl/ossl_ocsp.c
@@ -1093,7 +1093,7 @@ ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self
* exists in LibreSSL 2.1.10, 2.2.9, 2.3.6, 2.4.1.
*/
if (!(flg & (OCSP_NOCHAIN | OCSP_NOVERIFY)) &&
- sk_X509_num(x509s) && sk_X509_num(bs->certs)) {
+ sk_X509_num(x509s) && sk_X509_num(OCSP_resp_get0_certs(bs))) {
int i;
bs = ASN1_item_dup(ASN1_ITEM_rptr(OCSP_BASICRESP), bs);

View File

@ -1,14 +0,0 @@
Allow overriding CFLAGS for ripper extension.
Index: ext/ripper/depend
--- ext/ripper/depend.orig
+++ ext/ripper/depend
@@ -47,6 +47,8 @@ ripper.E: ripper.c
$(ECHO) preprocessing ripper.c
$(Q) $(CC) -E $(INCFLAGS) $(CPPFLAGS) $< | $(RUBY) $(srcdir)/tools/strip.rb > $@
+CFLAGS += %%CFLAGS_OVERRIDE%%
+
# AUTOGENERATED DEPENDENCIES START
ripper.o: $(RUBY_EXTCONF_H)
ripper.o: $(arch_hdrdir)/ruby/config.h

View File

@ -1,25 +0,0 @@
Make FileUtils.mkdir_p act more like mkdir(1) -p, by not attempting
to create directories that already exist. This fixes systrace
warnings when building ports.
Index: lib/fileutils.rb
--- lib/fileutils.rb.orig
+++ lib/fileutils.rb
@@ -211,7 +211,7 @@ module FileUtils
list.map {|path| remove_trailing_slash(path)}.each do |path|
# optimize for the most common case
begin
- fu_mkdir path, mode
+ fu_mkdir path, mode unless File.directory?(path)
next
rescue SystemCallError
next if File.directory?(path)
@@ -225,7 +225,7 @@ module FileUtils
stack.pop # root directory should exist
stack.reverse_each do |dir|
begin
- fu_mkdir dir, mode
+ fu_mkdir dir, mode unless File.directory?(dir)
rescue SystemCallError
raise unless File.directory?(dir)
end

View File

@ -1,14 +0,0 @@
Ignore linker warnings when compiling native extensions.
Index: lib/mkmf.rb
--- lib/mkmf.rb.orig
+++ lib/mkmf.rb
@@ -398,7 +398,7 @@ MESSAGE
result = nil
Logging.postpone do |log|
output = IO.popen(libpath_env, command, &:read)
- result = ($?.success? and File.zero?(log.path))
+ result = $?.success?
output
end
result

View File

@ -1,15 +0,0 @@
Make gem binaries on ruby 2.5 use a 25 suffix, so you can have both
other versions of the same gem installed at the same time
without conflicts.
--- lib/rubygems/commands/install_command.rb.orig Tue Dec 15 21:07:31 2015
+++ lib/rubygems/commands/install_command.rb Sat Dec 26 13:11:04 2015
@@ -21,7 +21,7 @@ class Gem::Commands::InstallCommand < Gem::Command
def initialize
defaults = Gem::DependencyInstaller::DEFAULT_OPTIONS.merge({
- :format_executable => false,
+ :format_executable => true,
:lock => true,
:suggest_alternate => true,
:version => Gem::Requirement.default,

View File

@ -1,12 +0,0 @@
Index: lib/rubygems/dependency_installer.rb
--- lib/rubygems/dependency_installer.rb.orig
+++ lib/rubygems/dependency_installer.rb
@@ -22,7 +22,7 @@ class Gem::DependencyInstaller
:document => %w[ri],
:domain => :both, # HACK dup
:force => false,
- :format_executable => false, # HACK dup
+ :format_executable => true, # HACK dup
:ignore_dependencies => false,
:prerelease => false,
:security_policy => nil, # HACK NoSecurity requires OpenSSL. AlmostNo? Low?

View File

@ -1,20 +0,0 @@
Ugly hack to make --user-install option work. Without this, when
a user uses gem install --user-install, it calls
/usr/bin/install -o root -g bin, which fails due to permission issues.
This removes the -o root -g bin, so it can succeed as a regular user.
Index: lib/rubygems/ext/ext_conf_builder.rb
--- lib/rubygems/ext/ext_conf_builder.rb.orig
+++ lib/rubygems/ext/ext_conf_builder.rb
@@ -34,6 +34,11 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
siteconf.puts "RbConfig::MAKEFILE_CONFIG['#{dir}'] = dest_path"
siteconf.puts "RbConfig::CONFIG['#{dir}'] = dest_path"
end
+ unless Process.euid == 0
+ %w[INSTALL INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM].each do |ins|
+ siteconf.puts "RbConfig::MAKEFILE_CONFIG['#{ins}'] = RbConfig::CONFIG['#{ins}'] = RbConfig::CONFIG['#{ins}'].gsub(/-o root -g bin/, '')"
+ end
+ end
siteconf.close

View File

@ -1,2 +0,0 @@
This is a Ruby extension to the GDBM library which is part of the Ruby
distribution.

View File

@ -1,17 +0,0 @@
Ruby is the interpreted scripting language for quick and
easy object-oriented programming. It has many features to
process text files and to do system management tasks (as in
Perl). It is simple, straight-forward, and extensible.
Features of Ruby are shown below.
- Simple Syntax
- *Normal* Object-Oriented features(ex. class, method calls)
- *Advanced* Object-Oriented features(ex. Mix-in, Singleton-method)
- Operator Overloading
- Exception Handling
- Iterators and Closures
- Garbage Collection
- Dynamic Loading of Object files(on some architecture)
- Highly Portable(works on many UNIX machines, and on DOS,
Windows, Mac, BeOS etc.)

View File

@ -1,2 +0,0 @@
This contains the files used by ruby's ri tool to get documentation
about classes and methods in ruby core and standard library.

View File

@ -1,18 +0,0 @@
If you want to use this package as your default system ruby, as root
create symbolic links like so (overwriting any previous default):
ln -sf ${PREFIX}/bin/ruby27 ${PREFIX}/bin/ruby
ln -sf ${PREFIX}/bin/erb27 ${PREFIX}/bin/erb
ln -sf ${PREFIX}/bin/irb27 ${PREFIX}/bin/irb
ln -sf ${PREFIX}/bin/rdoc27 ${PREFIX}/bin/rdoc
ln -sf ${PREFIX}/bin/ri27 ${PREFIX}/bin/ri
ln -sf ${PREFIX}/bin/rake27 ${PREFIX}/bin/rake
ln -sf ${PREFIX}/bin/gem27 ${PREFIX}/bin/gem
ln -sf ${PREFIX}/bin/bundle27 ${PREFIX}/bin/bundle
ln -sf ${PREFIX}/bin/bundler27 ${PREFIX}/bin/bundler
ln -sf ${PREFIX}/bin/racc27 ${PREFIX}/bin/racc
ln -sf ${PREFIX}/bin/racc2y27 ${PREFIX}/bin/racc2y
ln -sf ${PREFIX}/bin/y2racc27 ${PREFIX}/bin/y2racc
The ruby-shims package is also available to automatically select an
appropriate Ruby version per-project directory or system-wide.

View File

@ -1 +0,0 @@
@so lib/ruby/${REV}/${SUB}/gdbm.so

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
If you set up the symlinks to make ruby 2.7 the system
ruby, don't forget to remove the following files:
rm ${PREFIX}/bin/ruby
rm ${PREFIX}/bin/erb
rm ${PREFIX}/bin/irb
rm ${PREFIX}/bin/rdoc
rm ${PREFIX}/bin/ri
rm ${PREFIX}/bin/rake
rm ${PREFIX}/bin/gem
rm ${PREFIX}/bin/bundle
rm ${PREFIX}/bin/bundler
rm ${PREFIX}/bin/racc
rm ${PREFIX}/bin/racc2y
rm ${PREFIX}/bin/y2racc