games-board/freedoko: Drop old
[gentoo.git] / net-misc / pavuk / pavuk-0.9.36_pre20120215-r2.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 S="${WORKDIR}/${PN}"
7 AUTOTOOLS_AUTORECONF=1
8 AUTOTOOLS_IN_SOURCE_BUILD=1
9
10 inherit eutils autotools-utils
11
12 DESCRIPTION="Web spider and website mirroring tool"
13 HOMEPAGE="http://www.pavuk.org/"
14 SRC_URI="https://dev.gentoo.org/~pacho/maintainer-needed/${P}.tar.xz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
19 IUSE="debug gtk hammer ipv6 nls pcre profile ssl"
20
21 RDEPEND="virtual/libintl:=
22         gtk? ( x11-libs/gtk+:2 )
23         pcre? ( dev-libs/libpcre:= )
24         ssl? ( dev-libs/openssl:= )"
25 DEPEND="${RDEPEND}
26         >=sys-apps/sed-4
27         sys-devel/gettext"
28
29 PATCHES=(
30         # Fixes a bug in re.c for PCRE support
31         "${FILESDIR}/${P}-pcre-fix.patch"
32
33         # Fixes underlinking, bug #405337
34         "${FILESDIR}/${P}-fix-underlinking.patch"
35
36         # Fixes a segfault in the GTK+2 interface on amd64, bug #262504#c40
37         "${FILESDIR}/${P}-fix-gtkmulticol-segfault.patch"
38
39         # Fixed overflow, bug #450990
40         "${FILESDIR}/${P}-tl_selectr-overflow-fix.patch"
41 )
42
43 DOCS=( README CREDITS NEWS AUTHORS BUGS TODO MAILINGLIST wget-pavuk.HOWTO
44                 ChangeLog wget-pavuk.HOWTO pavuk_authinfo.sample pavukrc.sample )
45
46 src_prepare() {
47         # Fixes a bug in Makefile.am that causes aclocal to fail
48         sed -i 's/^\(ACLOCAL_AMFLAGS[[:space:]]*=[[:space:]]*-I[[:space:]]*\)\$(top_srcdir)\//\1/' "${S}/Makefile.am" || die
49
50         # Fixes a bug in configure.in that breaks non-debug builds
51         sed -i 's/\([[:space:]]C\(PP\)*FLAGS=`\)/true; # \1/' "${S}/configure.in" || die
52
53         # Fix for building with ~dev-lang/spidermonkey-1.8.5
54         # sed -i 's/mozjs/mozjs185/g' "${S}/configure.in" || die
55
56         autotools-utils_src_prepare
57 }
58
59 src_configure() {
60         local regex="auto"
61         use pcre && regex="pcre"
62
63         local myeconfargs=(
64                         --enable-threads
65                         --enable-socks
66                         --enable-utf-8
67                         --disable-js
68                         "--with-regex=${regex}"
69                         $(use_enable gtk)
70                         $(use_enable gtk gtk2)
71                         $(use_enable gtk gnome)
72                         $(use_with gtk x)
73                         $(use_enable debug debugging)
74                         $(use_enable debug debug-build)
75                         # $(use_enable debug debug-features)
76                         $(use_enable ssl)
77                         $(use_enable nls)
78                         $(use_enable ipv6)
79                         # $(use_enable javascript js)
80                         $(use_enable profile profiling)
81         )
82
83         # JavaScript bindings: Broken!
84         # ============================
85         # Currently could pass configure phase with ~dev-lang/spidermonkey-1.8.5
86         # yet apparently incompatible with recent versions of spidermonkey
87
88         # if use javascript; then
89         #       local jspkg='mozjs185'
90         #       local jsinclude=$(pkg-config --cflags "$jspkg")
91         #       local jslibs='/dev/null '$(pkg-config --libs-only-l "$jspkg")
92         #       myeconfargs+=(
93         #                       "--with-js-include=${jsinclude}"
94         #                       "--with-js-libraries=${jslibs}"
95         #                       )
96         # fi
97
98         autotools-utils_src_configure
99 }
100
101 src_install() {
102         if use gtk; then
103                 newicon src/pavuk_logo.xpm pavuk.xpm
104                 domenu pavuk.desktop
105         fi
106
107         doman "${S}/doc/pavuk.1"
108
109         autotools-utils_src_install
110 }