Skip to content

Commit 5db7b1b

Browse files
committed
fix(main/vulkan-wrapper-android): some build failures
Patches by @robertkirkman : termux#22500 (comment)
1 parent 19d1aac commit 5db7b1b

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

packages/vulkan-wrapper-android/0001-fix-for-anon-file.patch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,19 @@ Fallback to `@TERMUX_PREFIX@/tmp` if env `XDG_RUNTIME_DIR` is not set.
1414
if (!path) {
1515
errno = ENOENT;
1616
return -1;
17+
diff --git a/meson.build b/meson.build
18+
index b9edca30189..dbede3ca76a 100644
19+
--- a/meson.build
20+
+++ b/meson.build
21+
@@ -1376,11 +1376,9 @@ endforeach
22+
functions_to_detect = {
23+
'strtof': '',
24+
'mkostemp': '',
25+
- 'memfd_create': '',
26+
'random_r': '',
27+
'flock': '',
28+
'strtok_r': '',
29+
- 'getrandom': '',
30+
'qsort_s': '',
31+
'posix_fallocate': '',
32+
'secure_getenv': '',

packages/vulkan-wrapper-android/build.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ TERMUX_PKG_LICENSE="MIT"
44
TERMUX_PKG_LICENSE_FILE="docs/license.rst"
55
TERMUX_PKG_MAINTAINER="xMeM <haooy@outlook.com>"
66
TERMUX_PKG_VERSION="25.0.0"
7-
TERMUX_PKG_REVISION=2
87
TERMUX_PKG_SRCURL=git+https://github.com/xMeM/mesa
98
TERMUX_PKG_GIT_BRANCH=wrapper
109
_COMMIT=e65c7eb6ee2f9903c3256f2677beb1d98464103f
@@ -19,7 +18,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
1918
-Dopengl=false
2019
-Dllvm=disabled
2120
-Dshared-llvm=disabled
22-
-Dplatforms=x11,wayland
21+
-Dplatforms=x11
2322
-Dgallium-drivers=
2423
-Dxmlconfig=disabled
2524
-Dvulkan-drivers=wrapper
@@ -36,6 +35,10 @@ termux_step_post_get_source() {
3635
termux_step_pre_configure() {
3736
termux_setup_cmake
3837

38+
if [ "$TERMUX_ON_DEVICE_BUILD" = "true" ]; then
39+
CFLAGS+=" --target=$TERMUX_HOST_PLATFORM$TERMUX_PKG_API_LEVEL"
40+
fi
41+
3942
CPPFLAGS+=" -D__USE_GNU"
4043
LDFLAGS+=" -landroid-shmem"
4144

0 commit comments

Comments
 (0)