diff --git a/packages/gawk/build.sh b/packages/gawk/build.sh index cb81061b5..fc095d412 100644 --- a/packages/gawk/build.sh +++ b/packages/gawk/build.sh @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gawk/ TERMUX_PKG_DESCRIPTION="Programming language designed for text processing" TERMUX_PKG_DEPENDS="libandroid-support, libmpfr, libgmp, readline" TERMUX_PKG_VERSION=4.2.1 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=d1119785e746d46a8209d28b2de404a57f983aa48670f4e225531d3bdc175551 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gawk/gawk-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_RM_AFTER_INSTALL="bin/gawk-* bin/igawk share/man/man1/igawk.1" diff --git a/packages/gawk/main.c.patch b/packages/gawk/main.c.patch new file mode 100644 index 000000000..03c9a82f6 --- /dev/null +++ b/packages/gawk/main.c.patch @@ -0,0 +1,17 @@ +diff -u -r ../gawk-4.2.1/main.c ./main.c +--- ../gawk-4.2.1/main.c 2018-02-23 08:44:11.000000000 +0000 ++++ ./main.c 2018-10-28 21:59:28.583118833 +0000 +@@ -246,10 +246,12 @@ + if ((cp = getenv("GAWK_LOCALE_DIR")) != NULL) + locale_dir = cp; + +-#if defined(F_GETFL) && defined(O_APPEND) ++#if defined(F_GETFL) && defined(O_APPEND) && !defined(__ANDROID__) + // 1/2018: This is needed on modern BSD systems so that the + // inplace tests pass. I think it's a bug in those kernels + // but let's just work around it anyway. ++ // Do not do this for Android as it interferes with SELinux, ++ // see https://github.com/termux/termux-packages/issues/2979 + int flags = fcntl(fileno(stderr), F_GETFL, NULL); + if (flags >= 0 && (flags & O_APPEND) == 0) { + flags |= O_APPEND;