pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/libuv libuv: add and use autoconf test for pthre...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f4e8cd141a72
branches:  trunk
changeset: 360196:f4e8cd141a72
user:      maya <maya%pkgsrc.org@localhost>
date:      Tue Mar 28 18:44:49 2017 +0000

description:
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:

 devel/libuv/Makefile                        |   3 ++-
 devel/libuv/distinfo                        |   5 +++--
 devel/libuv/patches/patch-configure.ac      |  14 ++++++++++++++
 devel/libuv/patches/patch-src_unix_thread.c |  10 ++++------
 4 files changed, 23 insertions(+), 9 deletions(-)

diffs (71 lines):

diff -r 34b009ae6802 -r f4e8cd141a72 devel/libuv/Makefile
--- a/devel/libuv/Makefile      Tue Mar 28 16:21:21 2017 +0000
+++ b/devel/libuv/Makefile      Tue Mar 28 18:44:49 2017 +0000
@@ -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 -r 34b009ae6802 -r f4e8cd141a72 devel/libuv/distinfo
--- a/devel/libuv/distinfo      Tue Mar 28 16:21:21 2017 +0000
+++ b/devel/libuv/distinfo      Tue Mar 28 18:44:49 2017 +0000
@@ -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 -r 34b009ae6802 -r f4e8cd141a72 devel/libuv/patches/patch-configure.ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libuv/patches/patch-configure.ac    Tue Mar 28 18:44:49 2017 +0000
@@ -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 -r 34b009ae6802 -r f4e8cd141a72 devel/libuv/patches/patch-src_unix_thread.c
--- a/devel/libuv/patches/patch-src_unix_thread.c       Tue Mar 28 16:21:21 2017 +0000
+++ b/devel/libuv/patches/patch-src_unix_thread.c       Tue Mar 28 18:44:49 2017 +0000
@@ -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 @@
      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;



Home | Main Index | Thread Index | Old Index