summaryrefslogtreecommitdiff
blob: 7b5e6820fd67eb069bdfd411a38a60dea6670d74 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header:

IUSE="ssl X gtk gnome mozilla socks5 nls"

DESCRIPTION="Web spider and website mirroring tool"
SRC_URI="http://www.pavuk.org/sw/${PN}-0.9pl28.tgz"

HOMEPAGE="http://www.pavuk.org/"

S="${WORKDIR}/${PN}-0.9pl28"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 ppc sparc sparc64"

DEPEND="sys-devel/gettext
	sys-libs/zlib
	ssl? ( dev-libs/openssl )
	X? ( virtual/x11 )
	gtk? ( x11-libs/gtk+ )
	gnome? ( gnome-base/gnome )
	mozilla? ( net-www/mozilla )
	socks5? ( net-misc/tsocks )"

src_unpack() {

	unpack ${A}

	cd ${S}
}

src_compile() {

	local myconf
	myconf="--enable-threads --with-regex=auto"

	use X \
		&& myconf="${myconf} --with-x" \
		|| myconf="${myconf} --without-x"
	
	use ssl \
		&& myconf="${myconf} --enable-ssl" \
		|| myconf="${myconf} --disable-ssl"

	use gtk \
		&& myconf="${myconf} --enable-gtk" \
		|| myconf="${myconf} --disable-gtk" 

	use gnome \
		&& myconf="${myconf} --enable-gnome" \
		|| myconf="${myconf} --disable-gnome"

	use mozilla \
		&& myconf="${myconf} --enable-js" \
		|| myconf="${myconf} --disable-js"

	use socks5 \
		&& myconf="${myconf} --enable-socks" \
		|| myconf="${myconf} --disable-socks"
	
	use nls \
		&& myconf="${myconf} --enable-nls" \
		|| myconf="${myconf} --disable-nls"

	econf ${myconf}

	emake || die
}

src_install() {

	# fix sandbox volation for gnome .desktop and icon
	use gnome \
		&& mv Makefile Makefile.orig \
		&& mv icons/Makefile icons/Makefile.orig \
		&& sed -e 's/GNOME_PREFIX = \/usr/GNOME_PREFIX = ${D}usr/' Makefile.orig >Makefile \
		&& sed -e 's/GNOME_PREFIX = \/usr/GNOME_PREFIX = ${D}usr/' icons/Makefile.orig >icons/Makefile

	einstall

	dodoc ABOUT-NLS README CREDITS FAQ NEWS AUTHORS COPYING BUGS \
		TODO MAILINGLIST ChangeLog wget-pavuk.HOWTO jsbind.txt \
		pavuk_authinfo.sample  pavukrc.sample
}