Gentoo Archives: gentoo-commits

From: "Alex Legler (a3li)" <a3li@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/ruby-enterprise: metadata.xml ChangeLog ruby-enterprise-1.8.7.2010.02-r1.ebuild
Date: Wed, 01 Sep 2010 17:24:43
Message-Id: 20100901172440.2102C20051@flycatcher.gentoo.org
1 a3li 10/09/01 17:24:40
2
3 Modified: metadata.xml ChangeLog
4 Added: ruby-enterprise-1.8.7.2010.02-r1.ebuild
5 Log:
6 Revision bump. Revert fast-threading.patch by default as it's experimental and disables callcc. Thanks to Scott M. Likens for reporting this in bug 224458. Fix CVE-2010-0541 (WEBRick XSS), bug 332957.
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.3 dev-lang/ruby-enterprise/metadata.xml
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby-enterprise/metadata.xml?rev=1.3&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby-enterprise/metadata.xml?rev=1.3&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby-enterprise/metadata.xml?r1=1.2&r2=1.3
15
16 Index: metadata.xml
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/metadata.xml,v
19 retrieving revision 1.2
20 retrieving revision 1.3
21 diff -u -r1.2 -r1.3
22 --- metadata.xml 18 May 2010 23:10:00 -0000 1.2
23 +++ metadata.xml 1 Sep 2010 17:24:40 -0000 1.3
24 @@ -30,5 +30,9 @@
25 <flag name="tcmalloc">
26 Add support for TCMalloc provided by <pkg>dev-util/google-perftools</pkg>
27 </flag>
28 +
29 + <flag name="fastthreading">
30 + EXPERIMENTAL Enables fast threading routines. Removes support for callcc.
31 + </flag>
32 </use>
33 </pkgmetadata>
34
35
36
37 1.7 dev-lang/ruby-enterprise/ChangeLog
38
39 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog?rev=1.7&view=markup
40 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog?rev=1.7&content-type=text/plain
41 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog?r1=1.6&r2=1.7
42
43 Index: ChangeLog
44 ===================================================================
45 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog,v
46 retrieving revision 1.6
47 retrieving revision 1.7
48 diff -u -r1.6 -r1.7
49 --- ChangeLog 6 Aug 2010 17:04:32 -0000 1.6
50 +++ ChangeLog 1 Sep 2010 17:24:40 -0000 1.7
51 @@ -1,6 +1,14 @@
52 # ChangeLog for dev-lang/ruby-enterprise
53 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
54 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog,v 1.6 2010/08/06 17:04:32 a3li Exp $
55 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ChangeLog,v 1.7 2010/09/01 17:24:40 a3li Exp $
56 +
57 +*ruby-enterprise-1.8.7.2010.02-r1 (01 Sep 2010)
58 +
59 + 01 Sep 2010; Alex Legler <a3li@g.o>
60 + +ruby-enterprise-1.8.7.2010.02-r1.ebuild, metadata.xml:
61 + Revision bump. Revert fast-threading.patch by default as it's experimental
62 + and disables callcc. Thanks to Scott M. Likens for reporting this in bug
63 + 224458. Fix CVE-2010-0541 (WEBRick XSS), bug 332957.
64
65 06 Aug 2010; Alex Legler <a3li@g.o>
66 -ruby-enterprise-1.8.7.2010.01-r1.ebuild,
67
68
69
70 1.1 dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.02-r1.ebuild
71
72 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.02-r1.ebuild?rev=1.1&view=markup
73 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.02-r1.ebuild?rev=1.1&content-type=text/plain
74
75 Index: ruby-enterprise-1.8.7.2010.02-r1.ebuild
76 ===================================================================
77 # Copyright 1999-2010 Gentoo Foundation
78 # Distributed under the terms of the GNU General Public License v2
79 # $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby-enterprise/ruby-enterprise-1.8.7.2010.02-r1.ebuild,v 1.1 2010/09/01 17:24:40 a3li Exp $
80
81 EAPI=2
82
83 inherit autotools eutils flag-o-matic multilib versionator
84
85 MY_P="${PN}-$(replace_version_separator 3 '-')"
86 S="${WORKDIR}/${MY_P}/source"
87
88 SLOT=$(get_version_component_range 1-2)
89 MY_SUFFIX="ee$(delete_version_separator 1 ${SLOT})"
90 # 1.8 and 1.9 series disagree on this
91 RUBYVERSION=$(get_version_component_range 1-2)
92
93 if [[ -n ${PATCHSET} ]]; then
94 if [[ ${PVR} == ${PV} ]]; then
95 PATCHSET="${PV}-r0.${PATCHSET}"
96 else
97 PATCHSET="${PVR}.${PATCHSET}"
98 fi
99 else
100 PATCHSET="${PVR}"
101 fi
102
103 DESCRIPTION="Ruby Enterprise Edition is a branch of Ruby including various enhancements"
104 HOMEPAGE="http://www.rubyenterpriseedition.com/"
105 SRC_URI="mirror://rubyforge/emm-ruby/${MY_P}.tar.gz
106 http://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
107
108 LICENSE="|| ( Ruby GPL-2 )"
109 KEYWORDS="~amd64 ~x86"
110 IUSE="+berkdb debug doc examples fastthreading +gdbm ipv6 rubytests ssl tcmalloc threads tk xemacs ncurses +readline libedit"
111
112 RDEPEND="
113 berkdb? ( sys-libs/db )
114 gdbm? ( sys-libs/gdbm )
115 ssl? ( >=dev-libs/openssl-0.9.8m )
116 tk? ( dev-lang/tk[threads=] )
117 ncurses? ( sys-libs/ncurses )
118 libedit? ( dev-libs/libedit )
119 !libedit? ( readline? ( sys-libs/readline ) )
120 sys-libs/zlib
121 >=app-admin/eselect-ruby-20100402
122 tcmalloc? ( dev-util/google-perftools )"
123 DEPEND="${RDEPEND}"
124 # TODO rubygems
125 PDEPEND="xemacs? ( app-xemacs/ruby-modes )"
126
127 PROVIDE="virtual/ruby"
128
129 src_prepare() {
130 EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
131 epatch "${WORKDIR}/patches"
132
133 if use fastthreading; then
134 einfo
135 elog "NOTE: The fast threading feature in dev-lang/ruby-enterprise is"
136 elog "considered as EXPERIMENTAL. It also disables callcc. Use with care."
137 einfo
138 else
139 einfo "Restoring vanilla threading..."
140 EPATCH_OPTS="${EPATCH_OPTS} -R" \
141 epatch "${WORKDIR}/patches/999-fast-threading-NOAPPLY.diff" \
142 || die "Reverting the fast-threading patch failed"
143 fi
144
145 if use tcmalloc ; then
146 sed -i 's:^EXTLIBS.*:EXTLIBS = -ltcmalloc_minimal:' Makefile.in
147 fi
148
149 # Fix a hardcoded lib path in configure script
150 sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
151 configure.in || die "sed failed"
152
153 eautoreconf
154 }
155
156 src_configure() {
157 local myconf=
158
159 # -fomit-frame-pointer makes ruby segfault, see bug #150413.
160 filter-flags -fomit-frame-pointer
161 # In many places aliasing rules are broken; play it safe
162 # as it's risky with newer compilers to leave it as it is.
163 append-flags -fno-strict-aliasing
164
165 # Increase GC_MALLOC_LIMIT if set (default is 8000000)
166 if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
167 append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
168 fi
169
170 # ipv6 hack, bug 168939. Needs --enable-ipv6.
171 use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
172
173 if use libedit; then
174 einfo "Using libedit to provide readline extension"
175 myconf="${myconf} --enable-libedit --with-readline"
176 elif use readline; then
177 einfo "Using readline to provide readline extension"
178 myconf="${myconf} --with-readline"
179 else
180 myconf="${myconf} --without-readline"
181 fi
182
183 econf \
184 --program-suffix="${MY_SUFFIX}" \
185 --enable-shared \
186 $(use_enable doc install-doc) \
187 $(use_enable threads pthread) \
188 --enable-ipv6 \
189 $(use_enable debug) \
190 $(use_with berkdb dbm) \
191 $(use_with gdbm) \
192 $(use_with ssl openssl) \
193 $(use_with tk) \
194 $(use_with ncurses curses) \
195 ${myconf} \
196 --with-sitedir=/usr/$(get_libdir)/rubyee/site_ruby \
197 --with-vendordir=/usr/$(get_libdir)/rubyee/vendor_ruby \
198 --enable-option-checking=no \
199 || die "econf failed"
200 }
201
202 src_compile() {
203 emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
204 }
205
206 src_test() {
207 emake -j1 test || die "make test failed"
208
209 elog "Ruby's make test has been run. Ruby also ships with a make check"
210 elog "that cannot be run until after ruby has been installed."
211 elog
212 if use rubytests; then
213 elog "You have enabled rubytests, so they will be installed to"
214 elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
215 elog "than root, and you must place them into a writeable directory."
216 elog "Then call: "
217 elog
218 elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
219 else
220 elog "Enable the rubytests USE flag to install the make check tests"
221 fi
222 }
223
224 src_install() {
225 # Ruby is involved in the install process, we don't want interference here.
226 unset RUBYOPT
227
228 local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
229
230 LD_LIBRARY_PATH="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
231 RUBYLIB="${S}:${D}/usr/$(get_libdir)/rubyee/${RUBYVERSION}"
232 for d in $(find "${S}/ext" -type d) ; do
233 RUBYLIB="${RUBYLIB}:$d"
234 done
235 export LD_LIBRARY_PATH RUBYLIB
236
237 emake DESTDIR="${D}" install || die "make install failed"
238
239 keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']")
240 keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']")
241
242 if use doc; then
243 make DESTDIR="${D}" install-doc || die "make install-doc failed"
244 fi
245
246 if use examples; then
247 insinto /usr/share/doc/${PF}
248 doins -r sample
249 fi
250
251 dodoc ChangeLog NEWS README* ToDo || die
252
253 if use rubytests; then
254 pushd test
255 insinto /usr/share/${PN}-${SLOT}/test
256 doins -r .
257 popd
258 fi
259 }
260
261 pkg_postinst() {
262 if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
263 eselect ruby set ruby${MY_SUFFIX}
264 fi
265
266 ewarn
267 ewarn "Ruby Enterprise Edition is not guaranteed to be binary-compatible to"
268 ewarn "MRI (dev-lang/ruby). Exercise care especially with C extensions!"
269 ewarn "Gentoo does *not* accept any bugs regarding such failures."
270 ewarn
271
272 elog
273 elog "To switch between available Ruby profiles, execute as root:"
274 elog "\teselect ruby set ruby(18|19|...)"
275 elog
276 }
277
278 pkg_postrm() {
279 eselect ruby cleanup
280 }