summaryrefslogtreecommitdiff
path: root/package/libepoxy/0003-make-enable-glx-actually-work-on-osx-and-windows.patch
blob: 5b0d4fece260d5759da754982b4b9ad7b2f6684f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 902ea1eb073187603ec2eda4d2a146bef96592d4 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Mon, 18 Jan 2016 10:08:44 -0800
Subject: [PATCH 3/4] Make --enable-glx actually work on OSX and Windows

Followup for anholt/libepoxy#52

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Fetched from pull #81 on github for libepoxy:
https://github.com/anholt/libepoxy/pull/81/commits
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 configure.ac          | 6 +++---
 src/dispatch_common.h | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index d3d947c..b4c7ede 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion])
 AC_ARG_ENABLE([glx],
                 [AS_HELP_STRING([--disable-glx],
 				[disable if you don't want x11/glx support])],
-                [],
+                [enable_glx=$enableval],
                 [enable_glx=yes]
              )
 
@@ -74,7 +74,7 @@ has_znow=yes
 case $host_os in
     mingw*)
         build_egl=no
-        build_glx=no
+        build_glx=$x11
         build_wgl=yes
         # On windows, the DLL has to have all of its functions
         # resolved at link time, so we have to link directly aginst
@@ -89,7 +89,7 @@ case $host_os in
         ;;
     darwin*)
         build_egl=no
-        build_glx=no
+        build_glx=$x11
         build_wgl=no
         build_apple=yes
         has_znow=no
diff --git a/src/dispatch_common.h b/src/dispatch_common.h
index 2728b45..c30ce44 100644
--- a/src/dispatch_common.h
+++ b/src/dispatch_common.h
@@ -26,12 +26,12 @@
 
 #ifdef _WIN32
 #define PLATFORM_HAS_EGL 0
-#define PLATFORM_HAS_GLX 0
+#define PLATFORM_HAS_GLX BUILD_GLX
 #define PLATFORM_HAS_WGL BUILD_WGL
 #define EPOXY_IMPORTEXPORT __declspec(dllexport)
 #elif defined(__APPLE__)
 #define PLATFORM_HAS_EGL 0
-#define PLATFORM_HAS_GLX 0
+#define PLATFORM_HAS_GLX BUILD_GLX
 #define PLATFORM_HAS_WGL 0
 #define EPOXY_IMPORTEXPORT
 #elif defined(ANDROID)