summaryrefslogtreecommitdiffstats
path: root/net-misc/d4x/d4x-2.5.7.1-r3.ebuild
blob: 78c672543514770043a2f36c59cc5d3b34315ba1 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/d4x/d4x-2.5.7.1-r2.ebuild,v 1.4 2007/11/14 15:20:17 armin76 Exp $

inherit eutils flag-o-matic

DESCRIPTION="GTK based download manager for X."
HOMEPAGE="http://www.krasu.ru/soft/chuchelo"
SRC_URI="http://d4x.krasu.ru/files/${P}.tar.bz2"

KEYWORDS="amd64 ~ppc sparc x86"
SLOT="0"
LICENSE="Artistic"
IUSE="ao esd nls oss ssl"

RDEPEND=">=x11-libs/gtk+-2
	dev-libs/boost
	ssl? ( dev-libs/openssl )
	!ao? ( esd? ( media-sound/esound ) )
	ao? ( media-libs/libao )"
DEPEND="${RDEPEND}
	dev-util/pkgconfig
	nls? ( sys-devel/gettext dev-util/intltool )"

pkg_setup() {
	use ao && ewarn "Selecting USE ao will disable oss and esd."
}

src_unpack() {
	unpack ${A}
	cd "${S}"
	# Bugs #111769, #130479 and #193360 plus more.
	epatch "${FILESDIR}"/${P}-gentoo.patch || die
	epatch "${FILESDIR}"/d4x-2.5.7.1-ds-compile.patch || die
	epatch "${FILESDIR}"/d4x-ds-X.diff || die
}

src_compile() {
	append-flags -D_FILE_OFFSET_BITS=64

	econf $(use_enable nls) \
		$(use_enable esd) \
		$(use_enable oss) \
		$(use_enable ssl openssl) \
		$(use_enable ao libao)

	emake OPTFLAGS="${CXXFLAGS}" || die "emake failed."
}

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

	dodoc AUTHORS ChangeLog* NEWS README PLANS TODO
	docinto doc
	dodoc DOC/{FAQ*,README*,THANKS,TROUBLES}
	doman DOC/nt.1

	newicon share/nt.xpm ${PN}.xpm
	make_desktop_entry ${PN} ${PN} ${PN}
}