summaryrefslogtreecommitdiff
blob: 03ac0f9f590780ee559a37baca32a675ce6867b9 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/mod_ruby/mod_ruby-1.2.4-r2.ebuild,v 1.2 2005/04/13 12:48:43 caleb Exp $

inherit apache-module

DESCRIPTION="Embeds the Ruby interpreter into Apache"
HOMEPAGE="http://modruby.net/"
SRC_URI="http://modruby.net/archive/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~sparc ~x86 ~ppc ~amd64 ~ppc64"
IUSE="doc"

DEPEND="virtual/ruby
	doc? ( dev-ruby/rdtool )"

APACHE1_MOD_CONF="mod_ruby"
APACHE2_MOD_CONF="21_mod_ruby"
APACHE1_MOD_DEFINE="RUBY"
APACHE2_MOD_DEFINE="RUBY"
APACHE1_MOD_FILE="${PN}.so"
APACHE2_MOD_FILE="${PN}.so"
DOCFILES="ChangeLog COPYING README.* doc/*.html doc/*.css"

need_apache

src_compile() {
	use apache2 || ./configure.rb --with-apxs=${APXS1}
	use apache2 && ./configure.rb --with-apxs=${APXS2}

	./configure.rb --with-apxs=${APXS}

	emake || die "make failed"

	if use doc; then
		cd doc
		emake || die "make failed"
	fi
}

src_install() {
	emake DESTDIR=${D} install || die "make install failed"

	if use doc; then
		dohtml doc/*.css doc/*.html
	fi

	apache-module_src_install
}