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