1 |
commit: 38eae75234566b616036e9527eaa352e32c78282 |
2 |
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 4 20:53:40 2016 +0000 |
4 |
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 4 20:53:40 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38eae752 |
7 |
|
8 |
www-servers/thin: Migrate to rspec2; add ruby22, ruby23; drop x86, ppc |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
|
12 |
www-servers/thin/thin-1.7.0-r1.ebuild | 89 +++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 89 insertions(+) |
14 |
|
15 |
diff --git a/www-servers/thin/thin-1.7.0-r1.ebuild b/www-servers/thin/thin-1.7.0-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000..10c9800 |
18 |
--- /dev/null |
19 |
+++ b/www-servers/thin/thin-1.7.0-r1.ebuild |
20 |
@@ -0,0 +1,89 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=5 |
26 |
+ |
27 |
+USE_RUBY="ruby21 ruby22 ruby23" |
28 |
+ |
29 |
+RUBY_FAKEGEM_RECIPE_TEST="rspec" |
30 |
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" |
31 |
+ |
32 |
+inherit ruby-fakegem |
33 |
+ |
34 |
+DESCRIPTION="A fast and very simple Ruby web server" |
35 |
+HOMEPAGE="http://code.macournoyer.com/thin/" |
36 |
+SRC_URI="https://github.com/macournoyer/thin/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="Ruby" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~ppc64" |
41 |
+IUSE="doc test" |
42 |
+ |
43 |
+DEPEND="${DEPEND} |
44 |
+ dev-util/ragel" |
45 |
+RDEPEND="${RDEPEND}" |
46 |
+ |
47 |
+# The runtime dependencies are used at build-time as well since the |
48 |
+# Rakefile loads thin! |
49 |
+mydeps=">=dev-ruby/daemons-1.0.9 |
50 |
+ >=dev-ruby/rack-1.0.0:* <dev-ruby/rack-3:* |
51 |
+ >=dev-ruby/eventmachine-1.0.4:0 |
52 |
+ virtual/ruby-ssl" |
53 |
+ |
54 |
+ruby_add_rdepend "${mydeps}" |
55 |
+ruby_add_bdepend "${mydeps} |
56 |
+ dev-ruby/rake-compiler" |
57 |
+ |
58 |
+all_ruby_prepare() { |
59 |
+ # Fix Ragel-based parser generation (uses a *very* old syntax that |
60 |
+ # is not supported in Gentoo) |
61 |
+ sed -i -e 's: | rlgen-cd::' Rakefile || die |
62 |
+ |
63 |
+ # Fix specs' dependencies so that the extension is not rebuilt |
64 |
+ # when running tests |
65 |
+ rm tasks/spec.rake || die |
66 |
+ |
67 |
+ # Fix rspec version to allow newer 2.x versions |
68 |
+ sed -i -e '/gem "rspec"/ s/1.2.9/2.0/' spec/spec_helper.rb || die |
69 |
+ |
70 |
+ # Avoid CLEAN since it may not be available and we don't need it. |
71 |
+ sed -i -e '/CLEAN/ s:^:#:' tasks/*.rake || die |
72 |
+ |
73 |
+ # Disable a test that is known for freezing the testsuite, |
74 |
+ # reported upstream. In thin 1.5.1 this just fails. |
75 |
+ sed -i \ |
76 |
+ -e '/should force kill process in pid file/,/^ end/ s:^:#:' \ |
77 |
+ spec/daemonizing_spec.rb || die |
78 |
+ |
79 |
+ sed -i \ |
80 |
+ -e '/tracing routines (with NO custom logger)/,/^ end/ s:^:#:'\ |
81 |
+ spec/logging_spec.rb || die |
82 |
+ |
83 |
+ find spec/perf -name "*_spec.rb" -exec \ |
84 |
+ sed -i '/be_faster_then/ i \ pending' {} \; |
85 |
+ |
86 |
+ sed -i -e "s/Spec::Runner/Rspec/" spec/spec_helper.rb || die |
87 |
+ # nasty but too complex to fix up for now :( |
88 |
+ use doc || rm tasks/rdoc.rake |
89 |
+} |
90 |
+ |
91 |
+each_ruby_compile() { |
92 |
+ ${RUBY} -S rake compile || die "rake compile failed" |
93 |
+} |
94 |
+ |
95 |
+all_ruby_install() { |
96 |
+ all_fakegem_install |
97 |
+ |
98 |
+ keepdir /etc/thin |
99 |
+ newinitd "${FILESDIR}"/${PN}.initd-r4 ${PN} |
100 |
+ newconfd "${FILESDIR}"/${PN}.confd-2 ${PN} |
101 |
+ |
102 |
+ einfo |
103 |
+ elog "Thin is now shipped with init scripts." |
104 |
+ elog "The default script (/etc/init.d/thin) will start all servers that have" |
105 |
+ elog "configuration files in /etc/thin/. You can symlink the init script to" |
106 |
+ elog "files of the format 'thin.SERVER' to be able to start individual servers." |
107 |
+ elog "See /etc/conf.d/thin for more configuration options." |
108 |
+ einfo |
109 |
+} |