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.9.1.ebuild
Date: Sat, 21 Mar 2009 10:12:12
Message-Id: E1LkyBU-00046w-Gn@stork.gentoo.org
1 a3li 09/03/21 10:12:08
2
3 Modified: ChangeLog
4 Added: ruby-1.9.1.ebuild
5 Log:
6 Adding Ruby 1.9.1 for preliminary testing
7 (Portage version: 2.2_rc26/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.390 dev-lang/ruby/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.390&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.390&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ChangeLog?r1=1.389&r2=1.390
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v
19 retrieving revision 1.389
20 retrieving revision 1.390
21 diff -u -r1.389 -r1.390
22 --- ChangeLog 20 Mar 2009 07:47:40 -0000 1.389
23 +++ ChangeLog 21 Mar 2009 10:12:08 -0000 1.390
24 @@ -1,6 +1,13 @@
25 # ChangeLog for dev-lang/ruby
26 # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.389 2009/03/20 07:47:40 tove Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.390 2009/03/21 10:12:08 a3li Exp $
29 +
30 +*ruby-1.9.1 (21 Mar 2009)
31 +
32 + 21 Mar 2009; Alex Legler <a3li@g.o>
33 + +files/ruby19-rubygems-gentoo.patch, +files/ruby19-rubygems-proxy.patch,
34 + +ruby-1.9.1.ebuild:
35 + Adding Ruby 1.9.1 for preliminary testing
36
37 20 Mar 2009; Joseph Jezak <josejx@g.o> ruby-1.8.7_p72-r10.ebuild,
38 ruby-1.8.6_p287-r12.ebuild:
39
40
41
42 1.1 dev-lang/ruby/ruby-1.9.1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.9.1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.9.1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: ruby-1.9.1.ebuild
48 ===================================================================
49 # Copyright 1999-2009 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.9.1.ebuild,v 1.1 2009/03/21 10:12:08 a3li Exp $
52
53 inherit autotools eutils flag-o-matic multilib versionator
54
55 # Add p0 patchlevel
56 MY_P="${P}-p0"
57
58 # 1.9.1.0 -> 1.9
59 SLOT=$(get_version_component_range 1-2)
60
61 # 1.9.1.0 -> 1.9.1 (used in libdirs)
62 RUBYVERSION=$(get_version_component_range 1-3)
63
64 # 1.9 -> 19
65 MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
66
67 DESCRIPTION="An object-oriented scripting language"
68 HOMEPAGE="http://www.ruby-lang.org/"
69 SRC_URI="mirror://ruby/${MY_P}.tar.bz2"
70
71 LICENSE="|| ( Ruby GPL-2 )"
72 KEYWORDS="~amd64 ~x86"
73 IUSE="berkdb debug doc emacs examples gdbm ipv6 rubytests socks5 ssl tk xemacs"
74
75 RDEPEND="
76 berkdb? ( sys-libs/db )
77 gdbm? ( sys-libs/gdbm )
78 ssl? ( dev-libs/openssl )
79 socks5? ( >=net-proxy/dante-1.1.13 )
80 tk? ( dev-lang/tk )
81 >=app-admin/eselect-ruby-20080921
82 !=dev-lang/ruby-cvs-${SLOT}*
83 !dev-ruby/rdoc
84 !dev-ruby/rexml"
85 DEPEND="${RDEPEND}"
86 PDEPEND="
87 emacs? ( app-emacs/ruby-mode )
88 xemacs? ( app-xemacs/ruby-modes )"
89
90 PROVIDE="virtual/ruby"
91
92 S="${WORKDIR}/${MY_P}"
93
94 pkg_setup() {
95 ewarn
96 ewarn "It is highly recommended to install dev-ruby/rubygems-1.3.1-r30"
97 ewarn "if you have Ruby 1.8 on this system installed, too."
98 ewarn
99 epause 5
100 }
101
102 src_unpack() {
103 unpack ${A}
104
105 cd "${S}"
106
107 # Patch wrt bug #238061
108 epatch "${FILESDIR}/ruby19-rubygems-proxy.patch"
109 # Patch for rubygems to find installed gems outside of the sandbox
110 epatch "${FILESDIR}/ruby19-rubygems-gentoo.patch"
111
112 epatch "${FILESDIR}/${PN}-ossl_ocsp-verification.patch"
113
114 # Strip rake
115 rm "bin/rake"
116 rm "lib/rake.rb"
117 rm -rf "lib/rake"
118
119 # Fix a hardcoded lib path in configure script
120 sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
121 configure.in || die "sed failed"
122
123 eautoreconf
124 }
125
126 src_compile() {
127 # -fomit-frame-pointer makes ruby segfault, see bug #150413.
128 filter-flags -fomit-frame-pointer
129 # In many places aliasing rules are broken; play it safe
130 # as it's risky with newer compilers to leave it as it is.
131 append-flags -fno-strict-aliasing
132
133 # Socks support via dante
134 if use socks5 ; then
135 # Socks support can't be disabled as long as SOCKS_SERVER is
136 # set and socks library is present, so need to unset
137 # SOCKS_SERVER in that case.
138 unset SOCKS_SERVER
139 fi
140
141 # Increase GC_MALLOC_LIMIT if set (default is 8000000)
142 if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
143 append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
144 fi
145
146 econf --program-suffix=${MY_SUFFIX} --enable-shared --enable-pthread \
147 $(use_enable socks5 socks) \
148 $(use_enable doc install-doc) \
149 $(use_enable ipv6) \
150 $(use_enable debug) \
151 $(use_with berkdb dbm) \
152 $(use_with gdbm) \
153 $(use_with ssl openssl) \
154 $(use_with tk) \
155 ${myconf} \
156 --enable-option-checking=no \
157 || die "econf failed"
158
159 emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
160 }
161
162 src_test() {
163 emake test || die "make test failed"
164
165 elog "Ruby's make test has been run. Ruby also ships with a make check"
166 elog "that cannot be run until after ruby has been installed."
167 elog
168 if use rubytests; then
169 elog "You have enabled rubytests, so they will be installed to"
170 elog "/usr/share/${PN}-${RUBYVERSION}/test. To run them you must be a user other"
171 elog "than root, and you must place them into a writeable directory."
172 elog "Then call: "
173 elog
174 elog "ruby19 -C /location/of/tests runner.rb"
175 else
176 elog "Enable the rubytests USE flag to install the make check tests"
177 fi
178 }
179
180 src_install() {
181 # Ruby is involved in the install process, we don't want interference here.
182 unset RUBYOPT
183
184 # Creating the rubygems directories, bug #230163 once more.
185 local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
186 keepdir /usr/$(get_libdir)/ruby${MY_SUFFIX}/gems/${RUBYVERSION}/{doc,gems,cache,specifications}
187
188 export GEM_HOME="${D}/usr/$(get_libdir)/ruby${MY_SUFFIX}/gems/${RUBYVERSION}"
189 export GEM_PATH="${GEM_HOME}/"
190
191 LD_LIBRARY_PATH="${D}/usr/$(get_libdir)"
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 dodir /usr/share/doc/${PF}
209 cp -pPR sample "${D}/usr/share/doc/${PF}"
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 doc/NEWS-1.8.7 README* ToDo
218
219 if use rubytests; then
220 dodir /usr/share/${PN}-${RUBYVERSION}
221 cp -pPR test "${D}/usr/share/${PN}-${RUBYVERSION}"
222 fi
223
224 insinto /usr/$(get_libdir)/ruby${MY_SUFFIX}/site_ruby/
225 newins "${FILESDIR}/auto_gem.rb" auto_gem.rb
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 if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
241 eselect ruby set ruby${MY_SUFFIX}
242 fi
243 }