Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/eventmachine/
Date: Tue, 28 Sep 2021 01:01:56
Message-Id: 1632790837.f05cc0db4473e05d408574c23a494ce903173e8d.sam@gentoo
1 commit: f05cc0db4473e05d408574c23a494ce903173e8d
2 Author: Guillaume Seren <guillaumeseren <AT> gmail <DOT> com>
3 AuthorDate: Wed Mar 10 20:43:28 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 28 01:00:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f05cc0db
7
8 dev-ruby/eventmachine: Add ruby27 + tests support
9
10 Closes: https://bugs.gentoo.org/765253
11 Package-Manager: Portage-3.0.13, Repoman-3.0.2
12 Signed-off-by: Guillaume Seren <guillaumeseren <AT> gmail.com>
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 dev-ruby/eventmachine/eventmachine-1.2.7-r1.ebuild | 71 +++++++++-------------
16 1 file changed, 29 insertions(+), 42 deletions(-)
17
18 diff --git a/dev-ruby/eventmachine/eventmachine-1.2.7-r1.ebuild b/dev-ruby/eventmachine/eventmachine-1.2.7-r1.ebuild
19 index 7128a0f86c4..1954db7ace0 100644
20 --- a/dev-ruby/eventmachine/eventmachine-1.2.7-r1.ebuild
21 +++ b/dev-ruby/eventmachine/eventmachine-1.2.7-r1.ebuild
22 @@ -1,15 +1,20 @@
23 # Copyright 1999-2021 Gentoo Authors
24 # Distributed under the terms of the GNU General Public License v2
25
26 -EAPI=6
27 +EAPI=7
28
29 -USE_RUBY="ruby23 ruby24 ruby25 ruby26"
30 +USE_RUBY="ruby25 ruby26 ruby27"
31
32 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
33 RUBY_FAKEGEM_DOCDIR="rdoc"
34 -RUBY_FAKEGEM_EXTRADOC="docs/*.md README.md"
35 +RUBY_FAKEGEM_EXTRADOC="docs/*.md CHANGELOG.md README.md"
36
37 -inherit ruby-fakegem
38 +RUBY_FAKEGEM_GEMSPEC="eventmachine.gemspec"
39 +
40 +RUBY_FAKEGEM_EXTENSIONS=(ext/extconf.rb ext/fastfilereader/extconf.rb)
41 +RUBY_FAKEGEM_EXTRAINSTALL=(examples)
42 +
43 +inherit multilib ruby-fakegem
44
45 DESCRIPTION="EventMachine is a fast, simple event-processing library for Ruby programs"
46 HOMEPAGE="https://github.com/eventmachine/eventmachine"
47 @@ -17,8 +22,9 @@ SRC_URI="https://github.com/eventmachine/eventmachine/archive/v${PV}.tar.gz -> $
48
49 LICENSE="|| ( GPL-2 Ruby )"
50 SLOT="0"
51 -KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
52 -IUSE=""
53 +KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
54 +IUSE="test"
55 +RESTRICT="!test? ( test )"
56
57 DEPEND="${DEPEND}
58 dev-libs/openssl:0"
59 @@ -31,6 +37,7 @@ all_ruby_prepare() {
60 # Remove package tasks to avoid dependency on rake-compiler.
61 rm rakelib/package.rake || die
62
63 + sed -i -e '/git ls-files/d' ${RUBY_FAKEGEM_GEMSPEC} || die
64 # Remove the resolver tests since they require network access and
65 # the localhost test fails with an IPv6 localhost.
66 rm tests/test_resolver.rb || die
67 @@ -39,45 +46,28 @@ all_ruby_prepare() {
68 rm tests/test_kb.rb || die
69
70 # Avoid tests that require network access
71 - sed -i -e '/test_bind_connect/,/^ end/ s:^:#:' \
72 - tests/test_basic.rb || die
73 - sed -i -e '/test_\(cookie\|http_client\|version_1_0\)/,/^ end/ s:^:#:' \
74 - tests/test_httpclient.rb || die
75 - sed -i -e '/test_\(get\|https_get\)/,/^ end/ s:^:#:' \
76 - tests/test_httpclient2.rb || die
77 - sed -i -e '/test_connect_timeout/,/^ end/ s:^:#:' \
78 - tests/test_unbind_reason.rb || die
79 - sed -i -e '/test_for_real/,/^ end/ s:^:#:' \
80 - tests/test_pending_connect_timeout.rb || die
81 - rm -f tests/test_{get_sock_opt,set_sock_opt,idle_connection}.rb || die
82 -
83 + sed -e '/test_bind_connect/,/^ end/ s:^:#:' \
84 + -e '/test_invalid_address_bind_connect_src/,/^ end/ s:^:#:' \
85 + -e '/test_invalid_address_bind_connect_dst/,/^ end/ s:^:#:' \
86 + -i tests/test_basic.rb || die
87 # Avoid tests for insecure SSL versions that may not be available
88 - sed -i -e '/test_any_to_v3/,/^ end/ s:^:#:' \
89 + sed -e '/test_any_to_v3/,/^ end/ s:^:#:' \
90 -e '/test_v3_/,/^ end/ s:^:#:' \
91 -e '/test_tlsv1_required_with_external_client/aomit "sslv3"' \
92 - tests/test_ssl_protocols.rb || die
93 + -e '/test_any_to_any/,/^ end/ s:^:#:' \
94 + -e '/test_case_insensitivity/,/^ end/ s:^:#:' \
95 + -e '/test_default_to_default/,/^ end/ s:^:#:' \
96 + -i tests/test_ssl_protocols.rb || die
97 + # Those also want network
98 + sed -e '/test_ipv6_udp_local_server/,/^ end/ s:^:#:' \
99 + -e '/test_ipv6_tcp_local_server/,/^ end/ s:^:#:' \
100 + -i tests/test_ipv6.rb || die
101 +
102 + rm tests/test_{sock_opt,ssl_verify,ssl_methods,ssl_dhparam,ssl_ecdh_curve,idle_connection}.rb || die
103
104 # Avoid test that deliberately triggers a C++ exception which causes
105 # a SEGFAULT. This does not appear to happen upstream (on travis).
106 - rm -f tests/test_exc.rb || die
107 -}
108 -
109 -each_ruby_configure() {
110 - for extdir in ext ext/fastfilereader; do
111 - pushd $extdir
112 - ${RUBY} extconf.rb || die "extconf.rb failed for ${extdir}"
113 - popd
114 - done
115 -}
116 -
117 -each_ruby_compile() {
118 - for extdir in ext ext/fastfilereader; do
119 - pushd $extdir
120 - # both extensions use C++, so use the CXXFLAGS not the CFLAGS
121 - emake V=1 CFLAGS="${CXXFLAGS} -fPIC" archflag="${LDFLAGS}"
122 - popd
123 - cp $extdir/*.so lib/ || die "Unable to copy extensions for ${extdir}"
124 - done
125 + rm tests/test_exc.rb || die
126 }
127
128 each_ruby_test() {
129 @@ -86,7 +76,4 @@ each_ruby_test() {
130
131 all_ruby_install() {
132 all_fakegem_install
133 -
134 - insinto /usr/share/doc/${PF}/
135 - doins -r examples
136 }