summaryrefslogtreecommitdiff
path: root/net/tor
diff options
context:
space:
mode:
authorwiz <wiz>2015-12-11 12:13:00 +0000
committerwiz <wiz>2015-12-11 12:13:00 +0000
commit7abfcbd565ff19f9be9eb4a6b5490f50ee7cee76 (patch)
tree5c28c3c4c3148bc01289b92b30fa3b131b48c60e /net/tor
parent1931f189fd0260e948dabf77fdb20519509fa306 (diff)
downloadpkgsrc-7abfcbd565ff19f9be9eb4a6b5490f50ee7cee76.tar.gz
Fix two problems when building on NetBSD-6.x.
Mention upstream bug reports filed for them. Addresses PR 50521 by Uwe Toenjes. While here, add reload command to rc.d script and bump PKGREVISION.
Diffstat (limited to 'net/tor')
-rw-r--r--net/tor/Makefile5
-rw-r--r--net/tor/distinfo3
-rw-r--r--net/tor/files/tor.in4
-rw-r--r--net/tor/patches/patch-src_common_compat__pthreads.c22
4 files changed, 31 insertions, 3 deletions
diff --git a/net/tor/Makefile b/net/tor/Makefile
index dc2e224623b..756d5f6aa7f 100644
--- a/net/tor/Makefile
+++ b/net/tor/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.106 2015/12/08 13:19:38 wiz Exp $
+# $NetBSD: Makefile,v 1.107 2015/12/11 12:13:00 wiz Exp $
DISTNAME= tor-0.2.7.5
+PKGREVISION= 1
CATEGORIES= net security
MASTER_SITES= http://www.torproject.org/dist/
@@ -13,6 +14,8 @@ LICENSE= modified-bsd
USE_LANGUAGES= c99
USE_PKGLOCALEDIR= yes
+# https://trac.torproject.org/projects/tor/ticket/17818
+USE_TOOLS+= gmake
GNU_CONFIGURE= yes
CONFIGURE_ENV+= CPP=${CPP:Q}
diff --git a/net/tor/distinfo b/net/tor/distinfo
index 066481d8396..15eb6b52a09 100644
--- a/net/tor/distinfo
+++ b/net/tor/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.68 2015/12/08 13:19:38 wiz Exp $
+$NetBSD: distinfo,v 1.69 2015/12/11 12:13:00 wiz Exp $
SHA1 (tor-0.2.7.5.tar.gz) = ff099ddea9b33788d6f6ad8ed7f38479be197086
RMD160 (tor-0.2.7.5.tar.gz) = 964a3d0080684e159a85a2e257a4051667279e5d
SHA512 (tor-0.2.7.5.tar.gz) = c57b3ee6ecc36456182c7130db671c5581914cddf973c9460625cd5ecd10d128f3e4832f1520269f6ab145cc0dcb218df2a19fb659b778fb31d9f69de5362678
Size (tor-0.2.7.5.tar.gz) = 4838541 bytes
+SHA1 (patch-src_common_compat__pthreads.c) = 6c1be2f8e66e3796272eaad2d8a37ada6aa5e6ff
diff --git a/net/tor/files/tor.in b/net/tor/files/tor.in
index 20668310acc..6165b2aeb24 100644
--- a/net/tor/files/tor.in
+++ b/net/tor/files/tor.in
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: tor.in,v 1.4 2015/12/08 13:19:38 wiz Exp $
+# $NetBSD: tor.in,v 1.5 2015/12/11 12:13:00 wiz Exp $
#
# PROVIDE: tor
# REQUIRE: DAEMON NETWORKING
@@ -23,6 +23,7 @@ start_cmd="tor_start"
stop_cmd="tor_stop"
pidfile="@PKG_HOME@/${name}.pid"
restart_cmd="tor_stop ; tor_start"
+extra_commands="reload"
tor_start ()
{
@@ -42,3 +43,4 @@ then
else
eval ${start_cmd}
fi
+
diff --git a/net/tor/patches/patch-src_common_compat__pthreads.c b/net/tor/patches/patch-src_common_compat__pthreads.c
new file mode 100644
index 00000000000..1be6b88d0c9
--- /dev/null
+++ b/net/tor/patches/patch-src_common_compat__pthreads.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_common_compat__pthreads.c,v 1.1 2015/12/11 12:13:00 wiz Exp $
+
+Disable a function that is not there on NetBSD before 7.
+https://trac.torproject.org/projects/tor/ticket/17819
+
+--- src/common/compat_pthreads.c.orig 2015-11-13 13:33:25.000000000 +0000
++++ src/common/compat_pthreads.c
+@@ -186,12 +186,14 @@ tor_cond_init(tor_cond_t *cond)
+ }
+
+ #if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
++#if !defined(__NetBSD__) || (defined(__NetBSD__) && __NetBSD_Version__ > 699999999)
+ /* Use monotonic time so when we timedwait() on it, any clock adjustment
+ * won't affect the timeout value. */
+ if (pthread_condattr_setclock(&condattr, CLOCK_MONOTONIC)) {
+ return -1;
+ }
+ #endif
++#endif
+ if (pthread_cond_init(&cond->cond, &condattr)) {
+ return -1;
+ }