56 lines
1.2 KiB
Bash
56 lines
1.2 KiB
Bash
# Copyright 1999-2006 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: $
|
|
|
|
inherit eutils
|
|
|
|
DESCRIPTION="aria2 is a download utility with resuming and segmented downloading."
|
|
HOMEPAGE="http://aria2.sourceforge.net/"
|
|
MY_P=${P/pre/p}
|
|
|
|
SRC_URI="mirror://sourceforge/${PN}/${MY_P/_p/+}.tar.bz2"
|
|
|
|
LICENSE="GPL-2"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~ppc ~x86"
|
|
IUSE="bittorrent gnutls metalink nls ssl"
|
|
|
|
RDEPEND="ssl? ( gnutls? ( net-libs/gnutls )
|
|
!gnutls? ( dev-libs/openssl ) )
|
|
bittorrent? ( gnutls? ( dev-libs/libgcrypt ) )
|
|
metalink? ( >=dev-libs/libxml2-2.6.26 )"
|
|
|
|
DEPEND="${RDEPEND}
|
|
nls? ( sys-devel/gettext )"
|
|
|
|
|
|
S="${WORKDIR}/${MY_P/_p/+}"
|
|
|
|
|
|
pkg_setup() {
|
|
if use bittorrent && (! use ssl && ! use gnutls); then
|
|
eerror "For bittorrent, you need either ssl or gnutls"
|
|
eerror "use flag enabled"
|
|
die "use flag inconsistency"
|
|
fi
|
|
}
|
|
|
|
src_compile () {
|
|
econf \
|
|
$(use_enable ssl) \
|
|
$(use_enable gnutls) \
|
|
$(use_enable bittorrent) \
|
|
$(use_enable metalink) \
|
|
$(use_enable nls) \
|
|
|| die
|
|
|
|
emake || die
|
|
}
|
|
|
|
src_install () {
|
|
make install DESTDIR=${D} || die "make install failed."
|
|
# einstall || die "einstall failed"
|
|
dodoc AUTHORS NEWS README TODO
|
|
|
|
}
|