Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: dev-lang/ruby/
Date: Wed, 15 Nov 2017 16:40:16
Message-Id: 1510763963.a07bcbae9eb5d4d360741bb879a394c736a337ee.grobian@gentoo
1 commit: a07bcbae9eb5d4d360741bb879a394c736a337ee
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 15 16:39:23 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 15 16:39:23 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=a07bcbae
7
8 dev-lang/ruby: sync, bug #637572
9
10 Bug: https://bugs.gentoo.org/637572
11 Package-Manager: Portage-2.3.13-prefix, Repoman-2.3.4
12
13 dev-lang/ruby/Manifest | 6 +-
14 .../ruby/{ruby-2.1.5.ebuild => ruby-2.2.8.ebuild} | 84 ++++++++-------
15 .../ruby/{ruby-2.1.5.ebuild => ruby-2.4.2.ebuild} | 116 ++++++++++++---------
16 3 files changed, 118 insertions(+), 88 deletions(-)
17
18 diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
19 index 98f3bf0a8f..8e65e9d59e 100644
20 --- a/dev-lang/ruby/Manifest
21 +++ b/dev-lang/ruby/Manifest
22 @@ -1,6 +1,8 @@
23 -DIST ruby-2.1.5.tar.xz 9371780 SHA256 22ba1eb8d475c9ed7e0541418d86044c1ea4c093ab79c300c38fc0f721afe9a3 SHA512 8a257da64158d49bc2810695baf4b5849ef83e3dde452bf1e4823e52e8261225427d729fce2fb4e9b53d6d17ca9c96d491f242535c2f963738b74f90944e2a0b WHIRLPOOL 7dab5db91e56ba95a221c456fbcebfb86aff038a084b7638f504e91e4c9b45a0ad7ee0296d6531281c33d75a31ee4f5ad05af6567a93034316f3992ebc5d6bf3
24 DIST ruby-2.2.1.tar.xz 10320352 SHA256 3b2852c07fdc12d0ba2b5698c7587ae2b46141539a526d143da5860b55a626c0 SHA512 853517426cd4735bab42298a13cef6f4864b6f8787c3985eaa39a4d1efb40e121bdb51e874b567f0ec339fe001920bcd165067633992b2be30e7804191559151 WHIRLPOOL fdf6c064470172f366902c6d0896f25dfeea2690c0b184cc42ef65f8389a531ec8209551757cc3654fd4da54cb2055c687d3aca0a9716955586f50446ad0f26d
25 +DIST ruby-2.2.8.tar.xz 10520648 SHA256 37eafc15037396c26870f6a6c5bcd0658d14b46cd5e191a3b56d89dd22d561b0 SHA512 e21004bee537f0c706f4ac9526507b414ddb6a8d721e8fad8d7fe88992a4f048eb5eb79f8d8b8af2a8b331dcfa74b560490218a1acb3532c2cdb4fb4909da3c9 WHIRLPOOL a5b2f7a6c5131376980cf4d2a5f2d7a8a440effed588214c295fb4b83483d84310ba6bfbb96ee904384831eda47f0b1c0263d5190ca41db95df272428144cad1
26 DIST ruby-2.4.1.tar.xz 9939188 SHA256 4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654 SHA512 e6fd290b6edd166348b70f0f1c56f7ed9d956c4c1eb91d97d0548041ca4196b9b75ec1ad35c745bdbfd4de195899093e7205d7f02b014ecf1c48e6f31cf25903 WHIRLPOOL b45a6e3bd70e6ef802d084ad87ad0eddd85932e07939bd6ed6a2e6944aa289f231971fedd7d1eece792becb08312f37b80073a2a9df070f61f32747c0708523e
27 -DIST ruby-patches-2.1.5.tar.bz2 2310 SHA256 1743dc0cec0adc1a0b5d90b0ed7908f888b8251b7a414049a57e6e32e01e4ad6 SHA512 b695621d210a7afc6704dd480bf3e7fc559174ebf240d2287338d60537ba45e5bf0f5defac6b254064d4b28077e2b97ef23b7eadc1bfa1a6bf2c616e828f937c WHIRLPOOL e9fde062fc04e4e22aec2dc55250f9007c64b07c7d03875b4073c19af9cfb0ae735d6dcb2b65bd1465a457cf0ff0602866600b5af1d520df3efc8a418763ab5b
28 +DIST ruby-2.4.2.tar.xz 10046412 SHA256 748a8980d30141bd1a4124e11745bb105b436fb1890826e0d2b9ea31af27f735 SHA512 c1d42272fb0d94b693452e703b0ea4942bf59cbd4b08ba83bf039f54be97ebc88511632413da0164970b4cf97bc302bccb88aab48edfa8fa147498e7ee741595 WHIRLPOOL 4117f18e7901700d2cf603ed60cbe9b59ca65359ec359a7616b2cf90c76c25117afe864a8a7b55e7dc52c93377c541a8b497f1b281cdccade97aafa5ca363a5b
29 DIST ruby-patches-2.2.1.tar.bz2 2267 SHA256 0ad98acf3d3f9128c2471e360d4cef0c8967ef2feb59c18f8a781a94c13f349f SHA512 af533ae77b0149bceb04d544b2a6f6c0bd4bcbef53912b233452a7eeda1ecb9cd53aed1631ba9414e76eb0f960e9248fb82525ce5caf843aaad2ebf654cf74ce WHIRLPOOL c495f4e95c1709da1c91b5f7b42b9bc03dfed3849fb7b51ac120fbaae1dabdc99e631e60455f86f91f64eb113c9b24cbeb857efc84c128406350938e01bdb291
30 +DIST ruby-patches-2.2.8.tar.bz2 5764 SHA256 5c44fc38cb25d7dbdd8bef0fae49b5fc2f4f42da4e5b4b871655fd5e68faddbe SHA512 296387ec7f2ff82ad55f147d8f9568de544403d286ad24bb60aca916215d7ff6e1d6aca5a31c00a1999504989cda2bbd3260cae96c18ba73f9ffdcfd6b2695bd WHIRLPOOL 28889531d98b1bb96ceaa059f7fc641cc3db16eda0e3ad4cea031127c71897613d73cc3c8926dfd9ec978be79ca1201e7c90056ddcbec58d3e842c8af9a52389
31 DIST ruby-patches-2.4.1-r2.tar.bz2 4030 SHA256 f1beac832d3bd94b8a0be137da845ce96edd574be61f25945150e9a351e4ee73 SHA512 e3f141710a23e4716696fdd5fd898386b32ce6e9d729738591bde8a74f9af8353e0a3f5f9c48403443c6c1ee074b5c2f3b5e9503d96b57de5c6c484ccb337b40 WHIRLPOOL 327404741b8448f7d49ad3ca3cfe915b60881348fc98e18027276f26d4381237f67b7f8d849df765e76184c2f4a92861b585ddf9b25dcb485e4ac5e2b4ad43cd
32 +DIST ruby-patches-2.4.2.tar.bz2 3443 SHA256 621e92c4c14cec458100adf74e122df76663be4f75fc4ea86423a9ac6755ea3e SHA512 fb8349c67c72caf10ec12c4b5410194b4df24345446c2e3b6c6176d00727bfe803f4a905ef094a2d52315b6f4c3ce74fb8fbaa2fdf5efe46e6ccb24bf8418b17 WHIRLPOOL 306a16b49037a669398fb9c1b7c2b5484860d8749bf4c12d0e5eec02e3a7f7760b48b4a3cd709e0fa2b54f3d8dddff36d7eeb8d53d2d647d59e099b0299b8ed1
33
34 diff --git a/dev-lang/ruby/ruby-2.1.5.ebuild b/dev-lang/ruby/ruby-2.2.8.ebuild
35 similarity index 72%
36 copy from dev-lang/ruby/ruby-2.1.5.ebuild
37 copy to dev-lang/ruby/ruby-2.2.8.ebuild
38 index 16535d3be4..deecdf4920 100644
39 --- a/dev-lang/ruby/ruby-2.1.5.ebuild
40 +++ b/dev-lang/ruby/ruby-2.2.8.ebuild
41 @@ -1,6 +1,5 @@
42 # Copyright 1999-2017 Gentoo Foundation
43 # Distributed under the terms of the GNU General Public License v2
44 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-2.1.5.ebuild,v 1.4 2015/03/31 18:33:50 ulm Exp $
45
46 EAPI=5
47
48 @@ -8,15 +7,12 @@ EAPI=5
49
50 inherit autotools eutils flag-o-matic multilib versionator
51
52 -RUBYPL=$(get_version_component_range 4)
53 -
54 MY_P="${PN}-$(get_version_component_range 1-3)"
55 -#MY_P="${PN}-$(get_version_component_range 1-3)-${RUBYPL:-0}"
56 S=${WORKDIR}/${MY_P}
57
58 SLOT=$(get_version_component_range 1-2)
59 MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
60 -RUBYVERSION=2.1.0
61 +RUBYVERSION=2.2.0
62
63 if [[ -n ${PATCHSET} ]]; then
64 if [[ ${PVR} == ${PV} ]]; then
65 @@ -30,43 +26,55 @@ fi
66
67 DESCRIPTION="An object-oriented scripting language"
68 HOMEPAGE="http://www.ruby-lang.org/"
69 -SRC_URI="mirror://ruby/2.1/${MY_P}.tar.xz
70 - http://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
71 +SRC_URI="mirror://ruby/2.2/${MY_P}.tar.xz
72 + https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
73
74 LICENSE="|| ( Ruby-BSD BSD-2 )"
75 KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
76 -IUSE="berkdb debug doc examples gdbm ipv6 +rdoc rubytests socks5 ssl xemacs ncurses +readline cpu_flags_x86_sse2"
77 +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl tk xemacs ncurses +readline"
78
79 RDEPEND="
80 - berkdb? ( sys-libs/db )
81 + berkdb? ( sys-libs/db:= )
82 gdbm? ( sys-libs/gdbm )
83 - ssl? ( dev-libs/openssl )
84 + jemalloc? ( dev-libs/jemalloc )
85 + ssl? (
86 + !libressl? ( dev-libs/openssl:0= )
87 + libressl? ( dev-libs/libressl )
88 + )
89 socks5? ( >=net-proxy/dante-1.1.13 )
90 - ncurses? ( sys-libs/ncurses )
91 - readline? ( sys-libs/readline )
92 + tk? (
93 + dev-lang/tcl:0=[threads]
94 + dev-lang/tk:0=[threads]
95 + )
96 + ncurses? ( sys-libs/ncurses:0= )
97 + readline? ( sys-libs/readline:0= )
98 dev-libs/libyaml
99 virtual/libffi
100 sys-libs/zlib
101 - >=app-eselect/eselect-ruby-20131227
102 + >=app-eselect/eselect-ruby-20141227
103 !<dev-ruby/rdoc-3.9.4
104 !<dev-ruby/rubygems-1.8.10-r1"
105
106 DEPEND="${RDEPEND}"
107 +
108 +BUNDLED_GEMS="
109 + >=dev-ruby/minitest-5.4.3[ruby_targets_ruby22]
110 + >=dev-ruby/power_assert-0.2.2[ruby_targets_ruby22]
111 + >=dev-ruby/test-unit-3.0.8[ruby_targets_ruby22]
112 +"
113 +
114 PDEPEND="
115 - virtual/rubygems[ruby_targets_ruby21]
116 - >=dev-ruby/json-1.8.1[ruby_targets_ruby21]
117 - >=dev-ruby/rake-0.9.6[ruby_targets_ruby21]
118 - rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby21] )
119 + ${BUNDLED_GEMS}
120 + virtual/rubygems[ruby_targets_ruby22]
121 + >=dev-ruby/json-1.8.1[ruby_targets_ruby22]
122 + >=dev-ruby/rake-0.9.6[ruby_targets_ruby22]
123 + rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby22] )
124 xemacs? ( app-xemacs/ruby-modes )"
125
126 src_prepare() {
127 epatch "${FILESDIR}/${PN}-1.9.1-prefix.patch"
128
129 - if use cpu_flags_x86_sse2 ; then
130 - excluded_patches="012_no_forced_sse2.patch"
131 - fi
132 -
133 - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
134 + EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
135 epatch "${WORKDIR}/patches"
136
137 # We can no longer unbundle all of rake because rubygems now depends
138 @@ -74,9 +82,13 @@ src_prepare() {
139 # rubygems, but remove the bits that would cause a file collision.
140 einfo "Unbundling gems..."
141 cd "$S"
142 - rm -r \
143 + rm -rf \
144 {bin,lib}/rake lib/rake.rb man/rake.1 \
145 bin/gem || die "removal failed"
146 + # Remove bundled gems that we will install via PDEPEND, bug
147 + # 539700. Use explicit version numbers to ensure rm fails when they
148 + # change so we can update dependencies accordingly.
149 + rm gems/{minitest-5.4.3,power_assert-0.2.2,test-unit-3.0.8}.gem || die
150
151 # Fix a hardcoded lib path in configure script
152 sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
153 @@ -89,12 +101,7 @@ src_prepare() {
154 }
155
156 src_configure() {
157 - local myconf=
158 -
159 - # The Tk module can no longer be built because the module code is no
160 - # longer compatible with newer stable versions.
161 - # https://bugs.gentoo.org/show_bug.cgi?id=500894
162 - local modules="tk"
163 + local modules= myconf=
164
165 # -fomit-frame-pointer makes ruby segfault, see bug #150413.
166 filter-flags -fomit-frame-pointer
167 @@ -136,8 +143,14 @@ src_configure() {
168 if ! use ncurses ; then
169 modules="${modules},curses"
170 fi
171 + if ! use tk ; then
172 + modules="${modules},tk"
173 + fi
174
175 - INSTALL="${EPREFIX}/usr/bin/install -c" econf \
176 + # Provide an empty LIBPATHENV because we disable rpath but we do not
177 + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
178 + # #564272
179 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
180 --program-suffix=${MY_SUFFIX} \
181 --with-soname=ruby${MY_SUFFIX} \
182 --docdir=${EPREFIX}/usr/share/doc/${P} \
183 @@ -145,6 +158,7 @@ src_configure() {
184 --enable-pthread \
185 --disable-rpath \
186 --with-out-ext="${modules}" \
187 + $(use_with jemalloc jemalloc) \
188 $(use_enable socks5 socks) \
189 $(use_enable doc install-doc) \
190 --enable-ipv6 \
191 @@ -188,7 +202,7 @@ src_install() {
192
193 local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
194
195 - LD_LIBRARY_PATH="${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
196 + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
197 RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
198 for d in $(find "${S}/ext" -type d) ; do
199 RUBYLIB="${RUBYLIB}:$d"
200 @@ -198,9 +212,9 @@ src_install() {
201 emake V=1 DESTDIR="${D}" install || die "make install failed"
202
203 # Remove installed rubygems copy
204 - rm -r "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
205 - rm -r "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
206 - rm -r "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
207 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
208 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
209 + rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
210
211 if use doc; then
212 make DESTDIR="${D}" install-doc || die "make install-doc failed"
213 @@ -228,7 +242,7 @@ pkg_postinst() {
214
215 elog
216 elog "To switch between available Ruby profiles, execute as root:"
217 - elog "\teselect ruby set ruby(19|20|...)"
218 + elog "\teselect ruby set ruby(21|22|...)"
219 elog
220 }
221
222
223 diff --git a/dev-lang/ruby/ruby-2.1.5.ebuild b/dev-lang/ruby/ruby-2.4.2.ebuild
224 similarity index 62%
225 rename from dev-lang/ruby/ruby-2.1.5.ebuild
226 rename to dev-lang/ruby/ruby-2.4.2.ebuild
227 index 16535d3be4..65f42b0dc7 100644
228 --- a/dev-lang/ruby/ruby-2.1.5.ebuild
229 +++ b/dev-lang/ruby/ruby-2.4.2.ebuild
230 @@ -1,22 +1,18 @@
231 # Copyright 1999-2017 Gentoo Foundation
232 # Distributed under the terms of the GNU General Public License v2
233 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-2.1.5.ebuild,v 1.4 2015/03/31 18:33:50 ulm Exp $
234
235 -EAPI=5
236 +EAPI=6
237
238 #PATCHSET=1
239
240 inherit autotools eutils flag-o-matic multilib versionator
241
242 -RUBYPL=$(get_version_component_range 4)
243 -
244 MY_P="${PN}-$(get_version_component_range 1-3)"
245 -#MY_P="${PN}-$(get_version_component_range 1-3)-${RUBYPL:-0}"
246 S=${WORKDIR}/${MY_P}
247
248 SLOT=$(get_version_component_range 1-2)
249 MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
250 -RUBYVERSION=2.1.0
251 +RUBYVERSION=${SLOT}.0
252
253 if [[ -n ${PATCHSET} ]]; then
254 if [[ ${PVR} == ${PV} ]]; then
255 @@ -30,71 +26,83 @@ fi
256
257 DESCRIPTION="An object-oriented scripting language"
258 HOMEPAGE="http://www.ruby-lang.org/"
259 -SRC_URI="mirror://ruby/2.1/${MY_P}.tar.xz
260 - http://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
261 +SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz
262 + https://dev.gentoo.org/~graaff/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
263
264 LICENSE="|| ( Ruby-BSD BSD-2 )"
265 KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
266 -IUSE="berkdb debug doc examples gdbm ipv6 +rdoc rubytests socks5 ssl xemacs ncurses +readline cpu_flags_x86_sse2"
267 +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl static-libs tk xemacs"
268
269 RDEPEND="
270 - berkdb? ( sys-libs/db )
271 + berkdb? ( sys-libs/db:= )
272 gdbm? ( sys-libs/gdbm )
273 - ssl? ( dev-libs/openssl )
274 + jemalloc? ( dev-libs/jemalloc )
275 + ssl? (
276 + !libressl? ( dev-libs/openssl:0= )
277 + libressl? ( dev-libs/libressl )
278 + )
279 socks5? ( >=net-proxy/dante-1.1.13 )
280 - ncurses? ( sys-libs/ncurses )
281 - readline? ( sys-libs/readline )
282 + tk? (
283 + dev-lang/tcl:0=[threads]
284 + dev-lang/tk:0=[threads]
285 + )
286 dev-libs/libyaml
287 virtual/libffi
288 sys-libs/zlib
289 - >=app-eselect/eselect-ruby-20131227
290 + >=app-eselect/eselect-ruby-20161226
291 !<dev-ruby/rdoc-3.9.4
292 !<dev-ruby/rubygems-1.8.10-r1"
293
294 DEPEND="${RDEPEND}"
295 +
296 +BUNDLED_GEMS="
297 + >=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24]
298 + >=dev-ruby/minitest-5.10.1[ruby_targets_ruby24]
299 + >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24]
300 + >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24]
301 + >=dev-ruby/rake-12.0.0[ruby_targets_ruby24]
302 + >=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24]
303 + >=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24]
304 +"
305 +
306 PDEPEND="
307 - virtual/rubygems[ruby_targets_ruby21]
308 - >=dev-ruby/json-1.8.1[ruby_targets_ruby21]
309 - >=dev-ruby/rake-0.9.6[ruby_targets_ruby21]
310 - rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby21] )
311 + ${BUNDLED_GEMS}
312 + virtual/rubygems[ruby_targets_ruby24]
313 + >=dev-ruby/json-2.0.2[ruby_targets_ruby24]
314 + rdoc? ( >=dev-ruby/rdoc-5.1.0[ruby_targets_ruby24] )
315 xemacs? ( app-xemacs/ruby-modes )"
316
317 src_prepare() {
318 epatch "${FILESDIR}/${PN}-1.9.1-prefix.patch"
319 -
320 - if use cpu_flags_x86_sse2 ; then
321 - excluded_patches="012_no_forced_sse2.patch"
322 - fi
323 -
324 - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
325 + EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
326 epatch "${WORKDIR}/patches"
327
328 - # We can no longer unbundle all of rake because rubygems now depends
329 - # on this. We leave the actual rake code around to bootstrap
330 - # rubygems, but remove the bits that would cause a file collision.
331 einfo "Unbundling gems..."
332 cd "$S"
333 - rm -r \
334 - {bin,lib}/rake lib/rake.rb man/rake.1 \
335 - bin/gem || die "removal failed"
336 + # Remove bundled gems that we will install via PDEPEND, bug
337 + # 539700. Use explicit version numbers to ensure rm fails when they
338 + # change so we can update dependencies accordingly.
339 + 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
340 +
341 + einfo "Removing bundled libraries..."
342 + rm -fr ext/fiddle/libffi-3.2.1 || die
343
344 # Fix a hardcoded lib path in configure script
345 sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
346 configure.in || die "sed failed"
347 -
348 # Fix hardcoded SHELL var in mkmf library
349 - sed -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" -i lib/mkmf.rb
350 + sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb
351 + # avoid symlink loop on Darwin (?!)
352 + sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).dylib//' \
353 + configure.in || die "sed failed"
354 +
355 + eapply_user
356
357 eautoreconf
358 }
359
360 src_configure() {
361 - local myconf=
362 -
363 - # The Tk module can no longer be built because the module code is no
364 - # longer compatible with newer stable versions.
365 - # https://bugs.gentoo.org/show_bug.cgi?id=500894
366 - local modules="tk"
367 + local modules= myconf=
368
369 # -fomit-frame-pointer makes ruby segfault, see bug #150413.
370 filter-flags -fomit-frame-pointer
371 @@ -121,9 +129,6 @@ src_configure() {
372 use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
373
374 # Determine which modules *not* to build depending in the USE flags.
375 - if ! use readline ; then
376 - modules="${modules},readline"
377 - fi
378 if ! use berkdb ; then
379 modules="${modules},dbm"
380 fi
381 @@ -133,11 +138,14 @@ src_configure() {
382 if ! use ssl ; then
383 modules="${modules},openssl"
384 fi
385 - if ! use ncurses ; then
386 - modules="${modules},curses"
387 + if ! use tk ; then
388 + modules="${modules},tk"
389 fi
390
391 - INSTALL="${EPREFIX}/usr/bin/install -c" econf \
392 + # Provide an empty LIBPATHENV because we disable rpath but we do not
393 + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
394 + # #564272
395 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
396 --program-suffix=${MY_SUFFIX} \
397 --with-soname=ruby${MY_SUFFIX} \
398 --docdir=${EPREFIX}/usr/share/doc/${P} \
399 @@ -145,9 +153,13 @@ src_configure() {
400 --enable-pthread \
401 --disable-rpath \
402 --with-out-ext="${modules}" \
403 + $(use_with jemalloc jemalloc) \
404 $(use_enable socks5 socks) \
405 $(use_enable doc install-doc) \
406 --enable-ipv6 \
407 + $(use_enable static-libs static) \
408 + $(use_enable static-libs install-static-library) \
409 + $(use_with static-libs static-linked-ext) \
410 $(use_enable debug) \
411 ${myconf} \
412 --with-readline-dir="${EPREFIX}"/usr \
413 @@ -188,19 +200,21 @@ src_install() {
414
415 local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
416
417 - LD_LIBRARY_PATH="${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
418 + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
419 + DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
420 RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
421 for d in $(find "${S}/ext" -type d) ; do
422 RUBYLIB="${RUBYLIB}:$d"
423 done
424 - export LD_LIBRARY_PATH RUBYLIB
425 + export LD_LIBRARY_PATH DYLD_LIBRARY_PATH RUBYLIB
426
427 emake V=1 DESTDIR="${D}" install || die "make install failed"
428
429 - # Remove installed rubygems copy
430 - rm -r "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
431 - rm -r "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
432 - rm -r "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
433 + # Remove installed rubygems and rdoc copy
434 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
435 + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
436 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
437 + rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
438
439 if use doc; then
440 make DESTDIR="${D}" install-doc || die "make install-doc failed"
441 @@ -228,7 +242,7 @@ pkg_postinst() {
442
443 elog
444 elog "To switch between available Ruby profiles, execute as root:"
445 - elog "\teselect ruby set ruby(19|20|...)"
446 + elog "\teselect ruby set ruby(23|24|...)"
447 elog
448 }