<pre style='margin:0'>
Mark Evenson (easye) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/e5b44a273814eb5a05f780bf9fc22f94d0f487a8">https://github.com/macports/macports-ports/commit/e5b44a273814eb5a05f780bf9fc22f94d0f487a8</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new e5b44a27381 sbcl: add CLOCK_REALTIME
</span>e5b44a27381 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit e5b44a273814eb5a05f780bf9fc22f94d0f487a8
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Sun Nov 22 16:55:42 2020 -0800
<span style='display:block; white-space:pre;color:#404040;'> sbcl: add CLOCK_REALTIME
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> using legacysupport directly did not work
</span><span style='display:block; white-space:pre;color:#404040;'> possibly as this port does not use a
</span><span style='display:block; white-space:pre;color:#404040;'> configure phase and seems to santize it's
</span><span style='display:block; white-space:pre;color:#404040;'> environment during the build
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> so just patched it instead
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> closes: https://trac.macports.org/ticket/61384
</span>---
lang/sbcl/Portfile | 3 +-
lang/sbcl/files/patch-sbcl-realtime.diff | 58 ++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/Portfile b/lang/sbcl/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 70a2a2ad6d4..b4cc7fcb208 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -34,7 +34,8 @@ use_bzip2 yes
</span>
patchfiles \
patch-contrib-sb-posix-posix-tests.lisp.diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-use-right-gcc.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-use-right-gcc.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-sbcl-realtime.diff
</span>
distfiles ${name}-${version}-source${extract.suffix}:sbcl
worksrcdir ${name}-${version}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-sbcl-realtime.diff b/lang/sbcl/files/patch-sbcl-realtime.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..7f83d79ab76
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/patch-sbcl-realtime.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,58 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/runtime/runtime.c.orig 2020-11-22 16:30:31.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/runtime/runtime.c 2020-11-22 16:39:49.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -62,6 +62,37 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "genesis/static-symbols.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "genesis/symbol.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__APPLE__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <sys/time.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <mach/mach_time.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int clock_gettime( clockid_t clk_id, struct timespec *ts )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int ret = -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( ts )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( CLOCK_REALTIME == clk_id )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ struct timeval tv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ret = gettimeofday(&tv, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ts->tv_sec = tv.tv_sec;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ts->tv_nsec = tv.tv_usec * 1000;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else if ( CLOCK_MONOTONIC == clk_id )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const uint64_t t = mach_absolute_time();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mach_timebase_info_data_t timebase;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mach_timebase_info(&timebase);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const uint64_t tdiff = t * timebase.numer / timebase.denom;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ts->tv_sec = tdiff / 1000000000;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ts->tv_nsec = tdiff % 1000000000;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ret = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct timespec lisp_init_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static char libpath[] = "../lib/sbcl";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/runtime/runtime.h.orig 2020-11-22 16:30:42.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/runtime/runtime.h 2020-11-22 16:41:14.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -490,4 +490,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define TINY_BOXED_NWORDS(obj) ((HeaderValue(obj) & 0xFF) | 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* One define types and methods if not already defined. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if !defined(CLOCK_REALTIME) && !defined(CLOCK_MONOTONIC) && !defined(CLOCK_PROCESS_CPUTIME_ID)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CLOCK_REALTIME 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CLOCK_MONOTONIC 6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CLOCK_PROCESS_CPUTIME_ID 12
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef int clockid_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern int clock_gettime( clockid_t clk_id, struct timespec *ts );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /* !defined(CLOCK_REALTIME) && !defined(CLOCK_MONOTONIC) && !defined(CLOCK_PROCESS_CPUTIME_ID) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif /* _SBCL_RUNTIME_H_ */
</span></pre><pre style='margin:0'>
</pre>