diff options
author | maya <maya@pkgsrc.org> | 2017-03-28 18:44:49 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2017-03-28 18:44:49 +0000 |
commit | 6af8d64116a5da95027b9917112f37e135a600d8 (patch) | |
tree | 1884262c4a7137477a1d6b5d8d6e4a6610f89ea1 /devel | |
parent | 46df0897523cdb6bb9ce21fc4bce8794ff9378d3 (diff) | |
download | pkgsrc-6af8d64116a5da95027b9917112f37e135a600d8.tar.gz |
libuv: add and use autoconf test for pthread_condattr_setclock.
This call is absent in netbsd-6-0. libuv built anyway, but it later died
with undefined references in cmake.
I read outdated information and assumed that the previous attempt at
fixing the problem did not make a functional change, but it did.
pthread_condattr_setclock does have an effect on netbsd.
bump PKGREVISION so it is rebuilt, and for previous functional change.
thanks joerg and riastradh for clearing things up.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libuv/Makefile | 3 | ||||
-rw-r--r-- | devel/libuv/distinfo | 5 | ||||
-rw-r--r-- | devel/libuv/patches/patch-configure.ac | 14 | ||||
-rw-r--r-- | devel/libuv/patches/patch-src_unix_thread.c | 10 |
4 files changed, 23 insertions, 9 deletions
diff --git a/devel/libuv/Makefile b/devel/libuv/Makefile index 8b315927c9e..270c91b445e 100644 --- a/devel/libuv/Makefile +++ b/devel/libuv/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.13 2017/02/07 12:59:33 wiz Exp $ +# $NetBSD: Makefile,v 1.14 2017/03/28 18:44:49 maya Exp $ DISTNAME= libuv-1.11.0 +PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GITHUB:=libuv/} diff --git a/devel/libuv/distinfo b/devel/libuv/distinfo index 04feff9ec04..b5feac9da8a 100644 --- a/devel/libuv/distinfo +++ b/devel/libuv/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.13 2017/03/27 15:34:00 maya Exp $ +$NetBSD: distinfo,v 1.14 2017/03/28 18:44:49 maya Exp $ SHA1 (libuv-1.11.0.tar.gz) = 54f0972aa0d3f6a6036d477b381c01f030f9a2b5 RMD160 (libuv-1.11.0.tar.gz) = f2ed5e5c457a66625875d9fcd56584feebc94268 SHA512 (libuv-1.11.0.tar.gz) = fb0415d62a32cfc658bad6c849263ac236d27e9188fac603467173a5ae34fb3ad3e3bfd333e543ebd98b4fd59e0a58a93275e830c4365c058b62bb0c2c802732 Size (libuv-1.11.0.tar.gz) = 1083067 bytes SHA1 (patch-autogen.sh) = a5f48189bfb17624c545a80626ea311b7755d232 +SHA1 (patch-configure.ac) = e6636d522dc9218fc9aee62846426645473cb6cd SHA1 (patch-src_unix_fs.c) = 21fffa99df9528aedee0c6fe299d28ff5110d2ba -SHA1 (patch-src_unix_thread.c) = 8f7aeb216cef32648c70df7abc7bba2bade9b1b8 +SHA1 (patch-src_unix_thread.c) = 6ceab7f30d6bb158ee22b6ca286918dc88204a9c diff --git a/devel/libuv/patches/patch-configure.ac b/devel/libuv/patches/patch-configure.ac new file mode 100644 index 00000000000..c6af9c7fcb7 --- /dev/null +++ b/devel/libuv/patches/patch-configure.ac @@ -0,0 +1,14 @@ +$NetBSD: patch-configure.ac,v 1.1 2017/03/28 18:44:49 maya Exp $ + +Add feature-test for pthread_condattr_setclock absent in netbsd-6-0 + +--- configure.ac.orig 2017-02-01 00:38:56.000000000 +0000 ++++ configure.ac +@@ -46,6 +46,7 @@ AC_CHECK_LIB([kvm], [kvm_open]) + AC_CHECK_LIB([nsl], [gethostbyname]) + AC_CHECK_LIB([perfstat], [perfstat_cpu]) + AC_CHECK_LIB([pthread], [pthread_mutex_init]) ++AC_CHECK_LIB([pthread], [pthread_condattr_setclock], AC_DEFINE(HAVE_PTHREAD_CONDATTR_SETCLOCK)) + AC_CHECK_LIB([rt], [clock_gettime]) + AC_CHECK_LIB([sendfile], [sendfile]) + AC_CHECK_LIB([socket], [socket]) diff --git a/devel/libuv/patches/patch-src_unix_thread.c b/devel/libuv/patches/patch-src_unix_thread.c index a939c160e30..1f0b77624ca 100644 --- a/devel/libuv/patches/patch-src_unix_thread.c +++ b/devel/libuv/patches/patch-src_unix_thread.c @@ -1,8 +1,6 @@ -$NetBSD: patch-src_unix_thread.c,v 1.1 2017/03/27 15:34:00 maya Exp $ +$NetBSD: patch-src_unix_thread.c,v 1.2 2017/03/28 18:44:49 maya Exp $ -Don't use pthread_condattr_setclock on NetBSD. It's effectively -a no-op, and doesn't exist on NetBSD<7 leading to undefined refs -in building cmake. +Use feature test for pthread_condattr_setclock, absent in netbsd-6-0 --- src/unix/thread.c.orig 2017-02-01 00:38:56.000000000 +0000 +++ src/unix/thread.c @@ -11,8 +9,8 @@ in building cmake. return -err; -#if !(defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)) -+#if !(defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)) && \ -+ !(defined(__NetBSD__)) ++#if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && \ ++ (!defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)) err = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); if (err) goto error2; |