git: 1634c88f12a3 - main - graphics/mesa-devel: Fix 15-CURRENT 108de784513d build

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 07 Jun 2024 09:27:00 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1634c88f12a37d8d00ee59e2619578a1ea514a04

commit 1634c88f12a37d8d00ee59e2619578a1ea514a04
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-06-02 04:37:29 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-06-07 09:25:46 +0000

    graphics/mesa-devel: Fix 15-CURRENT 108de784513d build
    
    108de784513d on main in src redefined CLOCK_BOOTTIME to alias
    CLOCK_MONOTONIC, instead of CLOCK_UPTIME. This results in the following
    errors when building this port under 15-CURRENT:
    
    ../src/intel/common/xe/intel_gem.c:72:9: error: duplicate case value '4'
       72 |    case CLOCK_BOOTTIME:
          |         ^
    /usr/include/sys/_clock_id.h:81:25: note: expanded from macro 'CLOCK_BOOTTIME'
       81 | #define CLOCK_BOOTTIME          CLOCK_MONOTONIC
          |                                 ^
    /usr/include/sys/_clock_id.h:56:26: note: expanded from macro 'CLOCK_MONOTONIC'
       56 | #define CLOCK_MONOTONIC         4
          |                                 ^
    ../src/intel/common/xe/intel_gem.c:66:9: note: previous case defined here
       66 |    case CLOCK_MONOTONIC:
          |         ^
    /usr/include/sys/_clock_id.h:56:26: note: expanded from macro 'CLOCK_MONOTONIC'
       56 | #define CLOCK_MONOTONIC         4
          |                                 ^
    1 error generated.
    
    On FreeBSD systems without 108de784513d the old definition will be used
    while on 108de784513d and newer the duplicate case will be removed.
    
    Reported by:    pkg-fallout
    Obtained from:  src 676041c41ba5
    Discussed with: imp
---
 .../mesa-devel/files/patch-src_intel_common_xe_intel__gem.c  | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/graphics/mesa-devel/files/patch-src_intel_common_xe_intel__gem.c b/graphics/mesa-devel/files/patch-src_intel_common_xe_intel__gem.c
new file mode 100644
index 000000000000..b4f8bfd180d1
--- /dev/null
+++ b/graphics/mesa-devel/files/patch-src_intel_common_xe_intel__gem.c
@@ -0,0 +1,12 @@
+--- src/intel/common/xe/intel_gem.c.orig	2024-06-05 23:45:33 UTC
++++ src/intel/common/xe/intel_gem.c
+@@ -69,7 +69,9 @@ xe_gem_read_correlate_cpu_gpu_timestamp(int fd,
+ #endif
+    case CLOCK_REALTIME:
+ #ifdef CLOCK_BOOTTIME
++#if !(defined(CLOCK_BOOTTIME) && CLOCK_BOOTTIME == CLOCK_MONOTONIC)
+    case CLOCK_BOOTTIME:
++#endif
+ #endif
+ #ifdef CLOCK_TAI
+    case CLOCK_TAI: