diff options
author | khorben <khorben@pkgsrc.org> | 2018-03-13 21:20:34 +0000 |
---|---|---|
committer | khorben <khorben@pkgsrc.org> | 2018-03-13 21:20:34 +0000 |
commit | 4202bda83b0ce53fea187a579de4f8d62c14d519 (patch) | |
tree | 048abba2979167ec66fc8c3edd3d6e6f430fda5e /math/z3 | |
parent | 9c669e8b9b5e8d7c487bfc9e5654f8f3a9b02f11 (diff) | |
download | pkgsrc-4202bda83b0ce53fea187a579de4f8d62c14d519.tar.gz |
Re-introduce support for NetBSD in src/util/scoped_timer.cpp
I forgot to patch this part in the latest update; sorry.
This has now been submitted upstream as well.
Originally from dholland@.
Compile-tested on NetBSD/amd64.
Bump PKGREVISION.
Diffstat (limited to 'math/z3')
-rw-r--r-- | math/z3/Makefile | 3 | ||||
-rw-r--r-- | math/z3/distinfo | 3 | ||||
-rw-r--r-- | math/z3/patches/patch-src_util_scoped__timer.cpp | 59 |
3 files changed, 63 insertions, 2 deletions
diff --git a/math/z3/Makefile b/math/z3/Makefile index afe8928e34e..036047ace5d 100644 --- a/math/z3/Makefile +++ b/math/z3/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2018/03/13 00:31:16 khorben Exp $ +# $NetBSD: Makefile,v 1.9 2018/03/13 21:20:34 khorben Exp $ .include "Makefile.common" +PKGREVISION= 1 COMMENT= The Z3 theorem prover / SMT solver .include "options.mk" diff --git a/math/z3/distinfo b/math/z3/distinfo index 4029b25d2a6..165375bddb0 100644 --- a/math/z3/distinfo +++ b/math/z3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.4 2018/03/13 00:31:16 khorben Exp $ +$NetBSD: distinfo,v 1.5 2018/03/13 21:20:34 khorben Exp $ SHA1 (z3-4.5.0.tar.gz) = 6f4e94e025fcc2fa2896524d8fbb9de0b3033854 RMD160 (z3-4.5.0.tar.gz) = 81121307ac83f42989da49efda31964a94f7f5d5 @@ -6,4 +6,5 @@ SHA512 (z3-4.5.0.tar.gz) = 1ebc2c908d90b6b879f1e819c864ff894613276af47a440f27cf9 Size (z3-4.5.0.tar.gz) = 3573695 bytes SHA1 (patch-configure) = 8d5fe787f15fe781c3c23cee27058f898de8c95e SHA1 (patch-scripts_mk__util.py) = f0a7cfabdbf9b6c1eb92e75f381d8a3f8a088d35 +SHA1 (patch-src_util_scoped__timer.cpp) = 68e0bdee94d54c93f3d493bf71abebcdccd921ba SHA1 (patch-src_util_stopwatch.h) = dbeab175ed4f507d5378f1966f8ed173c4c9a9a7 diff --git a/math/z3/patches/patch-src_util_scoped__timer.cpp b/math/z3/patches/patch-src_util_scoped__timer.cpp new file mode 100644 index 00000000000..a8a93201b6f --- /dev/null +++ b/math/z3/patches/patch-src_util_scoped__timer.cpp @@ -0,0 +1,59 @@ +$NetBSD: patch-src_util_scoped__timer.cpp,v 1.1 2018/03/13 21:20:34 khorben Exp $ + +Add support for NetBSD. + +--- src/util/scoped_timer.cpp.orig 2016-11-07 22:02:30.000000000 +0000 ++++ src/util/scoped_timer.cpp +@@ -33,8 +33,8 @@ Revision History: + #include<sys/time.h> + #include<sys/errno.h> + #include<pthread.h> +-#elif defined(_LINUX_) || defined(_FREEBSD_) +-// Linux ++#elif defined(_LINUX_) || defined(_FREEBSD_) || defined(_NETBSD_) ++// Linux & FreeBSD & NetBSD + #include<errno.h> + #include<pthread.h> + #include<sched.h> +@@ -66,8 +66,8 @@ struct scoped_timer::imp { + pthread_mutex_t m_mutex; + pthread_cond_t m_condition_var; + struct timespec m_end_time; +-#elif defined(_LINUX_) || defined(_FREEBSD_) +- // Linux & FreeBSD ++#elif defined(_LINUX_) || defined(_FREEBSD_) || defined(_NETBSD_) ++ // Linux & FreeBSD & NetBSD + pthread_t m_thread_id; + pthread_mutex_t m_mutex; + pthread_cond_t m_cond; +@@ -103,7 +103,7 @@ struct scoped_timer::imp { + + return st; + } +-#elif defined(_LINUX_) || defined(_FREEBSD_) ++#elif defined(_LINUX_) || defined(_FREEBSD_) || defined(_NETBSD_) + static void* thread_func(void *arg) { + scoped_timer::imp *st = static_cast<scoped_timer::imp*>(arg); + +@@ -166,8 +166,8 @@ struct scoped_timer::imp { + + if (pthread_create(&m_thread_id, &m_attributes, &thread_func, this) != 0) + throw default_exception("failed to start timer thread"); +-#elif defined(_LINUX_) || defined(_FREEBSD_) +- // Linux & FreeBSD ++#elif defined(_LINUX_) || defined(_FREEBSD_) || defined(_NETBSD_) ++ // Linux & FreeBSD & NetBSD + m_ms = ms; + m_initialized = false; + ENSURE(pthread_mutex_init(&m_mutex, NULL) == 0); +@@ -206,8 +206,8 @@ struct scoped_timer::imp { + throw default_exception("failed to destroy pthread condition variable"); + if (pthread_attr_destroy(&m_attributes) != 0) + throw default_exception("failed to destroy pthread attributes object"); +-#elif defined(_LINUX_) || defined(_FREEBSD_) +- // Linux & FreeBSD ++#elif defined(_LINUX_) || defined(_FREEBSD_) || defined(_NETBSD_) ++ // Linux & FreeBSD & NetBSD + bool init = false; + + // spin until timer thread has been created |