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