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