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.9.3_p545.ebuild ChangeLog
Date: Wed, 26 Feb 2014 14:20:35
Message-Id: 20140226142028.5E78E2004C@flycatcher.gentoo.org
1 graaff 14/02/26 14:20:28
2
3 Modified: ChangeLog
4 Added: ruby-1.9.3_p545.ebuild
5 Log:
6 Version bump. Drop tk USE flag due to bug 500894.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
9
10 Revision Changes Path
11 1.641 dev-lang/ruby/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.641&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.641&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ChangeLog?r1=1.640&r2=1.641
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v
20 retrieving revision 1.640
21 retrieving revision 1.641
22 diff -u -r1.640 -r1.641
23 --- ChangeLog 23 Feb 2014 10:24:38 -0000 1.640
24 +++ ChangeLog 26 Feb 2014 14:20:28 -0000 1.641
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-lang/ruby
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.640 2014/02/23 10:24:38 graaff Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.641 2014/02/26 14:20:28 graaff Exp $
30 +
31 +*ruby-1.9.3_p545 (26 Feb 2014)
32 +
33 + 26 Feb 2014; Hans de Graaff <graaff@g.o> +ruby-1.9.3_p545.ebuild:
34 + Version bump. Drop tk USE flag due to bug 500894.
35
36 *ruby-2.0.0_p353-r2 (23 Feb 2014)
37
38
39
40
41 1.1 dev-lang/ruby/ruby-1.9.3_p545.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-1.9.3_p545.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ruby/ruby-1.9.3_p545.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ruby-1.9.3_p545.ebuild
47 ===================================================================
48 # Copyright 1999-2014 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.9.3_p545.ebuild,v 1.1 2014/02/26 14:20:28 graaff Exp $
51
52 EAPI=4
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)-${RUBYPL:-0}"
61 S=${WORKDIR}/${MY_P}
62
63 SLOT=$(get_version_component_range 1-2)
64 MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
65 # 1.9.3 still uses 1.9.1
66 RUBYVERSION=1.9.1
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/1.9/${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 xemacs ncurses +readline +yaml" #libedit
86
87 # libedit support is removed everywhere because of this upstream bug:
88 # http://redmine.ruby-lang.org/issues/show/3698
89
90 RDEPEND="
91 berkdb? ( sys-libs/db )
92 gdbm? ( sys-libs/gdbm )
93 ssl? ( dev-libs/openssl )
94 socks5? ( >=net-proxy/dante-1.1.13 )
95 ncurses? ( sys-libs/ncurses )
96 readline? ( sys-libs/readline )
97 yaml? ( dev-libs/libyaml )
98 virtual/libffi
99 sys-libs/zlib
100 >=app-admin/eselect-ruby-20100402
101 !<dev-ruby/rdoc-3.9.4
102 !<dev-ruby/rubygems-1.8.10-r1"
103 # libedit? ( dev-libs/libedit )
104 # !libedit? ( readline? ( sys-libs/readline ) )
105
106 DEPEND="${RDEPEND}"
107 PDEPEND="
108 >=dev-ruby/rubygems-1.8.10-r1[ruby_targets_ruby19]
109 rdoc? ( >=dev-ruby/rdoc-3.9.4[ruby_targets_ruby19] )
110 xemacs? ( app-xemacs/ruby-modes )"
111
112 src_prepare() {
113 EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
114 epatch "${WORKDIR}/patches"
115
116 einfo "Unbundling gems..."
117 cd "$S"
118 rm -r \
119 {bin,lib}/rake lib/rake.rb man/rake.1 \
120 ext/json \
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 # Always disable tk because the module is no longer compatible with
169 # stable tcl/tk: https://bugs.gentoo.org/show_bug.cgi?id=500894
170 INSTALL="${EPREFIX}/usr/bin/install -c" econf \
171 --program-suffix=${MY_SUFFIX} \
172 --with-soname=ruby${MY_SUFFIX} \
173 --enable-shared \
174 --enable-pthread \
175 --without-tk \
176 $(use_enable socks5 socks) \
177 $(use_enable doc install-doc) \
178 --enable-ipv6 \
179 $(use_enable debug) \
180 $(use_with berkdb dbm) \
181 $(use_with gdbm) \
182 $(use_with ssl openssl) \
183 $(use_with ncurses curses) \
184 $(use_with yaml psych) \
185 ${myconf} \
186 --enable-option-checking=no \
187 || die "econf failed"
188 }
189
190 src_compile() {
191 emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
192 }
193
194 src_test() {
195 emake -j1 V=1 test || die "make test failed"
196
197 elog "Ruby's make test has been run. Ruby also ships with a make check"
198 elog "that cannot be run until after ruby has been installed."
199 elog
200 if use rubytests; then
201 elog "You have enabled rubytests, so they will be installed to"
202 elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
203 elog "than root, and you must place them into a writeable directory."
204 elog "Then call: "
205 elog
206 elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
207 else
208 elog "Enable the rubytests USE flag to install the make check tests"
209 fi
210 }
211
212 src_install() {
213 # Ruby is involved in the install process, we don't want interference here.
214 unset RUBYOPT
215
216 local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
217
218 LD_LIBRARY_PATH="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
219 RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
220 for d in $(find "${S}/ext" -type d) ; do
221 RUBYLIB="${RUBYLIB}:$d"
222 done
223 export LD_LIBRARY_PATH RUBYLIB
224
225 emake V=1 DESTDIR="${D}" install || die "make install failed"
226
227 # Remove installed rubygems copy
228 rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
229 rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
230 rm -r "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
231
232 if use doc; then
233 make DESTDIR="${D}" install-doc || die "make install-doc failed"
234 fi
235
236 if use examples; then
237 insinto /usr/share/doc/${PF}
238 doins -r sample
239 fi
240
241 dodoc ChangeLog NEWS doc/NEWS* README* ToDo || die
242
243 if use rubytests; then
244 pushd test
245 insinto /usr/share/${PN}-${SLOT}/test
246 doins -r .
247 popd
248 fi
249 }
250
251 pkg_postinst() {
252 if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
253 eselect ruby set ruby${MY_SUFFIX}
254 fi
255
256 elog
257 elog "To switch between available Ruby profiles, execute as root:"
258 elog "\teselect ruby set ruby(18|19|...)"
259 elog
260 }
261
262 pkg_postrm() {
263 eselect ruby cleanup
264 }