termux-packages/x11-packages/glew/termux-glew-support.patch
2022-04-18 14:48:05 +05:30

124 lines
6.4 KiB
Diff

diff -uNr glew-2.1.0/auto/Makefile glew-2.1.0.mod/auto/Makefile
--- glew-2.1.0/auto/Makefile 2017-07-31 14:25:39.000000000 +0300
+++ glew-2.1.0.mod/auto/Makefile 2019-10-15 15:43:41.598890328 +0300
@@ -240,7 +240,7 @@
cat $(SRC)/glew_init_wgl.c >> $@
$(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}" >> $@;
- echo -e "\n#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
+ echo -e "\n#elif !defined(__NOANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
echo -e "\nGLboolean __GLXEW_VERSION_1_0 = GL_FALSE;" >> $@
@@ -253,7 +253,7 @@
$(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
$(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}" >> $@
- echo -e "\n#endif /* !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */\n" >> $@;
+ echo -e "\n#endif /* !defined(__NOANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */\n" >> $@;
cat $(SRC)/glew_init_tail.c >> $@
cat $(SRC)/glew_str_head.c >> $@
$(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
diff -uNr glew-2.1.0/auto/src/glew_head.c glew-2.1.0.mod/auto/src/glew_head.c
--- glew-2.1.0/auto/src/glew_head.c 2017-07-31 14:25:39.000000000 +0300
+++ glew-2.1.0.mod/auto/src/glew_head.c 2019-10-15 15:44:04.328890312 +0300
@@ -19,7 +19,7 @@
# undef NOGDI
# endif
# include <GL/wglew.h>
-#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
+#elif !defined(__NOANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
# include <GL/glxew.h>
#endif
@@ -138,7 +138,7 @@
# define glewGetProcAddress(name) NSGLGetProcAddress(name)
#elif defined(__sgi) || defined(__sun) || defined(__HAIKU__)
# define glewGetProcAddress(name) dlGetProcAddress(name)
-#elif defined(__ANDROID__)
+#elif defined(__NOANDROID__)
# define glewGetProcAddress(name) NULL /* TODO */
#elif defined(__native_client__)
# define glewGetProcAddress(name) NULL /* TODO */
diff -uNr glew-2.1.0/auto/src/glew_init_tail.c glew-2.1.0.mod/auto/src/glew_init_tail.c
--- glew-2.1.0/auto/src/glew_init_tail.c 2017-07-31 14:25:39.000000000 +0300
+++ glew-2.1.0.mod/auto/src/glew_init_tail.c 2019-10-15 15:43:48.048890323 +0300
@@ -43,7 +43,7 @@
#if defined(GLEW_EGL)
getCurrentDisplay = (PFNEGLGETCURRENTDISPLAYPROC) glewGetProcAddress("eglGetCurrentDisplay");
return eglewInit(getCurrentDisplay());
-#elif defined(GLEW_OSMESA) || defined(__ANDROID__) || defined(__native_client__) || defined(__HAIKU__)
+#elif defined(GLEW_OSMESA) || defined(__NOANDROID__) || defined(__native_client__) || defined(__HAIKU__)
return r;
#elif defined(_WIN32)
return wglewInit();
diff -uNr glew-2.1.0/auto/src/glew_str_glx.c glew-2.1.0.mod/auto/src/glew_str_glx.c
--- glew-2.1.0/auto/src/glew_str_glx.c 2017-07-31 14:25:39.000000000 +0300
+++ glew-2.1.0.mod/auto/src/glew_str_glx.c 2019-10-15 15:43:59.418890315 +0300
@@ -4,7 +4,7 @@
return ret;
}
-#elif !defined(GLEW_OSMESA) && !defined(GLEW_EGL) && !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
+#elif !defined(GLEW_OSMESA) && !defined(GLEW_EGL) && !defined(__NOANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
GLboolean glxewIsSupported (const char* name)
{
diff -uNr glew-2.1.0/src/glew.c glew-2.1.0.mod/src/glew.c
--- glew-2.1.0/src/glew.c 2017-07-31 14:25:39.000000000 +0300
+++ glew-2.1.0.mod/src/glew.c 2019-10-15 15:43:53.658890319 +0300
@@ -51,7 +51,7 @@
# undef NOGDI
# endif
# include <GL/wglew.h>
-#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
+#elif !defined(__NOANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
# include <GL/glxew.h>
#endif
@@ -170,7 +170,7 @@
# define glewGetProcAddress(name) NSGLGetProcAddress(name)
#elif defined(__sgi) || defined(__sun) || defined(__HAIKU__)
# define glewGetProcAddress(name) dlGetProcAddress(name)
-#elif defined(__ANDROID__)
+#elif defined(__NOANDROID__)
# define glewGetProcAddress(name) NULL /* TODO */
#elif defined(__native_client__)
# define glewGetProcAddress(name) NULL /* TODO */
@@ -19746,7 +19746,7 @@
return GLEW_OK;
}
-#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
+#elif !defined(__NOANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay = NULL;
@@ -20821,7 +20821,7 @@
return GLEW_OK;
}
-#endif /* !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */
+#endif /* !defined(__NOANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */
/* ------------------------------------------------------------------------ */
@@ -20868,7 +20868,7 @@
#if defined(GLEW_EGL)
getCurrentDisplay = (PFNEGLGETCURRENTDISPLAYPROC) glewGetProcAddress("eglGetCurrentDisplay");
return eglewInit(getCurrentDisplay());
-#elif defined(GLEW_OSMESA) || defined(__ANDROID__) || defined(__native_client__) || defined(__HAIKU__)
+#elif defined(GLEW_OSMESA) || defined(__NOANDROID__) || defined(__native_client__) || defined(__HAIKU__)
return r;
#elif defined(_WIN32)
return wglewInit();
@@ -27059,7 +27059,7 @@
return ret;
}
-#elif !defined(GLEW_OSMESA) && !defined(GLEW_EGL) && !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
+#elif !defined(GLEW_OSMESA) && !defined(GLEW_EGL) && !defined(__NOANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
GLboolean glxewIsSupported (const char* name)
{