1 |
commit: b6f27dafa139e1893d6407f9ae6fa0e2f3956720 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 11 09:50:52 2015 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 11 09:51:29 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6f27daf |
7 |
|
8 |
dev-lang/ruby: add libressl USE flag, fixing bug 562286 |
9 |
|
10 |
Add support for libressl using a backported upstream patch. |
11 |
Thanks for hasufell in bug 562286. |
12 |
|
13 |
Package-Manager: portage-2.2.20.1 |
14 |
|
15 |
dev-lang/ruby/Manifest | 1 + |
16 |
dev-lang/ruby/ruby-2.2.3-r1.ebuild | 241 +++++++++++++++++++++++++++++++++++++ |
17 |
2 files changed, 242 insertions(+) |
18 |
|
19 |
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest |
20 |
index d9c7471..f56f4d2 100644 |
21 |
--- a/dev-lang/ruby/Manifest |
22 |
+++ b/dev-lang/ruby/Manifest |
23 |
@@ -12,4 +12,5 @@ DIST ruby-patches-2.0.0_p647.tar.bz2 2947 SHA256 dc173fe94af215fd2c1823f46140e4f |
24 |
DIST ruby-patches-2.1.6-r1.tar.bz2 2348 SHA256 2c158373217a719f2961c1f2cf2f3494eb43c413dc41ba7f9c1d88c60baca7f7 SHA512 01367d463a3aa72261742ae468d96ca1fb06a2d6b2a7a0cc416e449a7ae602d4478fb2394390636725424f252fa95c5db7d2c8116dc0b1e4477d8d641961980f WHIRLPOOL b39e8b9bdd8d05958b3b4c5884bfdd65c99b9aee2470a48ca748cbf336948bf0bb9f834ce3fec5e9365abaf385de760012f67dec6db257d7cbeff04ce0c5c7fb |
25 |
DIST ruby-patches-2.1.7.tar.bz2 1931 SHA256 7e02c1b6a6352693bfd5828c9d1a7633a52baa57d8770df182ed0d8b450a3341 SHA512 85928207db4f76e58925e50d39d73db2d521674385ce3232828377e7d7bb4252aafb9f93d6045d4c159bf094b472af61ef9307203db313bf28918fe35e0f3a21 WHIRLPOOL 17a698b0a09be15f444ea34b33e9aa1d029fbd572c565072a92480bf7b6b21f1b6b88b0da3183a486bae30e7e65f3172cd72b7336be1dc5974b62bd8e2b9ef7a |
26 |
DIST ruby-patches-2.2.2-r1.tar.bz2 3066 SHA256 65342c7cd5146f0d5025932d31e2ed40e1247355d68356e17a06b0ff728fbef1 SHA512 1c578b868db179bca6dd7800528ac23076b1f44519d93b92fafd724d8e5a158512b05cb3d5f7a4f5ada156692978f98cab7dd5b4282701e57c33d50bcda977de WHIRLPOOL 241622b25acdc8b2a7cb912bac2f6e29a4331798ba67507821b3fb295791d7bea8b7933540f2cd47cc7e8477df14be478286d018b7afe9ae121cd8c49c58dc83 |
27 |
+DIST ruby-patches-2.2.3-r1.tar.bz2 3143 SHA256 45ce438c31c62313f193546a883afe19ccb6dda3276d1378eb5dfd33bd7b8bbe SHA512 e5799b8008276d98f3cd1bd57b1b76a39d052a7c920d84ef245961c2db55e96e7b7081b71aa04843844786cdeee759eb415b46d8e44611d5ff8f658ad12be7bb WHIRLPOOL d9d6dd5562574c2597cbb81b9dbb15c345cad9096e24cc82515fd021882a4e7fa375f37e660b1ce2075ef66bc7582bae4d0c3e819713549dbe7c5c3d4c658ded |
28 |
DIST ruby-patches-2.2.3.tar.bz2 2263 SHA256 a08bfaf193adf8e92e7937c9e8db3ec4a880e80dd9c99a5621a00a9233d4d2cd SHA512 dafbb40254d9703a7ed66314f6d9d0dd4c88485a5cef28ff1e3c7020c28cfaac1561ecfb72a465811b59213dbaf9aece6b52240ae895e47f5be63d7f88bc5543 WHIRLPOOL 54b91871b991d38cd4c573884389aaa4ee81afc14fd918e968f0b82df95264930d71199741be820c816998ca9134c496a028e13d00b93cae3c870981f28c2160 |
29 |
|
30 |
diff --git a/dev-lang/ruby/ruby-2.2.3-r1.ebuild b/dev-lang/ruby/ruby-2.2.3-r1.ebuild |
31 |
new file mode 100644 |
32 |
index 0000000..c47b5c4 |
33 |
--- /dev/null |
34 |
+++ b/dev-lang/ruby/ruby-2.2.3-r1.ebuild |
35 |
@@ -0,0 +1,241 @@ |
36 |
+# Copyright 1999-2015 Gentoo Foundation |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+# $Id$ |
39 |
+ |
40 |
+EAPI=5 |
41 |
+ |
42 |
+#PATCHSET=1 |
43 |
+ |
44 |
+inherit autotools eutils flag-o-matic multilib versionator |
45 |
+ |
46 |
+MY_P="${PN}-$(get_version_component_range 1-3)" |
47 |
+S=${WORKDIR}/${MY_P} |
48 |
+ |
49 |
+SLOT=$(get_version_component_range 1-2) |
50 |
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) |
51 |
+RUBYVERSION=2.2.0 |
52 |
+ |
53 |
+if [[ -n ${PATCHSET} ]]; then |
54 |
+ if [[ ${PVR} == ${PV} ]]; then |
55 |
+ PATCHSET="${PV}-r0.${PATCHSET}" |
56 |
+ else |
57 |
+ PATCHSET="${PVR}.${PATCHSET}" |
58 |
+ fi |
59 |
+else |
60 |
+ PATCHSET="${PVR}" |
61 |
+fi |
62 |
+ |
63 |
+DESCRIPTION="An object-oriented scripting language" |
64 |
+HOMEPAGE="http://www.ruby-lang.org/" |
65 |
+SRC_URI="mirror://ruby/2.2/${MY_P}.tar.xz |
66 |
+ https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2" |
67 |
+ |
68 |
+LICENSE="|| ( Ruby-BSD BSD-2 )" |
69 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
70 |
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl xemacs ncurses +readline" |
71 |
+ |
72 |
+RDEPEND=" |
73 |
+ berkdb? ( sys-libs/db:= ) |
74 |
+ gdbm? ( sys-libs/gdbm ) |
75 |
+ jemalloc? ( dev-libs/jemalloc ) |
76 |
+ ssl? ( |
77 |
+ !libressl? ( dev-libs/openssl:0 ) |
78 |
+ libressl? ( dev-libs/libressl ) |
79 |
+ ) |
80 |
+ socks5? ( >=net-proxy/dante-1.1.13 ) |
81 |
+ ncurses? ( sys-libs/ncurses:0= ) |
82 |
+ readline? ( sys-libs/readline:0 ) |
83 |
+ dev-libs/libyaml |
84 |
+ virtual/libffi |
85 |
+ sys-libs/zlib |
86 |
+ >=app-eselect/eselect-ruby-20141227 |
87 |
+ !<dev-ruby/rdoc-3.9.4 |
88 |
+ !<dev-ruby/rubygems-1.8.10-r1" |
89 |
+ |
90 |
+DEPEND="${RDEPEND}" |
91 |
+ |
92 |
+BUNDLED_GEMS=" |
93 |
+ >=dev-ruby/minitest-5.4.3[ruby_targets_ruby22] |
94 |
+ >=dev-ruby/power_assert-0.2.2[ruby_targets_ruby22] |
95 |
+ >=dev-ruby/test-unit-3.0.8[ruby_targets_ruby22] |
96 |
+" |
97 |
+ |
98 |
+PDEPEND=" |
99 |
+ ${BUNDLED_GEMS} |
100 |
+ virtual/rubygems[ruby_targets_ruby22] |
101 |
+ >=dev-ruby/json-1.8.1[ruby_targets_ruby22] |
102 |
+ >=dev-ruby/rake-0.9.6[ruby_targets_ruby22] |
103 |
+ rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby22] ) |
104 |
+ xemacs? ( app-xemacs/ruby-modes )" |
105 |
+ |
106 |
+src_prepare() { |
107 |
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \ |
108 |
+ epatch "${WORKDIR}/patches" |
109 |
+ |
110 |
+ # We can no longer unbundle all of rake because rubygems now depends |
111 |
+ # on this. We leave the actual rake code around to bootstrap |
112 |
+ # rubygems, but remove the bits that would cause a file collision. |
113 |
+ einfo "Unbundling gems..." |
114 |
+ cd "$S" |
115 |
+ rm -r \ |
116 |
+ {bin,lib}/rake lib/rake.rb man/rake.1 \ |
117 |
+ bin/gem || die "removal failed" |
118 |
+ # Remove bundled gems that we will install via PDEPEND, bug |
119 |
+ # 539700. Use explicit version numbers to ensure rm fails when they |
120 |
+ # change so we can update dependencies accordingly. |
121 |
+ rm gems/{minitest-5.4.3,power_assert-0.2.2,test-unit-3.0.8}.gem || die |
122 |
+ |
123 |
+ # Fix a hardcoded lib path in configure script |
124 |
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ |
125 |
+ configure.in || die "sed failed" |
126 |
+ |
127 |
+ eautoreconf |
128 |
+} |
129 |
+ |
130 |
+src_configure() { |
131 |
+ local myconf= |
132 |
+ |
133 |
+ # The Tk module can no longer be built because the module code is no |
134 |
+ # longer compatible with newer stable versions. |
135 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=500894 |
136 |
+ local modules="tk" |
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 readline ; then |
164 |
+ modules="${modules},readline" |
165 |
+ fi |
166 |
+ if ! use berkdb ; then |
167 |
+ modules="${modules},dbm" |
168 |
+ fi |
169 |
+ if ! use gdbm ; then |
170 |
+ modules="${modules},gdbm" |
171 |
+ fi |
172 |
+ if ! use ssl ; then |
173 |
+ modules="${modules},openssl" |
174 |
+ fi |
175 |
+ if ! use ncurses ; then |
176 |
+ modules="${modules},curses" |
177 |
+ fi |
178 |
+ |
179 |
+ INSTALL="${EPREFIX}/usr/bin/install -c" 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="${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 copy |
240 |
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" |
241 |
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" |
242 |
+ rm -r "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" |
243 |
+ |
244 |
+ if use doc; then |
245 |
+ make DESTDIR="${D}" install-doc || die "make install-doc failed" |
246 |
+ fi |
247 |
+ |
248 |
+ if use examples; then |
249 |
+ insinto /usr/share/doc/${PF} |
250 |
+ doins -r sample |
251 |
+ fi |
252 |
+ |
253 |
+ dodoc ChangeLog NEWS doc/NEWS* README* || die |
254 |
+ |
255 |
+ if use rubytests; then |
256 |
+ pushd test |
257 |
+ insinto /usr/share/${PN}-${SLOT}/test |
258 |
+ doins -r . |
259 |
+ popd |
260 |
+ fi |
261 |
+} |
262 |
+ |
263 |
+pkg_postinst() { |
264 |
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then |
265 |
+ eselect ruby set ruby${MY_SUFFIX} |
266 |
+ fi |
267 |
+ |
268 |
+ elog |
269 |
+ elog "To switch between available Ruby profiles, execute as root:" |
270 |
+ elog "\teselect ruby set ruby(19|20|...)" |
271 |
+ elog |
272 |
+} |
273 |
+ |
274 |
+pkg_postrm() { |
275 |
+ eselect ruby cleanup |
276 |
+} |