1 |
a3li 10/04/03 06:39:01 |
2 |
|
3 |
Added: metadata.xml ChangeLog |
4 |
ruby-enterprise-1.8.7.2010.01.ebuild |
5 |
Log: |
6 |
Initial import. Ebuild by Alex Legler <a3li@g.o>. tcmalloc integration by Lance Albertson <ramereth@g.o>. |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-lang/ruby-enterprise/metadata.xml |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby-enterprise/metadata.xml?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby-enterprise/metadata.xml?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: metadata.xml |
16 |
=================================================================== |
17 |
<?xml version="1.0" encoding="UTF-8"?> |
18 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
19 |
<pkgmetadata> |
20 |
<herd>ruby</herd> |
21 |
<use> |
22 |
<flag name="rubytests">Install ruby tests that can only be run after ruby is installed</flag> |
23 |
<flag name="tcmalloc">Add support for TCMalloc provided by dev-util/google-perftools</flag> |
24 |
</use> |
25 |
</pkgmetadata> |
26 |
|
27 |
|
28 |
|
29 |
1.1 dev-lang/ruby-enterprise/ChangeLog |
30 |
|
31 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog?rev=1.1&view=markup |
32 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog?rev=1.1&content-type=text/plain |
33 |
|
34 |
Index: ChangeLog |
35 |
=================================================================== |
36 |
# ChangeLog for dev-lang/ruby-enterprise |
37 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
38 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog,v 1.1 2010/04/03 06:39:01 a3li Exp $ |
39 |
|
40 |
*ruby-enterprise-1.8.7.2010.01 (03 Apr 2010) |
41 |
|
42 |
03 Apr 2010; Alex Legler <a3li@g.o> |
43 |
+ruby-enterprise-1.8.7.2010.01.ebuild, +metadata.xml: |
44 |
Initial import. Ebuild by Alex Legler <a3li@g.o>. tcmalloc |
45 |
integration by Lance Albertson <ramereth@g.o>. |
46 |
|
47 |
|
48 |
|
49 |
|
50 |
1.1 dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01.ebuild |
51 |
|
52 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01.ebuild?rev=1.1&view=markup |
53 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01.ebuild?rev=1.1&content-type=text/plain |
54 |
|
55 |
Index: ruby-enterprise-1.8.7.2010.01.ebuild |
56 |
=================================================================== |
57 |
# Copyright 1999-2010 Gentoo Foundation |
58 |
# Distributed under the terms of the GNU General Public License v2 |
59 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.01.ebuild,v 1.1 2010/04/03 06:39:01 a3li Exp $ |
60 |
|
61 |
EAPI="2" |
62 |
inherit autotools eutils flag-o-matic multilib versionator |
63 |
|
64 |
MY_PV=$(replace_version_separator 3 '-') |
65 |
S="${WORKDIR}/${PN}-${MY_PV}/source" |
66 |
|
67 |
SLOT=$(get_version_component_range 1-2) |
68 |
MY_VSUFFIX="ee$(delete_version_separator 1 ${SLOT})" |
69 |
MY_SUFFIX="ee" |
70 |
|
71 |
DESCRIPTION="Ruby Enterprise Edition is a branch of Ruby including various enhancements" |
72 |
HOMEPAGE="http://www.rubyenterpriseedition.com/" |
73 |
SRC_URI="mirror://rubyforge/emm-ruby/${PN}-${MY_PV}.tar.gz |
74 |
http://dev.a3li.li/gentoo/distfiles/ruby-patches-ee-${PV}.tar.bz2" |
75 |
|
76 |
LICENSE="|| ( Ruby GPL-2 )" |
77 |
KEYWORDS="~amd64 ~x86" |
78 |
IUSE="+berkdb debug doc emacs examples +gdbm ipv6 rubytests socks5 ssl tcmalloc |
79 |
threads tk xemacs" |
80 |
|
81 |
RDEPEND=" |
82 |
berkdb? ( sys-libs/db ) |
83 |
gdbm? ( sys-libs/gdbm ) |
84 |
ssl? ( dev-libs/openssl ) |
85 |
socks5? ( >=net-proxy/dante-1.1.13 ) |
86 |
tk? ( dev-lang/tk ) |
87 |
>=app-admin/eselect-ruby-20100402 |
88 |
tcmalloc? ( dev-util/google-perftools )" |
89 |
DEPEND="${REPEND}" |
90 |
# TODO rubygems |
91 |
PDEPEND="emacs? ( app-emacs/ruby-mode ) |
92 |
xemacs? ( app-xemacs/ruby-modes )" |
93 |
|
94 |
PROVIDE="virtual/ruby" |
95 |
|
96 |
pkg_setup() { |
97 |
use tk || return |
98 |
|
99 |
# Note for EAPI-2 lovers: We'd like to show that custom message. |
100 |
# *If* you can make USE dependencies show that, too, feel free to migrate. |
101 |
if (use threads && ! built_with_use dev-lang/tk threads) \ |
102 |
|| (! use threads && built_with_use dev-lang/tk threads) ; then |
103 |
eerror |
104 |
eerror "You have Tk support enabled." |
105 |
eerror |
106 |
eerror "Ruby and Tk need the same 'threads' USE flag settings." |
107 |
eerror "Either change the USE flag on dev-lang/ruby or on dev-lang/tk" |
108 |
eerror "and recompile tk." |
109 |
|
110 |
die "threads USE flag mismatch" |
111 |
fi |
112 |
} |
113 |
|
114 |
src_prepare() { |
115 |
EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \ |
116 |
epatch "${WORKDIR}/patches-ee-${PV}" |
117 |
|
118 |
if use tcmalloc ; then |
119 |
sed -i 's:^EXTLIBS.*:EXTLIBS = -ltcmalloc_minimal:' Makefile.in |
120 |
fi |
121 |
|
122 |
# Fix a hardcoded lib path in configure script |
123 |
sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
124 |
configure.in || die "sed failed" |
125 |
|
126 |
eautoreconf |
127 |
} |
128 |
|
129 |
src_configure() { |
130 |
local myconf= |
131 |
|
132 |
# -fomit-frame-pointer makes ruby segfault, see bug #150413. |
133 |
filter-flags -fomit-frame-pointer |
134 |
# In many places aliasing rules are broken; play it safe |
135 |
# as it's risky with newer compilers to leave it as it is. |
136 |
append-flags -fno-strict-aliasing |
137 |
|
138 |
# Socks support via dante |
139 |
if use socks5 ; then |
140 |
# Socks support can't be disabled as long as SOCKS_SERVER is |
141 |
# set and socks library is present, so need to unset |
142 |
# SOCKS_SERVER in that case. |
143 |
unset SOCKS_SERVER |
144 |
fi |
145 |
|
146 |
# Increase GC_MALLOC_LIMIT if set (default is 8000000) |
147 |
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
148 |
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
149 |
fi |
150 |
|
151 |
# ipv6 hack, bug 168939. Needs --enable-ipv6. |
152 |
use ipv6 || myconf="--with-lookup-order-hack=INET" |
153 |
|
154 |
econf \ |
155 |
--program-suffix="${MY_VSUFFIX}" \ |
156 |
--enable-shared \ |
157 |
$(use_enable doc install-doc) \ |
158 |
$(use_enable threads pthread) \ |
159 |
--enable-ipv6 \ |
160 |
$(use_enable debug) \ |
161 |
$(use_with berkdb dbm) \ |
162 |
$(use_with gdbm) \ |
163 |
$(use_with ssl openssl) \ |
164 |
$(use_with tk) \ |
165 |
${myconf} \ |
166 |
--with-sitedir=/usr/$(get_libdir)/ruby${MY_SUFFIX}/site_ruby \ |
167 |
--with-vendordir=/usr/$(get_libdir)/ruby${MY_SUFFIX}/vendor_ruby \ |
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 -j1 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}-${SLOT}/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 "ruby${MY_VSUFFIX} -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 |
LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" |
199 |
RUBYLIB="${S}:${D}/usr/$(get_libdir)/rubyee/${SLOT}" |
200 |
for d in $(find "${S}/ext" -type d) ; do |
201 |
RUBYLIB="${RUBYLIB}:$d" |
202 |
done |
203 |
export LD_LIBRARY_PATH RUBYLIB |
204 |
|
205 |
emake DESTDIR="${D}" install || die "make install failed" |
206 |
|
207 |
MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)' | make -f - getminiruby) |
208 |
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']") |
209 |
keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']") |
210 |
|
211 |
if use doc; then |
212 |
make DESTDIR="${D}" install-doc || die "make install-doc failed" |
213 |
fi |
214 |
|
215 |
if use examples; then |
216 |
dodir /usr/share/doc/${PF} |
217 |
cp -pPR sample "${D}/usr/share/doc/${PF}" |
218 |
fi |
219 |
|
220 |
dodoc ChangeLog NEWS README* ToDo |
221 |
|
222 |
if use rubytests; then |
223 |
dodir /usr/share/${PN}-${SLOT} |
224 |
cp -pPR test "${D}/usr/share/${PN}-${SLOT}" |
225 |
fi |
226 |
} |
227 |
|
228 |
pkg_postinst() { |
229 |
if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
230 |
eselect ruby set ruby${MY_VSUFFIX} |
231 |
fi |
232 |
|
233 |
ewarn |
234 |
ewarn "Ruby Enterprise Edition is not guaranteed to be binary-compatible to" |
235 |
ewarn "MRI (dev-lang/ruby). Exercise care especially with C extensions!" |
236 |
ewarn "Gentoo does *not* accept any bugs regarding such failures." |
237 |
ewarn |
238 |
|
239 |
elog |
240 |
elog "To switch between available Ruby profiles, execute as root:" |
241 |
elog "\teselect ruby set ruby(18|19|...)" |
242 |
elog |
243 |
} |
244 |
|
245 |
pkg_postrm() { |
246 |
eselect ruby cleanup |
247 |
} |