Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ruby/
Date: Sat, 27 May 2017 06:44:38
Message-Id: 1495866835.608e7f503cc48968b86b887d1b42814a325dd5ba.graaff@gentoo
1 commit: 608e7f503cc48968b86b887d1b42814a325dd5ba
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 27 06:33:23 2017 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sat May 27 06:33:55 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=608e7f50
7
8 dev-lang/ruby: bug fixes and small improvements
9
10 Ruby 2.4:
11
12 Add USE=static-libs support on ruby 2.4, bug 618878
13 Allow better crossdev on windows with ruby 2.4, bug 618878
14
15 Thanks to ntzrmtthihu777 for providing patches.
16
17 Ruby 2.2, 2.3, 2.3:
18
19 Fix compilation on ia64, bug 561780
20
21 Thanks to slyfox for providing patches.
22
23 Ruby 2.2:
24
25 Backport tcl/tk security fixes, bug 605536
26
27 Package-Manager: Portage-2.3.5, Repoman-2.3.1
28
29 dev-lang/ruby/Manifest | 3 +
30 dev-lang/ruby/ruby-2.2.7-r2.ebuild | 245 +++++++++++++++++++++++++++++++++++++
31 dev-lang/ruby/ruby-2.3.4-r2.ebuild | 242 ++++++++++++++++++++++++++++++++++++
32 dev-lang/ruby/ruby-2.4.1-r2.ebuild | 243 ++++++++++++++++++++++++++++++++++++
33 4 files changed, 733 insertions(+)
34
35 diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
36 index c78de3e2406..5d2e09e5bab 100644
37 --- a/dev-lang/ruby/Manifest
38 +++ b/dev-lang/ruby/Manifest
39 @@ -9,9 +9,12 @@ DIST ruby-patches-2.1.10.tar.bz2 1931 SHA256 7e02c1b6a6352693bfd5828c9d1a7633a52
40 DIST ruby-patches-2.1.9.tar.bz2 1931 SHA256 7e02c1b6a6352693bfd5828c9d1a7633a52baa57d8770df182ed0d8b450a3341 SHA512 85928207db4f76e58925e50d39d73db2d521674385ce3232828377e7d7bb4252aafb9f93d6045d4c159bf094b472af61ef9307203db313bf28918fe35e0f3a21 WHIRLPOOL 17a698b0a09be15f444ea34b33e9aa1d029fbd572c565072a92480bf7b6b21f1b6b88b0da3183a486bae30e7e65f3172cd72b7336be1dc5974b62bd8e2b9ef7a
41 DIST ruby-patches-2.2.6.tar.bz2 2272 SHA256 f54373704ce8df732490e8d1e7e35188503faacc5278fe0ab0d8c07bdc762fed SHA512 ed8bff8f730ccb114e62784d29541f276b2821d9eb121a9772dc4aabc139b688f2b14f5f27710098a8cd751c62d31b46170b427ad54dc4f6490c003450ae1583 WHIRLPOOL 8598c9284252c1e7cc9f9019c5f468ce5ab8b4ae013e71c631cd00cc8bfde068b041f1bc6851bb2962982a1e46cbde0ddc51c186ea41638a7881c587c658e603
42 DIST ruby-patches-2.2.7-r1.tar.bz2 2272 SHA256 f54373704ce8df732490e8d1e7e35188503faacc5278fe0ab0d8c07bdc762fed SHA512 ed8bff8f730ccb114e62784d29541f276b2821d9eb121a9772dc4aabc139b688f2b14f5f27710098a8cd751c62d31b46170b427ad54dc4f6490c003450ae1583 WHIRLPOOL 8598c9284252c1e7cc9f9019c5f468ce5ab8b4ae013e71c631cd00cc8bfde068b041f1bc6851bb2962982a1e46cbde0ddc51c186ea41638a7881c587c658e603
43 +DIST ruby-patches-2.2.7-r2.tar.bz2 5338 SHA256 cf7002fe00e18b35d7d2a70c3d0a51a57a8aa0d9b3f312c5f844b349a759c21c SHA512 ba97f1875acaff31babd9279470414777971bc163ea2578185cfd037441b5aba23075b20db9c1cbd98b6e0d6cf8355dc0f226fdd82c870c48b51c8531319029f WHIRLPOOL 92db2244170cdce944975f14e61bc18fb7b8e69e5236eb0877306527507ea97fface4cbe331a6741c876f2ee4f4b9f3d2b6fb8504cb15962851634f89b61aa60
44 DIST ruby-patches-2.2.7.tar.bz2 2272 SHA256 f54373704ce8df732490e8d1e7e35188503faacc5278fe0ab0d8c07bdc762fed SHA512 ed8bff8f730ccb114e62784d29541f276b2821d9eb121a9772dc4aabc139b688f2b14f5f27710098a8cd751c62d31b46170b427ad54dc4f6490c003450ae1583 WHIRLPOOL 8598c9284252c1e7cc9f9019c5f468ce5ab8b4ae013e71c631cd00cc8bfde068b041f1bc6851bb2962982a1e46cbde0ddc51c186ea41638a7881c587c658e603
45 DIST ruby-patches-2.3.3-r1.tar.bz2 2223 SHA256 f0a803173564368e5cf31162e1dba901c46640f9e861255f6cbe14256d18f3eb SHA512 bb47000e516017c1fedf7c5313b0628fa734030e69bd0fed1c06a38dd115b8c50837e3dd917f272e24abf5609c4c12793ae4570bfd7d6210290785bf2f8287bd WHIRLPOOL 0b0d4dcf7df4ff3ff11610bfe7a7b29ed621b45b412cb7618a6572f98a568ac67419bd852b193cfc3aa0968382cf9400a578511e9e8fb8b2125bc876e733bd64
46 DIST ruby-patches-2.3.4-r1.tar.bz2 2255 SHA256 32bb888f3ea9e81e4fdff5e852493aafc8f12bfcf9997981f7b7588d6e8ec9c1 SHA512 af7ad3255cf8450859e3c5564393ca106893fd1e40178ad153fb8e66871d30e326f63d48c1904fac5c353408f71e767c72d49fdbf47198c041a628b41c51c868 WHIRLPOOL dc412a788ec77dc9dad4fd631fc8aa5c909b9d21bf6b0b538c4ba398c1670cb01fbf1e4d92a38fa869b96f786707a9c45c7fe5ca7e04f75ff428b20d9fb34c53
47 +DIST ruby-patches-2.3.4-r2.tar.bz2 3423 SHA256 5bea5f60033bfaf711c62004dfb4ed3d677b3a96d98de30ffe18ccd40c8533c3 SHA512 502bceb711e4ae1add64dde1ca94cfbb09c8a69010b8e640bb41d8278c0bb8073d3b6c3350217b9775a76746d3bdbc46f0b51342f4812e36341f0671c574d28e WHIRLPOOL cae21a87e76e3da40ee8d2a73c028bc658c6e6b6860b9f4e656fb769830734396a1ccf47453f355636e252fe3f8d3fc44d427d08249c08f37a6fdbffcdc25c8e
48 DIST ruby-patches-2.3.4.tar.bz2 2255 SHA256 32bb888f3ea9e81e4fdff5e852493aafc8f12bfcf9997981f7b7588d6e8ec9c1 SHA512 af7ad3255cf8450859e3c5564393ca106893fd1e40178ad153fb8e66871d30e326f63d48c1904fac5c353408f71e767c72d49fdbf47198c041a628b41c51c868 WHIRLPOOL dc412a788ec77dc9dad4fd631fc8aa5c909b9d21bf6b0b538c4ba398c1670cb01fbf1e4d92a38fa869b96f786707a9c45c7fe5ca7e04f75ff428b20d9fb34c53
49 DIST ruby-patches-2.4.1-r1.tar.bz2 2047 SHA256 9560b8e8dc4a5517814df07aa635c9269f5e7cff5a15827a25a9f0811194e450 SHA512 b35db875a7e4a226e75eb6f7bc68b4bc97cc699bdc5f6930015e55cdc324b67b9883a2aa574c9c9a8b5dc5345c4df8a5ca8ace5b794b3e4de6517f3eefd25745 WHIRLPOOL fc5d226f46fe4ee1c86f6fff51ec9184b8c0ec08a1793eab365437d4ce2fd573cfc8857386cd10932f7dde05254bc975eff5b7986aea429730c606147fae2a5c
50 +DIST ruby-patches-2.4.1-r2.tar.bz2 4030 SHA256 f1beac832d3bd94b8a0be137da845ce96edd574be61f25945150e9a351e4ee73 SHA512 e3f141710a23e4716696fdd5fd898386b32ce6e9d729738591bde8a74f9af8353e0a3f5f9c48403443c6c1ee074b5c2f3b5e9503d96b57de5c6c484ccb337b40 WHIRLPOOL 327404741b8448f7d49ad3ca3cfe915b60881348fc98e18027276f26d4381237f67b7f8d849df765e76184c2f4a92861b585ddf9b25dcb485e4ac5e2b4ad43cd
51 DIST ruby-patches-2.4.1.tar.bz2 2047 SHA256 9560b8e8dc4a5517814df07aa635c9269f5e7cff5a15827a25a9f0811194e450 SHA512 b35db875a7e4a226e75eb6f7bc68b4bc97cc699bdc5f6930015e55cdc324b67b9883a2aa574c9c9a8b5dc5345c4df8a5ca8ace5b794b3e4de6517f3eefd25745 WHIRLPOOL fc5d226f46fe4ee1c86f6fff51ec9184b8c0ec08a1793eab365437d4ce2fd573cfc8857386cd10932f7dde05254bc975eff5b7986aea429730c606147fae2a5c
52
53 diff --git a/dev-lang/ruby/ruby-2.2.7-r2.ebuild b/dev-lang/ruby/ruby-2.2.7-r2.ebuild
54 new file mode 100644
55 index 00000000000..621e417b2cf
56 --- /dev/null
57 +++ b/dev-lang/ruby/ruby-2.2.7-r2.ebuild
58 @@ -0,0 +1,245 @@
59 +# Copyright 1999-2017 Gentoo Foundation
60 +# Distributed under the terms of the GNU General Public License v2
61 +
62 +EAPI=5
63 +
64 +#PATCHSET=1
65 +
66 +inherit autotools eutils flag-o-matic multilib versionator
67 +
68 +MY_P="${PN}-$(get_version_component_range 1-3)"
69 +S=${WORKDIR}/${MY_P}
70 +
71 +SLOT=$(get_version_component_range 1-2)
72 +MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
73 +RUBYVERSION=2.2.0
74 +
75 +if [[ -n ${PATCHSET} ]]; then
76 + if [[ ${PVR} == ${PV} ]]; then
77 + PATCHSET="${PV}-r0.${PATCHSET}"
78 + else
79 + PATCHSET="${PVR}.${PATCHSET}"
80 + fi
81 +else
82 + PATCHSET="${PVR}"
83 +fi
84 +
85 +DESCRIPTION="An object-oriented scripting language"
86 +HOMEPAGE="http://www.ruby-lang.org/"
87 +SRC_URI="mirror://ruby/2.2/${MY_P}.tar.xz
88 + https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
89 +
90 +LICENSE="|| ( Ruby-BSD BSD-2 )"
91 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
92 +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl tk xemacs ncurses +readline"
93 +
94 +RDEPEND="
95 + berkdb? ( sys-libs/db:= )
96 + gdbm? ( sys-libs/gdbm )
97 + jemalloc? ( dev-libs/jemalloc )
98 + ssl? (
99 + !libressl? ( dev-libs/openssl:0= )
100 + libressl? ( dev-libs/libressl )
101 + )
102 + socks5? ( >=net-proxy/dante-1.1.13 )
103 + tk? (
104 + dev-lang/tcl:0=[threads]
105 + dev-lang/tk:0=[threads]
106 + )
107 + ncurses? ( sys-libs/ncurses:0= )
108 + readline? ( sys-libs/readline:0= )
109 + dev-libs/libyaml
110 + virtual/libffi
111 + sys-libs/zlib
112 + >=app-eselect/eselect-ruby-20141227
113 + !<dev-ruby/rdoc-3.9.4
114 + !<dev-ruby/rubygems-1.8.10-r1"
115 +
116 +DEPEND="${RDEPEND}"
117 +
118 +BUNDLED_GEMS="
119 + >=dev-ruby/minitest-5.4.3[ruby_targets_ruby22]
120 + >=dev-ruby/power_assert-0.2.2[ruby_targets_ruby22]
121 + >=dev-ruby/test-unit-3.0.8[ruby_targets_ruby22]
122 +"
123 +
124 +PDEPEND="
125 + ${BUNDLED_GEMS}
126 + virtual/rubygems[ruby_targets_ruby22]
127 + >=dev-ruby/json-1.8.1[ruby_targets_ruby22]
128 + >=dev-ruby/rake-0.9.6[ruby_targets_ruby22]
129 + rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby22] )
130 + xemacs? ( app-xemacs/ruby-modes )"
131 +
132 +src_prepare() {
133 + EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
134 + epatch "${WORKDIR}/patches"
135 +
136 + # We can no longer unbundle all of rake because rubygems now depends
137 + # on this. We leave the actual rake code around to bootstrap
138 + # rubygems, but remove the bits that would cause a file collision.
139 + einfo "Unbundling gems..."
140 + cd "$S"
141 + rm -rf \
142 + {bin,lib}/rake lib/rake.rb man/rake.1 \
143 + bin/gem || die "removal failed"
144 + # Remove bundled gems that we will install via PDEPEND, bug
145 + # 539700. Use explicit version numbers to ensure rm fails when they
146 + # change so we can update dependencies accordingly.
147 + rm gems/{minitest-5.4.3,power_assert-0.2.2,test-unit-3.0.8}.gem || die
148 +
149 + # Fix a hardcoded lib path in configure script
150 + sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
151 + configure.in || die "sed failed"
152 +
153 + eautoreconf
154 +}
155 +
156 +src_configure() {
157 + local modules= myconf=
158 +
159 + # -fomit-frame-pointer makes ruby segfault, see bug #150413.
160 + filter-flags -fomit-frame-pointer
161 + # In many places aliasing rules are broken; play it safe
162 + # as it's risky with newer compilers to leave it as it is.
163 + append-flags -fno-strict-aliasing
164 + # SuperH needs this
165 + use sh && append-flags -mieee
166 +
167 + # Socks support via dante
168 + if use socks5 ; then
169 + # Socks support can't be disabled as long as SOCKS_SERVER is
170 + # set and socks library is present, so need to unset
171 + # SOCKS_SERVER in that case.
172 + unset SOCKS_SERVER
173 + fi
174 +
175 + # Increase GC_MALLOC_LIMIT if set (default is 8000000)
176 + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
177 + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
178 + fi
179 +
180 + # ipv6 hack, bug 168939. Needs --enable-ipv6.
181 + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
182 +
183 + # Determine which modules *not* to build depending in the USE flags.
184 + if ! use readline ; then
185 + modules="${modules},readline"
186 + fi
187 + if ! use berkdb ; then
188 + modules="${modules},dbm"
189 + fi
190 + if ! use gdbm ; then
191 + modules="${modules},gdbm"
192 + fi
193 + if ! use ssl ; then
194 + modules="${modules},openssl"
195 + fi
196 + if ! use ncurses ; then
197 + modules="${modules},curses"
198 + fi
199 + if ! use tk ; then
200 + modules="${modules},tk"
201 + fi
202 +
203 + # Provide an empty LIBPATHENV because we disable rpath but we do not
204 + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
205 + # #564272
206 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
207 + --program-suffix=${MY_SUFFIX} \
208 + --with-soname=ruby${MY_SUFFIX} \
209 + --docdir=${EPREFIX}/usr/share/doc/${P} \
210 + --enable-shared \
211 + --enable-pthread \
212 + --disable-rpath \
213 + --with-out-ext="${modules}" \
214 + $(use_with jemalloc jemalloc) \
215 + $(use_enable socks5 socks) \
216 + $(use_enable doc install-doc) \
217 + --enable-ipv6 \
218 + $(use_enable debug) \
219 + ${myconf} \
220 + --enable-option-checking=no \
221 + || die "econf failed"
222 +}
223 +
224 +src_compile() {
225 + emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
226 +}
227 +
228 +src_test() {
229 + emake -j1 V=1 test || die "make test failed"
230 +
231 + elog "Ruby's make test has been run. Ruby also ships with a make check"
232 + elog "that cannot be run until after ruby has been installed."
233 + elog
234 + if use rubytests; then
235 + elog "You have enabled rubytests, so they will be installed to"
236 + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
237 + elog "than root, and you must place them into a writeable directory."
238 + elog "Then call: "
239 + elog
240 + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
241 + else
242 + elog "Enable the rubytests USE flag to install the make check tests"
243 + fi
244 +}
245 +
246 +src_install() {
247 + # Remove the remaining bundled gems. We do this late in the process
248 + # since they are used during the build to e.g. create the
249 + # documentation.
250 + rm -rf ext/json || die
251 +
252 + # Ruby is involved in the install process, we don't want interference here.
253 + unset RUBYOPT
254 +
255 + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
256 +
257 + LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
258 + RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
259 + for d in $(find "${S}/ext" -type d) ; do
260 + RUBYLIB="${RUBYLIB}:$d"
261 + done
262 + export LD_LIBRARY_PATH RUBYLIB
263 +
264 + emake V=1 DESTDIR="${D}" install || die "make install failed"
265 +
266 + # Remove installed rubygems copy
267 + rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
268 + rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
269 + rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
270 +
271 + if use doc; then
272 + make DESTDIR="${D}" install-doc || die "make install-doc failed"
273 + fi
274 +
275 + if use examples; then
276 + insinto /usr/share/doc/${PF}
277 + doins -r sample
278 + fi
279 +
280 + dodoc ChangeLog NEWS doc/NEWS* README* || die
281 +
282 + if use rubytests; then
283 + pushd test
284 + insinto /usr/share/${PN}-${SLOT}/test
285 + doins -r .
286 + popd
287 + fi
288 +}
289 +
290 +pkg_postinst() {
291 + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
292 + eselect ruby set ruby${MY_SUFFIX}
293 + fi
294 +
295 + elog
296 + elog "To switch between available Ruby profiles, execute as root:"
297 + elog "\teselect ruby set ruby(19|20|...)"
298 + elog
299 +}
300 +
301 +pkg_postrm() {
302 + eselect ruby cleanup
303 +}
304
305 diff --git a/dev-lang/ruby/ruby-2.3.4-r2.ebuild b/dev-lang/ruby/ruby-2.3.4-r2.ebuild
306 new file mode 100644
307 index 00000000000..c3c8f0b9277
308 --- /dev/null
309 +++ b/dev-lang/ruby/ruby-2.3.4-r2.ebuild
310 @@ -0,0 +1,242 @@
311 +# Copyright 1999-2017 Gentoo Foundation
312 +# Distributed under the terms of the GNU General Public License v2
313 +
314 +EAPI=5
315 +
316 +#PATCHSET=1
317 +
318 +inherit autotools eutils flag-o-matic multilib versionator
319 +
320 +MY_P="${PN}-$(get_version_component_range 1-3)"
321 +S=${WORKDIR}/${MY_P}
322 +
323 +SLOT=$(get_version_component_range 1-2)
324 +MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
325 +RUBYVERSION=2.3.0
326 +
327 +if [[ -n ${PATCHSET} ]]; then
328 + if [[ ${PVR} == ${PV} ]]; then
329 + PATCHSET="${PV}-r0.${PATCHSET}"
330 + else
331 + PATCHSET="${PVR}.${PATCHSET}"
332 + fi
333 +else
334 + PATCHSET="${PVR}"
335 +fi
336 +
337 +DESCRIPTION="An object-oriented scripting language"
338 +HOMEPAGE="http://www.ruby-lang.org/"
339 +SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz
340 + https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
341 +
342 +LICENSE="|| ( Ruby-BSD BSD-2 )"
343 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
344 +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl tk xemacs ncurses +readline"
345 +
346 +RDEPEND="
347 + berkdb? ( sys-libs/db:= )
348 + gdbm? ( sys-libs/gdbm )
349 + jemalloc? ( dev-libs/jemalloc )
350 + ssl? (
351 + !libressl? ( dev-libs/openssl:0= )
352 + libressl? ( dev-libs/libressl )
353 + )
354 + socks5? ( >=net-proxy/dante-1.1.13 )
355 + tk? (
356 + dev-lang/tcl:0=[threads]
357 + dev-lang/tk:0=[threads]
358 + )
359 + ncurses? ( sys-libs/ncurses:0= )
360 + readline? ( sys-libs/readline:0= )
361 + dev-libs/libyaml
362 + virtual/libffi
363 + sys-libs/zlib
364 + >=app-eselect/eselect-ruby-20151229
365 + !<dev-ruby/rdoc-3.9.4
366 + !<dev-ruby/rubygems-1.8.10-r1"
367 +
368 +DEPEND="${RDEPEND}"
369 +
370 +BUNDLED_GEMS="
371 + >=dev-ruby/did_you_mean-1.0.0:1[ruby_targets_ruby23]
372 + >=dev-ruby/minitest-5.8.3[ruby_targets_ruby23]
373 + >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby23]
374 + >=dev-ruby/power_assert-0.2.6[ruby_targets_ruby23]
375 + >=dev-ruby/rake-10.4.2[ruby_targets_ruby23]
376 + >=dev-ruby/test-unit-3.1.5[ruby_targets_ruby23]
377 +"
378 +
379 +PDEPEND="
380 + ${BUNDLED_GEMS}
381 + virtual/rubygems[ruby_targets_ruby23]
382 + >=dev-ruby/json-1.8.3[ruby_targets_ruby23]
383 + rdoc? ( >=dev-ruby/rdoc-4.2.1[ruby_targets_ruby23] )
384 + xemacs? ( app-xemacs/ruby-modes )"
385 +
386 +src_prepare() {
387 + EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
388 + epatch "${WORKDIR}/patches"
389 +
390 + einfo "Unbundling gems..."
391 + cd "$S"
392 + # Remove bundled gems that we will install via PDEPEND, bug
393 + # 539700. Use explicit version numbers to ensure rm fails when they
394 + # change so we can update dependencies accordingly.
395 + rm -f gems/{did_you_mean-1.0.0,minitest-5.8.3,net-telnet-0.1.1,power_assert-0.2.6,rake-10.4.2,test-unit-3.1.5}.gem || die
396 +
397 + # Fix a hardcoded lib path in configure script
398 + sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
399 + configure.in || die "sed failed"
400 +
401 + eautoreconf
402 +}
403 +
404 +src_configure() {
405 + local modules= myconf=
406 +
407 + # -fomit-frame-pointer makes ruby segfault, see bug #150413.
408 + filter-flags -fomit-frame-pointer
409 + # In many places aliasing rules are broken; play it safe
410 + # as it's risky with newer compilers to leave it as it is.
411 + append-flags -fno-strict-aliasing
412 + # SuperH needs this
413 + use sh && append-flags -mieee
414 +
415 + # Socks support via dante
416 + if use socks5 ; then
417 + # Socks support can't be disabled as long as SOCKS_SERVER is
418 + # set and socks library is present, so need to unset
419 + # SOCKS_SERVER in that case.
420 + unset SOCKS_SERVER
421 + fi
422 +
423 + # Increase GC_MALLOC_LIMIT if set (default is 8000000)
424 + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
425 + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
426 + fi
427 +
428 + # ipv6 hack, bug 168939. Needs --enable-ipv6.
429 + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
430 +
431 + # Determine which modules *not* to build depending in the USE flags.
432 + if ! use readline ; then
433 + modules="${modules},readline"
434 + fi
435 + if ! use berkdb ; then
436 + modules="${modules},dbm"
437 + fi
438 + if ! use gdbm ; then
439 + modules="${modules},gdbm"
440 + fi
441 + if ! use ssl ; then
442 + modules="${modules},openssl"
443 + fi
444 + if ! use ncurses ; then
445 + modules="${modules},curses"
446 + fi
447 + if ! use tk ; then
448 + modules="${modules},tk"
449 + fi
450 +
451 + # Provide an empty LIBPATHENV because we disable rpath but we do not
452 + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
453 + # #564272
454 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
455 + --program-suffix=${MY_SUFFIX} \
456 + --with-soname=ruby${MY_SUFFIX} \
457 + --docdir=${EPREFIX}/usr/share/doc/${P} \
458 + --enable-shared \
459 + --enable-pthread \
460 + --disable-rpath \
461 + --with-out-ext="${modules}" \
462 + $(use_with jemalloc jemalloc) \
463 + $(use_enable socks5 socks) \
464 + $(use_enable doc install-doc) \
465 + --enable-ipv6 \
466 + $(use_enable debug) \
467 + ${myconf} \
468 + --enable-option-checking=no \
469 + || die "econf failed"
470 +}
471 +
472 +src_compile() {
473 + emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
474 +}
475 +
476 +src_test() {
477 + emake -j1 V=1 test || die "make test failed"
478 +
479 + elog "Ruby's make test has been run. Ruby also ships with a make check"
480 + elog "that cannot be run until after ruby has been installed."
481 + elog
482 + if use rubytests; then
483 + elog "You have enabled rubytests, so they will be installed to"
484 + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
485 + elog "than root, and you must place them into a writeable directory."
486 + elog "Then call: "
487 + elog
488 + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
489 + else
490 + elog "Enable the rubytests USE flag to install the make check tests"
491 + fi
492 +}
493 +
494 +src_install() {
495 + # Remove the remaining bundled gems. We do this late in the process
496 + # since they are used during the build to e.g. create the
497 + # documentation.
498 + rm -rf ext/json || die
499 +
500 + # Ruby is involved in the install process, we don't want interference here.
501 + unset RUBYOPT
502 +
503 + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
504 +
505 + LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
506 + RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
507 + for d in $(find "${S}/ext" -type d) ; do
508 + RUBYLIB="${RUBYLIB}:$d"
509 + done
510 + export LD_LIBRARY_PATH RUBYLIB
511 +
512 + emake V=1 DESTDIR="${D}" install || die "make install failed"
513 +
514 + # Remove installed rubygems and rdoc copy
515 + rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
516 + rm -rf "${D}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
517 + rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
518 + rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
519 +
520 + if use doc; then
521 + make DESTDIR="${D}" install-doc || die "make install-doc failed"
522 + fi
523 +
524 + if use examples; then
525 + insinto /usr/share/doc/${PF}
526 + doins -r sample
527 + fi
528 +
529 + dodoc ChangeLog NEWS doc/NEWS* README* || die
530 +
531 + if use rubytests; then
532 + pushd test
533 + insinto /usr/share/${PN}-${SLOT}/test
534 + doins -r .
535 + popd
536 + fi
537 +}
538 +
539 +pkg_postinst() {
540 + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
541 + eselect ruby set ruby${MY_SUFFIX}
542 + fi
543 +
544 + elog
545 + elog "To switch between available Ruby profiles, execute as root:"
546 + elog "\teselect ruby set ruby(19|20|...)"
547 + elog
548 +}
549 +
550 +pkg_postrm() {
551 + eselect ruby cleanup
552 +}
553
554 diff --git a/dev-lang/ruby/ruby-2.4.1-r2.ebuild b/dev-lang/ruby/ruby-2.4.1-r2.ebuild
555 new file mode 100644
556 index 00000000000..157a4e057d9
557 --- /dev/null
558 +++ b/dev-lang/ruby/ruby-2.4.1-r2.ebuild
559 @@ -0,0 +1,243 @@
560 +# Copyright 1999-2017 Gentoo Foundation
561 +# Distributed under the terms of the GNU General Public License v2
562 +
563 +EAPI=6
564 +
565 +#PATCHSET=1
566 +
567 +inherit autotools eutils flag-o-matic multilib versionator
568 +
569 +MY_P="${PN}-$(get_version_component_range 1-3)"
570 +S=${WORKDIR}/${MY_P}
571 +
572 +SLOT=$(get_version_component_range 1-2)
573 +MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
574 +RUBYVERSION=${SLOT}.0
575 +
576 +if [[ -n ${PATCHSET} ]]; then
577 + if [[ ${PVR} == ${PV} ]]; then
578 + PATCHSET="${PV}-r0.${PATCHSET}"
579 + else
580 + PATCHSET="${PVR}.${PATCHSET}"
581 + fi
582 +else
583 + PATCHSET="${PVR}"
584 +fi
585 +
586 +DESCRIPTION="An object-oriented scripting language"
587 +HOMEPAGE="http://www.ruby-lang.org/"
588 +SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz
589 + https://dev.gentoo.org/~graaff/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
590 +
591 +LICENSE="|| ( Ruby-BSD BSD-2 )"
592 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
593 +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl static-libs tk xemacs"
594 +
595 +RDEPEND="
596 + berkdb? ( sys-libs/db:= )
597 + gdbm? ( sys-libs/gdbm )
598 + jemalloc? ( dev-libs/jemalloc )
599 + ssl? (
600 + !libressl? ( dev-libs/openssl:0= )
601 + libressl? ( dev-libs/libressl )
602 + )
603 + socks5? ( >=net-proxy/dante-1.1.13 )
604 + tk? (
605 + dev-lang/tcl:0=[threads]
606 + dev-lang/tk:0=[threads]
607 + )
608 + dev-libs/libyaml
609 + virtual/libffi
610 + sys-libs/zlib
611 + >=app-eselect/eselect-ruby-20161226
612 + !<dev-ruby/rdoc-3.9.4
613 + !<dev-ruby/rubygems-1.8.10-r1"
614 +
615 +DEPEND="${RDEPEND}"
616 +
617 +BUNDLED_GEMS="
618 + >=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24]
619 + >=dev-ruby/minitest-5.10.1[ruby_targets_ruby24]
620 + >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24]
621 + >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24]
622 + >=dev-ruby/rake-12.0.0[ruby_targets_ruby24]
623 + >=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24]
624 + >=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24]
625 +"
626 +
627 +PDEPEND="
628 + ${BUNDLED_GEMS}
629 + virtual/rubygems[ruby_targets_ruby24]
630 + >=dev-ruby/json-2.0.2[ruby_targets_ruby24]
631 + rdoc? ( >=dev-ruby/rdoc-5.1.0[ruby_targets_ruby24] )
632 + xemacs? ( app-xemacs/ruby-modes )"
633 +
634 +src_prepare() {
635 + EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
636 + epatch "${WORKDIR}/patches"
637 +
638 + einfo "Unbundling gems..."
639 + cd "$S"
640 + # Remove bundled gems that we will install via PDEPEND, bug
641 + # 539700. Use explicit version numbers to ensure rm fails when they
642 + # change so we can update dependencies accordingly.
643 + 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
644 +
645 + einfo "Removing bundled libraries..."
646 + rm -fr ext/fiddle/libffi-3.2.1 || die
647 +
648 + # Fix a hardcoded lib path in configure script
649 + sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
650 + configure.in || die "sed failed"
651 +
652 + eapply_user
653 +
654 + eautoreconf
655 +}
656 +
657 +src_configure() {
658 + local modules= myconf=
659 +
660 + # -fomit-frame-pointer makes ruby segfault, see bug #150413.
661 + filter-flags -fomit-frame-pointer
662 + # In many places aliasing rules are broken; play it safe
663 + # as it's risky with newer compilers to leave it as it is.
664 + append-flags -fno-strict-aliasing
665 + # SuperH needs this
666 + use sh && append-flags -mieee
667 +
668 + # Socks support via dante
669 + if use socks5 ; then
670 + # Socks support can't be disabled as long as SOCKS_SERVER is
671 + # set and socks library is present, so need to unset
672 + # SOCKS_SERVER in that case.
673 + unset SOCKS_SERVER
674 + fi
675 +
676 + # Increase GC_MALLOC_LIMIT if set (default is 8000000)
677 + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
678 + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
679 + fi
680 +
681 + # ipv6 hack, bug 168939. Needs --enable-ipv6.
682 + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
683 +
684 + # Determine which modules *not* to build depending in the USE flags.
685 + if ! use berkdb ; then
686 + modules="${modules},dbm"
687 + fi
688 + if ! use gdbm ; then
689 + modules="${modules},gdbm"
690 + fi
691 + if ! use ssl ; then
692 + modules="${modules},openssl"
693 + fi
694 + if ! use tk ; then
695 + modules="${modules},tk"
696 + fi
697 +
698 + # Provide an empty LIBPATHENV because we disable rpath but we do not
699 + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
700 + # #564272
701 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
702 + --program-suffix=${MY_SUFFIX} \
703 + --with-soname=ruby${MY_SUFFIX} \
704 + --docdir=${EPREFIX}/usr/share/doc/${P} \
705 + --enable-shared \
706 + --enable-pthread \
707 + --disable-rpath \
708 + --with-out-ext="${modules}" \
709 + $(use_with jemalloc jemalloc) \
710 + $(use_enable socks5 socks) \
711 + $(use_enable doc install-doc) \
712 + --enable-ipv6 \
713 + $(use_enable static-libs static) \
714 + $(use_enable static-libs install-static-library) \
715 + $(use_with static-libs static-linked-ext) \
716 + $(use_enable debug) \
717 + ${myconf} \
718 + --enable-option-checking=no \
719 + || die "econf failed"
720 +}
721 +
722 +src_compile() {
723 + emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
724 +}
725 +
726 +src_test() {
727 + emake -j1 V=1 test || die "make test failed"
728 +
729 + elog "Ruby's make test has been run. Ruby also ships with a make check"
730 + elog "that cannot be run until after ruby has been installed."
731 + elog
732 + if use rubytests; then
733 + elog "You have enabled rubytests, so they will be installed to"
734 + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
735 + elog "than root, and you must place them into a writeable directory."
736 + elog "Then call: "
737 + elog
738 + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
739 + else
740 + elog "Enable the rubytests USE flag to install the make check tests"
741 + fi
742 +}
743 +
744 +src_install() {
745 + # Remove the remaining bundled gems. We do this late in the process
746 + # since they are used during the build to e.g. create the
747 + # documentation.
748 + rm -rf ext/json || die
749 +
750 + # Ruby is involved in the install process, we don't want interference here.
751 + unset RUBYOPT
752 +
753 + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
754 +
755 + LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
756 + RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
757 + for d in $(find "${S}/ext" -type d) ; do
758 + RUBYLIB="${RUBYLIB}:$d"
759 + done
760 + export LD_LIBRARY_PATH RUBYLIB
761 +
762 + emake V=1 DESTDIR="${D}" install || die "make install failed"
763 +
764 + # Remove installed rubygems and rdoc copy
765 + rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
766 + rm -rf "${D}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
767 + rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
768 + rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
769 +
770 + if use doc; then
771 + make DESTDIR="${D}" install-doc || die "make install-doc failed"
772 + fi
773 +
774 + if use examples; then
775 + insinto /usr/share/doc/${PF}
776 + doins -r sample
777 + fi
778 +
779 + dodoc ChangeLog NEWS doc/NEWS* README* || die
780 +
781 + if use rubytests; then
782 + pushd test
783 + insinto /usr/share/${PN}-${SLOT}/test
784 + doins -r .
785 + popd
786 + fi
787 +}
788 +
789 +pkg_postinst() {
790 + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
791 + eselect ruby set ruby${MY_SUFFIX}
792 + fi
793 +
794 + elog
795 + elog "To switch between available Ruby profiles, execute as root:"
796 + elog "\teselect ruby set ruby(19|20|...)"
797 + elog
798 +}
799 +
800 +pkg_postrm() {
801 + eselect ruby cleanup
802 +}