Description: Ignore missing EGL support (version in Debian is too old)
Author: Simon Richter <sjr@debian.org>
Last-Update: 2013-04-15

Index: beignet-0.1/backend/src/backend/program.cpp
===================================================================
--- beignet-0.1.orig/backend/src/backend/program.cpp	2013-05-14 19:59:15.766048760 +0200
+++ beignet-0.1/backend/src/backend/program.cpp	2013-05-14 19:59:34.230047937 +0200
@@ -118,7 +118,7 @@
     fclose(clFile);
 
     // Now compile the code to llvm using clang
-#if LLVM_VERSION_MINOR <= 1
+#if 1 //LLVM_VERSION_MINOR <= 1
     std::string compileCmd = "clang -x cl -fno-color-diagnostics -emit-llvm -O3 -ccc-host-triple ptx32 -c ";
 #else
     std::string compileCmd = "clang -ffp-contract=off -emit-llvm -O3 -target nvptx -x cl -c ";
Index: beignet-0.1/src/CMakeLists.txt
===================================================================
--- beignet-0.1.orig/src/CMakeLists.txt	2013-05-14 19:58:51.830049827 +0200
+++ beignet-0.1/src/CMakeLists.txt	2013-05-14 19:59:34.230047937 +0200
@@ -32,6 +32,9 @@
 set (OPENCL_SRC ${OPENCL_SRC} cl_mem_gl.c cl_gl_api.c x11/gbm_dri2_x11_platform.c)
 SET(CMAKE_CXX_FLAGS "-DHAS_EGL ${CMAKE_CXX_FLAGS}")
 SET(CMAKE_C_FLAGS "-DHAS_EGL ${CMAKE_C_FLAGS}")
+SET(OPTIONAL_EGL_LIBRARY "${EGL_LIBRARY}")
+else(EGL_FOUND)
+SET(OPTIONAL_EGL_LIBRARY "")
 endif (EGL_FOUND)
 
 link_directories (${LLVM_LIBRARY_DIR})
@@ -45,6 +48,6 @@
                       ${DRM_INTEL_LIBRARY}
                       ${DRM_LIBRARY}
                       ${OPENGL_LIBRARIES}
-                      ${EGL_LIBRARY}
+                      ${OPTIONAL_EGL_LIBRARY}
                       ${GBM_LIBRARY})
 install (TARGETS cl LIBRARY DESTINATION lib)
Index: beignet-0.1/utests/utest_helper.hpp
===================================================================
--- beignet-0.1.orig/utests/utest_helper.hpp	2013-05-14 19:58:51.830049827 +0200
+++ beignet-0.1/utests/utest_helper.hpp	2013-05-14 19:59:34.238047937 +0200
@@ -128,9 +128,9 @@
 extern void* buf_data[MAX_BUFFER_N];
 extern size_t globals[3];
 extern size_t locals[3];
-extern Display    *xDisplay;
-extern EGLDisplay  eglDisplay;
-extern EGLSurface  eglSurface;
+//extern Display    *xDisplay;
+//extern EGLDisplay  eglDisplay;
+//extern EGLSurface  eglSurface;
 
 
 enum {
