1 |
commit: 8ee54a514146fa0d8002b66a2637b305fa6cf5e2 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 28 09:05:55 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 28 09:05:55 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=8ee54a51 |
7 |
|
8 |
dev-lang/ruby: sync |
9 |
|
10 |
Package-Manager: Portage-2.3.68-prefix, Repoman-2.3.17 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
dev-lang/ruby/Manifest | 3 + |
14 |
dev-lang/ruby/ruby-2.4.7.ebuild | 246 +++++++++++++++++++++++++++++++++++++++ |
15 |
dev-lang/ruby/ruby-2.5.6.ebuild | 238 ++++++++++++++++++++++++++++++++++++++ |
16 |
dev-lang/ruby/ruby-2.6.4.ebuild | 250 ++++++++++++++++++++++++++++++++++++++++ |
17 |
4 files changed, 737 insertions(+) |
18 |
|
19 |
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest |
20 |
index d8e35f7b90..803823ab90 100644 |
21 |
--- a/dev-lang/ruby/Manifest |
22 |
+++ b/dev-lang/ruby/Manifest |
23 |
@@ -1,5 +1,8 @@ |
24 |
DIST ruby-2.4.3.tar.xz 10040072 BLAKE2B 87ad9700312a104a60b079f4ef95804d2a9e01109e9fef6e83e593464f1d2c5077af54cbbaff6e0d25a925d05f513cade6c76f05960d9bcc1817bdee51ad4a0f SHA512 8bcf60c994a96787da5d743c66f5609a5a6d834d6d61243cdea7fd059197c3b10da43c99e5649be85e2f2329eedcbb1dd76e89ce3ac586be9056348f7449ed09 |
25 |
DIST ruby-2.4.6.tar.xz 10005544 BLAKE2B 2af984d96dad4d7ef4d467b317bd4bb54b0614d96619377bc46f7588cd1c72bee47202b61d6ec54f00113fd25672d2831221dbf0a4491aa271541a34c634ee84 SHA512 eafb2257747f99e2ed262af142e71175b70f7cceaa4d1253b92c8337f075a9a58a2d93b029d75e11a9b124f112a8f0983273b2b30afc147b5cf71a8dbb5fa0ba |
26 |
+DIST ruby-2.4.7.tar.xz 10118948 BLAKE2B e85e051e9dbac8e7f87bd6187dc105b89a6bc7197c811bd51bf25b109781b8ec79c02e48887cbac841d38922d278da4ee32d8cf14e180083f4a902d77c4ec2dc SHA512 df637c5803ddd83f759e9c24b0e7ca1f6cae7c7b353409583d92dbffece0d9d02b48905d6552327a1522a4a37d4e2d22c6c11bd991383835be35e2f31739d649 |
27 |
DIST ruby-2.5.5.tar.xz 11459832 BLAKE2B ced1105a87e7df8f82a65ca8d1d329d5a9d110d2f3f88b27a79262c4ac1484dda16d8646c0c03f18c1bb25f8b154075eb03a0614355ec62f677c2fa56ab3c956 SHA512 06b1d58536ebfacb7b56c1e6ed4b8ab816fadc4f48c845a452554cd262e7908199a30e5793f3cbaec2db56a8803aa5c6089abf7bf06c8fc47867e97870b7dfec |
28 |
+DIST ruby-2.5.6.tar.xz 11323612 BLAKE2B 5db6d573089a9fba95a1027891a0116c14d495b342ca8f055bd1ad55942f2a15a65a61cc1a0f6f249cd10fe2f6161f3ab0066a6dbce8e480e55b76ca5bdb5cd9 SHA512 4fe5f8bad5d320f8f17b02ce15afee341e7b0074efcfd98d8944e0cb7c448e0660c4553dd5c0328ee3b49fea3247642f85c60bdce431ed57f58b6326dfd48ee1 |
29 |
DIST ruby-2.6.3.tar.xz 11904360 BLAKE2B 8113e5a19b967cdf995a3c8d3c83aeab3bf89e975d3b039c64259e97f20dbe9ebd96ada093f9d330516d16ef78bb0ecbbac8f3facd467aa13f1f70b23b992f82 SHA512 959a613f5cf5b3185a1d7a7ba0e1921166b3930f30461b391b1c9fcfe396f56dc3c736123dfc7b4e72c32a97dc5a1eb1fd7f09bcc3793a3c5526f6644ba421c8 |
30 |
+DIST ruby-2.6.4.tar.xz 11727940 BLAKE2B abeff89d50612d6426e1dc5fd7c15c83ef9714ddb38c64ed14bff6331c619b0a55d4a64bff49177576c3fae8cfcee30127e808f49d11b3e64a2230a043e16bd3 SHA512 930a4162fdb008d2446247908c14269fd13db4dc80bd2bb201a65a69c03f5933f97b4c5079ccd2a12db4934ff97b2debaa10a6c6f5c3060e55873f4397747eaa |
31 |
DIST ruby-patches-2.4.3.tar.bz2 2898 BLAKE2B e46502dbb0aa25c3d71693a6c04b433bd4de60f194cdd283517c4b08da190356885d9bca4a6765402088185fa8ec681156e8e8eecf0703a2c1ea7bb81adc0bf9 SHA512 d767d43c7df737469247e42e1c4205b8c6850c8f335a2869c884f145c037e9bab10492cc7cd2903f5c33e232cdc5bbdabb3e8da837c7bf420b9d58d1d33149ed |
32 |
|
33 |
diff --git a/dev-lang/ruby/ruby-2.4.7.ebuild b/dev-lang/ruby/ruby-2.4.7.ebuild |
34 |
new file mode 100644 |
35 |
index 0000000000..3851c75066 |
36 |
--- /dev/null |
37 |
+++ b/dev-lang/ruby/ruby-2.4.7.ebuild |
38 |
@@ -0,0 +1,246 @@ |
39 |
+# Copyright 1999-2019 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=7 |
43 |
+ |
44 |
+inherit autotools flag-o-matic multilib |
45 |
+ |
46 |
+MY_P="${PN}-$(ver_cut 1-3)" |
47 |
+S=${WORKDIR}/${MY_P} |
48 |
+ |
49 |
+SLOT=$(ver_cut 1-2) |
50 |
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) |
51 |
+RUBYVERSION=${SLOT}.0 |
52 |
+ |
53 |
+DESCRIPTION="An object-oriented scripting language" |
54 |
+HOMEPAGE="https://www.ruby-lang.org/" |
55 |
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz" |
56 |
+ |
57 |
+LICENSE="|| ( Ruby-BSD BSD-2 )" |
58 |
+KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
59 |
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs" |
60 |
+ |
61 |
+RDEPEND=" |
62 |
+ berkdb? ( sys-libs/db:= ) |
63 |
+ gdbm? ( sys-libs/gdbm:= ) |
64 |
+ jemalloc? ( dev-libs/jemalloc ) |
65 |
+ ssl? ( |
66 |
+ !libressl? ( dev-libs/openssl:0= ) |
67 |
+ libressl? ( dev-libs/libressl ) |
68 |
+ ) |
69 |
+ socks5? ( >=net-proxy/dante-1.1.13 ) |
70 |
+ tk? ( |
71 |
+ dev-lang/tcl:0=[threads] |
72 |
+ dev-lang/tk:0=[threads] |
73 |
+ ) |
74 |
+ dev-libs/libyaml |
75 |
+ virtual/libffi:= |
76 |
+ sys-libs/readline:0= |
77 |
+ sys-libs/zlib |
78 |
+ >=app-eselect/eselect-ruby-20161226 |
79 |
+ !<dev-ruby/rdoc-3.9.4 |
80 |
+ !<dev-ruby/rubygems-1.8.10-r1" |
81 |
+ |
82 |
+DEPEND="${RDEPEND}" |
83 |
+ |
84 |
+BUNDLED_GEMS=" |
85 |
+ >=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24] |
86 |
+ >=dev-ruby/minitest-5.10.1[ruby_targets_ruby24] |
87 |
+ >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24] |
88 |
+ >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24] |
89 |
+ >=dev-ruby/rake-12.0.0[ruby_targets_ruby24] |
90 |
+ >=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24] |
91 |
+ >=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24] |
92 |
+" |
93 |
+ |
94 |
+PDEPEND=" |
95 |
+ ${BUNDLED_GEMS} |
96 |
+ virtual/rubygems[ruby_targets_ruby24] |
97 |
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby24] |
98 |
+ rdoc? ( >=dev-ruby/rdoc-5.1.0-r1[ruby_targets_ruby24] ) |
99 |
+ xemacs? ( app-xemacs/ruby-modes )" |
100 |
+ |
101 |
+src_prepare() { |
102 |
+ eapply "${FILESDIR}/${PN}-1.9.1-prefix.patch" |
103 |
+ eapply "${FILESDIR}"/${SLOT}/{002,005,009,012}*.patch |
104 |
+ |
105 |
+ einfo "Unbundling gems..." |
106 |
+ cd "$S" |
107 |
+ # Remove bundled gems that we will install via PDEPEND, bug |
108 |
+ # 539700. Use explicit version numbers to ensure rm fails when they |
109 |
+ # change so we can update dependencies accordingly. |
110 |
+ 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 |
111 |
+ |
112 |
+ einfo "Removing bundled libraries..." |
113 |
+ rm -fr ext/fiddle/libffi-3.2.1 || die |
114 |
+ |
115 |
+ # Fix a hardcoded lib path in configure script |
116 |
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
117 |
+ configure.in || die "sed failed" |
118 |
+ # Fix hardcoded SHELL var in mkmf library |
119 |
+ sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die |
120 |
+ # avoid symlink loop on Darwin (?!) |
121 |
+ sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).dylib//' \ |
122 |
+ configure.in || die |
123 |
+ # make ar/libtool hack for Darwin work |
124 |
+ sed -i \ |
125 |
+ -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ |
126 |
+ configure.in || die |
127 |
+ # Fix using installed ruby |
128 |
+ sed -i -e '/^libs << File.expand_path("lib", srcdir)/s/^/#/' \ |
129 |
+ tool/runruby.rb || die |
130 |
+ |
131 |
+ eapply_user |
132 |
+ |
133 |
+ eautoreconf |
134 |
+} |
135 |
+ |
136 |
+src_configure() { |
137 |
+ local modules= myconf= |
138 |
+ |
139 |
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413. |
140 |
+ filter-flags -fomit-frame-pointer |
141 |
+ # In many places aliasing rules are broken; play it safe |
142 |
+ # as it's risky with newer compilers to leave it as it is. |
143 |
+ append-flags -fno-strict-aliasing |
144 |
+ # SuperH needs this |
145 |
+ use sh && append-flags -mieee |
146 |
+ |
147 |
+ # Socks support via dante |
148 |
+ if use socks5 ; then |
149 |
+ # Socks support can't be disabled as long as SOCKS_SERVER is |
150 |
+ # set and socks library is present, so need to unset |
151 |
+ # SOCKS_SERVER in that case. |
152 |
+ unset SOCKS_SERVER |
153 |
+ fi |
154 |
+ |
155 |
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000) |
156 |
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
157 |
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
158 |
+ fi |
159 |
+ |
160 |
+ # ipv6 hack, bug 168939. Needs --enable-ipv6. |
161 |
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" |
162 |
+ |
163 |
+ # Determine which modules *not* to build depending in the USE flags. |
164 |
+ if ! use berkdb ; then |
165 |
+ modules="${modules},dbm" |
166 |
+ fi |
167 |
+ if ! use gdbm ; then |
168 |
+ modules="${modules},gdbm" |
169 |
+ fi |
170 |
+ if ! use ssl ; then |
171 |
+ modules="${modules},openssl" |
172 |
+ fi |
173 |
+ if ! use tk ; then |
174 |
+ modules="${modules},tk" |
175 |
+ fi |
176 |
+ |
177 |
+ # Provide an empty LIBPATHENV because we disable rpath but we do not |
178 |
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget |
179 |
+ # #564272 |
180 |
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ |
181 |
+ --program-suffix=${MY_SUFFIX} \ |
182 |
+ --with-soname=ruby${MY_SUFFIX} \ |
183 |
+ --docdir=${EPREFIX}/usr/share/doc/${P} \ |
184 |
+ --enable-shared \ |
185 |
+ --enable-pthread \ |
186 |
+ --disable-rpath \ |
187 |
+ --disable-dtrace \ |
188 |
+ --with-out-ext="${modules}" \ |
189 |
+ $(use_with jemalloc jemalloc) \ |
190 |
+ $(use_enable socks5 socks) \ |
191 |
+ $(use_enable doc install-doc) \ |
192 |
+ --enable-ipv6 \ |
193 |
+ $(use_enable static-libs static) \ |
194 |
+ $(use_enable static-libs install-static-library) \ |
195 |
+ $(use_with static-libs static-linked-ext) \ |
196 |
+ $(use_enable debug) \ |
197 |
+ ${myconf} \ |
198 |
+ --with-readline-dir="${EPREFIX}"/usr \ |
199 |
+ --enable-option-checking=no \ |
200 |
+ || die "econf failed" |
201 |
+} |
202 |
+ |
203 |
+src_compile() { |
204 |
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed" |
205 |
+} |
206 |
+ |
207 |
+src_test() { |
208 |
+ emake -j1 V=1 test || die "make test failed" |
209 |
+ |
210 |
+ elog "Ruby's make test has been run. Ruby also ships with a make check" |
211 |
+ elog "that cannot be run until after ruby has been installed." |
212 |
+ elog |
213 |
+ if use rubytests; then |
214 |
+ elog "You have enabled rubytests, so they will be installed to" |
215 |
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" |
216 |
+ elog "than root, and you must place them into a writeable directory." |
217 |
+ elog "Then call: " |
218 |
+ elog |
219 |
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" |
220 |
+ else |
221 |
+ elog "Enable the rubytests USE flag to install the make check tests" |
222 |
+ fi |
223 |
+} |
224 |
+ |
225 |
+src_install() { |
226 |
+ # Remove the remaining bundled gems. We do this late in the process |
227 |
+ # since they are used during the build to e.g. create the |
228 |
+ # documentation. |
229 |
+ rm -rf ext/json || die |
230 |
+ |
231 |
+ # Ruby is involved in the install process, we don't want interference here. |
232 |
+ unset RUBYOPT |
233 |
+ |
234 |
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
235 |
+ |
236 |
+ LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
237 |
+ DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" |
238 |
+ RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" |
239 |
+ for d in $(find "${S}/ext" -type d) ; do |
240 |
+ RUBYLIB="${RUBYLIB}:$d" |
241 |
+ done |
242 |
+ export LD_LIBRARY_PATH DYLD_LIBRARY_PATH RUBYLIB |
243 |
+ |
244 |
+ emake V=1 DESTDIR="${D}" install || die "make install failed" |
245 |
+ |
246 |
+ # Remove installed rubygems and rdoc copy |
247 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" |
248 |
+ rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" |
249 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" |
250 |
+ rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" |
251 |
+ |
252 |
+ if use doc; then |
253 |
+ make DESTDIR="${D}" install-doc || die "make install-doc failed" |
254 |
+ fi |
255 |
+ |
256 |
+ if use examples; then |
257 |
+ insinto /usr/share/doc/${PF} |
258 |
+ doins -r sample |
259 |
+ fi |
260 |
+ |
261 |
+ dodoc ChangeLog NEWS doc/NEWS* README* || die |
262 |
+ |
263 |
+ if use rubytests; then |
264 |
+ pushd test |
265 |
+ insinto /usr/share/${PN}-${SLOT}/test |
266 |
+ doins -r . |
267 |
+ popd |
268 |
+ fi |
269 |
+} |
270 |
+ |
271 |
+pkg_postinst() { |
272 |
+ if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then |
273 |
+ eselect ruby set ruby${MY_SUFFIX} |
274 |
+ fi |
275 |
+ |
276 |
+ elog |
277 |
+ elog "To switch between available Ruby profiles, execute as root:" |
278 |
+ elog "\teselect ruby set ruby(23|24|...)" |
279 |
+ elog |
280 |
+} |
281 |
+ |
282 |
+pkg_postrm() { |
283 |
+ eselect ruby cleanup |
284 |
+} |
285 |
|
286 |
diff --git a/dev-lang/ruby/ruby-2.5.6.ebuild b/dev-lang/ruby/ruby-2.5.6.ebuild |
287 |
new file mode 100644 |
288 |
index 0000000000..21ce746cf6 |
289 |
--- /dev/null |
290 |
+++ b/dev-lang/ruby/ruby-2.5.6.ebuild |
291 |
@@ -0,0 +1,238 @@ |
292 |
+# Copyright 1999-2019 Gentoo Authors |
293 |
+# Distributed under the terms of the GNU General Public License v2 |
294 |
+ |
295 |
+EAPI=7 |
296 |
+ |
297 |
+inherit autotools flag-o-matic multilib |
298 |
+ |
299 |
+MY_P="${PN}-$(ver_cut 1-3)" |
300 |
+S=${WORKDIR}/${MY_P} |
301 |
+ |
302 |
+SLOT=$(ver_cut 1-2) |
303 |
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) |
304 |
+RUBYVERSION=${SLOT}.0 |
305 |
+ |
306 |
+DESCRIPTION="An object-oriented scripting language" |
307 |
+HOMEPAGE="https://www.ruby-lang.org/" |
308 |
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz" |
309 |
+ |
310 |
+LICENSE="|| ( Ruby-BSD BSD-2 )" |
311 |
+KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
312 |
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs" |
313 |
+ |
314 |
+RDEPEND=" |
315 |
+ berkdb? ( sys-libs/db:= ) |
316 |
+ gdbm? ( sys-libs/gdbm:= ) |
317 |
+ jemalloc? ( dev-libs/jemalloc ) |
318 |
+ ssl? ( |
319 |
+ !libressl? ( dev-libs/openssl:0= ) |
320 |
+ libressl? ( dev-libs/libressl ) |
321 |
+ ) |
322 |
+ socks5? ( >=net-proxy/dante-1.1.13 ) |
323 |
+ tk? ( |
324 |
+ dev-lang/tcl:0=[threads] |
325 |
+ dev-lang/tk:0=[threads] |
326 |
+ ) |
327 |
+ dev-libs/libyaml |
328 |
+ virtual/libffi:= |
329 |
+ sys-libs/readline:0= |
330 |
+ sys-libs/zlib |
331 |
+ >=app-eselect/eselect-ruby-20171225 |
332 |
+" |
333 |
+ |
334 |
+DEPEND="${RDEPEND}" |
335 |
+ |
336 |
+BUNDLED_GEMS=" |
337 |
+ >=dev-ruby/did_you_mean-1.2.0:2.5[ruby_targets_ruby25] |
338 |
+ >=dev-ruby/minitest-5.10.3[ruby_targets_ruby25] |
339 |
+ >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby25] |
340 |
+ >=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25] |
341 |
+ >=dev-ruby/rake-12.3.0[ruby_targets_ruby25] |
342 |
+ >=dev-ruby/test-unit-3.2.7[ruby_targets_ruby25] |
343 |
+ >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby25] |
344 |
+" |
345 |
+ |
346 |
+PDEPEND=" |
347 |
+ ${BUNDLED_GEMS} |
348 |
+ virtual/rubygems[ruby_targets_ruby25] |
349 |
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby25] |
350 |
+ rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby25] ) |
351 |
+ xemacs? ( app-xemacs/ruby-modes )" |
352 |
+ |
353 |
+src_prepare() { |
354 |
+ eapply "${FILESDIR}"/${SLOT}/{001,005,011}*.patch |
355 |
+ |
356 |
+ einfo "Unbundling gems..." |
357 |
+ cd "$S" |
358 |
+ # Remove bundled gems that we will install via PDEPEND, bug |
359 |
+ # 539700. Use explicit version numbers to ensure rm fails when they |
360 |
+ # change so we can update dependencies accordingly. |
361 |
+ rm -f gems/{did_you_mean-1.2.0,minitest-5.10.3,net-telnet-0.1.1,power_assert-1.1.1,rake-12.3.0,test-unit-3.2.7,xmlrpc-0.3.0}.gem || die |
362 |
+ |
363 |
+ einfo "Removing bundled libraries..." |
364 |
+ rm -fr ext/fiddle/libffi-3.2.1 || die |
365 |
+ |
366 |
+ # Fix hardcoded SHELL var in mkmf library |
367 |
+ sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die |
368 |
+ # avoid symlink loop on Darwin (?!) |
369 |
+ sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ |
370 |
+ configure.ac || die |
371 |
+ # make ar/libtool hack for Darwin work |
372 |
+ sed -i \ |
373 |
+ -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ |
374 |
+ configure.ac || die |
375 |
+ |
376 |
+ eapply_user |
377 |
+ |
378 |
+ eautoreconf |
379 |
+} |
380 |
+ |
381 |
+src_configure() { |
382 |
+ local modules= myconf= |
383 |
+ |
384 |
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413. |
385 |
+ filter-flags -fomit-frame-pointer |
386 |
+ # In many places aliasing rules are broken; play it safe |
387 |
+ # as it's risky with newer compilers to leave it as it is. |
388 |
+ append-flags -fno-strict-aliasing |
389 |
+ # SuperH needs this |
390 |
+ use sh && append-flags -mieee |
391 |
+ |
392 |
+ # Socks support via dante |
393 |
+ if use socks5 ; then |
394 |
+ # Socks support can't be disabled as long as SOCKS_SERVER is |
395 |
+ # set and socks library is present, so need to unset |
396 |
+ # SOCKS_SERVER in that case. |
397 |
+ unset SOCKS_SERVER |
398 |
+ fi |
399 |
+ |
400 |
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000) |
401 |
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
402 |
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
403 |
+ fi |
404 |
+ |
405 |
+ # ipv6 hack, bug 168939. Needs --enable-ipv6. |
406 |
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" |
407 |
+ |
408 |
+ # Determine which modules *not* to build depending in the USE flags. |
409 |
+ if ! use berkdb ; then |
410 |
+ modules="${modules},dbm" |
411 |
+ fi |
412 |
+ if ! use gdbm ; then |
413 |
+ modules="${modules},gdbm" |
414 |
+ fi |
415 |
+ if ! use ssl ; then |
416 |
+ modules="${modules},openssl" |
417 |
+ fi |
418 |
+ if ! use tk ; then |
419 |
+ modules="${modules},tk" |
420 |
+ fi |
421 |
+ |
422 |
+ # Provide an empty LIBPATHENV because we disable rpath but we do not |
423 |
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget |
424 |
+ # #564272 |
425 |
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ |
426 |
+ --program-suffix=${MY_SUFFIX} \ |
427 |
+ --with-soname=ruby${MY_SUFFIX} \ |
428 |
+ --docdir=${EPREFIX}/usr/share/doc/${P} \ |
429 |
+ --enable-shared \ |
430 |
+ --enable-pthread \ |
431 |
+ --disable-rpath \ |
432 |
+ --disable-dtrace \ |
433 |
+ --with-out-ext="${modules}" \ |
434 |
+ $(use_with jemalloc jemalloc) \ |
435 |
+ $(use_enable socks5 socks) \ |
436 |
+ $(use_enable doc install-doc) \ |
437 |
+ --enable-ipv6 \ |
438 |
+ $(use_enable static-libs static) \ |
439 |
+ $(use_enable static-libs install-static-library) \ |
440 |
+ $(use_with static-libs static-linked-ext) \ |
441 |
+ $(use_enable debug) \ |
442 |
+ ${myconf} \ |
443 |
+ --with-readline-dir="${EPREFIX}"/usr \ |
444 |
+ --enable-option-checking=no \ |
445 |
+ || die "econf failed" |
446 |
+} |
447 |
+ |
448 |
+src_compile() { |
449 |
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed" |
450 |
+} |
451 |
+ |
452 |
+src_test() { |
453 |
+ emake -j1 V=1 test || die "make test failed" |
454 |
+ |
455 |
+ elog "Ruby's make test has been run. Ruby also ships with a make check" |
456 |
+ elog "that cannot be run until after ruby has been installed." |
457 |
+ elog |
458 |
+ if use rubytests; then |
459 |
+ elog "You have enabled rubytests, so they will be installed to" |
460 |
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" |
461 |
+ elog "than root, and you must place them into a writeable directory." |
462 |
+ elog "Then call: " |
463 |
+ elog |
464 |
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" |
465 |
+ else |
466 |
+ elog "Enable the rubytests USE flag to install the make check tests" |
467 |
+ fi |
468 |
+} |
469 |
+ |
470 |
+src_install() { |
471 |
+ # Remove the remaining bundled gems. We do this late in the process |
472 |
+ # since they are used during the build to e.g. create the |
473 |
+ # documentation. |
474 |
+ rm -rf ext/json || die |
475 |
+ |
476 |
+ # Ruby is involved in the install process, we don't want interference here. |
477 |
+ unset RUBYOPT |
478 |
+ |
479 |
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
480 |
+ |
481 |
+ LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
482 |
+ DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" |
483 |
+ RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" |
484 |
+ for d in $(find "${S}/ext" -type d) ; do |
485 |
+ RUBYLIB="${RUBYLIB}:$d" |
486 |
+ done |
487 |
+ export LD_LIBRARY_PATH DYLD_LIBRARY_PATH RUBYLIB |
488 |
+ |
489 |
+ emake V=1 DESTDIR="${D}" install || die "make install failed" |
490 |
+ |
491 |
+ # Remove installed rubygems and rdoc copy |
492 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" |
493 |
+ rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" |
494 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" |
495 |
+ rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" |
496 |
+ |
497 |
+ if use doc; then |
498 |
+ make DESTDIR="${D}" install-doc || die "make install-doc failed" |
499 |
+ fi |
500 |
+ |
501 |
+ if use examples; then |
502 |
+ insinto /usr/share/doc/${PF} |
503 |
+ doins -r sample |
504 |
+ fi |
505 |
+ |
506 |
+ dodoc ChangeLog NEWS doc/NEWS* README* || die |
507 |
+ |
508 |
+ if use rubytests; then |
509 |
+ pushd test |
510 |
+ insinto /usr/share/${PN}-${SLOT}/test |
511 |
+ doins -r . |
512 |
+ popd |
513 |
+ fi |
514 |
+} |
515 |
+ |
516 |
+pkg_postinst() { |
517 |
+ if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then |
518 |
+ eselect ruby set ruby${MY_SUFFIX} |
519 |
+ fi |
520 |
+ |
521 |
+ elog |
522 |
+ elog "To switch between available Ruby profiles, execute as root:" |
523 |
+ elog "\teselect ruby set ruby(23|24|...)" |
524 |
+ elog |
525 |
+} |
526 |
+ |
527 |
+pkg_postrm() { |
528 |
+ eselect ruby cleanup |
529 |
+} |
530 |
|
531 |
diff --git a/dev-lang/ruby/ruby-2.6.4.ebuild b/dev-lang/ruby/ruby-2.6.4.ebuild |
532 |
new file mode 100644 |
533 |
index 0000000000..94c2d66b4d |
534 |
--- /dev/null |
535 |
+++ b/dev-lang/ruby/ruby-2.6.4.ebuild |
536 |
@@ -0,0 +1,250 @@ |
537 |
+# Copyright 1999-2019 Gentoo Authors |
538 |
+# Distributed under the terms of the GNU General Public License v2 |
539 |
+ |
540 |
+EAPI=7 |
541 |
+ |
542 |
+inherit autotools flag-o-matic multilib |
543 |
+ |
544 |
+MY_P="${PN}-$(ver_cut 1-3)" |
545 |
+S=${WORKDIR}/${MY_P} |
546 |
+ |
547 |
+SLOT=$(ver_cut 1-2) |
548 |
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) |
549 |
+RUBYVERSION=${SLOT}.0 |
550 |
+ |
551 |
+DESCRIPTION="An object-oriented scripting language" |
552 |
+HOMEPAGE="https://www.ruby-lang.org/" |
553 |
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz" |
554 |
+ |
555 |
+LICENSE="|| ( Ruby-BSD BSD-2 )" |
556 |
+KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
557 |
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs" |
558 |
+ |
559 |
+RDEPEND=" |
560 |
+ berkdb? ( sys-libs/db:= ) |
561 |
+ gdbm? ( sys-libs/gdbm:= ) |
562 |
+ jemalloc? ( dev-libs/jemalloc ) |
563 |
+ jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) |
564 |
+ ssl? ( |
565 |
+ !libressl? ( dev-libs/openssl:0= ) |
566 |
+ libressl? ( dev-libs/libressl ) |
567 |
+ ) |
568 |
+ socks5? ( >=net-proxy/dante-1.1.13 ) |
569 |
+ tk? ( |
570 |
+ dev-lang/tcl:0=[threads] |
571 |
+ dev-lang/tk:0=[threads] |
572 |
+ ) |
573 |
+ dev-libs/libyaml |
574 |
+ virtual/libffi:= |
575 |
+ sys-libs/readline:0= |
576 |
+ sys-libs/zlib |
577 |
+ >=app-eselect/eselect-ruby-20171225 |
578 |
+" |
579 |
+ |
580 |
+DEPEND="${RDEPEND}" |
581 |
+ |
582 |
+BUNDLED_GEMS=" |
583 |
+ >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26] |
584 |
+ >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26] |
585 |
+ >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26] |
586 |
+ >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26] |
587 |
+ >=dev-ruby/rake-12.3.2[ruby_targets_ruby26] |
588 |
+ >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26] |
589 |
+ >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26] |
590 |
+" |
591 |
+ |
592 |
+PDEPEND=" |
593 |
+ ${BUNDLED_GEMS} |
594 |
+ virtual/rubygems[ruby_targets_ruby26] |
595 |
+ >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26] |
596 |
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby26] |
597 |
+ rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] ) |
598 |
+ xemacs? ( app-xemacs/ruby-modes )" |
599 |
+ |
600 |
+src_prepare() { |
601 |
+ # 005 does not compile bigdecimal and is questionable because it |
602 |
+ # compiles ruby in a non-standard way, may be dropped |
603 |
+ eapply "${FILESDIR}"/2.6/010*.patch |
604 |
+ |
605 |
+ einfo "Unbundling gems..." |
606 |
+ cd "$S" |
607 |
+ # Remove bundled gems that we will install via PDEPEND, bug |
608 |
+ # 539700. |
609 |
+ rm -fr gems/* || die |
610 |
+ |
611 |
+ einfo "Removing bundled libraries..." |
612 |
+ rm -fr ext/fiddle/libffi-3.2.1 || die |
613 |
+ |
614 |
+ # Fix hardcoded SHELL var in mkmf library |
615 |
+ sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die |
616 |
+ # avoid symlink loop on Darwin (?!) |
617 |
+ sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ |
618 |
+ configure.ac || die |
619 |
+ # make ar/libtool hack for Darwin work |
620 |
+ sed -i \ |
621 |
+ -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ |
622 |
+ configure.ac || die |
623 |
+ |
624 |
+ eapply_user |
625 |
+ |
626 |
+ eautoreconf |
627 |
+} |
628 |
+ |
629 |
+src_configure() { |
630 |
+ local modules= myconf= |
631 |
+ |
632 |
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413. |
633 |
+ filter-flags -fomit-frame-pointer |
634 |
+ # In many places aliasing rules are broken; play it safe |
635 |
+ # as it's risky with newer compilers to leave it as it is. |
636 |
+ append-flags -fno-strict-aliasing |
637 |
+ # SuperH needs this |
638 |
+ use sh && append-flags -mieee |
639 |
+ |
640 |
+ # Socks support via dante |
641 |
+ if use socks5 ; then |
642 |
+ # Socks support can't be disabled as long as SOCKS_SERVER is |
643 |
+ # set and socks library is present, so need to unset |
644 |
+ # SOCKS_SERVER in that case. |
645 |
+ unset SOCKS_SERVER |
646 |
+ fi |
647 |
+ |
648 |
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000) |
649 |
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
650 |
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
651 |
+ fi |
652 |
+ |
653 |
+ # ipv6 hack, bug 168939. Needs --enable-ipv6. |
654 |
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" |
655 |
+ |
656 |
+ # Determine which modules *not* to build depending in the USE flags. |
657 |
+ if ! use berkdb ; then |
658 |
+ modules="${modules},dbm" |
659 |
+ fi |
660 |
+ if ! use gdbm ; then |
661 |
+ modules="${modules},gdbm" |
662 |
+ fi |
663 |
+ if ! use ssl ; then |
664 |
+ modules="${modules},openssl" |
665 |
+ fi |
666 |
+ if ! use tk ; then |
667 |
+ modules="${modules},tk" |
668 |
+ fi |
669 |
+ |
670 |
+ # Provide an empty LIBPATHENV because we disable rpath but we do not |
671 |
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget |
672 |
+ # #564272 |
673 |
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ |
674 |
+ --program-suffix=${MY_SUFFIX} \ |
675 |
+ --with-soname=ruby${MY_SUFFIX} \ |
676 |
+ --docdir=${EPREFIX}/usr/share/doc/${P} \ |
677 |
+ --enable-shared \ |
678 |
+ --enable-pthread \ |
679 |
+ --disable-rpath \ |
680 |
+ --disable-dtrace \ |
681 |
+ --with-out-ext="${modules}" \ |
682 |
+ $(use_with jemalloc jemalloc) \ |
683 |
+ $(use_enable jit jit-support ) \ |
684 |
+ $(use_enable socks5 socks) \ |
685 |
+ $(use_enable doc install-doc) \ |
686 |
+ --enable-ipv6 \ |
687 |
+ $(use_enable static-libs static) \ |
688 |
+ $(use_enable static-libs install-static-library) \ |
689 |
+ $(use_with static-libs static-linked-ext) \ |
690 |
+ $(use_enable debug) \ |
691 |
+ ${myconf} \ |
692 |
+ --with-readline-dir="${EPREFIX}"/usr \ |
693 |
+ --enable-option-checking=no \ |
694 |
+ || die "econf failed" |
695 |
+ |
696 |
+ # Makefile is broken because it lacks -ldl |
697 |
+ rm -rf ext/-test-/popen_deadlock || die |
698 |
+} |
699 |
+ |
700 |
+src_compile() { |
701 |
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" || die "emake failed" |
702 |
+} |
703 |
+ |
704 |
+src_test() { |
705 |
+ emake -j1 V=1 test || die "make test failed" |
706 |
+ |
707 |
+ elog "Ruby's make test has been run. Ruby also ships with a make check" |
708 |
+ elog "that cannot be run until after ruby has been installed." |
709 |
+ elog |
710 |
+ if use rubytests; then |
711 |
+ elog "You have enabled rubytests, so they will be installed to" |
712 |
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" |
713 |
+ elog "than root, and you must place them into a writeable directory." |
714 |
+ elog "Then call: " |
715 |
+ elog |
716 |
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" |
717 |
+ else |
718 |
+ elog "Enable the rubytests USE flag to install the make check tests" |
719 |
+ fi |
720 |
+} |
721 |
+ |
722 |
+src_install() { |
723 |
+ # Remove the remaining bundled gems. We do this late in the process |
724 |
+ # since they are used during the build to e.g. create the |
725 |
+ # documentation. |
726 |
+ rm -rf ext/json || die |
727 |
+ rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die |
728 |
+ |
729 |
+ # Ruby is involved in the install process, we don't want interference here. |
730 |
+ unset RUBYOPT |
731 |
+ |
732 |
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
733 |
+ |
734 |
+ LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
735 |
+ DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" |
736 |
+ RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" |
737 |
+ for d in $(find "${S}/ext" -type d) ; do |
738 |
+ RUBYLIB="${RUBYLIB}:$d" |
739 |
+ done |
740 |
+ export LD_LIBRARY_PATH DYLD_LIBRARY_PATH RUBYLIB |
741 |
+ |
742 |
+ # Create directory for the default gems |
743 |
+ local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" |
744 |
+ mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" |
745 |
+ |
746 |
+ emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install || die "make install failed" |
747 |
+ |
748 |
+ # Remove installed rubygems and rdoc copy |
749 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" |
750 |
+ rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" |
751 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" |
752 |
+ rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" |
753 |
+ |
754 |
+ if use doc; then |
755 |
+ emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc || die "make install-doc failed" |
756 |
+ fi |
757 |
+ |
758 |
+ if use examples; then |
759 |
+ insinto /usr/share/doc/${PF} |
760 |
+ doins -r sample |
761 |
+ fi |
762 |
+ |
763 |
+ dodoc ChangeLog NEWS doc/NEWS* README* || die |
764 |
+ |
765 |
+ if use rubytests; then |
766 |
+ pushd test |
767 |
+ insinto /usr/share/${PN}-${SLOT}/test |
768 |
+ doins -r . |
769 |
+ popd |
770 |
+ fi |
771 |
+} |
772 |
+ |
773 |
+pkg_postinst() { |
774 |
+ if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then |
775 |
+ eselect ruby set ruby${MY_SUFFIX} |
776 |
+ fi |
777 |
+ |
778 |
+ elog |
779 |
+ elog "To switch between available Ruby profiles, execute as root:" |
780 |
+ elog "\teselect ruby set ruby(23|24|...)" |
781 |
+ elog |
782 |
+} |
783 |
+ |
784 |
+pkg_postrm() { |
785 |
+ eselect ruby cleanup |
786 |
+} |