summaryrefslogtreecommitdiff
path: root/net/aria2
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2009-01-03 23:11:47 +0000
committerdholland <dholland@pkgsrc.org>2009-01-03 23:11:47 +0000
commit38b9661c7a642f07f803cb44fff083688cab0d9c (patch)
tree02d5e38e0fb1fdd17b29b44ad158c39fea906829 /net/aria2
parent7e90daa77bae20179ff4d43e907ac7a26a066e72 (diff)
downloadpkgsrc-38b9661c7a642f07f803cb44fff083688cab0d9c.tar.gz
Work around API bug in pre-christos-time_t NetBSD, where struct
timeval's seconds are "long" rather than "time_t". Passing these seconds to localtime_r() breaks on 64-bit platforms where those types aren't the same. Fixes PR 40323 from Andreas Burghardt. PKGREVISION++ as a precaution, since I patched the source.
Diffstat (limited to 'net/aria2')
-rw-r--r--net/aria2/Makefile3
-rw-r--r--net/aria2/distinfo3
-rw-r--r--net/aria2/patches/patch-aa17
3 files changed, 21 insertions, 2 deletions
diff --git a/net/aria2/Makefile b/net/aria2/Makefile
index acaa09ccaef..8617740b75e 100644
--- a/net/aria2/Makefile
+++ b/net/aria2/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.16 2008/10/29 01:04:06 bjs Exp $
+# $NetBSD: Makefile,v 1.17 2009/01/03 23:11:47 dholland Exp $
#
DISTNAME= aria2c-0.16.2
PKGNAME= ${DISTNAME:S/+/./:S/2c-/2-/}
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=aria2/}
EXTRACT_SUFX= .tar.bz2
diff --git a/net/aria2/distinfo b/net/aria2/distinfo
index 8f96b13022e..5dedef321d7 100644
--- a/net/aria2/distinfo
+++ b/net/aria2/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.14 2008/10/29 01:04:06 bjs Exp $
+$NetBSD: distinfo,v 1.15 2009/01/03 23:11:47 dholland Exp $
SHA1 (aria2c-0.16.2.tar.bz2) = 244d51c91771bf440009bb33c360f258913812ac
RMD160 (aria2c-0.16.2.tar.bz2) = e3c124ac20501163792fe5ceb820da3d801ffc83
Size (aria2c-0.16.2.tar.bz2) = 1153881 bytes
+SHA1 (patch-aa) = ef972e61740c7b95ca2441e6899ddadab45f51de
diff --git a/net/aria2/patches/patch-aa b/net/aria2/patches/patch-aa
new file mode 100644
index 00000000000..8fe21fea110
--- /dev/null
+++ b/net/aria2/patches/patch-aa
@@ -0,0 +1,17 @@
+$NetBSD: patch-aa,v 1.6 2009/01/03 23:11:47 dholland Exp $
+
+--- src/SimpleLogger.cc~ 2008-10-19 11:16:24.000000000 -0400
++++ src/SimpleLogger.cc 2009-01-03 17:46:14.000000000 -0500
+@@ -147,7 +147,12 @@ void SimpleLogger::writeLog(std::ostream
+ gettimeofday(&tv, 0);
+ char datestr[27]; // 'YYYY-MM-DD hh:mm:ss.uuuuuu'+'\0' = 27 bytes
+ struct tm tm;
++#ifdef __NetBSD__ /* work around API bug on 64-bit platforms in netbsd<6.0 */
++ time_t tmp = tv.tv_sec;
++ localtime_r(&tmp, &tm);
++#else
+ localtime_r(&tv.tv_sec, &tm);
++#endif
+ size_t dateLength =
+ strftime(datestr, sizeof(datestr), "%Y-%m-%d %H:%M:%S", &tm);
+ assert(dateLength <= (size_t)20);