summaryrefslogtreecommitdiff
blob: aed539c4e27343756f2b3897c09bb6899552e211 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

MY_P=${P/_/-}

inherit multilib eutils user

DESCRIPTION="Hop is a higher-order language for programming interactive web applications"
HOMEPAGE="http://hop.inria.fr/"
SRC_URI="ftp://ftp-sop.inria.fr/indes/fp/Hop/${MY_P}.tar.gz"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"
IUSE="debug ssl threads"

DEPEND="~dev-scheme/bigloo-3.6a[ssl?,threads?,multimedia,sqlite,web]"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${MY_P}"

pkg_setup() {
	enewgroup hop
	enewuser hop -1 -1 /var/lib/hop hop
}

src_configure() {
	# Hop doesn't use autoconf and consequently a lot of options used by econf give errors
	# Manuel Serrano says: "Please, dont talk to me about autoconf. I simply dont want to hear about it..."
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--libdir=/usr/$(get_libdir) \
		--etcdir=/etc/hop \
		--webletsdir="/usr/share/${PN}/weblets" \
		$(use_enable ssl) \
		$(use_enable threads) \
		$(use debug && echo "--debug") \
		|| die "configure failed"
}

src_compile () {
	emake EFLAGS='-ldopt "${LDFLAGS}"' || die "emake failed"
}

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

	# Create log dir
	keepdir /var/log/hop
	fowners root:hop /var/log/hop
	fperms 0775 /var/log/hop

	# Init scripts
	newinitd "${FILESDIR}/hop.initd" hop || die
	newconfd "${FILESDIR}/hop.confd" hop || die

	# Documentation
	dodoc ChangeLog README
	newdoc LICENSE COPYING
}