pkgsrc-Changes archive

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

CVS commit: pkgsrc/math/z3



Module Name:    pkgsrc
Committed By:   khorben
Date:           Tue Mar 13 21:20:34 UTC 2018

Modified Files:
        pkgsrc/math/z3: Makefile distinfo
Added Files:
        pkgsrc/math/z3/patches: patch-src_util_scoped__timer.cpp

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/math/z3/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/math/z3/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/math/z3/patches/patch-src_util_scoped__timer.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/math/z3/Makefile
diff -u pkgsrc/math/z3/Makefile:1.8 pkgsrc/math/z3/Makefile:1.9
--- pkgsrc/math/z3/Makefile:1.8 Tue Mar 13 00:31:16 2018
+++ pkgsrc/math/z3/Makefile     Tue Mar 13 21:20:34 2018
@@ -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"

Index: pkgsrc/math/z3/distinfo
diff -u pkgsrc/math/z3/distinfo:1.4 pkgsrc/math/z3/distinfo:1.5
--- pkgsrc/math/z3/distinfo:1.4 Tue Mar 13 00:31:16 2018
+++ pkgsrc/math/z3/distinfo     Tue Mar 13 21:20:34 2018
@@ -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) = 1ebc2c908d90b
 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

Added files:

Index: pkgsrc/math/z3/patches/patch-src_util_scoped__timer.cpp
diff -u /dev/null pkgsrc/math/z3/patches/patch-src_util_scoped__timer.cpp:1.1
--- /dev/null   Tue Mar 13 21:20:34 2018
+++ pkgsrc/math/z3/patches/patch-src_util_scoped__timer.cpp     Tue Mar 13 21:20:34 2018
@@ -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



Home | Main Index | Thread Index | Old Index