Gentoo Archives: gentoo-commits

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