summaryrefslogtreecommitdiff
blob: c7aa8861789b4458fcee3c590d93c0af6be45a1f (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-firewall/fwbuilder/fwbuilder-1.1.2.ebuild,v 1.13 2005/02/07 17:22:46 carlo Exp $

inherit flag-o-matic eutils

DESCRIPTION="A firewall GUI"
HOMEPAGE="http://www.fwbuilder.org/"
SRC_URI="mirror://sourceforge/fwbuilder/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 sparc amd64 ~ppc"
IUSE="static nls"

DEPEND="sys-devel/autoconf
	=x11-libs/gtk+-1.2*
	>=media-libs/gdk-pixbuf-0.16.0
	=dev-cpp/gtkmm-1.2*
	=dev-libs/libsigc++-1.0*
	nls? ( >=sys-devel/gettext-0.11 )
	~net-libs/libfwbuilder-1.0.2"

src_unpack() {
	unpack ${A} ; cd ${S}

	epatch ${FILESDIR}/${P}-nls_fix.patch
}

src_compile() {
	use sparc && replace-flags -O3 -O2
	local myconf
	use static && myconf="${myconf} --enable-shared=no --enable-static=yes"
	use nls || myconf="${myconf} --disable-nls"

	./autogen.sh \
		--prefix=/usr \
		--host=${CHOST}	\
		${myconf} \
		|| die "./configure failed"

	sed -i -e "s:#define HAVE_XMLSAVEFORMATFILE 1://:" config.h

	if use static ; then
		emake LDFLAGS="-static" || die "emake LDFLAGS failed"
	else
		make -j1 || die "emake failed"
	fi
}

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

pkg_postinst() {
	einfo "You need to emerge iproute2 on the machine that"
	einfo "will run the firewall script."
}