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: ChangeLog ruby-1.9.2_p290.ebuild ruby-1.9.2_rc2-r1.ebuild ruby-1.9.2.ebuild
Date: Tue, 30 Aug 2011 19:36:09
Message-Id: 20110830193559.B67D32004C@flycatcher.gentoo.org
1 a3li 11/08/30 19:35:59
2
3 Modified: ChangeLog
4 Added: ruby-1.9.2_p290.ebuild
5 Removed: ruby-1.9.2_rc2-r1.ebuild ruby-1.9.2.ebuild
6 Log:
7 Patchlevel bump. Thanks to Shota Fukumori for proposing an ebuild. Removing old patchlevels.
8
9 (Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.503 dev-lang/ruby/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.503&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.503&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?r1=1.502&r2=1.503
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v
21 retrieving revision 1.502
22 retrieving revision 1.503
23 diff -u -r1.502 -r1.503
24 --- ChangeLog 10 Aug 2011 18:16:07 -0000 1.502
25 +++ ChangeLog 30 Aug 2011 19:35:59 -0000 1.503
26 @@ -1,6 +1,13 @@
27 # ChangeLog for dev-lang/ruby
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.502 2011/08/10 18:16:07 xarthisius Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.503 2011/08/30 19:35:59 a3li Exp $
31 +
32 +*ruby-1.9.2_p290 (30 Aug 2011)
33 +
34 + 30 Aug 2011; Alex Legler <a3li@g.o> -ruby-1.9.2_rc2-r1.ebuild,
35 + -ruby-1.9.2.ebuild, +ruby-1.9.2_p290.ebuild:
36 + Patchlevel bump. Thanks to Shota Fukumori for proposing an ebuild. Removing
37 + old patchlevels.
38
39 10 Aug 2011; Kacper Kowalik <xarthisius@g.o>
40 ruby-1.8.7_p334-r2.ebuild:
41
42
43
44 1.1 dev-lang/ruby/ruby-1.9.2_p290.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-1.9.2_p290.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-1.9.2_p290.ebuild?rev=1.1&content-type=text/plain
48
49 Index: ruby-1.9.2_p290.ebuild
50 ===================================================================
51 # Copyright 1999-2011 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.9.2_p290.ebuild,v 1.1 2011/08/30 19:35:59 a3li Exp $
54
55 EAPI=2
56
57 #PATCHSET=
58
59 inherit autotools eutils flag-o-matic multilib versionator
60
61 RUBYPL=$(get_version_component_range 4)
62
63 MY_P="${PN}-$(get_version_component_range 1-3)-${RUBYPL:-p0}"
64 S=${WORKDIR}/${MY_P}
65
66 SLOT=$(get_version_component_range 1-2)
67 MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
68 # 1.9.2 still uses 1.9.1
69 RUBYVERSION=1.9.1
70
71 if [[ -n ${PATCHSET} ]]; then
72 if [[ ${PVR} == ${PV} ]]; then
73 PATCHSET="${PV}-r0.${PATCHSET}"
74 else
75 PATCHSET="${PVR}.${PATCHSET}"
76 fi
77 else
78 PATCHSET="${PVR}"
79 fi
80
81 DESCRIPTION="An object-oriented scripting language"
82 HOMEPAGE="http://www.ruby-lang.org/"
83 SRC_URI="mirror://ruby/${MY_P}.tar.bz2
84 http://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
85
86 LICENSE="|| ( Ruby GPL-2 )"
87 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
88 IUSE="berkdb debug doc examples gdbm ipv6 +rdoc rubytests socks5 ssl tk xemacs ncurses +readline yaml" #libedit
89
90 # libedit support is removed everywhere because of this upstream bug:
91 # http://redmine.ruby-lang.org/issues/show/3698
92
93 RDEPEND="
94 berkdb? ( sys-libs/db )
95 gdbm? ( sys-libs/gdbm )
96 ssl? ( dev-libs/openssl )
97 socks5? ( >=net-proxy/dante-1.1.13 )
98 tk? ( dev-lang/tk[threads] )
99 ncurses? ( sys-libs/ncurses )
100 readline? ( sys-libs/readline )
101 yaml? ( dev-libs/libyaml )
102 virtual/libffi
103 sys-libs/zlib
104 >=app-admin/eselect-ruby-20100402
105 !=dev-lang/ruby-cvs-${SLOT}*
106 !<dev-ruby/rdoc-2
107 !<dev-ruby/rubygems-1.3.7-r4
108 !dev-ruby/rexml"
109 # libedit? ( dev-libs/libedit )
110 # !libedit? ( readline? ( sys-libs/readline ) )
111
112 DEPEND="${RDEPEND}"
113 PDEPEND="
114 rdoc? ( >=dev-ruby/rdoc-2.5.11[ruby_targets_ruby19] )
115 xemacs? ( app-xemacs/ruby-modes )"
116
117 src_prepare() {
118 EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
119 epatch "${WORKDIR}/patches"
120
121 einfo "Unbundling gems..."
122 rm -r \
123 {bin,lib}/rake \
124 ext/json \
125 bin/gem \
126 || die "removal failed"
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 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 # if use libedit; then
163 # einfo "Using libedit to provide readline extension"
164 # myconf="${myconf} --enable-libedit --with-readline"
165 # elif use readline; then
166 # einfo "Using readline to provide readline extension"
167 # myconf="${myconf} --with-readline"
168 # else
169 # myconf="${myconf} --without-readline"
170 # fi
171 myconf="${myconf} $(use_with readline)"
172
173 econf \
174 --program-suffix=${MY_SUFFIX} \
175 --with-soname=ruby${MY_SUFFIX} \
176 --enable-shared \
177 --enable-pthread \
178 $(use_enable socks5 socks) \
179 $(use_enable doc install-doc) \
180 --enable-ipv6 \
181 $(use_enable debug) \
182 $(use_with berkdb dbm) \
183 $(use_with gdbm) \
184 $(use_with ssl openssl) \
185 $(use_with tk) \
186 $(use_with ncurses curses) \
187 $(use_with yaml psych) \
188 ${myconf} \
189 --enable-option-checking=no \
190 || die "econf failed"
191 }
192
193 src_compile() {
194 emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
195 }
196
197 src_test() {
198 emake -j1 test || die "make test failed"
199
200 elog "Ruby's make test has been run. Ruby also ships with a make check"
201 elog "that cannot be run until after ruby has been installed."
202 elog
203 if use rubytests; then
204 elog "You have enabled rubytests, so they will be installed to"
205 elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
206 elog "than root, and you must place them into a writeable directory."
207 elog "Then call: "
208 elog
209 elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
210 else
211 elog "Enable the rubytests USE flag to install the make check tests"
212 fi
213 }
214
215 src_install() {
216 # Ruby is involved in the install process, we don't want interference here.
217 unset RUBYOPT
218
219 local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
220
221 LD_LIBRARY_PATH="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
222 RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
223 for d in $(find "${S}/ext" -type d) ; do
224 RUBYLIB="${RUBYLIB}:$d"
225 done
226 export LD_LIBRARY_PATH RUBYLIB
227
228 emake DESTDIR="${D}" install || die "make install failed"
229
230 # Remove installed rubygems copy
231 rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
232 rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
233 rm -r "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
234
235 if use doc; then
236 make DESTDIR="${D}" install-doc || die "make install-doc failed"
237 fi
238
239 if use examples; then
240 insinto /usr/share/doc/${PF}
241 doins -r sample
242 fi
243
244 dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
245 "/usr/$(get_libdir)/libruby$(get_libname ${PV%.*})"
246 dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
247 "/usr/$(get_libdir)/libruby$(get_libname ${PV%_*})"
248
249 dodoc ChangeLog NEWS doc/NEWS-1.8.7 README* ToDo || die
250
251 if use rubytests; then
252 pushd test
253 insinto /usr/share/${PN}-${SLOT}/test
254 doins -r .
255 popd
256 fi
257 }
258
259 pkg_postinst() {
260 if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
261 eselect ruby set ruby${MY_SUFFIX}
262 fi
263
264 elog
265 elog "To switch between available Ruby profiles, execute as root:"
266 elog "\teselect ruby set ruby(18|19|...)"
267 elog
268 }
269
270 pkg_postrm() {
271 eselect ruby cleanup
272 }