1 |
commit: 128ac9aa53f8f3fcbfdb6ff0dda53e949ac22a9d |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 28 17:38:24 2019 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 28 17:38:38 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=128ac9aa |
7 |
|
8 |
dev-lang/ruby: add 2.6.4 |
9 |
|
10 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
11 |
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> |
12 |
|
13 |
dev-lang/ruby/Manifest | 1 + |
14 |
dev-lang/ruby/ruby-2.6.4.ebuild | 237 ++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 238 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest |
18 |
index f31228db39f..0abfca68499 100644 |
19 |
--- a/dev-lang/ruby/Manifest |
20 |
+++ b/dev-lang/ruby/Manifest |
21 |
@@ -4,3 +4,4 @@ DIST ruby-2.5.5.tar.xz 11459832 BLAKE2B ced1105a87e7df8f82a65ca8d1d329d5a9d110d2 |
22 |
DIST ruby-2.5.6.tar.xz 11323612 BLAKE2B 5db6d573089a9fba95a1027891a0116c14d495b342ca8f055bd1ad55942f2a15a65a61cc1a0f6f249cd10fe2f6161f3ab0066a6dbce8e480e55b76ca5bdb5cd9 SHA512 4fe5f8bad5d320f8f17b02ce15afee341e7b0074efcfd98d8944e0cb7c448e0660c4553dd5c0328ee3b49fea3247642f85c60bdce431ed57f58b6326dfd48ee1 |
23 |
DIST ruby-2.6.2.tar.xz 11889840 BLAKE2B 817919c078869c2ad8d5c9d8c8b7ee77e8b0e3339c2ef662a94a666a859f762fa63c6f8534027abd368e91fe4e3e1fe68fa984cbf12f76cff8c0c66f0114914f SHA512 13f7d7b483a037378eac4bf4bebddc21d69f4e19e6bbb397dd53e7518037ae9a3aa5b41fc20bf1fe410803c6efc3a6a65a65af47648d3a93713f75cfe885326a |
24 |
DIST ruby-2.6.3.tar.xz 11904360 BLAKE2B 8113e5a19b967cdf995a3c8d3c83aeab3bf89e975d3b039c64259e97f20dbe9ebd96ada093f9d330516d16ef78bb0ecbbac8f3facd467aa13f1f70b23b992f82 SHA512 959a613f5cf5b3185a1d7a7ba0e1921166b3930f30461b391b1c9fcfe396f56dc3c736123dfc7b4e72c32a97dc5a1eb1fd7f09bcc3793a3c5526f6644ba421c8 |
25 |
+DIST ruby-2.6.4.tar.xz 11727940 BLAKE2B abeff89d50612d6426e1dc5fd7c15c83ef9714ddb38c64ed14bff6331c619b0a55d4a64bff49177576c3fae8cfcee30127e808f49d11b3e64a2230a043e16bd3 SHA512 930a4162fdb008d2446247908c14269fd13db4dc80bd2bb201a65a69c03f5933f97b4c5079ccd2a12db4934ff97b2debaa10a6c6f5c3060e55873f4397747eaa |
26 |
|
27 |
diff --git a/dev-lang/ruby/ruby-2.6.4.ebuild b/dev-lang/ruby/ruby-2.6.4.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..4b9dd9787e6 |
30 |
--- /dev/null |
31 |
+++ b/dev-lang/ruby/ruby-2.6.4.ebuild |
32 |
@@ -0,0 +1,237 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+inherit autotools flag-o-matic multilib |
39 |
+ |
40 |
+MY_P="${PN}-$(ver_cut 1-3)" |
41 |
+S=${WORKDIR}/${MY_P} |
42 |
+ |
43 |
+SLOT=$(ver_cut 1-2) |
44 |
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) |
45 |
+RUBYVERSION=${SLOT}.0 |
46 |
+ |
47 |
+DESCRIPTION="An object-oriented scripting language" |
48 |
+HOMEPAGE="https://www.ruby-lang.org/" |
49 |
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz" |
50 |
+ |
51 |
+LICENSE="|| ( Ruby-BSD BSD-2 )" |
52 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
53 |
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs" |
54 |
+ |
55 |
+RDEPEND=" |
56 |
+ berkdb? ( sys-libs/db:= ) |
57 |
+ gdbm? ( sys-libs/gdbm:= ) |
58 |
+ jemalloc? ( dev-libs/jemalloc ) |
59 |
+ jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) |
60 |
+ ssl? ( |
61 |
+ !libressl? ( dev-libs/openssl:0= ) |
62 |
+ libressl? ( dev-libs/libressl ) |
63 |
+ ) |
64 |
+ socks5? ( >=net-proxy/dante-1.1.13 ) |
65 |
+ tk? ( |
66 |
+ dev-lang/tcl:0=[threads] |
67 |
+ dev-lang/tk:0=[threads] |
68 |
+ ) |
69 |
+ dev-libs/libyaml |
70 |
+ virtual/libffi:= |
71 |
+ sys-libs/readline:0= |
72 |
+ sys-libs/zlib |
73 |
+ >=app-eselect/eselect-ruby-20171225 |
74 |
+" |
75 |
+ |
76 |
+DEPEND="${RDEPEND}" |
77 |
+ |
78 |
+BUNDLED_GEMS=" |
79 |
+ >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26] |
80 |
+ >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26] |
81 |
+ >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26] |
82 |
+ >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26] |
83 |
+ >=dev-ruby/rake-12.3.2[ruby_targets_ruby26] |
84 |
+ >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26] |
85 |
+ >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26] |
86 |
+" |
87 |
+ |
88 |
+PDEPEND=" |
89 |
+ ${BUNDLED_GEMS} |
90 |
+ virtual/rubygems[ruby_targets_ruby26] |
91 |
+ >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26] |
92 |
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby26] |
93 |
+ rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] ) |
94 |
+ xemacs? ( app-xemacs/ruby-modes )" |
95 |
+ |
96 |
+src_prepare() { |
97 |
+ # 005 does not compile bigdecimal and is questionable because it |
98 |
+ # compiles ruby in a non-standard way, may be dropped |
99 |
+ eapply "${FILESDIR}"/2.6/010*.patch |
100 |
+ |
101 |
+ einfo "Unbundling gems..." |
102 |
+ cd "$S" |
103 |
+ # Remove bundled gems that we will install via PDEPEND, bug |
104 |
+ # 539700. |
105 |
+ rm -fr gems/* || die |
106 |
+ |
107 |
+ einfo "Removing bundled libraries..." |
108 |
+ rm -fr ext/fiddle/libffi-3.2.1 || die |
109 |
+ |
110 |
+ eapply_user |
111 |
+ |
112 |
+ eautoreconf |
113 |
+} |
114 |
+ |
115 |
+src_configure() { |
116 |
+ local modules= myconf= |
117 |
+ |
118 |
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413. |
119 |
+ filter-flags -fomit-frame-pointer |
120 |
+ # In many places aliasing rules are broken; play it safe |
121 |
+ # as it's risky with newer compilers to leave it as it is. |
122 |
+ append-flags -fno-strict-aliasing |
123 |
+ # SuperH needs this |
124 |
+ use sh && append-flags -mieee |
125 |
+ |
126 |
+ # Socks support via dante |
127 |
+ if use socks5 ; then |
128 |
+ # Socks support can't be disabled as long as SOCKS_SERVER is |
129 |
+ # set and socks library is present, so need to unset |
130 |
+ # SOCKS_SERVER in that case. |
131 |
+ unset SOCKS_SERVER |
132 |
+ fi |
133 |
+ |
134 |
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000) |
135 |
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
136 |
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
137 |
+ fi |
138 |
+ |
139 |
+ # ipv6 hack, bug 168939. Needs --enable-ipv6. |
140 |
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" |
141 |
+ |
142 |
+ # Determine which modules *not* to build depending in the USE flags. |
143 |
+ if ! use berkdb ; then |
144 |
+ modules="${modules},dbm" |
145 |
+ fi |
146 |
+ if ! use gdbm ; then |
147 |
+ modules="${modules},gdbm" |
148 |
+ fi |
149 |
+ if ! use ssl ; then |
150 |
+ modules="${modules},openssl" |
151 |
+ fi |
152 |
+ if ! use tk ; then |
153 |
+ modules="${modules},tk" |
154 |
+ fi |
155 |
+ |
156 |
+ # Provide an empty LIBPATHENV because we disable rpath but we do not |
157 |
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget |
158 |
+ # #564272 |
159 |
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ |
160 |
+ --program-suffix=${MY_SUFFIX} \ |
161 |
+ --with-soname=ruby${MY_SUFFIX} \ |
162 |
+ --docdir=${EPREFIX}/usr/share/doc/${P} \ |
163 |
+ --enable-shared \ |
164 |
+ --enable-pthread \ |
165 |
+ --disable-rpath \ |
166 |
+ --with-out-ext="${modules}" \ |
167 |
+ $(use_with jemalloc jemalloc) \ |
168 |
+ $(use_enable jit jit-support ) \ |
169 |
+ $(use_enable socks5 socks) \ |
170 |
+ $(use_enable doc install-doc) \ |
171 |
+ --enable-ipv6 \ |
172 |
+ $(use_enable static-libs static) \ |
173 |
+ $(use_enable static-libs install-static-library) \ |
174 |
+ $(use_with static-libs static-linked-ext) \ |
175 |
+ $(use_enable debug) \ |
176 |
+ ${myconf} \ |
177 |
+ --enable-option-checking=no \ |
178 |
+ || die "econf failed" |
179 |
+ |
180 |
+ # Makefile is broken because it lacks -ldl |
181 |
+ rm -rf ext/-test-/popen_deadlock || die |
182 |
+} |
183 |
+ |
184 |
+src_compile() { |
185 |
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" || die "emake failed" |
186 |
+} |
187 |
+ |
188 |
+src_test() { |
189 |
+ emake -j1 V=1 test || die "make test failed" |
190 |
+ |
191 |
+ elog "Ruby's make test has been run. Ruby also ships with a make check" |
192 |
+ elog "that cannot be run until after ruby has been installed." |
193 |
+ elog |
194 |
+ if use rubytests; then |
195 |
+ elog "You have enabled rubytests, so they will be installed to" |
196 |
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" |
197 |
+ elog "than root, and you must place them into a writeable directory." |
198 |
+ elog "Then call: " |
199 |
+ elog |
200 |
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" |
201 |
+ else |
202 |
+ elog "Enable the rubytests USE flag to install the make check tests" |
203 |
+ fi |
204 |
+} |
205 |
+ |
206 |
+src_install() { |
207 |
+ # Remove the remaining bundled gems. We do this late in the process |
208 |
+ # since they are used during the build to e.g. create the |
209 |
+ # documentation. |
210 |
+ rm -rf ext/json || die |
211 |
+ rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die |
212 |
+ |
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="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
219 |
+ RUBYLIB="${S}:${ED}/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 |
+ # Create directory for the default gems |
226 |
+ local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" |
227 |
+ mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" |
228 |
+ |
229 |
+ emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install || die "make install failed" |
230 |
+ |
231 |
+ # Remove installed rubygems and rdoc copy |
232 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" |
233 |
+ rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" |
234 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" |
235 |
+ rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" |
236 |
+ |
237 |
+ if use doc; then |
238 |
+ emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc || die "make install-doc failed" |
239 |
+ fi |
240 |
+ |
241 |
+ if use examples; then |
242 |
+ insinto /usr/share/doc/${PF} |
243 |
+ doins -r sample |
244 |
+ fi |
245 |
+ |
246 |
+ dodoc ChangeLog NEWS doc/NEWS* README* || die |
247 |
+ |
248 |
+ if use rubytests; then |
249 |
+ pushd test |
250 |
+ insinto /usr/share/${PN}-${SLOT}/test |
251 |
+ doins -r . |
252 |
+ popd |
253 |
+ fi |
254 |
+} |
255 |
+ |
256 |
+pkg_postinst() { |
257 |
+ if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then |
258 |
+ eselect ruby set ruby${MY_SUFFIX} |
259 |
+ fi |
260 |
+ |
261 |
+ elog |
262 |
+ elog "To switch between available Ruby profiles, execute as root:" |
263 |
+ elog "\teselect ruby set ruby(23|24|...)" |
264 |
+ elog |
265 |
+} |
266 |
+ |
267 |
+pkg_postrm() { |
268 |
+ eselect ruby cleanup |
269 |
+} |