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