<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/aad61eaaca7622886337681497f387639af52950">https://github.com/macports/macports-ports/commit/aad61eaaca7622886337681497f387639af52950</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 aad61eaaca7 php81: Fix build on OS X 10.11 and earlier
</span>aad61eaaca7 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit aad61eaaca7622886337681497f387639af52950
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Mon Jun 14 07:56:52 2021 -0500
<span style='display:block; white-space:pre;color:#404040;'> php81: Fix build on OS X 10.11 and earlier
</span>---
lang/php/Portfile | 6 +++-
.../files/patch-php81-ext-standard-hrtime.c.diff | 39 ++++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/Portfile b/lang/php/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ba1ad7de1fc..b05e6d82a4d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/php/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -259,11 +259,15 @@ if {[is_sapi_subport]} {
</span> patch.pre_args -p1
patchfiles-append patch-${php}-scripts-php-config.in.diff
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[vercmp ${branch} 8.1] == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${version} eq "8.1.0alpha1"} {
</span> patchfiles-append \
patch-${php}-configure.diff \
patch-${php}-main-streams-plain_wrapper.c.diff \
patch-${php}-scripts-phpize.m4.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.platform} eq "darwin" && ${os.major} < 16} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-${php}-ext-standard-hrtime.c.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
if {[vercmp ${branch} 7.0] >= 0 && [vercmp ${branch} 7.2] <= 0} {
patchfiles-append \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/files/patch-php81-ext-standard-hrtime.c.diff b/lang/php/files/patch-php81-ext-standard-hrtime.c.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..c2f912da12e
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/files/patch-php81-ext-standard-hrtime.c.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,39 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fix build on 10.11 and earlier by not using clock_gettime_nsec_np.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://bugs.php.net/bug.php?id=81137
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/php/php-src/commit/72c0deb4009e1ddfdccd2b353e0a839ffe10d81a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/ext/standard/hrtime.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/ext/standard/hrtime.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,6 +34,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static double _timer_scale = .0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif PHP_HRTIME_PLATFORM_APPLE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</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;'>++# include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static mach_timebase_info_data_t _timerlib_info;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif PHP_HRTIME_PLATFORM_HPUX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # include <sys/time.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -60,7 +66,9 @@ static int _timer_init(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif PHP_HRTIME_PLATFORM_APPLE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* pass */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (mach_timebase_info(&_timerlib_info)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return -1;
</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;'>+ #elif PHP_HRTIME_PLATFORM_POSIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -107,8 +115,7 @@ static zend_always_inline php_hrtime_t _timer_current(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QueryPerformanceCounter(<);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return (php_hrtime_t)((php_hrtime_t)lt.QuadPart * _timer_scale);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif PHP_HRTIME_PLATFORM_APPLE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* the value is of php_hrtime_t type already */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (php_hrtime_t)mach_absolute_time() * _timerlib_info.numer / _timerlib_info.denom;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif PHP_HRTIME_PLATFORM_POSIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (0 == clock_gettime(CLOCK_MONOTONIC, &ts)) {
</span></pre><pre style='margin:0'>
</pre>