1 |
commit: 9243b1c4795034628bb326acefeab5e1364f4cba |
2 |
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Sep 26 21:02:22 2017 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Tue Sep 26 21:02:22 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=9243b1c4 |
7 |
|
8 |
dev-lang/ruby: add 2.4.2 |
9 |
|
10 |
does not detect isnan and isinf in musl, so native extensions are |
11 |
broken. |
12 |
|
13 |
dev-lang/ruby/Manifest | 4 + |
14 |
dev-lang/ruby/metadata.xml | 28 +++++ |
15 |
dev-lang/ruby/ruby-2.4.2.ebuild | 248 ++++++++++++++++++++++++++++++++++++++++ |
16 |
3 files changed, 280 insertions(+) |
17 |
|
18 |
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest |
19 |
new file mode 100644 |
20 |
index 0000000..a7377be |
21 |
--- /dev/null |
22 |
+++ b/dev-lang/ruby/Manifest |
23 |
@@ -0,0 +1,4 @@ |
24 |
+DIST ruby-2.4.2.tar.xz 10046412 SHA256 748a8980d30141bd1a4124e11745bb105b436fb1890826e0d2b9ea31af27f735 SHA512 c1d42272fb0d94b693452e703b0ea4942bf59cbd4b08ba83bf039f54be97ebc88511632413da0164970b4cf97bc302bccb88aab48edfa8fa147498e7ee741595 WHIRLPOOL 4117f18e7901700d2cf603ed60cbe9b59ca65359ec359a7616b2cf90c76c25117afe864a8a7b55e7dc52c93377c541a8b497f1b281cdccade97aafa5ca363a5b |
25 |
+DIST ruby-patches-2.4.2.tar.bz2 3443 SHA256 621e92c4c14cec458100adf74e122df76663be4f75fc4ea86423a9ac6755ea3e SHA512 fb8349c67c72caf10ec12c4b5410194b4df24345446c2e3b6c6176d00727bfe803f4a905ef094a2d52315b6f4c3ce74fb8fbaa2fdf5efe46e6ccb24bf8418b17 WHIRLPOOL 306a16b49037a669398fb9c1b7c2b5484860d8749bf4c12d0e5eec02e3a7f7760b48b4a3cd709e0fa2b54f3d8dddff36d7eeb8d53d2d647d59e099b0299b8ed1 |
26 |
+EBUILD ruby-2.4.2.ebuild 7129 SHA256 420fc28e7a9d05029cdd801bea3a76e79112b3b0effbd98a5d5186e57ca10c84 SHA512 deacffb0a39c37400267dc67512e5c1e579acdb580c284cfa11fd0ad1358e5a847d73eb433a00955866f22cba70302ad60181bb22030c5322edc8b611beec340 WHIRLPOOL fba6a37c321632d9baa499b5c8765adfd1e4ca795d9f55bdb1688f3b5c6ad2043c6d7f9fef00bb84f5b5217608d5172eb38502ede48609ecbbb0658ba5f017d0 |
27 |
+MISC metadata.xml 977 SHA256 fc9d7cc6e682821e89141cdfcb007bc889c6cc522f662631e28dc280935a6624 SHA512 274ff4d66139d0e4fb91f339b834e77938e51508e712a5005fbb67e6b16fa04879cbb30ad6ee61cd60b16f01b6e311deee461dbb15ffcd1d9b45119484295750 WHIRLPOOL 44dbd829673c75af5459d1e440aa53be46e8ebc95d91faf0af31b9ad8608dac920d9dc13c11ca24af1646a31d0c5fa6800669fa7ba34c709814dffde226b4418 |
28 |
|
29 |
diff --git a/dev-lang/ruby/metadata.xml b/dev-lang/ruby/metadata.xml |
30 |
new file mode 100644 |
31 |
index 0000000..249178b |
32 |
--- /dev/null |
33 |
+++ b/dev-lang/ruby/metadata.xml |
34 |
@@ -0,0 +1,28 @@ |
35 |
+<?xml version="1.0" encoding="UTF-8"?> |
36 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
37 |
+<pkgmetadata> |
38 |
+ <maintainer type="project"> |
39 |
+ <email>ruby@g.o</email> |
40 |
+ <name>Gentoo Ruby Project</name> |
41 |
+ </maintainer> |
42 |
+ <use> |
43 |
+ <flag name="rubytests"> |
44 |
+ Install ruby tests that can only be run after ruby is installed |
45 |
+ </flag> |
46 |
+ <flag name="readline"> |
47 |
+ Use the <pkg>sys-libs/readline</pkg> library to provide the |
48 |
+ readline extension, used for instance by the irb tool. This flag |
49 |
+ is meaningful only if the libedit USE flag is disabled. |
50 |
+ |
51 |
+ If neither libedit nor readline USE flags are enabled, the |
52 |
+ readline extension will not be built (and irb will lose line |
53 |
+ editing functionality). |
54 |
+ </flag> |
55 |
+ <flag name="rdoc"> |
56 |
+ Install <pkg>dev-ruby/rdoc</pkg> after installing Ruby. |
57 |
+ </flag> |
58 |
+ <flag name="jemalloc"> |
59 |
+ Use <pkg>dev-libs/jemalloc</pkg> for memory allocation. |
60 |
+ </flag> |
61 |
+ </use> |
62 |
+</pkgmetadata> |
63 |
|
64 |
diff --git a/dev-lang/ruby/ruby-2.4.2.ebuild b/dev-lang/ruby/ruby-2.4.2.ebuild |
65 |
new file mode 100644 |
66 |
index 0000000..bdfb9ce |
67 |
--- /dev/null |
68 |
+++ b/dev-lang/ruby/ruby-2.4.2.ebuild |
69 |
@@ -0,0 +1,248 @@ |
70 |
+# Copyright 1999-2017 Gentoo Foundation |
71 |
+# Distributed under the terms of the GNU General Public License v2 |
72 |
+ |
73 |
+EAPI=6 |
74 |
+ |
75 |
+#PATCHSET=1 |
76 |
+ |
77 |
+inherit autotools eutils flag-o-matic multilib versionator |
78 |
+ |
79 |
+MY_P="${PN}-$(get_version_component_range 1-3)" |
80 |
+S=${WORKDIR}/${MY_P} |
81 |
+ |
82 |
+SLOT=$(get_version_component_range 1-2) |
83 |
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) |
84 |
+RUBYVERSION=${SLOT}.0 |
85 |
+ |
86 |
+if [[ -n ${PATCHSET} ]]; then |
87 |
+ if [[ ${PVR} == ${PV} ]]; then |
88 |
+ PATCHSET="${PV}-r0.${PATCHSET}" |
89 |
+ else |
90 |
+ PATCHSET="${PVR}.${PATCHSET}" |
91 |
+ fi |
92 |
+else |
93 |
+ PATCHSET="${PVR}" |
94 |
+fi |
95 |
+ |
96 |
+DESCRIPTION="An object-oriented scripting language" |
97 |
+HOMEPAGE="http://www.ruby-lang.org/" |
98 |
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz |
99 |
+ https://dev.gentoo.org/~graaff/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2" |
100 |
+ |
101 |
+LICENSE="|| ( Ruby-BSD BSD-2 )" |
102 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
103 |
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl static-libs tk xemacs" |
104 |
+ |
105 |
+RDEPEND=" |
106 |
+ berkdb? ( sys-libs/db:= ) |
107 |
+ gdbm? ( sys-libs/gdbm ) |
108 |
+ jemalloc? ( dev-libs/jemalloc ) |
109 |
+ ssl? ( |
110 |
+ !libressl? ( dev-libs/openssl:0= ) |
111 |
+ libressl? ( dev-libs/libressl ) |
112 |
+ ) |
113 |
+ socks5? ( >=net-proxy/dante-1.1.13 ) |
114 |
+ tk? ( |
115 |
+ dev-lang/tcl:0=[threads] |
116 |
+ dev-lang/tk:0=[threads] |
117 |
+ ) |
118 |
+ dev-libs/libyaml |
119 |
+ virtual/libffi |
120 |
+ sys-libs/zlib |
121 |
+ >=app-eselect/eselect-ruby-20161226 |
122 |
+ !<dev-ruby/rdoc-3.9.4 |
123 |
+ !<dev-ruby/rubygems-1.8.10-r1" |
124 |
+ |
125 |
+DEPEND="${RDEPEND}" |
126 |
+ |
127 |
+BUNDLED_GEMS=" |
128 |
+ >=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24] |
129 |
+ >=dev-ruby/minitest-5.10.1[ruby_targets_ruby24] |
130 |
+ >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24] |
131 |
+ >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24] |
132 |
+ >=dev-ruby/rake-12.0.0[ruby_targets_ruby24] |
133 |
+ >=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24] |
134 |
+ >=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24] |
135 |
+" |
136 |
+ |
137 |
+PDEPEND=" |
138 |
+ ${BUNDLED_GEMS} |
139 |
+ virtual/rubygems[ruby_targets_ruby24] |
140 |
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby24] |
141 |
+ rdoc? ( >=dev-ruby/rdoc-5.1.0[ruby_targets_ruby24] ) |
142 |
+ xemacs? ( app-xemacs/ruby-modes )" |
143 |
+ |
144 |
+src_prepare() { |
145 |
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \ |
146 |
+ epatch "${WORKDIR}/patches" |
147 |
+ |
148 |
+ einfo "Unbundling gems..." |
149 |
+ cd "$S" |
150 |
+ # Remove bundled gems that we will install via PDEPEND, bug |
151 |
+ # 539700. Use explicit version numbers to ensure rm fails when they |
152 |
+ # change so we can update dependencies accordingly. |
153 |
+ 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 |
154 |
+ |
155 |
+ einfo "Removing bundled libraries..." |
156 |
+ rm -fr ext/fiddle/libffi-3.2.1 || die |
157 |
+ |
158 |
+ # Fix a hardcoded lib path in configure script |
159 |
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
160 |
+ configure.in || die "sed failed" |
161 |
+ |
162 |
+ eapply_user |
163 |
+ |
164 |
+ eautoreconf |
165 |
+} |
166 |
+ |
167 |
+src_configure() { |
168 |
+ local modules= myconf= |
169 |
+ |
170 |
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413. |
171 |
+ filter-flags -fomit-frame-pointer |
172 |
+ # In many places aliasing rules are broken; play it safe |
173 |
+ # as it's risky with newer compilers to leave it as it is. |
174 |
+ append-flags -fno-strict-aliasing |
175 |
+ # SuperH needs this |
176 |
+ use sh && append-flags -mieee |
177 |
+ |
178 |
+ # Socks support via dante |
179 |
+ if use socks5 ; then |
180 |
+ # Socks support can't be disabled as long as SOCKS_SERVER is |
181 |
+ # set and socks library is present, so need to unset |
182 |
+ # SOCKS_SERVER in that case. |
183 |
+ unset SOCKS_SERVER |
184 |
+ fi |
185 |
+ |
186 |
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000) |
187 |
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
188 |
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
189 |
+ fi |
190 |
+ |
191 |
+ # ipv6 hack, bug 168939. Needs --enable-ipv6. |
192 |
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" |
193 |
+ |
194 |
+ # Determine which modules *not* to build depending in the USE flags. |
195 |
+ if ! use berkdb ; then |
196 |
+ modules="${modules},dbm" |
197 |
+ fi |
198 |
+ if ! use gdbm ; then |
199 |
+ modules="${modules},gdbm" |
200 |
+ fi |
201 |
+ if ! use ssl ; then |
202 |
+ modules="${modules},openssl" |
203 |
+ fi |
204 |
+ if ! use tk ; then |
205 |
+ modules="${modules},tk" |
206 |
+ fi |
207 |
+ |
208 |
+ # Configure script does not detect isinf/isnan as macros, which breaks |
209 |
+ # some native extensions. |
210 |
+ export ac_cv_func_isnan=yes |
211 |
+ export ac_cf_func_isinf=yes |
212 |
+ |
213 |
+ # Provide an empty LIBPATHENV because we disable rpath but we do not |
214 |
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget |
215 |
+ # #564272 |
216 |
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ |
217 |
+ --program-suffix=${MY_SUFFIX} \ |
218 |
+ --with-soname=ruby${MY_SUFFIX} \ |
219 |
+ --docdir=${EPREFIX}/usr/share/doc/${P} \ |
220 |
+ --enable-shared \ |
221 |
+ --enable-pthread \ |
222 |
+ --disable-rpath \ |
223 |
+ --with-out-ext="${modules}" \ |
224 |
+ $(use_with jemalloc jemalloc) \ |
225 |
+ $(use_enable socks5 socks) \ |
226 |
+ $(use_enable doc install-doc) \ |
227 |
+ --enable-ipv6 \ |
228 |
+ $(use_enable static-libs static) \ |
229 |
+ $(use_enable static-libs install-static-library) \ |
230 |
+ $(use_with static-libs static-linked-ext) \ |
231 |
+ $(use_enable debug) \ |
232 |
+ ${myconf} \ |
233 |
+ --enable-option-checking=no \ |
234 |
+ || die "econf failed" |
235 |
+} |
236 |
+ |
237 |
+src_compile() { |
238 |
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed" |
239 |
+} |
240 |
+ |
241 |
+src_test() { |
242 |
+ emake -j1 V=1 test || die "make test failed" |
243 |
+ |
244 |
+ elog "Ruby's make test has been run. Ruby also ships with a make check" |
245 |
+ elog "that cannot be run until after ruby has been installed." |
246 |
+ elog |
247 |
+ if use rubytests; then |
248 |
+ elog "You have enabled rubytests, so they will be installed to" |
249 |
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" |
250 |
+ elog "than root, and you must place them into a writeable directory." |
251 |
+ elog "Then call: " |
252 |
+ elog |
253 |
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" |
254 |
+ else |
255 |
+ elog "Enable the rubytests USE flag to install the make check tests" |
256 |
+ fi |
257 |
+} |
258 |
+ |
259 |
+src_install() { |
260 |
+ # Remove the remaining bundled gems. We do this late in the process |
261 |
+ # since they are used during the build to e.g. create the |
262 |
+ # documentation. |
263 |
+ rm -rf ext/json || die |
264 |
+ |
265 |
+ # Ruby is involved in the install process, we don't want interference here. |
266 |
+ unset RUBYOPT |
267 |
+ |
268 |
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
269 |
+ |
270 |
+ LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
271 |
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}" |
272 |
+ for d in $(find "${S}/ext" -type d) ; do |
273 |
+ RUBYLIB="${RUBYLIB}:$d" |
274 |
+ done |
275 |
+ export LD_LIBRARY_PATH RUBYLIB |
276 |
+ |
277 |
+ emake V=1 DESTDIR="${D}" install || die "make install failed" |
278 |
+ |
279 |
+ # Remove installed rubygems and rdoc copy |
280 |
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" |
281 |
+ rm -rf "${D}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" |
282 |
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" |
283 |
+ rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" |
284 |
+ |
285 |
+ if use doc; then |
286 |
+ make DESTDIR="${D}" install-doc || die "make install-doc failed" |
287 |
+ fi |
288 |
+ |
289 |
+ if use examples; then |
290 |
+ insinto /usr/share/doc/${PF} |
291 |
+ doins -r sample |
292 |
+ fi |
293 |
+ |
294 |
+ dodoc ChangeLog NEWS doc/NEWS* README* || die |
295 |
+ |
296 |
+ if use rubytests; then |
297 |
+ pushd test |
298 |
+ insinto /usr/share/${PN}-${SLOT}/test |
299 |
+ doins -r . |
300 |
+ popd |
301 |
+ fi |
302 |
+} |
303 |
+ |
304 |
+pkg_postinst() { |
305 |
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
306 |
+ eselect ruby set ruby${MY_SUFFIX} |
307 |
+ fi |
308 |
+ |
309 |
+ elog |
310 |
+ elog "To switch between available Ruby profiles, execute as root:" |
311 |
+ elog "\teselect ruby set ruby(19|20|...)" |
312 |
+ elog |
313 |
+} |
314 |
+ |
315 |
+pkg_postrm() { |
316 |
+ eselect ruby cleanup |
317 |
+} |