about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/mesa
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-05-17 10:56:54 +0000
committerAlyssa Ross <hi@alyssa.is>2019-05-17 10:56:54 +0000
commitc1d22074139ab0d048a05b5e5116265d099114d6 (patch)
tree97977009422d675f8930f97c309b010481289e72 /nixpkgs/pkgs/development/libraries/mesa
parent4dc8afe4fd6b18437150129e0a1ecc23c6a1c0b9 (diff)
parentbc9df0f66110039e495b6debe3a6cda4a1bb0fed (diff)
downloadnixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.gz
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.bz2
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.lz
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.xz
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.zst
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.zip
Merge commit 'bc9df0f66110039e495b6debe3a6cda4a1bb0fed'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/mesa')
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/darwin-clock-gettime.patch76
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/default.nix2
2 files changed, 1 insertions, 77 deletions
diff --git a/nixpkgs/pkgs/development/libraries/mesa/darwin-clock-gettime.patch b/nixpkgs/pkgs/development/libraries/mesa/darwin-clock-gettime.patch
deleted file mode 100644
index 94e90a1c5871..000000000000
--- a/nixpkgs/pkgs/development/libraries/mesa/darwin-clock-gettime.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h
-index 45cb6075e6..62937311b9 100644
---- a/include/c11/threads_posix.h
-+++ b/include/c11/threads_posix.h
-@@ -36,6 +36,11 @@
- #include <sched.h>
- #include <stdint.h> /* for intptr_t */
- 
-+#ifdef __MACH__
-+#include <mach/clock.h>
-+#include <mach/mach.h>
-+#endif
-+
- /*
- Configuration macro:
- 
-@@ -383,12 +388,25 @@ tss_set(tss_t key, void *val)
- /*-------------------- 7.25.7 Time functions --------------------*/
- // 7.25.6.1
- #ifndef HAVE_TIMESPEC_GET
-+
- static inline int
- timespec_get(struct timespec *ts, int base)
- {
-     if (!ts) return 0;
-     if (base == TIME_UTC) {
-+#ifdef __MACH__
-+        if (ts != NULL) {
-+            clock_serv_t cclock;
-+            mach_timespec_t mts;
-+            host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
-+            clock_get_time(cclock, &mts);
-+            mach_port_deallocate(mach_task_self(), cclock);
-+            ts->tv_sec = mts.tv_sec;
-+            ts->tv_nsec = mts.tv_nsec;
-+        }
-+#else
-         clock_gettime(CLOCK_REALTIME, ts);
-+#endif
-         return base;
-     }
-     return 0;
-diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
-index 1208ebb315..e1378fb1f0 100644
---- a/src/egl/drivers/dri2/egl_dri2.c
-+++ b/src/egl/drivers/dri2/egl_dri2.c
-@@ -65,6 +65,11 @@
- #include "util/u_vector.h"
- #include "mapi/glapi/glapi.h"
- 
-+#ifdef __MACH__
-+#include <mach/clock.h>
-+#include <mach/mach.h>
-+#endif
-+
- #define NUM_ATTRIBS 12
- 
- static void
-@@ -3092,7 +3097,17 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
- 
-             /* We override the clock to monotonic when creating the condition
-              * variable. */
-+#ifdef __MACH__
-+            clock_serv_t cclock;
-+            mach_timespec_t mts;
-+            host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
-+            clock_get_time(cclock, &mts);
-+            mach_port_deallocate(mach_task_self(), cclock);
-+            current.tv_sec = mts.tv_sec;
-+            current.tv_nsec = mts.tv_nsec;
-+#else
-             clock_gettime(CLOCK_MONOTONIC, &current);
-+#endif
- 
-             /* calculating when to expire */
-             expire.tv_nsec = timeout % 1000000000L;
diff --git a/nixpkgs/pkgs/development/libraries/mesa/default.nix b/nixpkgs/pkgs/development/libraries/mesa/default.nix
index a8a29414be4d..77ea6783b775 100644
--- a/nixpkgs/pkgs/development/libraries/mesa/default.nix
+++ b/nixpkgs/pkgs/development/libraries/mesa/default.nix
@@ -131,7 +131,7 @@ let
           url = https://cgit.freedesktop.org/mesa/mesa/patch/?id=bcc4bfc8e80da5dc4c6ee44f791f2112dac208d1;
           sha256 = "0rijkx80anbb7g14cg9g11ha7lcf7sixc7xsjam6myyd68nl3n5n";
         })
-      ] ++ optional stdenv.isDarwin ./darwin-clock-gettime.patch;
+      ];
 
       outputs = [ "out" "dev" "drivers" ]
                 ++ optional (elem "swrast" galliumDrivers) "osmesa";