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