diff --git a/x11-packages/st/android11.patch b/x11-packages/st/android11.patch new file mode 100644 index 000000000..5a451608a --- /dev/null +++ b/x11-packages/st/android11.patch @@ -0,0 +1,30 @@ +diff -uNr st-0.8.4/x.c st-0.8.4.mod/x.c +--- st-0.8.4/x.c 2020-06-19 12:29:45.000000000 +0300 ++++ st-0.8.4.mod/x.c 2021-08-19 22:20:11.807595168 +0300 +@@ -15,6 +15,9 @@ + #include + #include + ++#include ++#include ++ + char *argv0; + #include "arg.h" + #include "st.h" +@@ -1980,6 +1983,16 @@ + int + main(int argc, char *argv[]) + { ++ void *lib_handle = dlopen("libc.so", RTLD_LAZY); ++ if (lib_handle) { ++ bool (*android_mallopt)(int opcode, void* arg, size_t arg_size) = dlsym(lib_handle, "android_mallopt"); ++ if (android_mallopt) { ++ int android_malloc_tag_level = 0; ++ android_mallopt(8, &android_malloc_tag_level, sizeof(android_malloc_tag_level)); ++ } ++ dlclose(lib_handle); ++ } ++ + xw.l = xw.t = 0; + xw.isfixed = False; + xsetcursor(cursorshape); diff --git a/x11-packages/st/build.sh b/x11-packages/st/build.sh index 36be6f59d..125b25160 100644 --- a/x11-packages/st/build.sh +++ b/x11-packages/st/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A simple virtual terminal emulator for X" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_MAINTAINER="Tristan Ross " TERMUX_PKG_VERSION=0.8.4 -TERMUX_PKG_REVISION=3 +TERMUX_PKG_REVISION=4 TERMUX_PKG_SRCURL="http://dl.suckless.org/st/st-$TERMUX_PKG_VERSION.tar.gz" TERMUX_PKG_SHA256=d42d3ceceb4d6a65e32e90a5336e3d446db612c3fbd9ebc1780bc6c9a03346a6 # FIXME: config.h specified a Liberation Mono font which is not available in Termux.