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: ruby-1.8.7_p334-r1.ebuild ChangeLog
Date: Tue, 31 May 2011 19:08:22
Message-Id: 20110531190806.7555E20054@flycatcher.gentoo.org
1 a3li 11/05/31 19:08:06
2
3 Modified: ChangeLog
4 Added: ruby-1.8.7_p334-r1.ebuild
5 Log:
6 Revision bump for security bug 369141 (CVE-2011-0188)
7
8 (Portage version: 2.2.0_alpha37/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.492 dev-lang/ruby/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.492&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.492&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?r1=1.491&r2=1.492
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v
20 retrieving revision 1.491
21 retrieving revision 1.492
22 diff -u -r1.491 -r1.492
23 --- ChangeLog 16 May 2011 18:11:17 -0000 1.491
24 +++ ChangeLog 31 May 2011 19:08:06 -0000 1.492
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-lang/ruby
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.491 2011/05/16 18:11:17 graaff Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.492 2011/05/31 19:08:06 a3li Exp $
30 +
31 +*ruby-1.8.7_p334-r1 (31 May 2011)
32 +
33 + 31 May 2011; Alex Legler <a3li@g.o> +ruby-1.8.7_p334-r1.ebuild:
34 + Revision bump for security bug 369141 (CVE-2011-0188)
35
36 *ruby-1.9.2-r1 (16 May 2011)
37
38
39
40
41 1.1 dev-lang/ruby/ruby-1.8.7_p334-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p334-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p334-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ruby-1.8.7_p334-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p334-r1.ebuild,v 1.1 2011/05/31 19:08:06 a3li Exp $
51
52 EAPI=2
53
54 inherit autotools eutils flag-o-matic multilib versionator
55
56 MY_P="${PN}-$(replace_version_separator 3 '-')"
57 S=${WORKDIR}/${MY_P}
58
59 SLOT=$(get_version_component_range 1-2)
60 MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
61 # 1.8 and 1.9 series disagree on this
62 RUBYVERSION=$(get_version_component_range 1-2)
63
64 if [[ -n ${PATCHSET} ]]; then
65 if [[ ${PVR} == ${PV} ]]; then
66 PATCHSET="${PV}-r0.${PATCHSET}"
67 else
68 PATCHSET="${PVR}.${PATCHSET}"
69 fi
70 else
71 PATCHSET="${PVR}"
72 fi
73
74 DESCRIPTION="An object-oriented scripting language"
75 HOMEPAGE="http://www.ruby-lang.org/"
76 SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.bz2
77 http://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
78
79 LICENSE="|| ( Ruby GPL-2 )"
80 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
81 IUSE="+berkdb debug doc examples +gdbm ipv6 rubytests socks5 ssl threads tk xemacs ncurses +readline libedit"
82
83 RDEPEND="
84 berkdb? ( sys-libs/db )
85 gdbm? ( sys-libs/gdbm )
86 ssl? ( >=dev-libs/openssl-0.9.8m )
87 socks5? ( >=net-proxy/dante-1.1.13 )
88 tk? ( dev-lang/tk[threads=] )
89 ncurses? ( sys-libs/ncurses )
90 libedit? ( dev-libs/libedit )
91 !libedit? ( readline? ( sys-libs/readline ) )
92 sys-libs/zlib
93 >=app-admin/eselect-ruby-20100603
94 !=dev-lang/ruby-cvs-${SLOT}*
95 !<dev-ruby/rdoc-2
96 !dev-ruby/rexml"
97 DEPEND="${RDEPEND}"
98 PDEPEND="xemacs? ( app-xemacs/ruby-modes )"
99
100 src_prepare() {
101 EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
102 epatch "${WORKDIR}/patches"
103
104 # Fix a hardcoded lib path in configure script
105 sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
106 configure.in || die "sed failed"
107
108 eautoreconf
109 }
110
111 src_configure() {
112 local myconf=
113
114 # -fomit-frame-pointer makes ruby segfault, see bug #150413.
115 filter-flags -fomit-frame-pointer
116 # In many places aliasing rules are broken; play it safe
117 # as it's risky with newer compilers to leave it as it is.
118 append-flags -fno-strict-aliasing
119
120 # Socks support via dante
121 if use socks5 ; then
122 # Socks support can't be disabled as long as SOCKS_SERVER is
123 # set and socks library is present, so need to unset
124 # SOCKS_SERVER in that case.
125 unset SOCKS_SERVER
126 fi
127
128 # Increase GC_MALLOC_LIMIT if set (default is 8000000)
129 if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
130 append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
131 fi
132
133 # ipv6 hack, bug 168939. Needs --enable-ipv6.
134 use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
135
136 if use libedit; then
137 einfo "Using libedit to provide readline extension"
138 myconf="${myconf} --enable-libedit --with-readline"
139 elif use readline; then
140 einfo "Using readline to provide readline extension"
141 myconf="${myconf} --with-readline"
142 else
143 myconf="${myconf} --without-readline"
144 fi
145
146 econf \
147 --program-suffix="${MY_SUFFIX}" \
148 --enable-shared \
149 $(use_enable socks5 socks) \
150 $(use_enable doc install-doc) \
151 $(use_enable threads pthread) \
152 --enable-ipv6 \
153 $(use_enable debug) \
154 $(use_with berkdb dbm) \
155 $(use_with gdbm) \
156 $(use_with ssl openssl) \
157 $(use_with tk) \
158 $(use_with ncurses curses) \
159 ${myconf} \
160 --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \
161 --enable-option-checking=no \
162 || die "econf failed"
163 }
164
165 src_compile() {
166 emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
167 }
168
169 src_test() {
170 emake -j1 test || die "make test failed"
171
172 elog "Ruby's make test has been run. Ruby also ships with a make check"
173 elog "that cannot be run until after ruby has been installed."
174 elog
175 if use rubytests; then
176 elog "You have enabled rubytests, so they will be installed to"
177 elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
178 elog "than root, and you must place them into a writeable directory."
179 elog "Then call: "
180 elog
181 elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
182 else
183 elog "Enable the rubytests USE flag to install the make check tests"
184 fi
185 }
186
187 src_install() {
188 # Ruby is involved in the install process, we don't want interference here.
189 unset RUBYOPT
190
191 local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
192
193 LD_LIBRARY_PATH="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
194 RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
195 for d in $(find "${S}/ext" -type d) ; do
196 RUBYLIB="${RUBYLIB}:$d"
197 done
198 export LD_LIBRARY_PATH RUBYLIB
199
200 emake DESTDIR="${D}" install || die "make install failed"
201
202 keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']")
203 keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']")
204
205 if use doc; then
206 make DESTDIR="${D}" install-doc || die "make install-doc failed"
207 fi
208
209 if use examples; then
210 insinto /usr/share/doc/${PF}
211 doins -r sample
212 fi
213
214 dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
215 "/usr/$(get_libdir)/libruby$(get_libname ${PV%.*})"
216 dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
217 "/usr/$(get_libdir)/libruby$(get_libname ${PV%_*})"
218
219 dodoc ChangeLog NEWS README* ToDo || die
220
221 if use rubytests; then
222 pushd test
223 insinto /usr/share/${PN}-${SLOT}/test
224 doins -r .
225 popd
226 fi
227 }
228
229 pkg_postinst() {
230 if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
231 eselect ruby set ruby${MY_SUFFIX}
232 fi
233
234 elog
235 elog "To switch between available Ruby profiles, execute as root:"
236 elog "\teselect ruby set ruby(18|19|...)"
237 elog
238 }
239
240 pkg_postrm() {
241 eselect ruby cleanup
242 }