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