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-2.1.0.ebuild ChangeLog
Date: Thu, 26 Dec 2013 09:24:46
Message-Id: 20131226092440.240EB2004C@flycatcher.gentoo.org
1 graaff 13/12/26 09:24:40
2
3 Modified: ChangeLog
4 Added: ruby-2.1.0.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
9
10 Revision Changes Path
11 1.629 dev-lang/ruby/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.629&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.629&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?r1=1.628&r2=1.629
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v
20 retrieving revision 1.628
21 retrieving revision 1.629
22 diff -u -r1.628 -r1.629
23 --- ChangeLog 20 Dec 2013 15:52:10 -0000 1.628
24 +++ ChangeLog 26 Dec 2013 09:24:39 -0000 1.629
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.628 2013/12/20 15:52:10 hattya Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.629 2013/12/26 09:24:39 graaff Exp $
30 +
31 +*ruby-2.1.0 (26 Dec 2013)
32 +
33 + 26 Dec 2013; Hans de Graaff <graaff@g.o> +ruby-2.1.0.ebuild:
34 + Version bump.
35
36 20 Dec 2013; Akinori Hattori <hattya@g.o> ruby-2.0.0_p247-r1.ebuild:
37 ia64 stable wrt bug #483254
38
39
40
41 1.1 dev-lang/ruby/ruby-2.1.0.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-2.1.0.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-2.1.0.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ruby-2.1.0.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-2.1.0.ebuild,v 1.1 2013/12/26 09:24:39 graaff Exp $
51
52 EAPI=5
53
54 #PATCHSET=1
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)"
61 #MY_P="${PN}-$(get_version_component_range 1-3)-${RUBYPL:-0}"
62 S=${WORKDIR}/${MY_P}
63
64 SLOT=$(get_version_component_range 1-2)
65 MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
66 RUBYVERSION=2.1.0
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/2.1/${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"
86
87 RDEPEND="
88 berkdb? ( sys-libs/db )
89 gdbm? ( sys-libs/gdbm )
90 ssl? ( dev-libs/openssl )
91 socks5? ( >=net-proxy/dante-1.1.13 )
92 tk? ( dev-lang/tk[threads] )
93 ncurses? ( sys-libs/ncurses )
94 readline? ( sys-libs/readline )
95 dev-libs/libyaml
96 virtual/libffi
97 sys-libs/zlib
98 >=app-admin/eselect-ruby-20100402
99 !<dev-ruby/rdoc-3.9.4
100 !<dev-ruby/rubygems-1.8.10-r1"
101
102 DEPEND="${RDEPEND}"
103 PDEPEND="
104 >=dev-ruby/rubygems-2.0.14[ruby_targets_ruby21]
105 >=dev-ruby/json-1.8.1[ruby_targets_ruby21]
106 >=dev-ruby/rake-0.9.6[ruby_targets_ruby21]
107 rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby21] )
108 xemacs? ( app-xemacs/ruby-modes )"
109
110 src_prepare() {
111 EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
112 epatch "${WORKDIR}/patches"
113
114 # We can no longer unbundle all of rake because rubygems now depends
115 # on this. We leave the actual rake code around to bootstrap
116 # rubygems, but remove the bits that would cause a file collision.
117 einfo "Unbundling gems..."
118 cd "$S"
119 rm -r \
120 {bin,lib}/rake lib/rake.rb man/rake.1 \
121 bin/gem || die "removal failed"
122
123 # Fix a hardcoded lib path in configure script
124 sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
125 configure.in || die "sed failed"
126
127 eautoreconf
128 }
129
130 src_configure() {
131 local myconf=
132
133 # -fomit-frame-pointer makes ruby segfault, see bug #150413.
134 filter-flags -fomit-frame-pointer
135 # In many places aliasing rules are broken; play it safe
136 # as it's risky with newer compilers to leave it as it is.
137 append-flags -fno-strict-aliasing
138 # SuperH needs this
139 use sh && append-flags -mieee
140
141 # Socks support via dante
142 if use socks5 ; then
143 # Socks support can't be disabled as long as SOCKS_SERVER is
144 # set and socks library is present, so need to unset
145 # SOCKS_SERVER in that case.
146 unset SOCKS_SERVER
147 fi
148
149 # Increase GC_MALLOC_LIMIT if set (default is 8000000)
150 if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
151 append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
152 fi
153
154 # ipv6 hack, bug 168939. Needs --enable-ipv6.
155 use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
156
157 # if use libedit; then
158 # einfo "Using libedit to provide readline extension"
159 # myconf="${myconf} --enable-libedit --with-readline"
160 # elif use readline; then
161 # einfo "Using readline to provide readline extension"
162 # myconf="${myconf} --with-readline"
163 # else
164 # myconf="${myconf} --without-readline"
165 # fi
166 myconf="${myconf} $(use_with readline)"
167
168 INSTALL="${EPREFIX}/usr/bin/install -c" econf \
169 --program-suffix=${MY_SUFFIX} \
170 --with-soname=ruby${MY_SUFFIX} \
171 --enable-shared \
172 --enable-pthread \
173 --enable-psych \
174 --disable-rpath \
175 $(use_enable socks5 socks) \
176 $(use_enable doc install-doc) \
177 --enable-ipv6 \
178 $(use_enable debug) \
179 $(use_with berkdb dbm) \
180 $(use_with gdbm) \
181 $(use_with ssl openssl) \
182 $(use_with tk) \
183 $(use_with ncurses curses) \
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 # Remove the remaining bundled gems. We do this late in the process
213 # since they are used during the build to e.g. create the
214 # documentation.
215 rm -rf ext/json || die
216
217 # Ruby is involved in the install process, we don't want interference here.
218 unset RUBYOPT
219
220 local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
221
222 LD_LIBRARY_PATH="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
223 RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
224 for d in $(find "${S}/ext" -type d) ; do
225 RUBYLIB="${RUBYLIB}:$d"
226 done
227 export LD_LIBRARY_PATH RUBYLIB
228
229 emake V=1 DESTDIR="${D}" install || die "make install failed"
230
231 # Remove installed rubygems copy
232 rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
233 rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
234 rm -r "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
235
236 if use doc; then
237 make DESTDIR="${D}" install-doc || die "make install-doc failed"
238 fi
239
240 if use examples; then
241 insinto /usr/share/doc/${PF}
242 doins -r sample
243 fi
244
245 dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
246 "/usr/$(get_libdir)/libruby$(get_libname ${PV%.*})"
247 dosym "libruby${MY_SUFFIX}$(get_libname ${PV%_*})" \
248 "/usr/$(get_libdir)/libruby$(get_libname ${PV%_*})"
249
250 dodoc ChangeLog NEWS doc/NEWS* README* || die
251
252 if use rubytests; then
253 pushd test
254 insinto /usr/share/${PN}-${SLOT}/test
255 doins -r .
256 popd
257 fi
258 }
259
260 pkg_postinst() {
261 if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
262 eselect ruby set ruby${MY_SUFFIX}
263 fi
264
265 elog
266 elog "To switch between available Ruby profiles, execute as root:"
267 elog "\teselect ruby set ruby(18|19|...)"
268 elog
269 }
270
271 pkg_postrm() {
272 eselect ruby cleanup
273 }