Diff ruby-3.1.4-r4 with a ruby-3.2.2-r3

/usr/portage/dev-lang/ruby/ruby-3.2.2-r3.ebuild 2023-10-09 14:52:29.476368350 +0300
17 17
SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
18 18

  
19 19
LICENSE="|| ( Ruby-BSD BSD-2 )"
20
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
21
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs"
20
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
21
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc socks5 +ssl static-libs systemtap tk valgrind xemacs"
22 22

  
23 23
RDEPEND="
24 24
	berkdb? ( sys-libs/db:= )
25 25
	gdbm? ( sys-libs/gdbm:= )
26 26
	jemalloc? ( dev-libs/jemalloc:= )
27
	jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
27
	jit? ( >=virtual/rust-1.58.1 )
28 28
	ssl? (
29 29
		dev-libs/openssl:0=
30 30
	)
......
39 39
	sys-libs/readline:0=
40 40
	sys-libs/zlib
41 41
	virtual/libcrypt:=
42
	>=app-eselect/eselect-ruby-20201225
42
	>=app-eselect/eselect-ruby-20221225
43 43
"
44 44

  
45 45
DEPEND="
......
48 48
"
49 49

  
50 50
BUNDLED_GEMS="
51
	>=dev-ruby/minitest-5.15.0[ruby_targets_ruby31(-)]
52
	>=dev-ruby/power_assert-2.0.1[ruby_targets_ruby31(-)]
53
	>=dev-ruby/rake-13.0.6-r2[ruby_targets_ruby31(-)]
54
	>=dev-ruby/rbs-2.1.0[ruby_targets_ruby31(-)]
55
	>=dev-ruby/rexml-3.2.5[ruby_targets_ruby31(-)]
56
	>=dev-ruby/rss-0.2.9[ruby_targets_ruby31(-)]
57
	>=dev-ruby/test-unit-3.5.3[ruby_targets_ruby31(-)]
58
	>=dev-ruby/typeprof-0.12.2[ruby_targets_ruby31(-)]
51
	>=dev-ruby/debug-1.7.1[ruby_targets_ruby32(-)]
52
	>=dev-ruby/matrix-0.4.2[ruby_targets_ruby32(-)]
53
	>=dev-ruby/minitest-5.16.3[ruby_targets_ruby32(-)]
54
	>=dev-ruby/net-ftp-0.2.0[ruby_targets_ruby32(-)]
55
	>=dev-ruby/net-imap-0.3.4[ruby_targets_ruby32(-)]
56
	>=dev-ruby/net-pop-0.1.2[ruby_targets_ruby32(-)]
57
	>=dev-ruby/net-smtp-0.3.3[ruby_targets_ruby32(-)]
58
	>=dev-ruby/power_assert-2.0.3[ruby_targets_ruby32(-)]
59
	>=dev-ruby/prime-0.1.2[ruby_targets_ruby32(-)]
60
	>=dev-ruby/rake-13.0.6-r2[ruby_targets_ruby32(-)]
61
	>=dev-ruby/rbs-2.8.2[ruby_targets_ruby32(-)]
62
	>=dev-ruby/rexml-3.2.5[ruby_targets_ruby32(-)]
63
	>=dev-ruby/rss-0.2.9[ruby_targets_ruby32(-)]
64
	>=dev-ruby/test-unit-3.5.7[ruby_targets_ruby32(-)]
65
	>=dev-ruby/typeprof-0.21.3[ruby_targets_ruby32(-)]
59 66
"
60 67

  
61 68
PDEPEND="
62 69
	${BUNDLED_GEMS}
63
	virtual/rubygems[ruby_targets_ruby31(-)]
64
	>=dev-ruby/bundler-2.3.3[ruby_targets_ruby31(-)]
65
	>=dev-ruby/did_you_mean-1.6.1[ruby_targets_ruby31(-)]
66
	>=dev-ruby/json-2.6.1[ruby_targets_ruby31(-)]
67
	>=dev-ruby/rdoc-6.3.3[ruby_targets_ruby31(-)]
70
	virtual/rubygems[ruby_targets_ruby32(-)]
71
	>=dev-ruby/bundler-2.3.3[ruby_targets_ruby32(-)]
72
	>=dev-ruby/did_you_mean-1.6.1[ruby_targets_ruby32(-)]
73
	>=dev-ruby/json-2.6.1[ruby_targets_ruby32(-)]
74
	rdoc? ( >=dev-ruby/rdoc-6.3.3[ruby_targets_ruby32(-)] )
68 75
	xemacs? ( app-xemacs/ruby-modes )
69 76
"
70 77

  
71 78
src_prepare() {
72
	eapply "${FILESDIR}"/"${SLOT}"/011*.patch
79
	eapply "${FILESDIR}"/"${SLOT}"/010*.patch
73 80
	eapply "${FILESDIR}"/"${SLOT}"/902*.patch
74 81

  
75 82
	if use elibc_musl ; then
76
		eapply "${FILESDIR}"/3.1/901-musl-*.patch
83
		eapply "${FILESDIR}"/${SLOT}/901-musl-*.patch
77 84
	fi
78 85

  
79 86
	einfo "Unbundling gems..."
......
86 93
	rm -f bin/{racc,racc2y,y2racc} || die
87 94
	sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
88 95

  
89
	einfo "Removing bundled libraries..."
90
	rm -fr ext/fiddle/libffi-3.2.1 || die
96
	# Remove tests that are known to fail or require a network connection
97
	rm -f test/ruby/test_process.rb test/rubygems/test_gem{,_path_support}.rb || die
98
	rm -f test/rinda/test_rinda.rb test/socket/test_tcp.rb test/fiber/test_address_resolve.rb spec/ruby/library/socket/tcpsocket/{initialize,open}_spec.rb|| die
91 99

  
92 100
	# Remove webrick tests because setting LD_LIBRARY_PATH does not work for them.
93 101
	rm -rf tool/test/webrick || die
94 102

  
95
	# Remove tests that are known to fail or require a network connection
96
	rm -f test/ruby/test_process.rb test/rubygems/test_gem{,_path_support}.rb || die
97
	rm -f test/rinda/test_rinda.rb test/socket/test_tcp.rb test/fiber/test_address_resolve.rb test/resolv/test_addr.rb \
98
	   spec/ruby/library/socket/tcpsocket/{initialize,open}_spec.rb|| die
99
	sed -i -e '/def test_test/askip "Depends on system setup"' test/ruby/test_file_exhaustive.rb || die
103
	# Avoid test using the system ruby
104
	sed -i -e '/test_dumb_terminal/aomit "Uses system ruby"' test/reline/test_reline.rb || die
105

  
106
	# Avoid testing against hard-coded blockdev devices that most likely are not available
107
	sed -i -e '/def blockdev/a@blockdev = nil' test/ruby/test_file_exhaustive.rb || die
108

  
109
	# Avoid tests that require gem downloads
110
	sed -i -e '/^test-syntax-suggest/ s/\$(TEST_RUNNABLE)/no/' common.mk || die
111
	sed -i -e '/^check:/ s/\$(TEST_RUNNABLE)-\$(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest//' common.mk || die
100 112

  
101 113
	if use prefix ; then
102 114
		# Fix hardcoded SHELL var in mkmf library
......
188 200
		--enable-mkmf-verbose \
189 201
		--with-out-ext="${modules}" \
190 202
		$(use_with jemalloc jemalloc) \
191
		$(use_enable jit jit-support ) \
203
		$(use_enable jit jit-support) \
204
		$(use_enable jit yjit) \
192 205
		$(use_enable socks5 socks) \
193 206
		$(use_enable systemtap dtrace) \
194 207
		$(use_enable doc install-doc) \
......
197 210
		$(use_enable static-libs install-static-library) \
198 211
		$(use_with static-libs static-linked-ext) \
199 212
		$(use_enable debug) \
200
		$(use_with valgrind) \
201 213
		${myconf} \
214
		$(use_with valgrind) \
202 215
		--enable-option-checking=no
203 216

  
204 217
	# Makefile is broken because it lacks -ldl
......
206 219
}
207 220

  
208 221
src_compile() {
222
	export LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
209 223
	emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
210 224
}
211 225

  
212 226
src_test() {
227
	export LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
213 228
	emake V=1 check
214 229
}
215 230

  
......
258 273
		dodoc -r sample
259 274
	fi
260 275

  
261
	dodoc ChangeLog NEWS.md doc/NEWS* README*
276
	dodoc ChangeLog NEWS.md README*
277
	dodoc -r doc
262 278
}
263 279

  
264 280
pkg_postinst() {
Thank you!