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