summaryrefslogtreecommitdiff
blob: e5db6e55f4f7215a3b6276c31f80fc9101b32e69 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/cgicc/cgicc-3.2.3.ebuild,v 1.3 2005/11/23 00:56:41 metalgod Exp $

DESCRIPTION="A C++ class library for writing CGI applications"
HOMEPAGE="http://www.cgicc.org/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"

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

DEPEND=">=sys-apps/sed-4"
RDEPEND="virtual/libc"

src_unpack() {
	unpack ${A}
	# docs are included in html form, no need to depend on doxygen and regenerate them
	sed -i \
		-e 's|^\(SUBDIRS = cgicc\) doc\( support $(DEMO)\)|\1\2|' \
		-e 's|^\(DIST_SUBDIRS = cgicc\) doc\(support demo contrib\)|\1\2|' \
		-e 's|\($(mkdir_p) $(distdir)/cgicc\) $(distdir)/doc\( $(distdir)/support\)|\1\2|' \
		${S}/Makefile.in || die "sed Makefile.in failed"
}

src_compile() {
	econf \
		--disable-demos \
		--enable-warnings \
		$(use_enable debug debug-logging) \
		|| die "econf failed"
	emake || die "emake failed"
}

src_install() {
	use doc && dohtml -r doc/html/*
	rm -rf doc
	make DESTDIR="${D}" install || die "make install failed"
	dodoc AUTHORS ChangeLog COPYING COPYING.DOC COPYING.LIB INSTALL NEWS \
		README README.WIN THANKS
}