glfw: Fix unresolved symbols issue
This commit is contained in:
parent
cc441d5dbf
commit
ad17b20175
@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="An Open Source, multi-platform library for OpenGL, OpenG
|
|||||||
TERMUX_PKG_LICENSE="ZLIB"
|
TERMUX_PKG_LICENSE="ZLIB"
|
||||||
TERMUX_PKG_MAINTAINER="@termux"
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
TERMUX_PKG_VERSION=3.3.7
|
TERMUX_PKG_VERSION=3.3.7
|
||||||
|
TERMUX_PKG_REVISION=1
|
||||||
TERMUX_PKG_SRCURL=https://github.com/glfw/glfw/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
|
TERMUX_PKG_SRCURL=https://github.com/glfw/glfw/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
|
||||||
TERMUX_PKG_SHA256=fd21a5f65bcc0fc3c76e0f8865776e852de09ef6fbc3620e09ce96d2b2807e04
|
TERMUX_PKG_SHA256=fd21a5f65bcc0fc3c76e0f8865776e852de09ef6fbc3620e09ce96d2b2807e04
|
||||||
TERMUX_PKG_DEPENDS="libx11"
|
TERMUX_PKG_DEPENDS="libx11"
|
||||||
@ -13,3 +14,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|||||||
-DGLFW_BUILD_TESTS=OFF
|
-DGLFW_BUILD_TESTS=OFF
|
||||||
-DGLFW_BUILD_DOCS=OFF
|
-DGLFW_BUILD_DOCS=OFF
|
||||||
"
|
"
|
||||||
|
|
||||||
|
termux_step_pre_configure() {
|
||||||
|
LDFLAGS+=" -lm"
|
||||||
|
}
|
||||||
|
20
x11-packages/glfw/src-wl_init.c.patch
Normal file
20
x11-packages/glfw/src-wl_init.c.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- a/src/wl_init.c
|
||||||
|
+++ b/src/wl_init.c
|
||||||
|
@@ -1150,7 +1150,7 @@
|
||||||
|
// Sync so we got all initial output events
|
||||||
|
wl_display_roundtrip(_glfw.wl.display);
|
||||||
|
|
||||||
|
-#ifdef __linux__
|
||||||
|
+#if defined __linux__ && !defined __ANDROID__
|
||||||
|
if (!_glfwInitJoysticksLinux())
|
||||||
|
return GLFW_FALSE;
|
||||||
|
#endif
|
||||||
|
@@ -1211,7 +1211,7 @@
|
||||||
|
|
||||||
|
void _glfwPlatformTerminate(void)
|
||||||
|
{
|
||||||
|
-#ifdef __linux__
|
||||||
|
+#if defined __linux__ && !defined __ANDROID__
|
||||||
|
_glfwTerminateJoysticksLinux();
|
||||||
|
#endif
|
||||||
|
_glfwTerminateEGL();
|
11
x11-packages/glfw/src-wl_platform.h.patch
Normal file
11
x11-packages/glfw/src-wl_platform.h.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/wl_platform.h
|
||||||
|
+++ b/src/wl_platform.h
|
||||||
|
@@ -45,7 +45,7 @@
|
||||||
|
|
||||||
|
#include "posix_thread.h"
|
||||||
|
#include "posix_time.h"
|
||||||
|
-#ifdef __linux__
|
||||||
|
+#if defined __linux__ && !defined __ANDROID__
|
||||||
|
#include "linux_joystick.h"
|
||||||
|
#else
|
||||||
|
#include "null_joystick.h"
|
@ -63,3 +63,21 @@
|
|||||||
_glfw.x11.xrender.handle = _glfw_dlopen("libXrender.so");
|
_glfw.x11.xrender.handle = _glfw_dlopen("libXrender.so");
|
||||||
#else
|
#else
|
||||||
_glfw.x11.xrender.handle = _glfw_dlopen("libXrender.so.1");
|
_glfw.x11.xrender.handle = _glfw_dlopen("libXrender.so.1");
|
||||||
|
@@ -1147,7 +1147,7 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if defined(__linux__)
|
||||||
|
+#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
|
if (!_glfwInitJoysticksLinux())
|
||||||
|
return GLFW_FALSE;
|
||||||
|
#endif
|
||||||
|
@@ -1240,7 +1240,7 @@
|
||||||
|
_glfwTerminateEGL();
|
||||||
|
_glfwTerminateGLX();
|
||||||
|
|
||||||
|
-#if defined(__linux__)
|
||||||
|
+#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
|
_glfwTerminateJoysticksLinux();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
11
x11-packages/glfw/src-x11_window.c.patch
Normal file
11
x11-packages/glfw/src-x11_window.c.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/x11_window.c
|
||||||
|
+++ b/src/x11_window.c
|
||||||
|
@@ -2830,7 +2830,7 @@
|
||||||
|
{
|
||||||
|
drainEmptyEvents();
|
||||||
|
|
||||||
|
-#if defined(__linux__)
|
||||||
|
+#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
|
_glfwDetectJoystickConnectionLinux();
|
||||||
|
#endif
|
||||||
|
XPending(_glfw.x11.display);
|
Loading…
Reference in New Issue
Block a user