fvwm: Bump to 2.7.0

This commit is contained in:
Tee KOBAYASHI 2022-10-30 03:48:01 +09:00 committed by xtkoba
parent df995b7a71
commit 4b3605c57f
5 changed files with 170 additions and 155 deletions

View File

@ -1,14 +1,17 @@
TERMUX_PKG_HOMEPAGE=https://www.fvwm.org/
TERMUX_PKG_DESCRIPTION="A multiple large virtual desktop window manager originally derived from twm."
TERMUX_PKG_LICENSE="GPL-2.0"
# Licenses: GPL-2.0, FVWM
TERMUX_PKG_LICENSE="custom"
TERMUX_PKG_LICENSE_FILE="COPYING"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.7.0
TERMUX_PKG_REVISION=5
TERMUX_PKG_SRCURL=https://github.com/fvwmorg/fvwm/releases/download/2.6.9/fvwm-2.6.9.tar.gz
TERMUX_PKG_SHA256=1bc64cf3ccd0073008758168327a8265b8059def9b239b451d6b9fab2cc391ae
TERMUX_PKG_DEPENDS="fribidi, librsvg, libxcursor, libxinerama, libxpm, imlib2, libandroid-shmem"
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=https://github.com/fvwmorg/fvwm/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=a0662354ce5762e894665a27e59b437cb422bfe738a8cf901665c6ee0d0b9ab8
TERMUX_PKG_DEPENDS="fontconfig, fribidi, glib, libandroid-shmem, libcairo, libice, libiconv, libpng, librsvg, libsm, libx11, libxcursor, libxext, libxft, libxinerama, libxpm, libxrender, readline"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_func_setpgrp_void=yes ac_cv_func_mkstemp=no ac_cv_func_getpwuid=no"
termux_step_pre_configure() {
autoreconf -fi
export LIBS="-landroid-shmem"
}

View File

@ -0,0 +1,60 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1186,6 +1186,7 @@
fribidi_in_path=yes
ac_save_LIBS="$LIBS"
LIBS="$LIBS $Bidi_LIBS"
+ if false; then
AC_TRY_RUN([#include <stdlib.h>
#include <fribidi/fribidi.h>
int main()
@@ -1198,12 +1199,14 @@
return 0;
}
], [:], [fribidi_in_path=no])
+ fi
LIBS="$ac_save_LIBS"
if test ! x"$fribidi_in_path" = xyes; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $Bidi_CFLAGS"
LIBS="$LIBS $Bidi_LIBS"
+ if false; then
AC_TRY_RUN([#include <stdlib.h>
#include <fribidi/fribidi.h>
int main()
@@ -1216,6 +1219,7 @@
return 0;
}
], [:], [with_bidi=no; problem_bidi=": Bad fribidi version, see config.log"])
+ fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
@@ -1233,11 +1237,13 @@
Bidi_LIBS=
else
AC_DEFINE(HAVE_BIDI)
+ if false; then
AC_TRY_RUN([#include <fribidi/fribidi.h>
int main(int c, char **v) {
return FRIBIDI_CHARSET_NOT_FOUND * 0;
}
], [AC_DEFINE(FRIBIDI_CHARSET_SPELLING)])
+ fi
fi
AH_VERBATIM([_FRIBIDI_CHARSET_SPELLING],
[#ifdef FRIBIDI_CHARSET_SPELLING
@@ -1422,10 +1428,12 @@
fi
# Define some compatibility macros needed for config.h.
+if false; then
mg_DEFINE_IF_NOT([#include <X11/keysym.h>],
[defined XK_Page_Up && defined XK_Page_Down],
[COMPAT_OLD_KEYSYMDEF], [$X_CFLAGS],
[Old AIX systems (3.2.5) don't define some common keysyms.])
+fi
AH_VERBATIM([_COMPAT_OLD_KEYSYMDEF],
[#ifdef COMPAT_OLD_KEYSYMDEF
# define XK_Page_Up XK_Prior

View File

@ -1,150 +0,0 @@
diff -uNr fvwm-2.6.9/configure fvwm-2.6.9.mod/configure
--- fvwm-2.6.9/configure 2019-09-05 20:55:22.000000000 +0000
+++ fvwm-2.6.9.mod/configure 2019-10-13 18:54:47.276104871 +0000
@@ -10796,74 +10796,12 @@
fribidi_in_path=yes
ac_save_LIBS="$LIBS"
LIBS="$LIBS $Bidi_LIBS"
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <fribidi/fribidi.h>
-int main()
-{
- FriBidiChar *logical_unicode_str =
- (FriBidiChar *)malloc((4 + 1) * sizeof(FriBidiChar));
- fribidi_charset_to_unicode(
- fribidi_parse_charset("iso8859-8"), "test", 4,
- logical_unicode_str);
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- :
-else
- fribidi_in_path=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- LIBS="$ac_save_LIBS"
if test ! x"$fribidi_in_path" = xyes; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $Bidi_CFLAGS"
LIBS="$LIBS $Bidi_LIBS"
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <fribidi/fribidi.h>
-int main()
-{
- FriBidiChar *logical_unicode_str =
- (FriBidiChar *)malloc((4 + 1) * sizeof(FriBidiChar));
- fribidi_charset_to_unicode(
- fribidi_parse_charset("iso8859-8"), "test", 4,
- logical_unicode_str);
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- :
-else
- with_bidi=no; problem_bidi=": Bad fribidi version, see config.log"
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
fi
if test ! x"$fribidi_in_path" = xno; then
Bidi_CFLAGS=
@@ -10878,29 +10816,6 @@
Bidi_LIBS=
else
$as_echo "#define HAVE_BIDI 1" >>confdefs.h
-
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <fribidi/fribidi.h>
- int main(int c, char **v) {
- return FRIBIDI_CHARSET_NOT_FOUND * 0;
- }
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- $as_echo "#define FRIBIDI_CHARSET_SPELLING 1" >>confdefs.h
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
fi
@@ -13015,41 +12930,6 @@
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <stdio.h>
-int main(int c, char **v) {
-#include <X11/keysym.h>
-#if defined XK_Page_Up && defined XK_Page_Down
- return 0;
-#else
- return 1;
-#endif
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- :
-else
- $as_echo "#define COMPAT_OLD_KEYSYMDEF 1" >>confdefs.h
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-CPPFLAGS="$mg_save_CPPFLAGS"
-
-
-
if test x"$with_stroke" = xyes; then
mg_save_CPPFLAGS="$CPPFLAGS"

View File

@ -0,0 +1,102 @@
https://github.com/fvwmorg/fvwm3/commit/5c17c83df4605d2d97999740cf180af983298896
From 5c17c83df4605d2d97999740cf180af983298896 Mon Sep 17 00:00:00 2001
From: Matthieu Herrb <matthieu@herrb.eu>
Date: Mon, 8 Aug 2022 22:13:59 +0200
Subject: [PATCH] Fix for lock recusion in handle_all_expose()
XCheckIfEvent() holds the X display lock and the predicate
function it calls is not allowed to call any Xlib function that
would re-enter the lock.
libX11 1.8.1 enables X display locks unconditionnaly (it was only
enabled by XInitThreads() when called explicitely before) and
thus exposes the issue.
So don't process events in the FCheckPeekIfEvent() predicate, but
instead use a separate handler that is called for the returned event
out of the lock.
---
fvwm/events.c | 9 ++++++++-
libs/FEvent.c | 22 ++++++++++++++++++++++
libs/FEvent.h | 8 ++++++++
3 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/fvwm/events.c b/fvwm/events.c
index ae179d620..72d857079 100644
--- a/fvwm/events.c
+++ b/fvwm/events.c
@@ -267,6 +267,12 @@ static int _pred_weed_accumulate_expose(
return 1;
}
+static int _pred_weed_is_expose(
+ Display *display, XEvent *event, XPointer arg)
+{
+ return (event->type == Expose);
+}
+
static int _pred_weed_handle_expose(
Display *display, XEvent *event, XPointer arg)
{
@@ -4546,7 +4552,8 @@ void handle_all_expose(void)
saved_event = fev_save_event();
FPending(dpy);
- FWeedIfEvents(dpy, _pred_weed_handle_expose, NULL);
+ FWeedAndHandleIfEvents(dpy, _pred_weed_is_expose,
+ _pred_weed_handle_expose, NULL);
fev_restore_event(saved_event);
return;
diff --git a/libs/FEvent.c b/libs/FEvent.c
index f3bf54d3b..7e0621181 100644
--- a/libs/FEvent.c
+++ b/libs/FEvent.c
@@ -534,6 +534,28 @@ int FWeedIfEvents(
return weed_args.count;
}
+int FWeedAndHandleIfEvents(
+ Display *display,
+ int (*weed_predicate) (Display *display, XEvent *event, XPointer arg),
+ int (*handler) (Display *display, XEvent *event, XPointer arg),
+ XPointer arg)
+{
+ _fev_weed_args weed_args;
+ XEvent e;
+
+ assert(fev_is_invalid_event_type_set);
+ memset(&weed_args, 0, sizeof(weed_args));
+ weed_args.weed_predicate = weed_predicate;
+ weed_args.arg = arg;
+ if (FCheckPeekIfEvent(display, &e, _fev_pred_weed_if,
+ (XPointer)&weed_args)) {
+ handler(display, &e, arg);
+ }
+ _fev_pred_weed_if_finish(&weed_args);
+
+ return weed_args.count;
+}
+
int FWeedIfWindowEvents(
Display *display, Window window,
int (*weed_predicate) (
diff --git a/libs/FEvent.h b/libs/FEvent.h
index ecfb164ca..f17ac5e9b 100644
--- a/libs/FEvent.h
+++ b/libs/FEvent.h
@@ -114,6 +114,14 @@ int FWeedIfEvents(
Display *display, XEvent *current_event, XPointer arg),
XPointer arg);
+/* Same as FWeedIfEvents but with a second callback out of XLockDisplay()
+ * to handle events in a lock-safe manner */
+int FWeedAndHandleIfEvents(
+ Display *display,
+ int (*weed_predicate) (Display *display, XEvent *event, XPointer arg),
+ int (*handler) (Display *display, XEvent *event, XPointer arg),
+ XPointer arg);
+
/* Same as FWeedIfEvents but weeds only events for the given window. The
* weed_predicate is only called for events with a matching window. */
int FWeedIfWindowEvents(