From 2fb7766a797579471b392dd5e7d7eb265bb46327 Mon Sep 17 00:00:00 2001 From: rnauber Date: Sat, 31 Dec 2016 12:57:44 +0100 Subject: [PATCH] Add a joe (editor) package (#622) --- packages/joe/build.sh | 12 ++++++++++++ packages/joe/do_not_build_utils.patch | 11 +++++++++++ packages/joe/fix_errno.patch | 20 ++++++++++++++++++++ packages/joe/no_getpwent.patch | 19 +++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 packages/joe/build.sh create mode 100644 packages/joe/do_not_build_utils.patch create mode 100644 packages/joe/fix_errno.patch create mode 100644 packages/joe/no_getpwent.patch diff --git a/packages/joe/build.sh b/packages/joe/build.sh new file mode 100644 index 000000000..165e6b6df --- /dev/null +++ b/packages/joe/build.sh @@ -0,0 +1,12 @@ +TERMUX_PKG_HOMEPAGE=http://www.sourceforge.net/projects/joe-editor +TERMUX_PKG_DESCRIPTION="JOE is a full featured terminal-based screen editor" +TERMUX_PKG_DEPENDS="ncurses" +TERMUX_PKG_VERSION=4.3 +TERMUX_PKG_SRCURL=https://sourceforge.net/projects/joe-editor/files/JOE%20sources/joe-${TERMUX_PKG_VERSION}/joe-${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_FOLDERNAME=joe-${TERMUX_PKG_VERSION} +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-termcap" + +termux_step_post_extract_package () { +# rm -r $TERMUX_PKG_SRCDIR/joe/util +return +} \ No newline at end of file diff --git a/packages/joe/do_not_build_utils.patch b/packages/joe/do_not_build_utils.patch new file mode 100644 index 000000000..60d4a321b --- /dev/null +++ b/packages/joe/do_not_build_utils.patch @@ -0,0 +1,11 @@ +--- src/joe/Makefile.in~ 2016-08-31 16:47:12.000000000 +0200 ++++ src/joe/Makefile.in 2016-12-26 18:03:33.523645366 +0100 +@@ -316,7 +316,7 @@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = foreign +-SUBDIRS = util ++SUBDIR = + EXTRA_DIST = TODO + sysconf_joedir = $(sysconfdir)/joe + data_joedir = $(datadir)/joe diff --git a/packages/joe/fix_errno.patch b/packages/joe/fix_errno.patch new file mode 100644 index 000000000..23688aafd --- /dev/null +++ b/packages/joe/fix_errno.patch @@ -0,0 +1,20 @@ +--- src/joe/b.c~ 2016-08-22 15:52:28.000000000 +0200 ++++ src/joe/b.c 2016-12-26 18:17:44.449852459 +0100 +@@ -5,6 +5,8 @@ + * + * This file is part of JOE (Joe's Own Editor) + */ ++ ++ + #include "types.h" + + #ifdef HAVE_PWD_H +@@ -19,7 +21,7 @@ + #endif + #endif + +-extern int errno; ++ + + #ifdef WITH_SELINUX + #include diff --git a/packages/joe/no_getpwent.patch b/packages/joe/no_getpwent.patch new file mode 100644 index 000000000..81549d9b0 --- /dev/null +++ b/packages/joe/no_getpwent.patch @@ -0,0 +1,19 @@ +--- src/joe/path.c~ 2016-07-18 17:11:09.000000000 +0200 ++++ src/joe/path.c 2016-12-26 18:48:04.010421451 +0100 +@@ -401,14 +401,14 @@ + { + char **lst = NULL; + struct passwd *pw; +- ++#ifndef __ANDROID__ + while((pw=getpwent())) + if (rmatch(word+1, pw->pw_name)) { + char *t = vsncpy(NULL,0,sc("~")); + lst = vaadd(lst, vsncpy(sv(t),sz(pw->pw_name))); + } + endpwent(); +- ++#endif + return lst; + } + /********************************************************************/