blob: 9cfdfe9b415a17b9eae7b986b03b0466e2eebd02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-servers/mongrel/mongrel-1.1.5-r2.ebuild,v 1.2 2010/02/07 15:59:33 armin76 Exp $
EAPI="2"
# ruby19 → extension does not build, so there is no way to get this to
# work for now
USE_RUBY="ruby18 jruby"
RUBY_FAKEGEM_TASK_DOC=""
RUBY_FAKEGEM_TASK_TEST=""
RUBY_FAKEGEM_EXTRADOC="CHANGELOG README TODO"
inherit ruby-fakegem
DESCRIPTION="A small fast HTTP library and server that runs Rails, Camping, and Nitro apps"
HOMEPAGE="http://mongrel.rubyforge.org/"
LICENSE="|| ( mongrel GPL-2 )"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE=""
RDEPEND=""
DEPEND="ruby_targets_jruby? ( >=virtual/jdk-1.5 )"
ruby_add_rdepend ">=dev-ruby/daemons-1.0.3
>=dev-ruby/gem_plugin-0.2.3"
# Only useful with Ruby 1.8 as it's not used/useful with Ruby 1.9 or JRuby
USE_RUBY=ruby18 ruby_add_rdepend ">=dev-ruby/fastthread-1.0.1"
ruby_add_bdepend test virtual/ruby-test-unit
each_ruby_compile() {
case ${RUBY} in
*jruby)
# There is no script to build the JRuby extension so we're
# going to do it manually :(
pushd ext/http11_java &>/dev/null
find . -name '*.java' | xargs javac -source 1.5 -target 1.5 -cp $(java-config -d -p jruby) \
|| die "failed to build java source"
find . -name '*.class' | xargs jar cf http11.jar \
|| die "failed to create http11.jar"
popd &>/dev/null
# Move it here to avoid special-casing the test and
# install phases.
cp ext/http11_java/http11.jar lib/ || die "unable to copy http11.so"
;;
*)
pushd ext/http11 &>/dev/null
${RUBY} extconf.rb || die "extconf failed"
emake || die "emake failed"
popd &>/dev/null
# Move it here to avoid special-casing the test and
# install phases.
cp ext/http11/http11.so lib/ || die "unable to copy http11.so"
;;
esac
}
each_ruby_test() {
${RUBY} -S testrb -I lib:ext/http11_java -a test -x test_command || die "tests failed"
}
|