summaryrefslogtreecommitdiff
path: root/lang/ruby/3.2/patches
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ruby/3.2/patches')
-rw-r--r--lang/ruby/3.2/patches/CVS/Entries17
-rw-r--r--lang/ruby/3.2/patches/CVS/Repository1
-rw-r--r--lang/ruby/3.2/patches/patch-common_mk34
-rw-r--r--lang/ruby/3.2/patches/patch-compile_c17
-rw-r--r--lang/ruby/3.2/patches/patch-configure49
-rw-r--r--lang/ruby/3.2/patches/patch-ext_etc_etc_c23
-rw-r--r--lang/ruby/3.2/patches/patch-ext_extmk_rb14
-rw-r--r--lang/ruby/3.2/patches/patch-ext_ripper_depend14
-rw-r--r--lang/ruby/3.2/patches/patch-lib_fileutils_rb16
-rw-r--r--lang/ruby/3.2/patches/patch-lib_mkmf_rb14
-rw-r--r--lang/ruby/3.2/patches/patch-lib_rubygems_commands_install_command_rb16
-rw-r--r--lang/ruby/3.2/patches/patch-lib_rubygems_dependency_installer_rb12
-rw-r--r--lang/ruby/3.2/patches/patch-lib_rubygems_ext_builder_rb21
-rw-r--r--lang/ruby/3.2/patches/patch-lib_rubygems_ext_ext_conf_builder_rb14
-rw-r--r--lang/ruby/3.2/patches/patch-lib_rubygems_rb25
-rw-r--r--lang/ruby/3.2/patches/patch-template_Makefile_in16
-rw-r--r--lang/ruby/3.2/patches/patch-template_builtin_binary_inc_tmpl15
-rw-r--r--lang/ruby/3.2/patches/patch-thread_pthread_h14
18 files changed, 0 insertions, 332 deletions
diff --git a/lang/ruby/3.2/patches/CVS/Entries b/lang/ruby/3.2/patches/CVS/Entries
deleted file mode 100644
index 90e741d..0000000
--- a/lang/ruby/3.2/patches/CVS/Entries
+++ /dev/null
@@ -1,17 +0,0 @@
1/patch-common_mk/1.1.1.1/Mon Dec 26 03:03:57 2022//
2/patch-compile_c/1.1.1.1/Mon Dec 26 03:03:57 2022//
3/patch-ext_etc_etc_c/1.1.1.1/Mon Dec 26 03:03:57 2022//
4/patch-ext_extmk_rb/1.1.1.1/Mon Dec 26 03:03:57 2022//
5/patch-ext_ripper_depend/1.1.1.1/Mon Dec 26 03:03:57 2022//
6/patch-lib_fileutils_rb/1.1.1.1/Mon Dec 26 03:03:57 2022//
7/patch-lib_mkmf_rb/1.1.1.1/Mon Dec 26 03:03:57 2022//
8/patch-lib_rubygems_commands_install_command_rb/1.1.1.1/Mon Dec 26 03:03:57 2022//
9/patch-lib_rubygems_dependency_installer_rb/1.1.1.1/Mon Dec 26 03:03:57 2022//
10/patch-template_builtin_binary_inc_tmpl/1.1.1.1/Mon Dec 26 03:03:57 2022//
11/patch-thread_pthread_h/1.1.1.1/Mon Dec 26 03:03:57 2022//
12/patch-lib_rubygems_ext_builder_rb/1.2/Sun Feb 12 08:19:31 2023//
13/patch-lib_rubygems_rb/1.1/Sat Feb 11 20:06:58 2023//
14/patch-lib_rubygems_ext_ext_conf_builder_rb/1.2/Sun Apr 2 07:16:05 2023//
15/patch-template_Makefile_in/1.1/Tue Jun 13 05:00:23 2023//
16/patch-configure/1.3/Sun Sep 24 17:19:52 2023//
17D
diff --git a/lang/ruby/3.2/patches/CVS/Repository b/lang/ruby/3.2/patches/CVS/Repository
deleted file mode 100644
index 6c2be2b..0000000
--- a/lang/ruby/3.2/patches/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
1ports/lang/ruby/3.2/patches
diff --git a/lang/ruby/3.2/patches/patch-common_mk b/lang/ruby/3.2/patches/patch-common_mk
deleted file mode 100644
index 00be1f5..0000000
--- a/lang/ruby/3.2/patches/patch-common_mk
+++ /dev/null
@@ -1,34 +0,0 @@
1Enable verbose mode when building.
2
3Don't regenerate rdoc documentation during install.
4
5Index: common.mk
6--- common.mk.orig
7+++ common.mk
8@@ -7,7 +7,7 @@ dll: $(LIBRUBY_SO)
9 .SUFFIXES: .rbinc .rb .inc .h .c .y .i .$(ASMEXT) .$(DTRACE_EXT)
10
11 # V=0 quiet, V=1 verbose. other values don't work.
12-V = 0
13+V = 1
14 V0 = $(V:0=)
15 Q1 = $(V:1=)
16 Q = $(Q1:0=@)
17@@ -328,7 +328,7 @@ ext/configure-ext.mk: $(PREP) all-incs $(MKFILES) $(RB
18 configure-ext: $(EXTS_MK)
19
20 build-ext: $(EXTS_MK)
21- $(Q)$(MAKE) -f $(EXTS_MK) $(mflags) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) \
22+ $(Q)$(MAKE) -f $(EXTS_MK) V=1 $(mflags) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) \
23 EXTENCS="$(ENCOBJS)" MINIRUBY="$(MINIRUBY)" UPDATE_LIBRARIES=no $(EXTSTATIC)
24 $(Q)$(MAKE) $(EXTS_NOTE)
25
26@@ -572,7 +572,7 @@ dont-install-man: $(PREP)
27 post-no-install-man::
28 @$(NULLCMD)
29
30-install-doc: rdoc pre-install-doc do-install-doc post-install-doc
31+install-doc: pre-install-doc do-install-doc post-install-doc
32 pre-install-doc:: install-prereq
33 do-install-doc: $(PROGRAM) pre-install-doc
34 $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc $(INSTALL_DOC_OPTS)
diff --git a/lang/ruby/3.2/patches/patch-compile_c b/lang/ruby/3.2/patches/patch-compile_c
deleted file mode 100644
index 2b6833d..0000000
--- a/lang/ruby/3.2/patches/patch-compile_c
+++ /dev/null
@@ -1,17 +0,0 @@
1Disable peephole optimizer on mips64 and sparc64, since it occasionally
2segfaults.
3
4Index: compile.c
5--- compile.c.orig
6+++ compile.c
7@@ -2994,6 +2994,10 @@ static int
8 iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcallopt)
9 {
10 INSN *const iobj = (INSN *)list;
11+#if defined(__mips64__) || defined(__sparc64__)
12+ return COMPILE_OK;
13+#endif
14+
15
16 again:
17 optimize_checktype(iseq, iobj);
diff --git a/lang/ruby/3.2/patches/patch-configure b/lang/ruby/3.2/patches/patch-configure
deleted file mode 100644
index f7af0c0..0000000
--- a/lang/ruby/3.2/patches/patch-configure
+++ /dev/null
@@ -1,49 +0,0 @@
1Support arm64 coroutines.
2Don't downgrade arm64 branch protection.
3
4Set correct shared library name.
5
6Override the arch setting to remove OpenBSD version from it,
7so ports don't have to be bumped when OpenBSD version changes.
8
9Index: configure
10--- configure.orig
11+++ configure
12@@ -10897,7 +10897,7 @@ esac
13 case "$target_cpu" in #(
14 aarch64) :
15
16- for opt in -mbranch-protection=pac-ret -msign-return-address=all
17+ for opt in -mbranch-protection=standard -msign-return-address=all
18 do :
19
20
21@@ -29475,6 +29475,10 @@ esac
22
23 coroutine_type=x86
24 ;; #(
25+ aarch64-openbsd*) :
26+
27+ coroutine_type=arm64
28+ ;; #(
29 *-openbsd*) :
30
31 coroutine_type=pthread
32@@ -31684,7 +31688,7 @@ fi
33 ;; #(
34 openbsd*|mirbsd*) :
35
36- LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
37+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.'${LIBruby32_VERSION}
38 ;; #(
39 solaris*) :
40
41@@ -33675,7 +33679,7 @@ then :
42
43 else $as_nop
44
45- arch="${target_cpu}-${target_os}"
46+ arch="${target_cpu}-openbsd"
47
48 fi
49 printf "%s\n" "#define RUBY_PLATFORM \"$arch\"" >>confdefs.h
diff --git a/lang/ruby/3.2/patches/patch-ext_etc_etc_c b/lang/ruby/3.2/patches/patch-ext_etc_etc_c
deleted file mode 100644
index 0d9265a..0000000
--- a/lang/ruby/3.2/patches/patch-ext_etc_etc_c
+++ /dev/null
@@ -1,23 +0,0 @@
1Use shadow versions of password functions.
2
3Index: ext/etc/etc.c
4--- ext/etc/etc.c.orig
5+++ ext/etc/etc.c
6@@ -223,7 +223,7 @@ etc_getpwuid(int argc, VALUE *argv, VALUE obj)
7 else {
8 uid = getuid();
9 }
10- pwd = getpwuid(uid);
11+ pwd = getpwuid_shadow(uid);
12 if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %d", (int)uid);
13 return setup_passwd(pwd);
14 #else
15@@ -253,7 +253,7 @@ etc_getpwnam(VALUE obj, VALUE nam)
16 struct passwd *pwd;
17 const char *p = StringValueCStr(nam);
18
19- pwd = getpwnam(p);
20+ pwd = getpwnam_shadow(p);
21 if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %"PRIsVALUE, nam);
22 return setup_passwd(pwd);
23 #else
diff --git a/lang/ruby/3.2/patches/patch-ext_extmk_rb b/lang/ruby/3.2/patches/patch-ext_extmk_rb
deleted file mode 100644
index 40d7877..0000000
--- a/lang/ruby/3.2/patches/patch-ext_extmk_rb
+++ /dev/null
@@ -1,14 +0,0 @@
1Build extensions in verbose mode by default.
2
3Index: ext/extmk.rb
4--- ext/extmk.rb.orig
5+++ ext/extmk.rb
6@@ -712,7 +712,7 @@ exts.map! {|d| "#{ext_prefix}/#{d}/."}
7 FileUtils.makedirs(File.dirname($command_output))
8 begin
9 atomic_write_open($command_output) do |mf|
10- mf.puts "V = 0"
11+ mf.puts "V = 1"
12 mf.puts "V0 = $(V:0=)"
13 mf.puts "Q1 = $(V:1=)"
14 mf.puts "Q = $(Q1:0=@)"
diff --git a/lang/ruby/3.2/patches/patch-ext_ripper_depend b/lang/ruby/3.2/patches/patch-ext_ripper_depend
deleted file mode 100644
index 7d5c477..0000000
--- a/lang/ruby/3.2/patches/patch-ext_ripper_depend
+++ /dev/null
@@ -1,14 +0,0 @@
1Allow overriding CFLAGS for ripper extension.
2
3Index: ext/ripper/depend
4--- ext/ripper/depend.orig
5+++ ext/ripper/depend
6@@ -45,6 +45,8 @@ ripper.E: ripper.c
7 $(ECHO) preprocessing ripper.c
8 $(Q) $(CC) -E $(INCFLAGS) $(CPPFLAGS) $< | $(RUBY) $(srcdir)/tools/strip.rb > $@
9
10+CFLAGS += %%CFLAGS_OVERRIDE%%
11+
12 # AUTOGENERATED DEPENDENCIES START
13 ripper.o: $(RUBY_EXTCONF_H)
14 ripper.o: $(arch_hdrdir)/ruby/config.h
diff --git a/lang/ruby/3.2/patches/patch-lib_fileutils_rb b/lang/ruby/3.2/patches/patch-lib_fileutils_rb
deleted file mode 100644
index aef98f9..0000000
--- a/lang/ruby/3.2/patches/patch-lib_fileutils_rb
+++ /dev/null
@@ -1,16 +0,0 @@
1Make FileUtils.mkdir_p act more like mkdir(1) -p, by not attempting
2to create directories that already exist. This fixes systrace
3warnings when building ports.
4
5Index: lib/fileutils.rb
6--- lib/fileutils.rb.orig
7+++ lib/fileutils.rb
8@@ -381,7 +381,7 @@ module FileUtils
9 end
10 stack.reverse_each do |dir|
11 begin
12- fu_mkdir dir, mode
13+ fu_mkdir dir, mode unless File.directory?(dir)
14 rescue SystemCallError
15 raise unless File.directory?(dir)
16 end
diff --git a/lang/ruby/3.2/patches/patch-lib_mkmf_rb b/lang/ruby/3.2/patches/patch-lib_mkmf_rb
deleted file mode 100644
index 68046ce..0000000
--- a/lang/ruby/3.2/patches/patch-lib_mkmf_rb
+++ /dev/null
@@ -1,14 +0,0 @@
1Ignore linker warnings when compiling native extensions.
2
3Index: lib/mkmf.rb
4--- lib/mkmf.rb.orig
5+++ lib/mkmf.rb
6@@ -415,7 +415,7 @@ MESSAGE
7 result = nil
8 Logging.postpone do |log|
9 output = IO.popen(env, command, &:read)
10- result = ($?.success? and File.zero?(log.path))
11+ result = $?.success?
12 output
13 end
14 result
diff --git a/lang/ruby/3.2/patches/patch-lib_rubygems_commands_install_command_rb b/lang/ruby/3.2/patches/patch-lib_rubygems_commands_install_command_rb
deleted file mode 100644
index 1dd38f2..0000000
--- a/lang/ruby/3.2/patches/patch-lib_rubygems_commands_install_command_rb
+++ /dev/null
@@ -1,16 +0,0 @@
1Make gem binaries on ruby 3.2 use a 32 suffix, so you can have both
2other versions of the same gem installed at the same time
3without conflicts.
4
5Index: lib/rubygems/commands/install_command.rb
6--- lib/rubygems/commands/install_command.rb.orig
7+++ lib/rubygems/commands/install_command.rb
8@@ -22,7 +22,7 @@ class Gem::Commands::InstallCommand < Gem::Command
9
10 def initialize
11 defaults = Gem::DependencyInstaller::DEFAULT_OPTIONS.merge({
12- :format_executable => false,
13+ :format_executable => true,
14 :lock => true,
15 :suggest_alternate => true,
16 :version => Gem::Requirement.default,
diff --git a/lang/ruby/3.2/patches/patch-lib_rubygems_dependency_installer_rb b/lang/ruby/3.2/patches/patch-lib_rubygems_dependency_installer_rb
deleted file mode 100644
index d108d6f..0000000
--- a/lang/ruby/3.2/patches/patch-lib_rubygems_dependency_installer_rb
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: lib/rubygems/dependency_installer.rb
2--- lib/rubygems/dependency_installer.rb.orig
3+++ lib/rubygems/dependency_installer.rb
4@@ -20,7 +20,7 @@ class Gem::DependencyInstaller
5 :document => %w[ri],
6 :domain => :both, # HACK dup
7 :force => false,
8- :format_executable => false, # HACK dup
9+ :format_executable => true, # HACK dup
10 :ignore_dependencies => false,
11 :prerelease => false,
12 :security_policy => nil, # HACK NoSecurity requires OpenSSL. AlmostNo? Low?
diff --git a/lang/ruby/3.2/patches/patch-lib_rubygems_ext_builder_rb b/lang/ruby/3.2/patches/patch-lib_rubygems_ext_builder_rb
deleted file mode 100644
index 13283f0..0000000
--- a/lang/ruby/3.2/patches/patch-lib_rubygems_ext_builder_rb
+++ /dev/null
@@ -1,21 +0,0 @@
1Ugly hack to make --user-install option work. Without this, when
2a user uses gem install --user-install, it calls
3/usr/bin/install -o root -g bin, which fails due to permission issues.
4This removes the -o root -g bin, so it can succeed as a regular user.
5
6Index: lib/rubygems/ext/builder.rb
7--- lib/rubygems/ext/builder.rb.orig
8+++ lib/rubygems/ext/builder.rb
9@@ -40,6 +40,12 @@ class Gem::Ext::Builder
10 env << "sitelibdir=%s" % sitedir
11 end
12
13+ unless Process.euid == 0
14+ %w[INSTALL INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM].each do |ins|
15+ env.unshift "#{ins}=#{RbConfig::MAKEFILE_CONFIG[ins].gsub(/-o root -g bin/, '')}"
16+ end
17+ end
18+
19 targets.each do |target|
20 # Pass DESTDIR via command line to override what's in MAKEFLAGS
21 cmd = [
diff --git a/lang/ruby/3.2/patches/patch-lib_rubygems_ext_ext_conf_builder_rb b/lang/ruby/3.2/patches/patch-lib_rubygems_ext_ext_conf_builder_rb
deleted file mode 100644
index 26f7a0c..0000000
--- a/lang/ruby/3.2/patches/patch-lib_rubygems_ext_ext_conf_builder_rb
+++ /dev/null
@@ -1,14 +0,0 @@
1Don't clean extension dir when installing gems. Doing so breaks packaging
2of some ports.
3
4Index: lib/rubygems/ext/ext_conf_builder.rb
5--- lib/rubygems/ext/ext_conf_builder.rb.orig
6+++ lib/rubygems/ext/ext_conf_builder.rb
7@@ -55,7 +55,6 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
8 destent.exist? || FileUtils.mv(ent.path, destent.path)
9 end
10
11- make dest_path, results, extension_dir, tmp_dest_relative, ["clean"]
12 ensure
13 ENV["DESTDIR"] = destdir
14 end
diff --git a/lang/ruby/3.2/patches/patch-lib_rubygems_rb b/lang/ruby/3.2/patches/patch-lib_rubygems_rb
deleted file mode 100644
index 233c34c..0000000
--- a/lang/ruby/3.2/patches/patch-lib_rubygems_rb
+++ /dev/null
@@ -1,25 +0,0 @@
1Disable the use of `gem update --system`, which is not supported when using
2OpenBSD packages. Also avoids printing the nagging update message:
3
4 A new release of RubyGems is available: 3.4.1 - 3.4.2!
5 Run `gem update --system 3.4.2` to update your installation.
6
7The ENV usage is to skip this logic during tests, to avoid test failures.
8
9Index: lib/rubygems.rb
10--- lib/rubygems.rb.orig
11+++ lib/rubygems.rb
12@@ -1168,6 +1168,13 @@ An Array (#{env.inspect}) was passed in from #{caller[
13
14 attr_accessor :disable_system_update_message
15
16+ unless ENV['RUBYGEMS_SYSTEM_UPDATE_MESSAGE'] == 'enable'
17+ Gem.disable_system_update_message = <<EOF
18+Ruby was installed using an OpenBSD package, and using `gem update --system`
19+is not supported.
20+EOF
21+ end
22+
23 ##
24 # Whether RubyGems should enhance builtin `require` to automatically
25 # check whether the path required is present in installed gems, and
diff --git a/lang/ruby/3.2/patches/patch-template_Makefile_in b/lang/ruby/3.2/patches/patch-template_Makefile_in
deleted file mode 100644
index 572d5ba..0000000
--- a/lang/ruby/3.2/patches/patch-template_Makefile_in
+++ /dev/null
@@ -1,16 +0,0 @@
1Allow linking libruby to libc++abi on amd64/aarch64, so other
2software that links to libruby other than ruby itself does
3not need to manually handle arch-dependent linking.
4
5Index: template/Makefile.in
6--- template/Makefile.in.orig
7+++ template/Makefile.in
8@@ -339,7 +339,7 @@ verify-static-library: $(LIBRUBY_A)
9 $(LIBRUBY_SO):
10 @-[ -n "$(EXTSTATIC)" ] || $(PRE_LIBRUBY_UPDATE)
11 $(ECHO) linking shared-library $@
12- $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
13+ $(Q) $(LDSHARED) ${LIBRUBY_DLDFLAGS} $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
14 -$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)ruby_static_id_*' \
15 -L '$(SYMBOL_PREFIX)*_threadptr_*' -L '$(SYMBOL_PREFIX)*_ec_*' $@
16 $(Q) $(POSTLINK)
diff --git a/lang/ruby/3.2/patches/patch-template_builtin_binary_inc_tmpl b/lang/ruby/3.2/patches/patch-template_builtin_binary_inc_tmpl
deleted file mode 100644
index 6c1c8e4..0000000
--- a/lang/ruby/3.2/patches/patch-template_builtin_binary_inc_tmpl
+++ /dev/null
@@ -1,15 +0,0 @@
1Ensure proper alignment of builtin binary arrays to fix crash on mips64.
2compile.c accesses the start of these arrays as struct ibf_header.
3
4Index: template/builtin_binary.inc.tmpl
5--- template/builtin_binary.inc.tmpl.orig
6+++ template/builtin_binary.inc.tmpl
7@@ -6,7 +6,7 @@
8 % ary = RubyVM.enum_for(:each_builtin).to_a
9 % ary.each{|feature, iseq|
10
11-static const unsigned char <%= feature %>_bin[] = {
12+static const unsigned char <%= feature %>_bin[] __attribute__((aligned(8))) = {
13 % iseq \
14 % . to_binary \
15 % . each_byte \
diff --git a/lang/ruby/3.2/patches/patch-thread_pthread_h b/lang/ruby/3.2/patches/patch-thread_pthread_h
deleted file mode 100644
index 7a0a1d4..0000000
--- a/lang/ruby/3.2/patches/patch-thread_pthread_h
+++ /dev/null
@@ -1,14 +0,0 @@
1base-gcc doesn't support __thread
2
3Index: thread_pthread.h
4--- thread_pthread.h.orig
5+++ thread_pthread.h
6@@ -93,7 +93,7 @@ struct rb_thread_sched {
7 #ifndef RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED
8 # if __STDC_VERSION__ >= 201112
9 # define RB_THREAD_LOCAL_SPECIFIER _Thread_local
10-# elif defined(__GNUC__)
11+# elif defined(__clang__)
12 /* note that ICC (linux) and Clang are covered by __GNUC__ */
13 # define RB_THREAD_LOCAL_SPECIFIER __thread
14 # endif