From cbdf6bfcde4f93ae168bb9abbb535c36bb680357 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Sun, 13 Oct 2019 22:03:27 +0300 Subject: [PATCH] new package: fvwm Requested in https://github.com/termux/x11-packages/issues/104. --- x11-packages/fvwm/build.sh | 13 ++ x11-packages/fvwm/fvwm-2.6.9_configure.patch | 150 ++++++++++++++++++ .../fvwm/fvwm-2.6.9_fvwm_session.c.patch | 21 +++ 3 files changed, 184 insertions(+) create mode 100644 x11-packages/fvwm/build.sh create mode 100644 x11-packages/fvwm/fvwm-2.6.9_configure.patch create mode 100644 x11-packages/fvwm/fvwm-2.6.9_fvwm_session.c.patch diff --git a/x11-packages/fvwm/build.sh b/x11-packages/fvwm/build.sh new file mode 100644 index 000000000..0d96922f8 --- /dev/null +++ b/x11-packages/fvwm/build.sh @@ -0,0 +1,13 @@ +TERMUX_PKG_HOMEPAGE=http://www.fvwm.org/ +TERMUX_PKG_DESCRIPTION="A multiple large virtual desktop window manager originally derived from twm." +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_MAINTAINER="Leonid Plyushch " +TERMUX_PKG_VERSION=2.6.9 +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_EXTRA_CONFIGURE_ARGS="ac_cv_func_setpgrp_void=yes ac_cv_func_mkstemp=no ac_cv_func_getpwuid=no" + +termux_step_pre_configure() { + export LIBS="-landroid-shmem" +} diff --git a/x11-packages/fvwm/fvwm-2.6.9_configure.patch b/x11-packages/fvwm/fvwm-2.6.9_configure.patch new file mode 100644 index 000000000..b40a164ef --- /dev/null +++ b/x11-packages/fvwm/fvwm-2.6.9_configure.patch @@ -0,0 +1,150 @@ +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 +-#include +-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 +-#include +-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 +- 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 +-int main(int c, char **v) { +-#include +-#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" diff --git a/x11-packages/fvwm/fvwm-2.6.9_fvwm_session.c.patch b/x11-packages/fvwm/fvwm-2.6.9_fvwm_session.c.patch new file mode 100644 index 000000000..cfabb988f --- /dev/null +++ b/x11-packages/fvwm/fvwm-2.6.9_fvwm_session.c.patch @@ -0,0 +1,21 @@ +diff -uNr fvwm-2.6.9/fvwm/session.c fvwm-2.6.9.mod/fvwm/session.c +--- fvwm-2.6.9/fvwm/session.c 2018-05-26 11:35:26.000000000 +0000 ++++ fvwm-2.6.9.mod/fvwm/session.c 2019-10-13 18:59:27.680981153 +0000 +@@ -754,7 +754,6 @@ + { + FSmProp prop1, prop2, prop3, prop4, prop5, prop6, prop7, *props[7]; + FSmPropValue prop1val, prop2val, prop3val, prop4val, prop7val; +- struct passwd *pwd; + char *user_id; + char screen_num[32]; + int numVals, i, priority = 30; +@@ -775,8 +774,7 @@ + return; + } + +- pwd = getpwuid (getuid()); +- user_id = pwd->pw_name; ++ user_id = "termux"; + + prop1.name = FSmProgram; + prop1.type = FSmARRAY8;