1 |
commit: 3b06f692b138c8f53f8ea11b0df2a4c9c7cc9d9b |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 3 06:03:16 2019 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 3 06:05:02 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b06f692 |
7 |
|
8 |
dev-lang/ruby: add 2.4.9 |
9 |
|
10 |
Package-Manager: Portage-2.3.76, 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.4.9.ebuild | 230 ++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 231 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest |
18 |
index e9a707ecf5f..d3b501803ba 100644 |
19 |
--- a/dev-lang/ruby/Manifest |
20 |
+++ b/dev-lang/ruby/Manifest |
21 |
@@ -1,5 +1,6 @@ |
22 |
DIST ruby-2.4.7.tar.xz 10118948 BLAKE2B e85e051e9dbac8e7f87bd6187dc105b89a6bc7197c811bd51bf25b109781b8ec79c02e48887cbac841d38922d278da4ee32d8cf14e180083f4a902d77c4ec2dc SHA512 df637c5803ddd83f759e9c24b0e7ca1f6cae7c7b353409583d92dbffece0d9d02b48905d6552327a1522a4a37d4e2d22c6c11bd991383835be35e2f31739d649 |
23 |
DIST ruby-2.4.8.tar.xz 9813812 BLAKE2B 94f651ecb013f13425d8e53ae23070c23568b079c4554273c36b61d4ccf17269ac4bccff8676cf26d6c2a2e678e4d644432aa1d36e5bafbbe65457a4988a5532 SHA512 5f51a8312c23c1c2bfbb9c59efbd789492a4a7e4b1d4e7764db6eaaa542008e814b40817f10825e22c7fa8715fb9187be5d09b06128da211559b3601785937ea |
24 |
+DIST ruby-2.4.9.tar.xz 10078316 BLAKE2B ad83adf6b884a9a36e83cc754077f706afa221a9e8b81d92f6b6a1b829dc0350bdacd67b0b4e1e196a17e3f7d1c65f1e9b38e245aeddf089576eaca7d051701b SHA512 9046575315c29c789427c2d00c832f0c0970e47fd158bbe8e4f2df5cff2ea9c06c65c3493adb4656e5b32ebfdc546092911f98a8ad7f698bc001c290db5888c7 |
25 |
DIST ruby-2.5.6.tar.xz 11323612 BLAKE2B 5db6d573089a9fba95a1027891a0116c14d495b342ca8f055bd1ad55942f2a15a65a61cc1a0f6f249cd10fe2f6161f3ab0066a6dbce8e480e55b76ca5bdb5cd9 SHA512 4fe5f8bad5d320f8f17b02ce15afee341e7b0074efcfd98d8944e0cb7c448e0660c4553dd5c0328ee3b49fea3247642f85c60bdce431ed57f58b6326dfd48ee1 |
26 |
DIST ruby-2.5.7.tar.xz 11296440 BLAKE2B 6f3590f30c7b196145a83490abed24b0059521374a03086646186b20670bfed548ea744c910c8eda0d11607d8673644d7fb23ff9091dd2f6dfcbc43080fe0f97 SHA512 63b7c75fab44cd1bd22f22ddec00c740cf379ac7240da0dfafcec54347766695faef47428ce1c433fd77fa96992e976c984697067fa526236d383b12adc9ce75 |
27 |
DIST ruby-2.6.3.tar.xz 11904360 BLAKE2B 8113e5a19b967cdf995a3c8d3c83aeab3bf89e975d3b039c64259e97f20dbe9ebd96ada093f9d330516d16ef78bb0ecbbac8f3facd467aa13f1f70b23b992f82 SHA512 959a613f5cf5b3185a1d7a7ba0e1921166b3930f30461b391b1c9fcfe396f56dc3c736123dfc7b4e72c32a97dc5a1eb1fd7f09bcc3793a3c5526f6644ba421c8 |
28 |
|
29 |
diff --git a/dev-lang/ruby/ruby-2.4.9.ebuild b/dev-lang/ruby/ruby-2.4.9.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..f38372e822b |
32 |
--- /dev/null |
33 |
+++ b/dev-lang/ruby/ruby-2.4.9.ebuild |
34 |
@@ -0,0 +1,230 @@ |
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-20161226 |
75 |
+ !<dev-ruby/rdoc-3.9.4 |
76 |
+ !<dev-ruby/rubygems-1.8.10-r1" |
77 |
+ |
78 |
+DEPEND="${RDEPEND}" |
79 |
+ |
80 |
+BUNDLED_GEMS=" |
81 |
+ >=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24] |
82 |
+ >=dev-ruby/minitest-5.10.1[ruby_targets_ruby24] |
83 |
+ >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24] |
84 |
+ >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24] |
85 |
+ >=dev-ruby/rake-12.0.0[ruby_targets_ruby24] |
86 |
+ >=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24] |
87 |
+ >=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24] |
88 |
+" |
89 |
+ |
90 |
+PDEPEND=" |
91 |
+ ${BUNDLED_GEMS} |
92 |
+ virtual/rubygems[ruby_targets_ruby24] |
93 |
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby24] |
94 |
+ rdoc? ( >=dev-ruby/rdoc-5.1.0-r1[ruby_targets_ruby24] ) |
95 |
+ xemacs? ( app-xemacs/ruby-modes )" |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ eapply "${FILESDIR}"/${SLOT}/{002,005,009,012}*.patch |
99 |
+ |
100 |
+ einfo "Unbundling gems..." |
101 |
+ cd "$S" |
102 |
+ # Remove bundled gems that we will install via PDEPEND, bug |
103 |
+ # 539700. Use explicit version numbers to ensure rm fails when they |
104 |
+ # change so we can update dependencies accordingly. |
105 |
+ rm -f gems/{did_you_mean-1.1.0,minitest-5.10.1,net-telnet-0.1.1,power_assert-0.4.1,rake-12.0.0,test-unit-3.2.3,xmlrpc-0.2.1}.gem || die |
106 |
+ |
107 |
+ einfo "Removing bundled libraries..." |
108 |
+ rm -fr ext/fiddle/libffi-3.2.1 || die |
109 |
+ |
110 |
+ # Fix a hardcoded lib path in configure script |
111 |
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
112 |
+ configure.in || die "sed failed" |
113 |
+ |
114 |
+ eapply_user |
115 |
+ |
116 |
+ eautoreconf |
117 |
+} |
118 |
+ |
119 |
+src_configure() { |
120 |
+ local modules= myconf= |
121 |
+ |
122 |
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413. |
123 |
+ filter-flags -fomit-frame-pointer |
124 |
+ # In many places aliasing rules are broken; play it safe |
125 |
+ # as it's risky with newer compilers to leave it as it is. |
126 |
+ append-flags -fno-strict-aliasing |
127 |
+ # SuperH needs this |
128 |
+ use sh && append-flags -mieee |
129 |
+ |
130 |
+ # Socks support via dante |
131 |
+ if use socks5 ; then |
132 |
+ # Socks support can't be disabled as long as SOCKS_SERVER is |
133 |
+ # set and socks library is present, so need to unset |
134 |
+ # SOCKS_SERVER in that case. |
135 |
+ unset SOCKS_SERVER |
136 |
+ fi |
137 |
+ |
138 |
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000) |
139 |
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
140 |
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
141 |
+ fi |
142 |
+ |
143 |
+ # ipv6 hack, bug 168939. Needs --enable-ipv6. |
144 |
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" |
145 |
+ |
146 |
+ # Determine which modules *not* to build depending in the USE flags. |
147 |
+ if ! use berkdb ; then |
148 |
+ modules="${modules},dbm" |
149 |
+ fi |
150 |
+ if ! use gdbm ; then |
151 |
+ modules="${modules},gdbm" |
152 |
+ fi |
153 |
+ if ! use ssl ; then |
154 |
+ modules="${modules},openssl" |
155 |
+ fi |
156 |
+ if ! use tk ; then |
157 |
+ modules="${modules},tk" |
158 |
+ fi |
159 |
+ |
160 |
+ # Provide an empty LIBPATHENV because we disable rpath but we do not |
161 |
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget |
162 |
+ # #564272 |
163 |
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ |
164 |
+ --program-suffix=${MY_SUFFIX} \ |
165 |
+ --with-soname=ruby${MY_SUFFIX} \ |
166 |
+ --docdir=${EPREFIX}/usr/share/doc/${P} \ |
167 |
+ --enable-shared \ |
168 |
+ --enable-pthread \ |
169 |
+ --disable-rpath \ |
170 |
+ --with-out-ext="${modules}" \ |
171 |
+ $(use_with jemalloc jemalloc) \ |
172 |
+ $(use_enable socks5 socks) \ |
173 |
+ $(use_enable doc install-doc) \ |
174 |
+ --enable-ipv6 \ |
175 |
+ $(use_enable static-libs static) \ |
176 |
+ $(use_enable static-libs install-static-library) \ |
177 |
+ $(use_with static-libs static-linked-ext) \ |
178 |
+ $(use_enable debug) \ |
179 |
+ ${myconf} \ |
180 |
+ --enable-option-checking=no \ |
181 |
+ || die "econf failed" |
182 |
+} |
183 |
+ |
184 |
+src_compile() { |
185 |
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" || 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 |
+ |
212 |
+ # Ruby is involved in the install process, we don't want interference here. |
213 |
+ unset RUBYOPT |
214 |
+ |
215 |
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
216 |
+ |
217 |
+ LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
218 |
+ RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" |
219 |
+ for d in $(find "${S}/ext" -type d) ; do |
220 |
+ RUBYLIB="${RUBYLIB}:$d" |
221 |
+ done |
222 |
+ export LD_LIBRARY_PATH RUBYLIB |
223 |
+ |
224 |
+ emake V=1 DESTDIR="${D}" install || die "make install failed" |
225 |
+ |
226 |
+ # Remove installed rubygems and rdoc copy |
227 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" |
228 |
+ rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" |
229 |
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" |
230 |
+ rm -rf "${ED}/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* || 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 "${EROOT}"/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(23|24|...)" |
259 |
+ elog |
260 |
+} |
261 |
+ |
262 |
+pkg_postrm() { |
263 |
+ eselect ruby cleanup |
264 |
+} |