pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/aria2 Import aria2 0.11.3 (patched to stable-0.11 ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5fc664a84f0a
branches:  trunk
changeset: 534341:5fc664a84f0a
user:      bjs <bjs%pkgsrc.org@localhost>
date:      Wed Oct 17 09:42:39 2007 +0000

description:
Import aria2 0.11.3 (patched to stable-0.11 branch).

        aria2 is a download utility with resuming and segmented downloading.
        Supported protocols are HTTP/HTTPS/FTP/BitTorrent; it also supports
        MetaLink 3.0.

        Some of its features:

        * Command-line interface
        * Download files through HTTP/HTTPS/FTP/BitTorrent
        * HTTP Proxy support
        * FTP through HTTP Proxy
        * HTTP BASIC authentication support
        * HTTP Proxy authentication support
        * Segmented downloading
        * Download speed throttling
        * Upload speed throttling in BitTorrent
        * Cookie support
        * Load Cookies from file whose format is one used by Netscape and
          Mozilla.
        * Run as a daemon process.
        * Selective download in multi-file torrent/metalink
        * BitTorrent Fast extension support
        * Multi-tracker support
        * Metalink version 3.0 support(HTTP/FTP/BitTorrent)
        * Chunk checksum validation in Metalink
        * Can disable segmented downloading in Metalink
        * netrc support
        * Configuration file support
        * Download URIs found in a text file or stdin
        * Parameterized URI support

diffstat:

 net/aria2/DESCR            |  10 ++++++++
 net/aria2/Makefile         |  41 ++++++++++++++++++++++++++++++++++++
 net/aria2/PLIST            |   7 ++++++
 net/aria2/distinfo         |  19 ++++++++++++++++
 net/aria2/options.mk       |  51 +++++++++++++++++++++++++++++++++++++++++++++
 net/aria2/patches/patch-aa |  13 +++++++++++
 net/aria2/patches/patch-ab |  38 +++++++++++++++++++++++++++++++++
 net/aria2/patches/patch-ac |  13 +++++++++++
 net/aria2/patches/patch-ad |  13 +++++++++++
 net/aria2/patches/patch-ae |   9 +++++++
 net/aria2/patches/patch-af |  52 ++++++++++++++++++++++++++++++++++++++++++++++
 net/aria2/patches/patch-ag |  13 +++++++++++
 net/aria2/patches/patch-ah |  29 +++++++++++++++++++++++++
 net/aria2/patches/patch-ai |  13 +++++++++++
 net/aria2/patches/patch-aj |  35 ++++++++++++++++++++++++++++++
 net/aria2/patches/patch-ak |  14 ++++++++++++
 net/aria2/patches/patch-al |  13 +++++++++++
 net/aria2/patches/patch-am |  12 ++++++++++
 net/aria2/patches/patch-an |  35 ++++++++++++++++++++++++++++++
 19 files changed, 430 insertions(+), 0 deletions(-)

diffs (truncated from 506 to 300 lines):

diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/DESCR   Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,10 @@
+aria2 is a utility for downloading files. It has completely new design
+concept from its predecessor, Aria, and is written from scratch. aria2
+has a segmented downloading engine in its core. It can download one
+file from multiple URLs or multiple connections from one URL. This
+results in very high speed downloading, much faster than ordinary
+browsers. This engine in was implemented in a single-thread model. The
+architecture is clean and easy to extend. aria2 currently supports
+HTTP, FTP, and BitTorrent. It also supports Metalink version 3.0.
+
+Please visit the project web site at http://aria2.sourceforge.net
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/Makefile        Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,41 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+#
+
+DISTNAME=      aria2-0.11.3
+PKGREVISION=   2
+CATEGORIES=    net
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=aria2/}
+EXTRACT_SUFX=  .tar.bz2
+
+MAINTAINER=    bjs%NetBSD.org@localhost
+HOMEPAGE=      http://aria2.sourceforge.net/
+COMMENT=       Multithreaded download accelerator
+
+PKG_DESTDIR_SUPPORT=   user-destdir
+
+GNU_CONFIGURE=         yes
+USE_LIBTOOL=           yes
+USE_PKGLOCALEDIR=      yes
+USE_LANGUAGES=         c c++
+
+CONFIGURE_ARGS+=       --enable-bittorrent
+CONFIGURE_ARGS+=       --with-included-gettext=no
+
+TEST_TARGET=           check
+
+.include "options.mk"
+
+.include "../../mk/compiler.mk"
+
+.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss])
+BUILDLINK_DEPMETHOD.cppunit?=  build
+.  include "../../devel/cppunit/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=       --disable-xmltest
+.endif 
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/libgetopt/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/PLIST   Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+bin/aria2c
+man/man1/aria2c.1
+share/locale/de/LC_MESSAGES/aria2c.mo
+share/locale/fr/LC_MESSAGES/aria2c.mo
+share/locale/ja/LC_MESSAGES/aria2c.mo
+share/locale/ru/LC_MESSAGES/aria2c.mo
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/distinfo        Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,19 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+
+SHA1 (aria2-0.11.3.tar.bz2) = bce3c6e8ca732f41736c2f81d3e69784a74817d5
+RMD160 (aria2-0.11.3.tar.bz2) = 29742d22763abefe46854a3ff99ec1634e6fb92a
+Size (aria2-0.11.3.tar.bz2) = 530059 bytes
+SHA1 (patch-aa) = ef192d6a098e59a2edf34bd693ae3f3b27567db8
+SHA1 (patch-ab) = 0f50a78ce703fef9bcd63eebeeee8f176d5886e3
+SHA1 (patch-ac) = f353c48182cc32c467078eb5339c0c8a2930f0b7
+SHA1 (patch-ad) = b7aab1c576f01f8fbe5b87e8ee5dee04b0fadd43
+SHA1 (patch-ae) = d247426fb4279ac91e6d21cfd421c0be9bd6b34a
+SHA1 (patch-af) = 946f329f17b41ca922bf8e95610f1d80cbbd32d3
+SHA1 (patch-ag) = b85662d4626ab1c7ff9ed00c1636800d8aa76b09
+SHA1 (patch-ah) = 9ad3b1ea037abc3758215238827bdfc673ed7301
+SHA1 (patch-ai) = 09b10ce2907d31ae1a88540d898feda14389d58b
+SHA1 (patch-aj) = d04c063c8cc857a3e912a7636873efe66116703a
+SHA1 (patch-ak) = 25689a271064f43867e25c518460ac7d025eaa24
+SHA1 (patch-al) = 468d16be3d9072a38fe3aec4af09bc257f03ebde
+SHA1 (patch-am) = 32e84f8269956c6b93cd4602885485d6177d4576
+SHA1 (patch-an) = 14db2deb67f38fbe7a8c3835968063796722d344
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/options.mk      Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,51 @@
+# $NetBSD: options.mk,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.aria2
+
+PKG_OPTIONS_GROUP.tls=                 gnutls ssl
+PKG_OPTIONS_GROUP.asyncns=     libares libcares
+
+PKG_OPTIONS_REQUIRED_GROUPS=   tls asyncns
+
+PKG_SUPPORTED_OPTIONS+=                aria2-metalink
+PKG_SUGGESTED_OPTIONS+=                ssl libcares aria2-metalink
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mssl)
+CONFIGURE_ARGS+=               --with-openssl
+CONFIGURE_ARGS+=               --without-gnutls
+
+.include "../../security/openssl/buildlink3.mk"
+
+.else
+CONFIGURE_ARGS+=               --with-gnutls
+CONFIGURE_ARGS+=               --without-openssl
+
+.include "../../security/gnutls/buildlink3.mk"
+
+.endif
+
+.if !empty(PKG_OPTIONS:Mlibcares)
+CONFIGURE_ARGS+=       --with-libcares-prefix=${BUILDLINK_PREFIX.libcares:Q}
+
+.include "../../net/libcares/buildlink3.mk"
+
+.elif !empty(PKG_OPTIONS:Mlibares)
+CONFIGURE_ARGS+=       --with-libares-prefix=${BUILDLINK_PREFIX.libares:Q}
+
+.endif
+
+
+.if !empty(PKG_OPTIONS:Maria2-metalink)
+CONFIGURE_ARGS+=       --with-libxml2
+CONFIGURE_ARGS+=       --enable-metalink
+CONFIGURE_ARGS+=       --with-xml-prefix=${BULDLINK_PREFIX.libxml2:Q}
+
+.include "../../textproc/libxml2/buildlink3.mk"
+
+.else
+CONFIGURE_ARGS+=       --without-libxml2
+CONFIGURE_ARGS+=       --disable-metalink
+
+.endif
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/patches/patch-aa        Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+
+--- src/DefaultBtProgressInfoFile.cc.orig      2007-09-01 12:10:30.000000000 -0400
++++ src/DefaultBtProgressInfoFile.cc
+@@ -92,7 +92,7 @@ void DefaultBtProgressInfoFile::save() {
+                       filename.c_str(), strerror(errno));
+   }
+ 
+-  if(rename(filenameTemp.c_str(), filename.c_str()) == -1) {
++  if(!File(filenameTemp).renameTo(filename)) {
+     throw new DlAbortEx(EX_SEGMENT_FILE_WRITE,
+                       filename.c_str(), strerror(errno));
+   }
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/patches/patch-ab        Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+
+--- src/File.cc.orig   2007-08-28 12:36:33.000000000 -0400
++++ src/File.cc
+@@ -37,6 +37,11 @@
+ #include "a2io.h"
+ #include <libgen.h>
+ 
++#ifdef __MINGW32__
++# define WIN32_LEAN_AND_MEAN
++# include <windows.h>
++#endif // __MINGW32__
++
+ File::File(const string& name):name(name) {}
+ 
+ File::~File() {}
+@@ -140,3 +145,21 @@ bool File::isDir(const string& filename)
+ {
+   return File(filename).isDir();
+ }
++
++bool File::renameTo(const string& dest)
++{
++#ifdef __MINGW32__
++  /* MinGW's rename() doesn't delete an existing destination */
++  if (_access(dest.c_str(), 0) == 0) {
++    if (_unlink(dest.c_str()) != 0) {
++      return false;
++    }
++  }
++#endif // __MINGW32__
++  if(rename(name.c_str(), dest.c_str()) == 0) {
++    name = dest;
++    return true;
++  } else {
++    return false;
++  }
++}
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/patches/patch-ac        Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+
+--- src/File.h.orig    2007-08-28 12:36:33.000000000 -0400
++++ src/File.h
+@@ -96,6 +96,8 @@ public:
+   string getDirname() const;
+ 
+   static bool isDir(const string& filename);
++
++  bool renameTo(const string& dest);
+ };
+ 
+ #endif // _D_FILE_H_
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/patches/patch-ad        Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+
+--- src/SegmentMan.cc.orig     2007-09-01 12:10:30.000000000 -0400
++++ src/SegmentMan.cc
+@@ -143,7 +143,7 @@ void SegmentMan::save() const {
+                       segFilename.c_str(), strerror(errno));
+   }
+ 
+-  if(rename(segFilenameTemp.c_str(), segFilename.c_str()) == -1) {
++  if(!File(segFilenameTemp).renameTo(segFilename)) {
+     throw new DlAbortEx(EX_SEGMENT_FILE_WRITE,
+                       segFilename.c_str(), strerror(errno));
+   }
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/patches/patch-ae        Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,9 @@
+$NetBSD: patch-ae,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+
+--- test/DefaultBtProgressInfoFileTest.cc.orig 2007-09-01 12:10:30.000000000 -0400
++++ test/DefaultBtProgressInfoFileTest.cc
+@@ -1,3 +1,4 @@
++#include <fstream>
+ #include "DefaultBtProgressInfoFile.h"
+ #include "DefaultBtContext.h"
+ #include "Option.h"
diff -r 2b926d04746e -r 5fc664a84f0a net/aria2/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/aria2/patches/patch-af        Wed Oct 17 09:42:39 2007 +0000
@@ -0,0 +1,52 @@
+$NetBSD: patch-af,v 1.1.1.1 2007/10/17 09:42:39 bjs Exp $
+
+--- test/FileTest.cc.orig      2007-08-28 12:36:33.000000000 -0400
++++ test/FileTest.cc
+@@ -3,6 +3,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <string>
++#include <fstream>
+ #include <cppunit/extensions/HelperMacros.h>
+ 
+ using namespace std;
+@@ -18,6 +19,7 @@ class FileTest:public CppUnit::TestFixtu
+   CPPUNIT_TEST(testMkdir);
+   CPPUNIT_TEST(testGetDirname);
+   CPPUNIT_TEST(testGetBasename);
++  CPPUNIT_TEST(testRenameTo);
+   CPPUNIT_TEST_SUITE_END();
+ private:
+ 
+@@ -33,6 +35,7 @@ public:
+   void testMkdir();
+   void testGetDirname();
+   void testGetBasename();
++  void testRenameTo();
+ };
+ 
+ 
+@@ -132,3 +135,23 @@ void FileTest::testGetBasename()
+   File f("/tmp/dist/aria2.tar.bz2");
+   CPPUNIT_ASSERT_EQUAL(string("aria2.tar.bz2"), f.getBasename());
+ }
++
++void FileTest::testRenameTo()
++{
++  string fname = "FileTest_testRenameTo.txt";
++  ofstream of(fname.c_str());
++  of.close();
++
++  File f(fname);
++  string fnameTo = "FileTest_testRenameTo_dest.txt";
++  CPPUNIT_ASSERT(f.renameTo(fnameTo));



Home | Main Index | Thread Index | Old Index