1 |
a3li 09/04/03 12:26:26 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: ruby-1.9.1-r1.ebuild ruby-1.8.7_p72-r11.ebuild |
5 |
ruby-1.8.6_p287-r13.ebuild |
6 |
Removed: ruby-1.8.7_p72-r10.ebuild |
7 |
ruby-1.8.6_p287-r12.ebuild ruby-1.9.1.ebuild |
8 |
Log: |
9 |
Fixing bugs 239101 and 260760, thanks to matsuu and Tom. Migrating 1.9.1 to EAPI-2 and other minor fixes |
10 |
(Portage version: 2.2_rc28/cvs/Linux x86_64) |
11 |
|
12 |
Revision Changes Path |
13 |
1.391 dev-lang/ruby/ChangeLog |
14 |
|
15 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.391&view=markup |
16 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.391&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ChangeLog?r1=1.390&r2=1.391 |
18 |
|
19 |
Index: ChangeLog |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v |
22 |
retrieving revision 1.390 |
23 |
retrieving revision 1.391 |
24 |
diff -u -r1.390 -r1.391 |
25 |
--- ChangeLog 21 Mar 2009 10:12:08 -0000 1.390 |
26 |
+++ ChangeLog 3 Apr 2009 12:26:26 -0000 1.391 |
27 |
@@ -1,6 +1,21 @@ |
28 |
# ChangeLog for dev-lang/ruby |
29 |
# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.390 2009/03/21 10:12:08 a3li Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.391 2009/04/03 12:26:26 a3li Exp $ |
32 |
+ |
33 |
+*ruby-1.9.1-r1 (03 Apr 2009) |
34 |
+*ruby-1.8.7_p72-r11 (03 Apr 2009) |
35 |
+*ruby-1.8.6_p287-r13 (03 Apr 2009) |
36 |
+ |
37 |
+ 03 Apr 2009; Alex Legler <a3li@g.o> |
38 |
+ +files/ruby-1.8.6-uclibc-udp.patch, +files/auto_gem.rb, |
39 |
+ +files/ruby18-mkmf-parallel-install.patch, |
40 |
+ +files/ruby19-mkmf-parallel-install.patch, -ruby-1.8.6_p287-r12.ebuild, |
41 |
+ +ruby-1.8.6_p287-r13.ebuild, -ruby-1.8.7_p72-r10.ebuild, |
42 |
+ +ruby-1.8.7_p72-r11.ebuild, -ruby-1.9.1.ebuild, +ruby-1.9.1-r1.ebuild: |
43 |
+ Revbumps fixing bugs 239101 (thanks to matsuu) and 260760 (thanks to Tom |
44 |
+ Lloyd), ruby-1.9.1 is now EAPI-2. Removing old versions. Adding fake |
45 |
+ auto_gem.rb for Ruby 1.9.1. Removing redundant WANT_AUTO* to make repoman |
46 |
+ happy. |
47 |
|
48 |
*ruby-1.9.1 (21 Mar 2009) |
49 |
|
50 |
|
51 |
|
52 |
|
53 |
1.1 dev-lang/ruby/ruby-1.9.1-r1.ebuild |
54 |
|
55 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.9.1-r1.ebuild?rev=1.1&view=markup |
56 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.9.1-r1.ebuild?rev=1.1&content-type=text/plain |
57 |
|
58 |
Index: ruby-1.9.1-r1.ebuild |
59 |
=================================================================== |
60 |
# Copyright 1999-2009 Gentoo Foundation |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.9.1-r1.ebuild,v 1.1 2009/04/03 12:26:26 a3li Exp $ |
63 |
|
64 |
EAPI=2 |
65 |
|
66 |
inherit autotools eutils flag-o-matic multilib versionator |
67 |
|
68 |
# Add p0 patchlevel |
69 |
MY_P="${P}-p0" |
70 |
|
71 |
# 1.9.1.0 -> 1.9 |
72 |
SLOT=$(get_version_component_range 1-2) |
73 |
|
74 |
# 1.9.1.0 -> 1.9.1 (used in libdirs) |
75 |
RUBYVERSION=$(get_version_component_range 1-3) |
76 |
|
77 |
# 1.9 -> 19 |
78 |
MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) |
79 |
|
80 |
DESCRIPTION="An object-oriented scripting language" |
81 |
HOMEPAGE="http://www.ruby-lang.org/" |
82 |
SRC_URI="mirror://ruby/${MY_P}.tar.bz2" |
83 |
|
84 |
LICENSE="|| ( Ruby GPL-2 )" |
85 |
KEYWORDS="~amd64 ~x86" |
86 |
IUSE="berkdb debug doc emacs examples gdbm ipv6 rubytests socks5 ssl tk xemacs" |
87 |
|
88 |
RDEPEND=" |
89 |
berkdb? ( sys-libs/db ) |
90 |
gdbm? ( sys-libs/gdbm ) |
91 |
ssl? ( dev-libs/openssl ) |
92 |
socks5? ( >=net-proxy/dante-1.1.13 ) |
93 |
tk? ( dev-lang/tk[threads] ) |
94 |
>=app-admin/eselect-ruby-20080921 |
95 |
!=dev-lang/ruby-cvs-${SLOT}* |
96 |
!dev-ruby/rdoc |
97 |
!dev-ruby/rexml" |
98 |
DEPEND="${RDEPEND}" |
99 |
PDEPEND=" |
100 |
emacs? ( app-emacs/ruby-mode ) |
101 |
xemacs? ( app-xemacs/ruby-modes )" |
102 |
|
103 |
PROVIDE="virtual/ruby" |
104 |
|
105 |
S="${WORKDIR}/${MY_P}" |
106 |
|
107 |
pkg_setup() { |
108 |
ewarn |
109 |
ewarn "It is highly recommended to install dev-ruby/rubygems-1.3.1-r30" |
110 |
ewarn "if you have Ruby 1.8 on this system installed, too." |
111 |
ewarn |
112 |
epause 5 |
113 |
} |
114 |
|
115 |
src_prepare() { |
116 |
cd "${S}" |
117 |
|
118 |
# Patch wrt bug #238061 |
119 |
epatch "${FILESDIR}/ruby19-rubygems-proxy.patch" |
120 |
# Patch for rubygems to find installed gems outside of the sandbox |
121 |
epatch "${FILESDIR}/ruby19-rubygems-gentoo.patch" |
122 |
|
123 |
epatch "${FILESDIR}/${PN}-ossl_ocsp-verification.patch" |
124 |
epatch "${FILESDIR}/${PN}${MY_SUFFIX}-mkmf-parallel-install.patch" |
125 |
|
126 |
# Strip rake |
127 |
rm "bin/rake" |
128 |
rm "lib/rake.rb" |
129 |
rm -rf "lib/rake" |
130 |
|
131 |
# Fix a hardcoded lib path in configure script |
132 |
sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
133 |
configure.in || die "sed failed" |
134 |
|
135 |
eautoreconf |
136 |
} |
137 |
|
138 |
src_configure() { |
139 |
# -fomit-frame-pointer makes ruby segfault, see bug #150413. |
140 |
filter-flags -fomit-frame-pointer |
141 |
# In many places aliasing rules are broken; play it safe |
142 |
# as it's risky with newer compilers to leave it as it is. |
143 |
append-flags -fno-strict-aliasing |
144 |
|
145 |
# Socks support via dante |
146 |
if use socks5 ; then |
147 |
# Socks support can't be disabled as long as SOCKS_SERVER is |
148 |
# set and socks library is present, so need to unset |
149 |
# SOCKS_SERVER in that case. |
150 |
unset SOCKS_SERVER |
151 |
fi |
152 |
|
153 |
# Increase GC_MALLOC_LIMIT if set (default is 8000000) |
154 |
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
155 |
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
156 |
fi |
157 |
|
158 |
econf --program-suffix=${MY_SUFFIX} --enable-shared --enable-pthread \ |
159 |
$(use_enable socks5 socks) \ |
160 |
$(use_enable doc install-doc) \ |
161 |
$(use_enable ipv6) \ |
162 |
$(use_enable debug) \ |
163 |
$(use_with berkdb dbm) \ |
164 |
$(use_with gdbm) \ |
165 |
$(use_with ssl openssl) \ |
166 |
$(use_with tk) \ |
167 |
${myconf} \ |
168 |
--enable-option-checking=no \ |
169 |
|| die "econf failed" |
170 |
} |
171 |
|
172 |
src_compile() { |
173 |
emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed" |
174 |
} |
175 |
|
176 |
src_test() { |
177 |
emake test || die "make test failed" |
178 |
|
179 |
elog "Ruby's make test has been run. Ruby also ships with a make check" |
180 |
elog "that cannot be run until after ruby has been installed." |
181 |
elog |
182 |
if use rubytests; then |
183 |
elog "You have enabled rubytests, so they will be installed to" |
184 |
elog "/usr/share/${PN}-${RUBYVERSION}/test. To run them you must be a user other" |
185 |
elog "than root, and you must place them into a writeable directory." |
186 |
elog "Then call: " |
187 |
elog |
188 |
elog "ruby19 -C /location/of/tests runner.rb" |
189 |
else |
190 |
elog "Enable the rubytests USE flag to install the make check tests" |
191 |
fi |
192 |
} |
193 |
|
194 |
src_install() { |
195 |
# Ruby is involved in the install process, we don't want interference here. |
196 |
unset RUBYOPT |
197 |
|
198 |
# Creating the rubygems directories, bug #230163 once more. |
199 |
local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
200 |
keepdir /usr/$(get_libdir)/ruby${MY_SUFFIX}/gems/${RUBYVERSION}/{doc,gems,cache,specifications} |
201 |
|
202 |
export GEM_HOME="${D}/usr/$(get_libdir)/ruby${MY_SUFFIX}/gems/${RUBYVERSION}" |
203 |
export GEM_PATH="${GEM_HOME}/" |
204 |
|
205 |
LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" |
206 |
RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}" |
207 |
for d in $(find "${S}/ext" -type d) ; do |
208 |
RUBYLIB="${RUBYLIB}:$d" |
209 |
done |
210 |
export LD_LIBRARY_PATH RUBYLIB |
211 |
|
212 |
emake DESTDIR="${D}" install || die "make install failed" |
213 |
|
214 |
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']") |
215 |
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']") |
216 |
|
217 |
if use doc; then |
218 |
make DESTDIR="${D}" install-doc || die "make install-doc failed" |
219 |
fi |
220 |
|
221 |
if use examples; then |
222 |
dodir /usr/share/doc/${PF} |
223 |
cp -pPR sample "${D}/usr/share/doc/${PF}" |
224 |
fi |
225 |
|
226 |
dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \ |
227 |
"/usr/$(get_libdir)/libruby$(get_libname ${PV%.*})" |
228 |
dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \ |
229 |
"/usr/$(get_libdir)/libruby$(get_libname ${PV%_*})" |
230 |
|
231 |
dodoc ChangeLog NEWS doc/NEWS-1.8.7 README* ToDo |
232 |
|
233 |
if use rubytests; then |
234 |
dodir /usr/share/${PN}-${RUBYVERSION} |
235 |
cp -pPR test "${D}/usr/share/${PN}-${RUBYVERSION}" |
236 |
fi |
237 |
|
238 |
insinto /usr/$(get_libdir)/ruby${MY_SUFFIX}/site_ruby/ |
239 |
newins "${FILESDIR}/auto_gem.rb" auto_gem.rb |
240 |
} |
241 |
|
242 |
pkg_postinst() { |
243 |
if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
244 |
eselect ruby set ruby${MY_SUFFIX} |
245 |
fi |
246 |
|
247 |
elog |
248 |
elog "To switch between available Ruby profiles, execute as root:" |
249 |
elog "\teselect ruby set ruby(18|19|...)" |
250 |
elog |
251 |
} |
252 |
|
253 |
pkg_postrm() { |
254 |
if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
255 |
eselect ruby set ruby${MY_SUFFIX} |
256 |
fi |
257 |
} |
258 |
|
259 |
|
260 |
|
261 |
1.1 dev-lang/ruby/ruby-1.8.7_p72-r11.ebuild |
262 |
|
263 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p72-r11.ebuild?rev=1.1&view=markup |
264 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p72-r11.ebuild?rev=1.1&content-type=text/plain |
265 |
|
266 |
Index: ruby-1.8.7_p72-r11.ebuild |
267 |
=================================================================== |
268 |
# Copyright 1999-2009 Gentoo Foundation |
269 |
# Distributed under the terms of the GNU General Public License v2 |
270 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p72-r11.ebuild,v 1.1 2009/04/03 12:26:26 a3li Exp $ |
271 |
|
272 |
#PATCHES APPLY, DOESN'T COMPILE THOUGH |
273 |
#ONIGURUMA="onigd2_5_9" |
274 |
|
275 |
inherit autotools eutils flag-o-matic multilib versionator |
276 |
|
277 |
SLOT=$(get_version_component_range 1-2) |
278 |
MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) |
279 |
|
280 |
MY_P="${PN}-$(replace_version_separator 3 '-')" |
281 |
S=${WORKDIR}/${MY_P} |
282 |
|
283 |
DESCRIPTION="An object-oriented scripting language" |
284 |
HOMEPAGE="http://www.ruby-lang.org/" |
285 |
SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.bz2" |
286 |
# cjk? ( http://www.geocities.jp/kosako3/oniguruma/archive/${ONIGURUMA}.tar.gz )" |
287 |
|
288 |
LICENSE="Ruby" |
289 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
290 |
IUSE="berkdb debug doc emacs examples gdbm ipv6 rubytests socks5 ssl threads tk xemacs" #cjk |
291 |
|
292 |
RDEPEND=" |
293 |
berkdb? ( sys-libs/db ) |
294 |
gdbm? ( sys-libs/gdbm ) |
295 |
ssl? ( dev-libs/openssl ) |
296 |
socks5? ( >=net-proxy/dante-1.1.13 ) |
297 |
tk? ( dev-lang/tk ) |
298 |
app-admin/eselect-ruby |
299 |
!=dev-lang/ruby-cvs-${SLOT}* |
300 |
!dev-ruby/rdoc |
301 |
!dev-ruby/rexml" |
302 |
DEPEND="${RDEPEND}" |
303 |
PDEPEND="emacs? ( app-emacs/ruby-mode ) |
304 |
xemacs? ( app-xemacs/ruby-modes )" |
305 |
|
306 |
PROVIDE="virtual/ruby" |
307 |
|
308 |
pkg_setup() { |
309 |
use tk || return |
310 |
|
311 |
if (use threads && ! built_with_use dev-lang/tk threads) \ |
312 |
|| (! use threads && built_with_use dev-lang/tk threads) ; then |
313 |
eerror |
314 |
eerror "You have Tk support enabled." |
315 |
eerror |
316 |
eerror "Ruby and Tk need the same 'threads' USE flag settings." |
317 |
eerror "Either change the USE flag on dev-lang/ruby or on dev-lang/tk" |
318 |
eerror "and recompile tk." |
319 |
|
320 |
die "threads USE flag mismatch" |
321 |
fi |
322 |
} |
323 |
|
324 |
src_unpack() { |
325 |
unpack ${A} |
326 |
|
327 |
# if use cjk ; then |
328 |
# einfo "Applying ${ONIGURUMA}" |
329 |
# pushd "${WORKDIR}/oniguruma" |
330 |
# econf --with-rubydir="${S}" || die "oniguruma econf failed" |
331 |
# emake $MY_SUFFIX || die "oniguruma emake failed" |
332 |
# popd |
333 |
# fi |
334 |
|
335 |
cd "${S}/ext/dl" |
336 |
epatch "${FILESDIR}/${PN}-1.8.6-memory-leak.diff" |
337 |
cd "${S}" |
338 |
epatch "${FILESDIR}/${PN}-1.8.6-shortname_constants.patch" |
339 |
epatch "${FILESDIR}/${PN}-mkconfig.patch" |
340 |
epatch "${FILESDIR}/${PN}-ossl_ocsp-verification.patch" |
341 |
epatch "${FILESDIR}/${PN}${MY_SUFFIX}-mkmf-parallel-install.patch" |
342 |
|
343 |
|
344 |
# Fix a hardcoded lib path in configure script |
345 |
sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
346 |
configure.in || die "sed failed" |
347 |
|
348 |
eautoreconf |
349 |
} |
350 |
|
351 |
src_compile() { |
352 |
# -fomit-frame-pointer makes ruby segfault, see bug #150413. |
353 |
filter-flags -fomit-frame-pointer |
354 |
# In many places aliasing rules are broken; play it safe |
355 |
# as it's risky with newer compilers to leave it as it is. |
356 |
append-flags -fno-strict-aliasing |
357 |
|
358 |
# Socks support via dante |
359 |
if use socks5 ; then |
360 |
# Socks support can't be disabled as long as SOCKS_SERVER is |
361 |
# set and socks library is present, so need to unset |
362 |
# SOCKS_SERVER in that case. |
363 |
unset SOCKS_SERVER |
364 |
fi |
365 |
|
366 |
# Increase GC_MALLOC_LIMIT if set (default is 8000000) |
367 |
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
368 |
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
369 |
fi |
370 |
|
371 |
econf --program-suffix=$MY_SUFFIX --enable-shared \ |
372 |
$(use_enable socks5 socks) \ |
373 |
$(use_enable doc install-doc) \ |
374 |
$(use_enable threads pthread) \ |
375 |
$(use_enable ipv6) \ |
376 |
$(use_enable debug) \ |
377 |
$(use_with berkdb dbm) \ |
378 |
$(use_with gdbm) \ |
379 |
$(use_with ssl openssl) \ |
380 |
$(use_with tk) \ |
381 |
${myconf} \ |
382 |
--with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \ |
383 |
--enable-option-checking=no \ |
384 |
|| die "econf failed" |
385 |
|
386 |
emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed" |
387 |
} |
388 |
|
389 |
src_test() { |
390 |
emake -j1 test || die "make test failed" |
391 |
|
392 |
elog "Ruby's make test has been run. Ruby also ships with a make check" |
393 |
elog "that cannot be run until after ruby has been installed." |
394 |
elog |
395 |
if use rubytests; then |
396 |
elog "You have enabled rubytests, so they will be installed to" |
397 |
elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" |
398 |
elog "than root, and you must place them into a writeable directory." |
399 |
elog "Then call: " |
400 |
elog |
401 |
elog "ruby -C /location/of/tests runner.rb" |
402 |
else |
403 |
elog "Enable the rubytests USE flag to install the make check tests" |
404 |
fi |
405 |
} |
406 |
|
407 |
src_install() { |
408 |
# Ruby is involved in the install process, we don't want interference here. |
409 |
unset RUBYOPT |
410 |
|
411 |
LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" |
412 |
RUBYLIB="${S}:${LD_LIBRARY_PATH}/ruby/${SLOT}" |
413 |
for d in $(find "${S}/ext" -type d) ; do |
414 |
RUBYLIB="${RUBYLIB}:$d" |
415 |
done |
416 |
export LD_LIBRARY_PATH RUBYLIB |
417 |
|
418 |
emake DESTDIR="${D}" install || die "make install failed" |
419 |
|
420 |
MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
421 |
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']") |
422 |
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']") |
423 |
|
424 |
if use doc; then |
425 |
make DESTDIR="${D}" install-doc || die "make install-doc failed" |
426 |
fi |
427 |
|
428 |
if use examples; then |
429 |
dodir /usr/share/doc/${PF} |
430 |
cp -pPR sample "${D}/usr/share/doc/${PF}" |
431 |
fi |
432 |
|
433 |
dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%.*}) |
434 |
dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%_*}) |
435 |
|
436 |
dodoc ChangeLog NEWS README* ToDo |
437 |
|
438 |
if use rubytests; then |
439 |
dodir /usr/share/${PN}-${SLOT} |
440 |
cp -pPR test "${D}/usr/share/${PN}-${SLOT}" |
441 |
fi |
442 |
} |
443 |
|
444 |
pkg_postinst() { |
445 |
if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
446 |
eselect ruby set ruby${MY_SUFFIX} |
447 |
fi |
448 |
|
449 |
elog |
450 |
elog "This ebuild is compatible to eselect-ruby" |
451 |
elog "To switch between available Ruby profiles, execute as root:" |
452 |
elog "\teselect ruby set ruby(18|19|...)" |
453 |
elog |
454 |
} |
455 |
|
456 |
pkg_postrm() { |
457 |
if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
458 |
eselect ruby set ruby${MY_SUFFIX} |
459 |
fi |
460 |
} |
461 |
|
462 |
|
463 |
|
464 |
1.1 dev-lang/ruby/ruby-1.8.6_p287-r13.ebuild |
465 |
|
466 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.8.6_p287-r13.ebuild?rev=1.1&view=markup |
467 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.8.6_p287-r13.ebuild?rev=1.1&content-type=text/plain |
468 |
|
469 |
Index: ruby-1.8.6_p287-r13.ebuild |
470 |
=================================================================== |
471 |
# Copyright 1999-2009 Gentoo Foundation |
472 |
# Distributed under the terms of the GNU General Public License v2 |
473 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.6_p287-r13.ebuild,v 1.1 2009/04/03 12:26:26 a3li Exp $ |
474 |
|
475 |
ONIGURUMA="onigd2_5_9" |
476 |
|
477 |
inherit autotools eutils flag-o-matic multilib versionator |
478 |
|
479 |
MY_P="${PN}-$(replace_version_separator 3 '-')" |
480 |
S=${WORKDIR}/${MY_P} |
481 |
|
482 |
SLOT=$(get_version_component_range 1-2) |
483 |
MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) |
484 |
|
485 |
DESCRIPTION="An object-oriented scripting language" |
486 |
HOMEPAGE="http://www.ruby-lang.org/" |
487 |
SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.bz2" |
488 |
|
489 |
LICENSE="Ruby" |
490 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
491 |
IUSE="berkdb debug doc emacs examples gdbm ipv6 rubytests socks5 ssl threads tk xemacs" |
492 |
|
493 |
RDEPEND=" |
494 |
berkdb? ( sys-libs/db ) |
495 |
gdbm? ( sys-libs/gdbm ) |
496 |
ssl? ( dev-libs/openssl ) |
497 |
socks5? ( >=net-proxy/dante-1.1.13 ) |
498 |
tk? ( dev-lang/tk ) |
499 |
app-admin/eselect-ruby |
500 |
!=dev-lang/ruby-cvs-${SLOT}* |
501 |
!dev-ruby/rdoc |
502 |
!dev-ruby/rexml" |
503 |
DEPEND="${RDEPEND}" |
504 |
PDEPEND="emacs? ( app-emacs/ruby-mode ) |
505 |
xemacs? ( app-xemacs/ruby-modes )" |
506 |
|
507 |
PROVIDE="virtual/ruby" |
508 |
|
509 |
pkg_setup() { |
510 |
use tk || return |
511 |
|
512 |
# Note for EAPI-2 lovers: We'd like to show that custom message. |
513 |
# *If* you can make USE dependencies show that, too, feel free to migrate. |
514 |
if (use threads && ! built_with_use dev-lang/tk threads) \ |
515 |
|| (! use threads && built_with_use dev-lang/tk threads) ; then |
516 |
eerror |
517 |
eerror "You have Tk support enabled." |
518 |
eerror |
519 |
eerror "Ruby and Tk need the same 'threads' USE flag settings." |
520 |
eerror "Either change the USE flag on dev-lang/ruby or on dev-lang/tk" |
521 |
eerror "and recompile tk." |
522 |
|
523 |
die "threads USE flag mismatch" |
524 |
fi |
525 |
} |
526 |
|
527 |
src_unpack() { |
528 |
unpack ${A} |
529 |
|
530 |
cd "${S}/ext/dl" |
531 |
epatch "${FILESDIR}/${PN}-1.8.6-memory-leak.diff" |
532 |
cd "${S}" |
533 |
|
534 |
epatch "${FILESDIR}/${P}-entity_expansion_limit.diff" |
535 |
epatch "${FILESDIR}/${PN}-1.8.6-shortname_constants.patch" |
536 |
epatch "${FILESDIR}/${PN}-1.8.6-openssl.patch" |
537 |
epatch "${FILESDIR}/${PN}-mkconfig.patch" |
538 |
epatch "${FILESDIR}/${PN}-ossl_ocsp-verification.patch" |
539 |
epatch "${FILESDIR}/${PN}${MY_SUFFIX}-mkmf-parallel-install.patch" |
540 |
epatch "${FILESDIR}/${PN}-1.8.6-uclibc-udp.patch" |
541 |
|
542 |
# Fix a hardcoded lib path in configure script |
543 |
sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
544 |
configure.in || die "sed failed" |
545 |
|
546 |
eautoreconf |
547 |
} |
548 |
|
549 |
src_compile() { |
550 |
# -fomit-frame-pointer makes ruby segfault, see bug #150413. |
551 |
filter-flags -fomit-frame-pointer |
552 |
# In many places aliasing rules are broken; play it safe |
553 |
# as it's risky with newer compilers to leave it as it is. |
554 |
append-flags -fno-strict-aliasing |
555 |
|
556 |
# Socks support via dante |
557 |
if use socks5 ; then |
558 |
# Socks support can't be disabled as long as SOCKS_SERVER is |
559 |
# set and socks library is present, so need to unset |
560 |
# SOCKS_SERVER in that case. |
561 |
unset SOCKS_SERVER |
562 |
fi |
563 |
|
564 |
# Increase GC_MALLOC_LIMIT if set (default is 8000000) |
565 |
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
566 |
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
567 |
fi |
568 |
|
569 |
econf --program-suffix=$MY_SUFFIX --enable-shared \ |
570 |
$(use_enable socks5 socks) \ |
571 |
$(use_enable doc install-doc) \ |
572 |
$(use_enable threads pthread) \ |
573 |
$(use_enable ipv6) \ |
574 |
$(use_enable debug) \ |
575 |
$(use_with berkdb dbm) \ |
576 |
$(use_with gdbm) \ |
577 |
$(use_with ssl openssl) \ |
578 |
$(use_with tk) \ |
579 |
${myconf} \ |
580 |
--with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \ |
581 |
--enable-option-checking=no \ |
582 |
|| die "econf failed" |
583 |
|
584 |
emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed" |
585 |
} |
586 |
|
587 |
src_test() { |
588 |
emake -j1 test || die "make test failed" |
589 |
|
590 |
elog "Ruby's make test has been run. Ruby also ships with a make check" |
591 |
elog "that cannot be run until after ruby has been installed." |
592 |
elog |
593 |
if use rubytests; then |
594 |
elog "You have enabled rubytests, so they will be installed to" |
595 |
elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" |
596 |
elog "than root, and you must place them into a writeable directory." |
597 |
elog "Then call: " |
598 |
elog |
599 |
elog "ruby -C /location/of/tests runner.rb" |
600 |
else |
601 |
elog "Enable the rubytests USE flag to install the make check tests" |
602 |
fi |
603 |
} |
604 |
|
605 |
src_install() { |
606 |
LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" |
607 |
RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${SLOT}" |
608 |
for d in $(find "${S}/ext" -type d) ; do |
609 |
RUBYLIB="${RUBYLIB}:$d" |
610 |
done |
611 |
export LD_LIBRARY_PATH RUBYLIB |
612 |
|
613 |
emake DESTDIR="${D}" install || die "make install failed" |
614 |
|
615 |
MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
616 |
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']") |
617 |
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']") |
618 |
|
619 |
if use doc; then |
620 |
make DESTDIR="${D}" install-doc || die "make install-doc failed" |
621 |
fi |
622 |
|
623 |
if use examples; then |
624 |
dodir /usr/share/doc/${PF} |
625 |
cp -pPR sample "${D}/usr/share/doc/${PF}" |
626 |
fi |
627 |
|
628 |
dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%.*}) |
629 |
dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%_*}) |
630 |
|
631 |
dodoc ChangeLog NEWS README* ToDo |
632 |
|
633 |
if use rubytests; then |
634 |
dodir /usr/share/${PN}-${SLOT} |
635 |
cp -pPR test "${D}/usr/share/${PN}-${SLOT}" |
636 |
fi |
637 |
} |
638 |
|
639 |
pkg_postinst() { |
640 |
if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
641 |
eselect ruby set ruby${MY_SUFFIX} |
642 |
fi |
643 |
|
644 |
elog |
645 |
elog "This ebuild is compatible to eselect-ruby" |
646 |
elog "To switch between available Ruby profiles, execute as root:" |
647 |
elog "\teselect ruby set ruby(18|19|...)" |
648 |
elog |
649 |
} |
650 |
|
651 |
pkg_postrm() { |
652 |
if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
653 |
eselect ruby set ruby${MY_SUFFIX} |
654 |
fi |
655 |
} |