diff --git a/packages/tree/build.sh b/packages/tree/build.sh index 8a7146399..95659f6de 100644 --- a/packages/tree/build.sh +++ b/packages/tree/build.sh @@ -2,10 +2,11 @@ TERMUX_PKG_HOMEPAGE=http://mama.indstate.edu/users/ice/tree/ TERMUX_PKG_DESCRIPTION="Recursive directory lister producing a depth indented listing of files" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=1.8.0 -TERMUX_PKG_REVISION=2 -TERMUX_PKG_SRCURL=http://mama.indstate.edu/users/ice/tree/src/tree-${TERMUX_PKG_VERSION}.tgz -TERMUX_PKG_SHA256=715d5d4b434321ce74706d0dd067505bb60c5ea83b5f0b3655dae40aa6f9b7c2 +TERMUX_PKG_VERSION=2.0.2 +TERMUX_PKG_SRCURL="https://gitlab.com/OldManProgrammer/unix-tree/-/archive/${TERMUX_PKG_VERSION}/unix-tree-${TERMUX_PKG_VERSION}.tar.gz" +TERMUX_PKG_SHA256=fda48f7443c6883c599cd9e87e93fd843c1cd162e68794d23e4dc6d10efc6250 +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag" TERMUX_PKG_DEPENDS="libandroid-support" TERMUX_PKG_BUILD_IN_SRC=true @@ -13,12 +14,11 @@ termux_step_make() { make \ CC="$CC" \ CFLAGS="$CFLAGS $CPPFLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \ - LDFLAGS="$LDFLAGS" \ - OBJS="file.o tree.o unix.o html.o xml.o json.o hash.o color.o strverscmp.o" + LDFLAGS="$LDFLAGS" } termux_step_make_install() { make install \ - prefix="$TERMUX_PREFIX" \ + PREFIX="$TERMUX_PREFIX" \ MANDIR="$TERMUX_PREFIX/share/man/man1" } diff --git a/packages/tree/strverscmp.c.patch b/packages/tree/strverscmp.c.patch new file mode 100644 index 000000000..51c6b4f4a --- /dev/null +++ b/packages/tree/strverscmp.c.patch @@ -0,0 +1,18 @@ +--- ./strverscmp.c.orig 2022-04-17 17:30:13.079263409 +0000 ++++ ./strverscmp.c 2022-04-17 17:37:27.495463877 +0000 +@@ -21,7 +21,7 @@ + /* #include "libiberty.h" */ + /* #include "safe-ctype.h" */ + #include +-#ifndef __linux__ ++#if defined(__ANDROID__) || !defined(__linux__) + + /* + @deftypefun int strverscmp (const char *@var{s1}, const char *@var{s2}) +@@ -157,4 +157,4 @@ + return state; + } + } +-#endif +\ No newline at end of file ++#endif diff --git a/packages/tree/tree.c.patch b/packages/tree/tree.c.patch deleted file mode 100644 index d25188134..000000000 --- a/packages/tree/tree.c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../tree-1.7.0/tree.c ./tree.c ---- ../tree-1.7.0/tree.c 2014-04-23 17:38:24.000000000 -0400 -+++ ./tree.c 2016-03-23 10:54:14.212468421 -0400 -@@ -112,7 +112,7 @@ - } - - /* Until I get rid of this hack, make it linux/cygwin/HP nonstop only: */ --#if defined (LINUX) || defined (CYGWIN) || defined (__TANDEM) -+#if defined (LINUX) || defined (CYGWIN) || defined (__TANDEM) || defined (__ANDROID__) - mb_cur_max = (int)MB_CUR_MAX; - #else - mb_cur_max = 1;