new package: cadaver

This commit is contained in:
Tee KOBAYASHI 2021-12-25 23:20:23 +09:00 committed by Henrik Grimler
parent db9805f21f
commit c1ff610bb9
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
7 changed files with 334 additions and 17 deletions

View File

@ -1,17 +0,0 @@
# Status: Does not work with openssl 1.1 or later.
TERMUX_PKG_HOMEPAGE=http://www.webdav.org/cadaver/
TERMUX_PKG_DESCRIPTION="cadaver is a command-line WebDAV client for Unix"
TERMUX_PKG_VERSION=0.23.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://fossies.org/linux/www/old/cadaver-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=123772d7d33f06a76742dba874b1c444423b52ad3a7bbb87559616ec78b9ae5e
TERMUX_PKG_DEPENDS="openssl, libxml2, ncurses, readline"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-libxml2
--without-gssapi
--with-ssl=openssl
"
termux_step_pre_configure() {
export ac_cv_func_setlocale=no
}

18
packages/cadaver/build.sh Normal file
View File

@ -0,0 +1,18 @@
TERMUX_PKG_HOMEPAGE=http://webdav.org/cadaver/
TERMUX_PKG_DESCRIPTION="A command-line WebDAV client for Unix"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.23.3
TERMUX_PKG_SRCURL=http://webdav.org/cadaver/cadaver-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=fd4ce68a3230ba459a92bcb747fc6afa91e46d803c1d5ffe964b661793c13fca
TERMUX_PKG_DEPENDS="libneon"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
ac_cv_prog_XML2_CONFIG=$TERMUX_PREFIX/bin/xml2-config
--with-neon=$TERMUX_PREFIX
--disable-nls
"
termux_step_pre_configure() {
CPPFLAGS+=" -DHAVE_LOCALE_H"
}

View File

@ -0,0 +1,41 @@
--- a/config.sub
+++ b/config.sub
@@ -239,10 +239,11 @@
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | arc | arm | arm[bl]e | arme[lb] | armv* | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -290,7 +291,7 @@
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | x86_64 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
@@ -319,6 +320,7 @@
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
@@ -1259,7 +1261,7 @@
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ -gnu* | -android* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -kopensolaris* \

View File

@ -0,0 +1,218 @@
--- a/configure
+++ b/configure
@@ -9528,15 +9528,15 @@
# Configure to use an external neon, given a neon-config script
# found at $NEON_CONFIG.
-neon_prefix=`$NEON_CONFIG --prefix`
+neon_prefix=`sh $NEON_CONFIG --prefix`
# Check whether the library is of required version
ne_save_LIBS="$LIBS"
ne_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS `$NEON_CONFIG --cflags`"
- LIBS="$LIBS `$NEON_CONFIG --libs`"
- ne_libver=`$NEON_CONFIG --version | sed -e "s/neon //g"`
+ CFLAGS="$CFLAGS `sh $NEON_CONFIG --cflags`"
+ LIBS="$LIBS `sh $NEON_CONFIG --libs`"
+ ne_libver=`sh $NEON_CONFIG --version | sed -e "s/neon //g"`
# Check whether it's possible to link against neon
{ $as_echo "$as_me:$LINENO: checking linking against neon" >&5
$as_echo_n "checking linking against neon... " >&6; }
@@ -9595,7 +9595,7 @@
$as_echo "$ne_cv_lib_neon" >&6; }
if test "$ne_cv_lib_neon" = "yes"; then
ne_cv_lib_neonver=no
- for v in 27 28 29; do
+ for v in 27 28 29 30 31 32; do
case $ne_libver in
0.$v.*) ne_cv_lib_neonver=yes ;;
esac
@@ -9611,10 +9611,10 @@
$as_echo "$as_me: using neon library $ne_libver" >&6;}
# Pick up CFLAGS and LIBS needed
- CFLAGS="$CFLAGS `$NEON_CONFIG --cflags`"
- NEON_LIBS="$NEON_LIBS `$NEON_CONFIG --libs`"
+ CFLAGS="$CFLAGS `sh $NEON_CONFIG --cflags`"
+ NEON_LIBS="$NEON_LIBS `sh $NEON_CONFIG --libs`"
# Pick up library version
- set dummy `$NEON_CONFIG --version | sed 's/\./ /g'`
+ set dummy `sh $NEON_CONFIG --version | sed 's/\./ /g'`
NE_VERSION_MAJOR=$3; NE_VERSION_MINOR=$4; NE_VERSION_PATCH=$5
@@ -9644,7 +9644,7 @@
neon_library_message="library in ${neon_prefix} (${NEON_VERSION})"
neon_xml_parser_message="using whatever neon uses"
-if $NEON_CONFIG --support ssl >/dev/null; then
+if sh $NEON_CONFIG --support ssl >/dev/null; then
NE_FLAG_SSL=yes
@@ -9668,7 +9668,7 @@
fi
-if $NEON_CONFIG --support zlib >/dev/null; then
+if sh $NEON_CONFIG --support zlib >/dev/null; then
NE_FLAG_ZLIB=yes
@@ -9692,7 +9692,7 @@
fi
-if $NEON_CONFIG --support ipv6 >/dev/null; then
+if sh $NEON_CONFIG --support ipv6 >/dev/null; then
NE_FLAG_IPV6=yes
@@ -9716,7 +9716,7 @@
fi
-if $NEON_CONFIG --support lfs >/dev/null; then
+if sh $NEON_CONFIG --support lfs >/dev/null; then
NE_FLAG_LFS=yes
@@ -9740,7 +9740,7 @@
fi
-if $NEON_CONFIG --support ts_ssl >/dev/null; then
+if sh $NEON_CONFIG --support ts_ssl >/dev/null; then
NE_FLAG_TS_SSL=yes
@@ -10261,15 +10261,15 @@
# Configure to use an external neon, given a neon-config script
# found at $NEON_CONFIG.
-neon_prefix=`$NEON_CONFIG --prefix`
+neon_prefix=`sh $NEON_CONFIG --prefix`
# Check whether the library is of required version
ne_save_LIBS="$LIBS"
ne_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS `$NEON_CONFIG --cflags`"
- LIBS="$LIBS `$NEON_CONFIG --libs`"
- ne_libver=`$NEON_CONFIG --version | sed -e "s/neon //g"`
+ CFLAGS="$CFLAGS `sh $NEON_CONFIG --cflags`"
+ LIBS="$LIBS `sh $NEON_CONFIG --libs`"
+ ne_libver=`sh $NEON_CONFIG --version | sed -e "s/neon //g"`
# Check whether it's possible to link against neon
{ $as_echo "$as_me:$LINENO: checking linking against neon" >&5
$as_echo_n "checking linking against neon... " >&6; }
@@ -10328,7 +10328,7 @@
$as_echo "$ne_cv_lib_neon" >&6; }
if test "$ne_cv_lib_neon" = "yes"; then
ne_cv_lib_neonver=no
- for v in 27 28 29; do
+ for v in 27 28 29 30 31 32; do
case $ne_libver in
0.$v.*) ne_cv_lib_neonver=yes ;;
esac
@@ -10344,10 +10344,10 @@
$as_echo "$as_me: using neon library $ne_libver" >&6;}
# Pick up CFLAGS and LIBS needed
- CFLAGS="$CFLAGS `$NEON_CONFIG --cflags`"
- NEON_LIBS="$NEON_LIBS `$NEON_CONFIG --libs`"
+ CFLAGS="$CFLAGS `sh $NEON_CONFIG --cflags`"
+ NEON_LIBS="$NEON_LIBS `sh $NEON_CONFIG --libs`"
# Pick up library version
- set dummy `$NEON_CONFIG --version | sed 's/\./ /g'`
+ set dummy `sh $NEON_CONFIG --version | sed 's/\./ /g'`
NE_VERSION_MAJOR=$3; NE_VERSION_MINOR=$4; NE_VERSION_PATCH=$5
@@ -10377,7 +10377,7 @@
neon_library_message="library in ${neon_prefix} (${NEON_VERSION})"
neon_xml_parser_message="using whatever neon uses"
-if $NEON_CONFIG --support ssl >/dev/null; then
+if sh $NEON_CONFIG --support ssl >/dev/null; then
NE_FLAG_SSL=yes
@@ -10401,7 +10401,7 @@
fi
-if $NEON_CONFIG --support zlib >/dev/null; then
+if sh $NEON_CONFIG --support zlib >/dev/null; then
NE_FLAG_ZLIB=yes
@@ -10425,7 +10425,7 @@
fi
-if $NEON_CONFIG --support ipv6 >/dev/null; then
+if sh $NEON_CONFIG --support ipv6 >/dev/null; then
NE_FLAG_IPV6=yes
@@ -10449,7 +10449,7 @@
fi
-if $NEON_CONFIG --support lfs >/dev/null; then
+if sh $NEON_CONFIG --support lfs >/dev/null; then
NE_FLAG_LFS=yes
@@ -10473,7 +10473,7 @@
fi
-if $NEON_CONFIG --support ts_ssl >/dev/null; then
+if sh $NEON_CONFIG --support ts_ssl >/dev/null; then
NE_FLAG_TS_SSL=yes
@@ -17660,7 +17660,7 @@
if test -n "$XML2_CONFIG"; then
- neon_xml_parser_message="libxml `$XML2_CONFIG --version`"
+ neon_xml_parser_message="libxml `sh $XML2_CONFIG --version`"
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBXML 1
@@ -17668,8 +17668,8 @@
# xml2-config in some versions erroneously includes -I/include
# in the --cflags output.
- CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags | sed 's| -I/include||g'`"
- NEON_LIBS="$NEON_LIBS `$XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`"
+ CPPFLAGS="$CPPFLAGS `sh $XML2_CONFIG --cflags | sed 's| -I/include||g'`"
+ NEON_LIBS="$NEON_LIBS `sh $XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`"
for ac_header in libxml/xmlversion.h libxml/parser.h
@@ -18656,7 +18656,7 @@
if test -n "$XML2_CONFIG"; then
- neon_xml_parser_message="libxml `$XML2_CONFIG --version`"
+ neon_xml_parser_message="libxml `sh $XML2_CONFIG --version`"
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBXML 1
@@ -18664,8 +18664,8 @@
# xml2-config in some versions erroneously includes -I/include
# in the --cflags output.
- CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags | sed 's| -I/include||g'`"
- NEON_LIBS="$NEON_LIBS `$XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`"
+ CPPFLAGS="$CPPFLAGS `sh $XML2_CONFIG --cflags | sed 's| -I/include||g'`"
+ NEON_LIBS="$NEON_LIBS `sh $XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`"
for ac_header in libxml/xmlversion.h libxml/parser.h

View File

@ -0,0 +1,26 @@
--- a/lib/tempname.c
+++ b/lib/tempname.c
@@ -29,8 +29,11 @@
#endif
#include <stdio.h>
+#ifdef __ANDROID__
+# undef P_tmpdir
+#endif
#ifndef P_tmpdir
-# define P_tmpdir "/tmp"
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
#endif
#ifndef TMP_MAX
# define TMP_MAX 238328
@@ -190,8 +193,8 @@
{
if (direxists (P_tmpdir))
dir = P_tmpdir;
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
- dir = "/tmp";
+ else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp"))
+ dir = "@TERMUX_PREFIX@/tmp";
else
{
__set_errno (ENOENT);

View File

@ -0,0 +1,20 @@
--- a/src/commands.c
+++ b/src/commands.c
@@ -795,12 +795,14 @@
tmp = getenv("PAGER");
if (tmp != NULL) {
return tmp;
+#ifndef __ANDROID__
} else if (stat("/usr/bin/less", &st) == 0) {
return "/usr/bin/less";
- } else if (stat("/bin/less", &st) == 0) {
- return "/bin/less";
+#endif
+ } else if (stat("@TERMUX_PREFIX@/bin/less", &st) == 0) {
+ return "@TERMUX_PREFIX@/bin/less";
} else {
- return "/bin/more";
+ return "@TERMUX_PREFIX@/bin/more";
}
}

View File

@ -0,0 +1,11 @@
--- a/src/edit.c
+++ b/src/edit.c
@@ -114,7 +114,7 @@
char *real_remote;
unsigned int can_lock; /* can we LOCK it? */
struct ne_lock *lock = NULL;
- char fname[PATH_MAX] = "/tmp/cadaver-edit-XXXXXX";
+ char fname[PATH_MAX] = "@TERMUX_PREFIX@/tmp/cadaver-edit-XXXXXX";
const char *pnt;
int fd;
int is_checkout, is_checkin;