summaryrefslogtreecommitdiff
blob: fdb42a3db2659daba78279abc7a7e20cc365a4fa (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-mail/freepops/freepops-0.2.9.ebuild,v 1.1 2009/01/03 07:13:39 dragonheart Exp $

EAPI=2
inherit eutils toolchain-funcs

DESCRIPTION="WebMail->POP3 converter and more"
HOMEPAGE="http://freepops.sourceforge.net/"
SRC_URI="mirror://sourceforge/freepops/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="gnutls"

DEPEND=">=net-misc/curl-7.10.8
		gnutls? ( net-libs/gnutls
					dev-libs/libgcrypt )
		!gnutls? ( dev-libs/openssl )
		>=dev-lang/lua-5.1.3[deprecated]"
RDEPEND="${DEPEND}
		sys-apps/debianutils
		dev-util/dialog"
# bug #247280 - freepops-updater-dialog requires the /bin/tempfile executable in the
# sys-apps/debianutils package
#	doc? ( app-text/ghostscript-gpl app-text/tetex )"

#pkg_setup() {
#	if has_version '>dev-lang/lua-5.1.3' && ! built_with_use dev-lang/lua deprecated; then
#		eerror 'This package uses the deprecated functions of lua'
#		die 'please compile dev-lang/lua with USE=deprecated'
#	fi
#}

src_prepare() {
	sed -i -e '/PKGCONFIG lua/s/5.1//g' configure.sh
	epatch "${FILESDIR}"/${PN}-0.2.3-pop3config.diff
}

src_configure() {
	tc-export CC CXX LD AR STRIP RANLIB
	# note fbsd and Darwin and osx targets exist here too
	if use gnutls; then
		./configure.sh linux-gnutls -lua || die "configure gnutls failed"
	else
		./configure.sh linux -lua || die "configure openssl failed"
	fi
	sed -i -e '/^WHERE=/s/=.*$/=\/usr\//' config
	sed -i -e 's:var/lib/:usr/share/:g' config.h Makefile
}

src_compile() {
	emake -j1 H= all || die "make failed"
	# Doesn't work
#	if use doc; then
#		cd doc/manual
#		emake -j1 pdf
#	fi
}

src_install() {
	emake -j1 install DESTDIR="${D}" || die
	mv "${D}"/usr/share/doc/${PN} "${D}"/usr/share/doc/${PF}
	dodoc AUTHORS README ChangeLog TODO

	newinitd buildfactory/gentoo/freePOPsd.initd freepopsd
	newconfd buildfactory/gentoo/freePOPsd.confd freepopsd
	domenu buildfactory/debian-ubuntu/freepops.desktop
	doicon modules/src/winsystray/freepops-32.xpm
	doicon modules/src/winsystray/freepops-16.xpm
}