diff --git a/packages/dar/build.sh b/packages/dar/build.sh new file mode 100644 index 000000000..9850015f2 --- /dev/null +++ b/packages/dar/build.sh @@ -0,0 +1,17 @@ +TERMUX_PKG_HOMEPAGE=http://dar.linux.free.fr/ +TERMUX_PKG_DESCRIPTION="A full featured command-line backup tool, short for Disk ARchive" +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_VERSION=2.6.12 +TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/dar/dar/${TERMUX_PKG_VERSION}/dar-${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=d3ef3ad2fc9b5199333fc462e68b49498eb6e2c3e5472e6f9b7aa42b6a548f4b +TERMUX_PKG_DEPENDS="attr, libbz2, libgcrypt, liblzma, liblzo, zlib" +TERMUX_PKG_BUILD_IN_SRC=true + +termux_step_pre_configure() { + if [ "$TERMUX_ARCH_BITS" = "32" ]; then + TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-mode=32" + else + TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-mode=64" + fi + CXXFLAGS+=" $CPPFLAGS" +} diff --git a/packages/dar/configure.patch b/packages/dar/configure.patch new file mode 100644 index 000000000..48ec15700 --- /dev/null +++ b/packages/dar/configure.patch @@ -0,0 +1,55 @@ +diff -uNr dar-2.6.12/configure dar-2.6.12.mod/configure +--- dar-2.6.12/configure 2020-09-11 14:26:19.000000000 +0000 ++++ dar-2.6.12.mod/configure 2020-11-05 21:36:52.997365365 +0000 +@@ -23331,7 +23331,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgcrypt usability" >&5 + $as_echo_n "checking for libgcrypt usability... " >&6; } +- if test "$cross_compiling" = yes; then : ++ if test "$cross_compiling" = "fakeyes"; 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 +@@ -23365,13 +23365,13 @@ + } + + _ACEOF +-if ac_fn_cxx_try_run "$LINENO"; then : ++if true; then : + + $as_echo "#define CRYPTO_AVAILABLE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 + $as_echo "ok" >&6; } +- if test "$cross_compiling" = yes; then : ++ if test "$cross_compiling" = "fakeyes"; 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 +@@ -23400,7 +23400,7 @@ + } + + _ACEOF +-if ac_fn_cxx_try_run "$LINENO"; then : ++if true; then : + + else + libgcrypt_hash_bug="yes" +@@ -25756,7 +25756,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libthreadar() operationability" >&5 + $as_echo_n "checking for libthreadar() operationability... " >&6; } +- if test "$cross_compiling" = yes; then : ++ if test "$cross_compiling" = "fakeyes"; 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 +@@ -25799,7 +25799,7 @@ + } + + _ACEOF +-if ac_fn_cxx_try_run "$LINENO"; then : ++if false; then : + + local_threadar=yes + diff --git a/packages/dar/line_tools.cpp.patch b/packages/dar/line_tools.cpp.patch new file mode 100644 index 000000000..540d4a3fd --- /dev/null +++ b/packages/dar/line_tools.cpp.patch @@ -0,0 +1,13 @@ +diff -uNr dar-2.6.12/src/dar_suite/line_tools.cpp dar-2.6.12.mod/src/dar_suite/line_tools.cpp +--- dar-2.6.12/src/dar_suite/line_tools.cpp 2020-09-11 14:05:44.000000000 +0000 ++++ dar-2.6.12.mod/src/dar_suite/line_tools.cpp 2020-11-05 22:23:47.729283750 +0000 +@@ -35,7 +35,8 @@ + #if HAVE_FCNTL_H + #include + #endif +-#include "getopt_decision.h" ++//#include "getopt_decision.h" ++#include + } + + #include diff --git a/packages/dar/user_group_bases.cpp.patch b/packages/dar/user_group_bases.cpp.patch new file mode 100644 index 000000000..c4d8139a7 --- /dev/null +++ b/packages/dar/user_group_bases.cpp.patch @@ -0,0 +1,20 @@ +diff -uNr dar-2.6.12/src/libdar/user_group_bases.cpp dar-2.6.12.mod/src/libdar/user_group_bases.cpp +--- dar-2.6.12/src/libdar/user_group_bases.cpp 2020-08-08 08:33:43.000000000 +0000 ++++ dar-2.6.12.mod/src/libdar/user_group_bases.cpp 2020-11-05 21:45:09.475684451 +0000 +@@ -89,6 +89,7 @@ + if(me == nullptr) + throw SRC_BUG; + ++#ifndef __ANDROID__ + setpwent(); // reset password reading + + while((pwd = getpwent()) != nullptr) +@@ -103,7 +104,7 @@ + me->group_database[grp->gr_gid] = grp->gr_name; + + endgrent(); +- ++#endif + CRITICAL_END; + + me->filled = true;