1 |
commit: ce34dee9f40a2a98e7ab8832b1056aac67c78fd3 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 28 08:12:11 2016 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 28 08:14:26 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce34dee9 |
7 |
|
8 |
dev-lang/ruby: update did_you_mean dependency, bug 603850 |
9 |
|
10 |
Add an explicit slot since each slot ties to a specific |
11 |
ruby version, and without the slot paludis will try to |
12 |
upgrade and becomes confused. |
13 |
|
14 |
Fixes bug 603850 |
15 |
|
16 |
Package-Manager: portage-2.3.0 |
17 |
|
18 |
dev-lang/ruby/Manifest | 1 + |
19 |
dev-lang/ruby/ruby-2.3.3-r1.ebuild | 243 +++++++++++++++++++++++++++++++++++++ |
20 |
2 files changed, 244 insertions(+) |
21 |
|
22 |
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest |
23 |
index 0fae516..fb0c22b 100644 |
24 |
--- a/dev-lang/ruby/Manifest |
25 |
+++ b/dev-lang/ruby/Manifest |
26 |
@@ -14,5 +14,6 @@ DIST ruby-patches-2.2.5.tar.bz2 2272 SHA256 f54373704ce8df732490e8d1e7e35188503f |
27 |
DIST ruby-patches-2.2.6.tar.bz2 2272 SHA256 f54373704ce8df732490e8d1e7e35188503faacc5278fe0ab0d8c07bdc762fed SHA512 ed8bff8f730ccb114e62784d29541f276b2821d9eb121a9772dc4aabc139b688f2b14f5f27710098a8cd751c62d31b46170b427ad54dc4f6490c003450ae1583 WHIRLPOOL 8598c9284252c1e7cc9f9019c5f468ce5ab8b4ae013e71c631cd00cc8bfde068b041f1bc6851bb2962982a1e46cbde0ddc51c186ea41638a7881c587c658e603 |
28 |
DIST ruby-patches-2.3.1.tar.bz2 2223 SHA256 f0a803173564368e5cf31162e1dba901c46640f9e861255f6cbe14256d18f3eb SHA512 bb47000e516017c1fedf7c5313b0628fa734030e69bd0fed1c06a38dd115b8c50837e3dd917f272e24abf5609c4c12793ae4570bfd7d6210290785bf2f8287bd WHIRLPOOL 0b0d4dcf7df4ff3ff11610bfe7a7b29ed621b45b412cb7618a6572f98a568ac67419bd852b193cfc3aa0968382cf9400a578511e9e8fb8b2125bc876e733bd64 |
29 |
DIST ruby-patches-2.3.2.tar.bz2 2223 SHA256 f0a803173564368e5cf31162e1dba901c46640f9e861255f6cbe14256d18f3eb SHA512 bb47000e516017c1fedf7c5313b0628fa734030e69bd0fed1c06a38dd115b8c50837e3dd917f272e24abf5609c4c12793ae4570bfd7d6210290785bf2f8287bd WHIRLPOOL 0b0d4dcf7df4ff3ff11610bfe7a7b29ed621b45b412cb7618a6572f98a568ac67419bd852b193cfc3aa0968382cf9400a578511e9e8fb8b2125bc876e733bd64 |
30 |
+DIST ruby-patches-2.3.3-r1.tar.bz2 2223 SHA256 f0a803173564368e5cf31162e1dba901c46640f9e861255f6cbe14256d18f3eb SHA512 bb47000e516017c1fedf7c5313b0628fa734030e69bd0fed1c06a38dd115b8c50837e3dd917f272e24abf5609c4c12793ae4570bfd7d6210290785bf2f8287bd WHIRLPOOL 0b0d4dcf7df4ff3ff11610bfe7a7b29ed621b45b412cb7618a6572f98a568ac67419bd852b193cfc3aa0968382cf9400a578511e9e8fb8b2125bc876e733bd64 |
31 |
DIST ruby-patches-2.3.3.tar.bz2 2223 SHA256 f0a803173564368e5cf31162e1dba901c46640f9e861255f6cbe14256d18f3eb SHA512 bb47000e516017c1fedf7c5313b0628fa734030e69bd0fed1c06a38dd115b8c50837e3dd917f272e24abf5609c4c12793ae4570bfd7d6210290785bf2f8287bd WHIRLPOOL 0b0d4dcf7df4ff3ff11610bfe7a7b29ed621b45b412cb7618a6572f98a568ac67419bd852b193cfc3aa0968382cf9400a578511e9e8fb8b2125bc876e733bd64 |
32 |
DIST ruby-patches-2.4.0.tar.bz2 2047 SHA256 9560b8e8dc4a5517814df07aa635c9269f5e7cff5a15827a25a9f0811194e450 SHA512 b35db875a7e4a226e75eb6f7bc68b4bc97cc699bdc5f6930015e55cdc324b67b9883a2aa574c9c9a8b5dc5345c4df8a5ca8ace5b794b3e4de6517f3eefd25745 WHIRLPOOL fc5d226f46fe4ee1c86f6fff51ec9184b8c0ec08a1793eab365437d4ce2fd573cfc8857386cd10932f7dde05254bc975eff5b7986aea429730c606147fae2a5c |
33 |
|
34 |
diff --git a/dev-lang/ruby/ruby-2.3.3-r1.ebuild b/dev-lang/ruby/ruby-2.3.3-r1.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000..56c6595 |
37 |
--- /dev/null |
38 |
+++ b/dev-lang/ruby/ruby-2.3.3-r1.ebuild |
39 |
@@ -0,0 +1,243 @@ |
40 |
+# Copyright 1999-2016 Gentoo Foundation |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+# $Id$ |
43 |
+ |
44 |
+EAPI=5 |
45 |
+ |
46 |
+#PATCHSET=1 |
47 |
+ |
48 |
+inherit autotools eutils flag-o-matic multilib versionator |
49 |
+ |
50 |
+MY_P="${PN}-$(get_version_component_range 1-3)" |
51 |
+S=${WORKDIR}/${MY_P} |
52 |
+ |
53 |
+SLOT=$(get_version_component_range 1-2) |
54 |
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) |
55 |
+RUBYVERSION=2.3.0 |
56 |
+ |
57 |
+if [[ -n ${PATCHSET} ]]; then |
58 |
+ if [[ ${PVR} == ${PV} ]]; then |
59 |
+ PATCHSET="${PV}-r0.${PATCHSET}" |
60 |
+ else |
61 |
+ PATCHSET="${PVR}.${PATCHSET}" |
62 |
+ fi |
63 |
+else |
64 |
+ PATCHSET="${PVR}" |
65 |
+fi |
66 |
+ |
67 |
+DESCRIPTION="An object-oriented scripting language" |
68 |
+HOMEPAGE="http://www.ruby-lang.org/" |
69 |
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz |
70 |
+ https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2" |
71 |
+ |
72 |
+LICENSE="|| ( Ruby-BSD BSD-2 )" |
73 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
74 |
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl tk xemacs ncurses +readline" |
75 |
+ |
76 |
+RDEPEND=" |
77 |
+ berkdb? ( sys-libs/db:= ) |
78 |
+ gdbm? ( sys-libs/gdbm ) |
79 |
+ jemalloc? ( dev-libs/jemalloc ) |
80 |
+ ssl? ( |
81 |
+ !libressl? ( dev-libs/openssl:0= ) |
82 |
+ libressl? ( dev-libs/libressl ) |
83 |
+ ) |
84 |
+ socks5? ( >=net-proxy/dante-1.1.13 ) |
85 |
+ tk? ( |
86 |
+ dev-lang/tcl:0=[threads] |
87 |
+ dev-lang/tk:0=[threads] |
88 |
+ ) |
89 |
+ ncurses? ( sys-libs/ncurses:0= ) |
90 |
+ readline? ( sys-libs/readline:0= ) |
91 |
+ dev-libs/libyaml |
92 |
+ virtual/libffi |
93 |
+ sys-libs/zlib |
94 |
+ >=app-eselect/eselect-ruby-20151229 |
95 |
+ !<dev-ruby/rdoc-3.9.4 |
96 |
+ !<dev-ruby/rubygems-1.8.10-r1" |
97 |
+ |
98 |
+DEPEND="${RDEPEND}" |
99 |
+ |
100 |
+BUNDLED_GEMS=" |
101 |
+ >=dev-ruby/did_you_mean-1.0.0:1[ruby_targets_ruby23] |
102 |
+ >=dev-ruby/minitest-5.8.3[ruby_targets_ruby23] |
103 |
+ >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby23] |
104 |
+ >=dev-ruby/power_assert-0.2.6[ruby_targets_ruby23] |
105 |
+ >=dev-ruby/rake-10.4.2[ruby_targets_ruby23] |
106 |
+ >=dev-ruby/test-unit-3.1.5[ruby_targets_ruby23] |
107 |
+" |
108 |
+ |
109 |
+PDEPEND=" |
110 |
+ ${BUNDLED_GEMS} |
111 |
+ virtual/rubygems[ruby_targets_ruby23] |
112 |
+ >=dev-ruby/json-1.8.3[ruby_targets_ruby23] |
113 |
+ rdoc? ( >=dev-ruby/rdoc-4.2.1[ruby_targets_ruby23] ) |
114 |
+ xemacs? ( app-xemacs/ruby-modes )" |
115 |
+ |
116 |
+src_prepare() { |
117 |
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \ |
118 |
+ epatch "${WORKDIR}/patches" |
119 |
+ |
120 |
+ einfo "Unbundling gems..." |
121 |
+ cd "$S" |
122 |
+ # Remove bundled gems that we will install via PDEPEND, bug |
123 |
+ # 539700. Use explicit version numbers to ensure rm fails when they |
124 |
+ # change so we can update dependencies accordingly. |
125 |
+ rm -f gems/{did_you_mean-1.0.0,minitest-5.8.3,net-telnet-0.1.1,power_assert-0.2.6,rake-10.4.2,test-unit-3.1.5}.gem || die |
126 |
+ |
127 |
+ # Fix a hardcoded lib path in configure script |
128 |
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
129 |
+ configure.in || die "sed failed" |
130 |
+ |
131 |
+ eautoreconf |
132 |
+} |
133 |
+ |
134 |
+src_configure() { |
135 |
+ local modules= myconf= |
136 |
+ |
137 |
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413. |
138 |
+ filter-flags -fomit-frame-pointer |
139 |
+ # In many places aliasing rules are broken; play it safe |
140 |
+ # as it's risky with newer compilers to leave it as it is. |
141 |
+ append-flags -fno-strict-aliasing |
142 |
+ # SuperH needs this |
143 |
+ use sh && append-flags -mieee |
144 |
+ |
145 |
+ # Socks support via dante |
146 |
+ if use socks5 ; then |
147 |
+ # Socks support can't be disabled as long as SOCKS_SERVER is |
148 |
+ # set and socks library is present, so need to unset |
149 |
+ # SOCKS_SERVER in that case. |
150 |
+ unset SOCKS_SERVER |
151 |
+ fi |
152 |
+ |
153 |
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000) |
154 |
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
155 |
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
156 |
+ fi |
157 |
+ |
158 |
+ # ipv6 hack, bug 168939. Needs --enable-ipv6. |
159 |
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" |
160 |
+ |
161 |
+ # Determine which modules *not* to build depending in the USE flags. |
162 |
+ if ! use readline ; then |
163 |
+ modules="${modules},readline" |
164 |
+ fi |
165 |
+ if ! use berkdb ; then |
166 |
+ modules="${modules},dbm" |
167 |
+ fi |
168 |
+ if ! use gdbm ; then |
169 |
+ modules="${modules},gdbm" |
170 |
+ fi |
171 |
+ if ! use ssl ; then |
172 |
+ modules="${modules},openssl" |
173 |
+ fi |
174 |
+ if ! use ncurses ; then |
175 |
+ modules="${modules},curses" |
176 |
+ fi |
177 |
+ if ! use tk ; then |
178 |
+ modules="${modules},tk" |
179 |
+ fi |
180 |
+ |
181 |
+ # Provide an empty LIBPATHENV because we disable rpath but we do not |
182 |
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget |
183 |
+ # #564272 |
184 |
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ |
185 |
+ --program-suffix=${MY_SUFFIX} \ |
186 |
+ --with-soname=ruby${MY_SUFFIX} \ |
187 |
+ --docdir=${EPREFIX}/usr/share/doc/${P} \ |
188 |
+ --enable-shared \ |
189 |
+ --enable-pthread \ |
190 |
+ --disable-rpath \ |
191 |
+ --with-out-ext="${modules}" \ |
192 |
+ $(use_enable jemalloc jemalloc) \ |
193 |
+ $(use_enable socks5 socks) \ |
194 |
+ $(use_enable doc install-doc) \ |
195 |
+ --enable-ipv6 \ |
196 |
+ $(use_enable debug) \ |
197 |
+ ${myconf} \ |
198 |
+ --enable-option-checking=no \ |
199 |
+ || die "econf failed" |
200 |
+} |
201 |
+ |
202 |
+src_compile() { |
203 |
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed" |
204 |
+} |
205 |
+ |
206 |
+src_test() { |
207 |
+ emake -j1 V=1 test || die "make test failed" |
208 |
+ |
209 |
+ elog "Ruby's make test has been run. Ruby also ships with a make check" |
210 |
+ elog "that cannot be run until after ruby has been installed." |
211 |
+ elog |
212 |
+ if use rubytests; then |
213 |
+ elog "You have enabled rubytests, so they will be installed to" |
214 |
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" |
215 |
+ elog "than root, and you must place them into a writeable directory." |
216 |
+ elog "Then call: " |
217 |
+ elog |
218 |
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" |
219 |
+ else |
220 |
+ elog "Enable the rubytests USE flag to install the make check tests" |
221 |
+ fi |
222 |
+} |
223 |
+ |
224 |
+src_install() { |
225 |
+ # Remove the remaining bundled gems. We do this late in the process |
226 |
+ # since they are used during the build to e.g. create the |
227 |
+ # documentation. |
228 |
+ rm -rf ext/json || die |
229 |
+ |
230 |
+ # Ruby is involved in the install process, we don't want interference here. |
231 |
+ unset RUBYOPT |
232 |
+ |
233 |
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
234 |
+ |
235 |
+ LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
236 |
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}" |
237 |
+ for d in $(find "${S}/ext" -type d) ; do |
238 |
+ RUBYLIB="${RUBYLIB}:$d" |
239 |
+ done |
240 |
+ export LD_LIBRARY_PATH RUBYLIB |
241 |
+ |
242 |
+ emake V=1 DESTDIR="${D}" install || die "make install failed" |
243 |
+ |
244 |
+ # Remove installed rubygems and rdoc copy |
245 |
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" |
246 |
+ rm -rf "${D}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" |
247 |
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" |
248 |
+ rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" |
249 |
+ |
250 |
+ if use doc; then |
251 |
+ make DESTDIR="${D}" install-doc || die "make install-doc failed" |
252 |
+ fi |
253 |
+ |
254 |
+ if use examples; then |
255 |
+ insinto /usr/share/doc/${PF} |
256 |
+ doins -r sample |
257 |
+ fi |
258 |
+ |
259 |
+ dodoc ChangeLog NEWS doc/NEWS* README* || die |
260 |
+ |
261 |
+ if use rubytests; then |
262 |
+ pushd test |
263 |
+ insinto /usr/share/${PN}-${SLOT}/test |
264 |
+ doins -r . |
265 |
+ popd |
266 |
+ fi |
267 |
+} |
268 |
+ |
269 |
+pkg_postinst() { |
270 |
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
271 |
+ eselect ruby set ruby${MY_SUFFIX} |
272 |
+ fi |
273 |
+ |
274 |
+ elog |
275 |
+ elog "To switch between available Ruby profiles, execute as root:" |
276 |
+ elog "\teselect ruby set ruby(19|20|...)" |
277 |
+ elog |
278 |
+} |
279 |
+ |
280 |
+pkg_postrm() { |
281 |
+ eselect ruby cleanup |
282 |
+} |