# ChangeLog for net-misc/aria2
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/aria2/ChangeLog,v 1.9 2007/01/06 11:11:08 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/aria2/ChangeLog,v 1.10 2007/01/10 21:30:45 dev-zero Exp $
+
+*aria2-0.9.0-r1 (10 Jan 2007)
+
+ 10 Jan 2007; Tiziano Müller <dev-zero@gentoo.org>
+ +files/aria2-0.9.0-isalpha_exception.patch, -aria2-0.9.0.ebuild,
+ +aria2-0.9.0-r1.ebuild:
+ Added patch to fix bittorrent exception issue (thanks to Daniel Lange).
06 Jan 2007; Tiziano Müller <dev-zero@gentoo.org> -aria2-0.8.1.ebuild:
Dropped old version
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/aria2/aria2-0.9.0-r1.ebuild,v 1.1 2007/01/10 21:30:45 dev-zero Exp $
+
+inherit eutils
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+DESCRIPTION="A download utility with resuming and segmented downloading with HTTP/HTTPS/FTP/BitTorrent support."
+HOMEPAGE="http://aria2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ares bittorrent gnutls metalink nls ssl"
+
+# Tests are still broken
+RESTRICT="test"
+
+CDEPEND="ssl? (
+ gnutls? ( net-libs/gnutls )
+ !gnutls? ( dev-libs/openssl ) )
+ ares? ( >=net-dns/c-ares-1.3.1 )
+ bittorrent? ( gnutls? ( dev-libs/libgcrypt ) )
+ metalink? ( >=dev-libs/libxml2-2.6.26 )"
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libiconv virtual/libintl )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-isalpha_exception.patch"
+}
+
+src_compile() {
+ use ssl && \
+ myconf="${myconf} $(use_with gnutls) $(use_with !gnutls openssl)"
+
+ # Note:
+ # - we don't have ares, only libcares
+ # - depends on libgcrypt only when using openssl
+ econf \
+ $(use_enable nls) \
+ $(use_enable metalink) \
+ $(use_enable bittorrent) \
+ --without-ares \
+ $(use_with ares libcares) \
+ $(use_with metalink libxml2) \
+ ${myconf} \
+ || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc ChangeLog README AUTHORS TODO NEWS
+}
--- /dev/null
+*** aria2-0.9.0/src/Util.cc 2006-11-06 00:04:17.000000000 +0900
+--- aria2-0.9.0+1/src/Util.cc 2007-01-11 01:55:24.000000000 +0900
+***************
+*** 213,219 ****
+ string Util::torrentUrlencode(const unsigned char* target, int len) {
+ string dest;
+ for(int i = 0; i < len; i++) {
+! if(isalpha(target[i]) || isdigit(target[i])) {
+ dest += target[i];
+ } else {
+ char temp[4];
+--- 213,221 ----
+ string Util::torrentUrlencode(const unsigned char* target, int len) {
+ string dest;
+ for(int i = 0; i < len; i++) {
+! if('0' <= target[i] && target[i] <= '9' ||
+! 'A' <= target[i] && target[i] <= 'Z' ||
+! 'a' <= target[i] && target[i] <= 'z') {
+ dest += target[i];
+ } else {
+ char temp[4];
+
+