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.8.7_p357.ebuild
Date: Wed, 28 Dec 2011 17:33:23
Message-Id: 20111228173312.AB8D12004B@flycatcher.gentoo.org
1 graaff 11/12/28 17:33:12
2
3 Modified: ChangeLog
4 Added: ruby-1.8.7_p357.ebuild
5 Log:
6 Version bump for security bug 396301.
7
8 (Portage version: 2.1.10.41/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.519 dev-lang/ruby/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.519&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.519&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?r1=1.518&r2=1.519
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v
20 retrieving revision 1.518
21 retrieving revision 1.519
22 diff -u -r1.518 -r1.519
23 --- ChangeLog 28 Dec 2011 15:55:30 -0000 1.518
24 +++ ChangeLog 28 Dec 2011 17:33:12 -0000 1.519
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.518 2011/12/28 15:55:30 graaff Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.519 2011/12/28 17:33:12 graaff Exp $
30 +
31 +*ruby-1.8.7_p357 (28 Dec 2011)
32 +
33 + 28 Dec 2011; Hans de Graaff <graaff@g.o> +ruby-1.8.7_p357.ebuild:
34 + Version bump for security bug 396301.
35
36 28 Dec 2011; Hans de Graaff <graaff@g.o> ruby-1.9.3_p0.ebuild:
37 Drop alpha, arm, hppa for now since each missing a dependency, bug 332593.
38
39
40
41 1.1 dev-lang/ruby/ruby-1.8.7_p357.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p357.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p357.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ruby-1.8.7_p357.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_p357.ebuild,v 1.1 2011/12/28 17:33:12 graaff 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-ruby/rdoc-2"
95 DEPEND="${RDEPEND}"
96 PDEPEND="xemacs? ( app-xemacs/ruby-modes )"
97
98 src_prepare() {
99 EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
100 epatch "${WORKDIR}/patches"
101
102 # Fix a hardcoded lib path in configure script
103 sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
104 configure.in || die "sed failed"
105
106 eautoreconf
107 }
108
109 src_configure() {
110 local myconf=
111
112 # -fomit-frame-pointer makes ruby segfault, see bug #150413.
113 filter-flags -fomit-frame-pointer
114 # In many places aliasing rules are broken; play it safe
115 # as it's risky with newer compilers to leave it as it is.
116 append-flags -fno-strict-aliasing
117
118 # Socks support via dante
119 if use socks5 ; then
120 # Socks support can't be disabled as long as SOCKS_SERVER is
121 # set and socks library is present, so need to unset
122 # SOCKS_SERVER in that case.
123 unset SOCKS_SERVER
124 fi
125
126 # Increase GC_MALLOC_LIMIT if set (default is 8000000)
127 if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
128 append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
129 fi
130
131 # ipv6 hack, bug 168939. Needs --enable-ipv6.
132 use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
133
134 if use libedit; then
135 einfo "Using libedit to provide readline extension"
136 myconf="${myconf} --enable-libedit --with-readline"
137 elif use readline; then
138 einfo "Using readline to provide readline extension"
139 myconf="${myconf} --with-readline"
140 else
141 myconf="${myconf} --without-readline"
142 fi
143
144 econf \
145 --program-suffix="${MY_SUFFIX}" \
146 --enable-shared \
147 $(use_enable socks5 socks) \
148 $(use_enable doc install-doc) \
149 $(use_enable threads pthread) \
150 --enable-ipv6 \
151 $(use_enable debug) \
152 $(use_with berkdb dbm) \
153 $(use_with gdbm) \
154 $(use_with ssl openssl) \
155 $(use_with tk) \
156 $(use_with ncurses curses) \
157 ${myconf} \
158 --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \
159 --enable-option-checking=no \
160 || die "econf failed"
161 }
162
163 src_compile() {
164 emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
165 }
166
167 src_test() {
168 emake -j1 test || die "make test failed"
169
170 elog "Ruby's make test has been run. Ruby also ships with a make check"
171 elog "that cannot be run until after ruby has been installed."
172 elog
173 if use rubytests; then
174 elog "You have enabled rubytests, so they will be installed to"
175 elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
176 elog "than root, and you must place them into a writeable directory."
177 elog "Then call: "
178 elog
179 elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
180 else
181 elog "Enable the rubytests USE flag to install the make check tests"
182 fi
183 }
184
185 src_install() {
186 # Ruby is involved in the install process, we don't want interference here.
187 unset RUBYOPT
188
189 local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
190
191 LD_LIBRARY_PATH="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
192 RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
193 for d in $(find "${S}/ext" -type d) ; do
194 RUBYLIB="${RUBYLIB}:$d"
195 done
196 export LD_LIBRARY_PATH RUBYLIB
197
198 emake DESTDIR="${D}" install || die "make install failed"
199
200 keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']")
201 keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']")
202
203 if use doc; then
204 make DESTDIR="${D}" install-doc || die "make install-doc failed"
205 fi
206
207 if use examples; then
208 insinto /usr/share/doc/${PF}
209 doins -r sample
210 fi
211
212 dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
213 "/usr/$(get_libdir)/libruby$(get_libname ${PV%.*})"
214 dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
215 "/usr/$(get_libdir)/libruby$(get_libname ${PV%_*})"
216
217 dodoc ChangeLog NEWS README* ToDo || die
218
219 if use rubytests; then
220 pushd test
221 insinto /usr/share/${PN}-${SLOT}/test
222 doins -r .
223 popd
224 fi
225 }
226
227 pkg_postinst() {
228 if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
229 eselect ruby set ruby${MY_SUFFIX}
230 fi
231
232 elog
233 elog "To switch between available Ruby profiles, execute as root:"
234 elog "\teselect ruby set ruby(18|19|...)"
235 elog
236 }
237
238 pkg_postrm() {
239 eselect ruby cleanup
240 }