pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/qt5-qtbase qt5-qtbase: fix build on NetBSD < 6.1 (...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7d94f8082d30
branches:  trunk
changeset: 361669:7d94f8082d30
user:      maya <maya%pkgsrc.org@localhost>
date:      Mon Apr 24 12:27:58 2017 +0000

description:
qt5-qtbase: fix build on NetBSD < 6.1 (no pthread_condattr_setclock)
Invert logic from !defined && to defined || for simplicity and use
a netbsd version check.

diffstat:

 x11/qt5-qtbase/distinfo                                                  |   3 +-
 x11/qt5-qtbase/patches/patch-src_corelib_thread_qwaitcondition__unix.cpp |  27 ++++++++++
 2 files changed, 29 insertions(+), 1 deletions(-)

diffs (48 lines):

diff -r e207e1499eb3 -r 7d94f8082d30 x11/qt5-qtbase/distinfo
--- a/x11/qt5-qtbase/distinfo   Mon Apr 24 12:25:09 2017 +0000
+++ b/x11/qt5-qtbase/distinfo   Mon Apr 24 12:27:58 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2016/12/04 21:46:54 marino Exp $
+$NetBSD: distinfo,v 1.32 2017/04/24 12:27:58 maya Exp $
 
 SHA1 (qtbase-opensource-src-5.5.1.tar.xz) = 0b651543fa013ae151b7a11f0d0dee092050aa3f
 RMD160 (qtbase-opensource-src-5.5.1.tar.xz) = ce4bccd0703aaf8d904fbecd1f334ef13d698a44
@@ -23,6 +23,7 @@
 SHA1 (patch-src_corelib_io_qlockfile__unix.cpp) = f07812f0867bd04dfdea736847a668843a5fe646
 SHA1 (patch-src_corelib_io_qstandardpaths_unix.cpp) = de4b6c6be89524763e40698bcf5e8f413abdb938
 SHA1 (patch-src_corelib_io_qstorageinfo_unix.cpp) = 688de65bf3364cb8c982a7f82c9b67f5ecbebd10
+SHA1 (patch-src_corelib_thread_qwaitcondition__unix.cpp) = 331c3ced6554da7164a6927b0d8052447ae804d0
 SHA1 (patch-src_network_kernel_qhostinfo__unix.cpp) = 0335273353daa7c980ccb4febb6eed11b452e50d
 SHA1 (patch-src_openglextensions_openglextensions.pro) = e79effc1433ddda744b79d7e1f47764fee406580
 SHA1 (patch-src_platformsupport_devicediscovery_devicediscovery.pri) = 2cd24768b41c813d0aee0943f97f913308794611
diff -r e207e1499eb3 -r 7d94f8082d30 x11/qt5-qtbase/patches/patch-src_corelib_thread_qwaitcondition__unix.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/qt5-qtbase/patches/patch-src_corelib_thread_qwaitcondition__unix.cpp  Mon Apr 24 12:27:58 2017 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_corelib_thread_qwaitcondition__unix.cpp,v 1.1 2017/04/24 12:27:58 maya Exp $
+
+don't have pthread_condattr_setclock on NetBSD < 6.1, don't
+use it.
+
+--- src/corelib/thread/qwaitcondition_unix.cpp.orig    2015-10-13 04:35:30.000000000 +0000
++++ src/corelib/thread/qwaitcondition_unix.cpp
+@@ -45,6 +45,7 @@
+ 
+ #include <errno.h>
+ #include <sys/time.h>
++#include <sys/param.h>
+ #include <time.h>
+ 
+ #ifndef QT_NO_THREAD
+@@ -77,7 +78,10 @@ void qt_initialize_pthread_cond(pthread_
+ #if defined(Q_OS_ANDROID)
+     if (local_condattr_setclock && QElapsedTimer::clockType() == QElapsedTimer::MonotonicClock)
+         local_condattr_setclock(&condattr, CLOCK_MONOTONIC);
+-#elif !defined(Q_OS_MAC) && !defined(Q_OS_HAIKU)
++#elif (defined(Q_OS_NETBSD) && (__NetBSD_Version__ < 600010000)) || \
++    defined(Q_OS_MAC) || defined(Q_OS_HAIKU)
++    /* nothing, don't have pthread_condattr_setclock */
++#else
+     if (QElapsedTimer::clockType() == QElapsedTimer::MonotonicClock)
+         pthread_condattr_setclock(&condattr, CLOCK_MONOTONIC);
+ #endif



Home | Main Index | Thread Index | Old Index