emacs-x: avoid system faccessat

Just setting ac_cv_func_faccessat=no just leads to emacs hanging when
trying to use that function, so we need to modify m4 script as
well. Fixes https://github.com/termux/x11-packages/issues/497.
This commit is contained in:
Henrik Grimler 2021-11-16 14:30:30 +01:00 committed by Yaksh Bariya
parent 5c44317808
commit b2bef64d90
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 17 additions and 1 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Extensible, customizable text editor-and more"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=27.2
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/emacs/emacs-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=b4a7cc4e78e63f378624e0919215b910af5bb2a0afc819fad298272e9f40c1b9
TERMUX_PKG_DEPENDS="fontconfig, freetype, gdk-pixbuf, giflib, glib, libgnutls, libice, libjpeg-turbo, libpng, librsvg, libsm, libtiff, libx11, libxaw, libxcb, libxext, libxfixes, libxft, libxinerama, libxml2, libxmu, libxpm, libxrandr, libxrender, libxt, littlecms, ncurses, zlib"
@ -47,6 +47,10 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_lib_elf_elf_begin=no"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" gl_cv_func_dup2_works=no"
# disable setrlimit function to make termux-am work from within emacs
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_setrlimit=no"
# for some reason faccessat calls fails with "invalid argument"
# starting from ndk-r23
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_faccessat=no"
TERMUX_PKG_HOSTBUILD=true
# Remove some irrelevant files:

View File

@ -0,0 +1,12 @@
diff --git a/m4/faccessat.m4 b/m4/faccessat.m4
index 9d6b3635117..ff1f803d405 100644
--- a/m4/faccessat.m4
+++ b/m4/faccessat.m4
@@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_FACCESSAT],
AC_CHECK_FUNCS_ONCE([faccessat])
if test $ac_cv_func_faccessat = no; then
HAVE_FACCESSAT=0
+ REPLACE_FACCESSAT=1
else
case $gl_cv_func_lstat_dereferences_slashed_symlink in
*yes) ;;