1 |
commit: c3cfe3488282f194f5bc5ad4204fdd6c4b1f8214 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 25 07:36:54 2016 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 26 19:16:52 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3cfe348 |
7 |
|
8 |
dev-lang/ruby: add 2.4.0 |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
dev-lang/ruby/Manifest | 2 + |
13 |
dev-lang/ruby/ruby-2.4.0.ebuild | 238 ++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 240 insertions(+) |
15 |
|
16 |
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest |
17 |
index 5bba2b00..0fae516 100644 |
18 |
--- a/dev-lang/ruby/Manifest |
19 |
+++ b/dev-lang/ruby/Manifest |
20 |
@@ -6,6 +6,7 @@ DIST ruby-2.2.6.tar.xz 10487776 SHA256 9414ecc0d09cf71c9a24e8dc82fcc87919ac7359f |
21 |
DIST ruby-2.3.1.tar.xz 11407048 SHA256 6725b5534d5a3a21ec4f14d6d7b9921a0d00d08acb88fd04cd50b47b70496338 SHA512 e9d89aeefb1b1e72cee9d3d414b27c793cf09ff3ed5e0ea5277a2b6ae1cae9fdbf6b404a84b42c0c6835754eb04674fc4f1470fbfedabeee3f57e518f13db633 WHIRLPOOL ddfad0f36d61e75209bdc69da0ec549a3443ecb3ed8e1347bb3d0b54ec34073eb05fc8bb78843d59b8b65ec92b8df47f001f5f28f00f685bd2ab60b1ce557558 |
22 |
DIST ruby-2.3.2.tar.xz 11420276 SHA256 5c78f311045ce48160092160444dec2744941a5e37d7865032978bd5bf392f0c SHA512 f2e602281cbcfad81b8197b9555bf637a1ef34f51dbc7548e5e0c5996ab1b7db5bd9eeb902128d37eed90f39b559c569aa75f2b29fe5f65085be65a63206fd72 WHIRLPOOL a8206b08b27c45e237069804d03d2250f561c588dfbb65aeb4e3f394b8d843d08abddc65fbf56b4f943dcc25cc2a60b3967cc1a50af4fdce4b8eb5eb1ebe5b95 |
23 |
DIST ruby-2.3.3.tar.xz 11444164 SHA256 1a4fa8c2885734ba37b97ffdb4a19b8fba0e8982606db02d936e65bac07419dc SHA512 73dd6ed896ff52d953b153b2cab359c87953ea77521878f1ee16c1e217cc46bcb253100debe61ba631e6ffa0bc773e592d603a374508ed5189a311136ccd8d20 WHIRLPOOL aa368a2d0f067ac9d0c6fed62c0e1bdfac0d49c473cd49be9b2774ed3097b76286d091a0887528227f36307b8c1217a2493c5c48fb462db52a3e23cb251a7f79 |
24 |
+DIST ruby-2.4.0.tar.xz 9906880 SHA256 3a87fef45cba48b9322236be60c455c13fd4220184ce7287600361319bb63690 SHA512 975a5388592adc038461e0acebb6c0efee242891b2ea8621476401458efe2bc0fdd317d3bf99beb745b0b3808410efdff33862da29c95c027f457943721e3ab6 WHIRLPOOL 5e0594aa853f9a8a64837d6c34d7110f32471bda719df3ae724643cbe9722b5003cf014ac10130b5a1d59c3f4cc65967c4c00edeea47801e389241be7fe0b53f |
25 |
DIST ruby-patches-2.0.0_p648.tar.bz2 3341 SHA256 7d82403fed6216baed59ac1fbba888e2b9a4a9cb742ffd01531753bae07ab6b8 SHA512 40d07275a391df3e0a7a0c2705913c8120a548e223032dc39993f8f873c8d0639646cf728dc95f1400352a13766623ac6d69a1b1ff03183df6fabf32946dd7a6 WHIRLPOOL ed7ea6b1c1fd3570ea85b885f7455d8273cff2a9db2540c9e89faca867bd5eed2b4de52c7d21a96bb33ae0beedce113c68bb6c8cee4688650ff5169bd9c265fd |
26 |
DIST ruby-patches-2.1.10.tar.bz2 1931 SHA256 7e02c1b6a6352693bfd5828c9d1a7633a52baa57d8770df182ed0d8b450a3341 SHA512 85928207db4f76e58925e50d39d73db2d521674385ce3232828377e7d7bb4252aafb9f93d6045d4c159bf094b472af61ef9307203db313bf28918fe35e0f3a21 WHIRLPOOL 17a698b0a09be15f444ea34b33e9aa1d029fbd572c565072a92480bf7b6b21f1b6b88b0da3183a486bae30e7e65f3172cd72b7336be1dc5974b62bd8e2b9ef7a |
27 |
DIST ruby-patches-2.1.9.tar.bz2 1931 SHA256 7e02c1b6a6352693bfd5828c9d1a7633a52baa57d8770df182ed0d8b450a3341 SHA512 85928207db4f76e58925e50d39d73db2d521674385ce3232828377e7d7bb4252aafb9f93d6045d4c159bf094b472af61ef9307203db313bf28918fe35e0f3a21 WHIRLPOOL 17a698b0a09be15f444ea34b33e9aa1d029fbd572c565072a92480bf7b6b21f1b6b88b0da3183a486bae30e7e65f3172cd72b7336be1dc5974b62bd8e2b9ef7a |
28 |
@@ -14,3 +15,4 @@ DIST ruby-patches-2.2.6.tar.bz2 2272 SHA256 f54373704ce8df732490e8d1e7e35188503f |
29 |
DIST ruby-patches-2.3.1.tar.bz2 2223 SHA256 f0a803173564368e5cf31162e1dba901c46640f9e861255f6cbe14256d18f3eb SHA512 bb47000e516017c1fedf7c5313b0628fa734030e69bd0fed1c06a38dd115b8c50837e3dd917f272e24abf5609c4c12793ae4570bfd7d6210290785bf2f8287bd WHIRLPOOL 0b0d4dcf7df4ff3ff11610bfe7a7b29ed621b45b412cb7618a6572f98a568ac67419bd852b193cfc3aa0968382cf9400a578511e9e8fb8b2125bc876e733bd64 |
30 |
DIST ruby-patches-2.3.2.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.4.0.ebuild b/dev-lang/ruby/ruby-2.4.0.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000..1fad0d2 |
37 |
--- /dev/null |
38 |
+++ b/dev-lang/ruby/ruby-2.4.0.ebuild |
39 |
@@ -0,0 +1,238 @@ |
40 |
+# Copyright 1999-2016 Gentoo Foundation |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+# $Id$ |
43 |
+ |
44 |
+EAPI=6 |
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/~graaff/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" |
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 |
+ dev-libs/libyaml |
90 |
+ virtual/libffi |
91 |
+ sys-libs/zlib |
92 |
+ >=app-eselect/eselect-ruby-20151229 |
93 |
+ !<dev-ruby/rdoc-3.9.4 |
94 |
+ !<dev-ruby/rubygems-1.8.10-r1" |
95 |
+ |
96 |
+DEPEND="${RDEPEND}" |
97 |
+ |
98 |
+BUNDLED_GEMS=" |
99 |
+ >=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24] |
100 |
+ >=dev-ruby/minitest-5.10.1[ruby_targets_ruby24] |
101 |
+ >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24] |
102 |
+ >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24] |
103 |
+ >=dev-ruby/rake-12.0.0[ruby_targets_ruby24] |
104 |
+ >=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24] |
105 |
+ >=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24] |
106 |
+" |
107 |
+ |
108 |
+PDEPEND=" |
109 |
+ ${BUNDLED_GEMS} |
110 |
+ virtual/rubygems[ruby_targets_ruby24] |
111 |
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby24] |
112 |
+ rdoc? ( >=dev-ruby/rdoc-5.0.0[ruby_targets_ruby24] ) |
113 |
+ xemacs? ( app-xemacs/ruby-modes )" |
114 |
+ |
115 |
+src_prepare() { |
116 |
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \ |
117 |
+ epatch "${WORKDIR}/patches" |
118 |
+ |
119 |
+ einfo "Unbundling gems..." |
120 |
+ cd "$S" |
121 |
+ # Remove bundled gems that we will install via PDEPEND, bug |
122 |
+ # 539700. Use explicit version numbers to ensure rm fails when they |
123 |
+ # change so we can update dependencies accordingly. |
124 |
+ 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 |
125 |
+ |
126 |
+ # Fix a hardcoded lib path in configure script |
127 |
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
128 |
+ configure.in || die "sed failed" |
129 |
+ |
130 |
+ eapply_user |
131 |
+ |
132 |
+ eautoreconf |
133 |
+} |
134 |
+ |
135 |
+src_configure() { |
136 |
+ local modules= myconf= |
137 |
+ |
138 |
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413. |
139 |
+ filter-flags -fomit-frame-pointer |
140 |
+ # In many places aliasing rules are broken; play it safe |
141 |
+ # as it's risky with newer compilers to leave it as it is. |
142 |
+ append-flags -fno-strict-aliasing |
143 |
+ # SuperH needs this |
144 |
+ use sh && append-flags -mieee |
145 |
+ |
146 |
+ # Socks support via dante |
147 |
+ if use socks5 ; then |
148 |
+ # Socks support can't be disabled as long as SOCKS_SERVER is |
149 |
+ # set and socks library is present, so need to unset |
150 |
+ # SOCKS_SERVER in that case. |
151 |
+ unset SOCKS_SERVER |
152 |
+ fi |
153 |
+ |
154 |
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000) |
155 |
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then |
156 |
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" |
157 |
+ fi |
158 |
+ |
159 |
+ # ipv6 hack, bug 168939. Needs --enable-ipv6. |
160 |
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" |
161 |
+ |
162 |
+ # Determine which modules *not* to build depending in the USE flags. |
163 |
+ if ! use berkdb ; then |
164 |
+ modules="${modules},dbm" |
165 |
+ fi |
166 |
+ if ! use gdbm ; then |
167 |
+ modules="${modules},gdbm" |
168 |
+ fi |
169 |
+ if ! use ssl ; then |
170 |
+ modules="${modules},openssl" |
171 |
+ fi |
172 |
+ if ! use tk ; then |
173 |
+ modules="${modules},tk" |
174 |
+ fi |
175 |
+ |
176 |
+ # Provide an empty LIBPATHENV because we disable rpath but we do not |
177 |
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget |
178 |
+ # #564272 |
179 |
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ |
180 |
+ --program-suffix=${MY_SUFFIX} \ |
181 |
+ --with-soname=ruby${MY_SUFFIX} \ |
182 |
+ --docdir=${EPREFIX}/usr/share/doc/${P} \ |
183 |
+ --enable-shared \ |
184 |
+ --enable-pthread \ |
185 |
+ --disable-rpath \ |
186 |
+ --with-out-ext="${modules}" \ |
187 |
+ $(use_enable jemalloc jemalloc) \ |
188 |
+ $(use_enable socks5 socks) \ |
189 |
+ $(use_enable doc install-doc) \ |
190 |
+ --enable-ipv6 \ |
191 |
+ $(use_enable debug) \ |
192 |
+ ${myconf} \ |
193 |
+ --enable-option-checking=no \ |
194 |
+ || die "econf failed" |
195 |
+} |
196 |
+ |
197 |
+src_compile() { |
198 |
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed" |
199 |
+} |
200 |
+ |
201 |
+src_test() { |
202 |
+ emake -j1 V=1 test || die "make test failed" |
203 |
+ |
204 |
+ elog "Ruby's make test has been run. Ruby also ships with a make check" |
205 |
+ elog "that cannot be run until after ruby has been installed." |
206 |
+ elog |
207 |
+ if use rubytests; then |
208 |
+ elog "You have enabled rubytests, so they will be installed to" |
209 |
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" |
210 |
+ elog "than root, and you must place them into a writeable directory." |
211 |
+ elog "Then call: " |
212 |
+ elog |
213 |
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" |
214 |
+ else |
215 |
+ elog "Enable the rubytests USE flag to install the make check tests" |
216 |
+ fi |
217 |
+} |
218 |
+ |
219 |
+src_install() { |
220 |
+ # Remove the remaining bundled gems. We do this late in the process |
221 |
+ # since they are used during the build to e.g. create the |
222 |
+ # documentation. |
223 |
+ rm -rf ext/json || die |
224 |
+ |
225 |
+ # Ruby is involved in the install process, we don't want interference here. |
226 |
+ unset RUBYOPT |
227 |
+ |
228 |
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) |
229 |
+ |
230 |
+ LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
231 |
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}" |
232 |
+ for d in $(find "${S}/ext" -type d) ; do |
233 |
+ RUBYLIB="${RUBYLIB}:$d" |
234 |
+ done |
235 |
+ export LD_LIBRARY_PATH RUBYLIB |
236 |
+ |
237 |
+ emake V=1 DESTDIR="${D}" install || die "make install failed" |
238 |
+ |
239 |
+ # Remove installed rubygems and rdoc copy |
240 |
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" |
241 |
+ rm -rf "${D}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" |
242 |
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" |
243 |
+ rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" |
244 |
+ |
245 |
+ if use doc; then |
246 |
+ make DESTDIR="${D}" install-doc || die "make install-doc failed" |
247 |
+ fi |
248 |
+ |
249 |
+ if use examples; then |
250 |
+ insinto /usr/share/doc/${PF} |
251 |
+ doins -r sample |
252 |
+ fi |
253 |
+ |
254 |
+ dodoc ChangeLog NEWS doc/NEWS* README* || die |
255 |
+ |
256 |
+ if use rubytests; then |
257 |
+ pushd test |
258 |
+ insinto /usr/share/${PN}-${SLOT}/test |
259 |
+ doins -r . |
260 |
+ popd |
261 |
+ fi |
262 |
+} |
263 |
+ |
264 |
+pkg_postinst() { |
265 |
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
266 |
+ eselect ruby set ruby${MY_SUFFIX} |
267 |
+ fi |
268 |
+ |
269 |
+ elog |
270 |
+ elog "To switch between available Ruby profiles, execute as root:" |
271 |
+ elog "\teselect ruby set ruby(19|20|...)" |
272 |
+ elog |
273 |
+} |
274 |
+ |
275 |
+pkg_postrm() { |
276 |
+ eselect ruby cleanup |
277 |
+} |