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