transmission: update to 3.00

This commit is contained in:
Henrik Grimler 2020-05-14 21:43:07 +02:00
parent 492762f4cb
commit 5d9df78e7c
5 changed files with 80 additions and 85 deletions

View File

@ -10,18 +10,16 @@ diff -u -r ../transmission-2.82/third-party/libnatpmp/getgateway.h ./third-party
/* getdefaultgateway() :
* return value :
* 0 : success
diff -u -r ../transmission-2.82/third-party/libnatpmp/natpmp.c ./third-party/libnatpmp/natpmp.c
--- ../transmission-2.82/third-party/libnatpmp/natpmp.c 2013-08-09 04:47:55.000000000 +0200
+++ ./third-party/libnatpmp/natpmp.c 2014-01-28 23:56:20.000000000 +0100
@@ -53,6 +53,8 @@
--- ../natpmp.c.orig 2020-05-14 20:17:03.002657737 +0200
+++ ./third-party/libnatpmp/natpmp.c 2020-05-14 20:17:34.527090133 +0200
@@ -54,6 +54,7 @@
#include "natpmp.h"
#include "getgateway.h"
#include <stdio.h>
+#include <arpa/inet.h>
+
LIBSPEC int initnatpmp(natpmp_t * p, int forcegw, in_addr_t forcedgw)
NATPMP_LIBSPEC int initnatpmp(natpmp_t * p, int forcegw, in_addr_t forcedgw)
{
#ifdef WIN32
diff -u -r ../transmission-2.82/third-party/libnatpmp/natpmp.h ./third-party/libnatpmp/natpmp.h
--- ../transmission-2.82/third-party/libnatpmp/natpmp.h 2013-08-09 04:47:55.000000000 +0200
+++ ./third-party/libnatpmp/natpmp.h 2014-01-28 23:58:05.000000000 +0100

View File

@ -1,10 +1,8 @@
TERMUX_PKG_HOMEPAGE=https://transmissionbt.com/
TERMUX_PKG_DESCRIPTION="Easy, lean and powerful BitTorrent client"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_VERSION=2.94
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=https://github.com/transmission/transmission/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=440c2fd0f89b1ab59d8a4b79ecd7bffd61bc000e36fb5b6c8e88142a4fadbb1f
TERMUX_PKG_VERSION=3.00
TERMUX_PKG_SRCURL=https://github.com/transmission/transmission.git
TERMUX_PKG_DEPENDS="libcurl, libevent, miniupnpc, openssl"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-gtk --enable-lightweight --cache-file=termux_configure.cache"
# transmission already puts timestamps in the info printed to stdout so no need for svlogd -tt,
@ -14,6 +12,26 @@ TERMUX_PKG_SERVICE_SCRIPT=(
"transmission/log" 'mkdir -p "$LOGDIR/sv/transmission"\nexec svlogd "$LOGDIR/sv/transmission"'
)
termux_step_extract_package() {
local CHECKED_OUT_FOLDER=$TERMUX_PKG_CACHEDIR/checkout-$TERMUX_PKG_VERSION
if [ ! -d $CHECKED_OUT_FOLDER ]; then
local TMP_CHECKOUT=$TERMUX_PKG_TMPDIR/tmp-checkout
rm -Rf $TMP_CHECKOUT
mkdir -p $TMP_CHECKOUT
git clone --depth 1 \
--branch $TERMUX_PKG_VERSION \
$TERMUX_PKG_SRCURL \
$TMP_CHECKOUT
cd $TMP_CHECKOUT
git submodule update --init --recursive
mv $TMP_CHECKOUT $CHECKED_OUT_FOLDER
fi
rm -rf $TERMUX_PKG_SRCDIR
cp -Rf $CHECKED_OUT_FOLDER $TERMUX_PKG_SRCDIR
}
termux_step_pre_configure() {
./autogen.sh

View File

@ -1,12 +0,0 @@
diff -u -r ../transmission-2.82/third-party/miniupnp/miniwget.c ./third-party/miniupnp/miniwget.c
--- ../transmission-2.82/third-party/miniupnp/miniwget.c 2013-08-09 04:47:50.000000000 +0200
+++ ./third-party/miniupnp/miniwget.c 2014-02-10 17:08:34.000000000 +0100
@@ -42,7 +42,7 @@
* during the connect() call */
#define MINIUPNPC_IGNORE_EINTR
#endif /* #else _WIN32 */
-#if defined(__sun) || defined(sun)
+#if defined(__sun) || defined(sun) || defined __ANDROID__
#define MIN(x,y) (((x)<(y))?(x):(y))
#endif

View File

@ -1,12 +1,11 @@
diff -u -r ../transmission-2.82/libtransmission/utils.c ./libtransmission/utils.c
--- ../transmission-2.82/libtransmission/utils.c 2013-08-09 04:45:40.000000000 +0200
+++ ./libtransmission/utils.c 2014-01-29 00:08:31.000000000 +0100
@@ -1412,7 +1412,7 @@
char buf[128];
const int max_precision = (int) log10 (1.0 / DBL_EPSILON) - 1;
tr_snprintf (buf, sizeof (buf), "%.*f", max_precision, x);
- if ((pt = strstr (buf, localeconv ()->decimal_point)))
+ if ((pt = strstr (buf, ".")))
pt[precision ? precision+1 : 0] = '\0';
return atof (buf);
}
--- ./libtransmission/utils.c.orig 2020-05-14 20:22:41.415540431 +0200
+++ ./libtransmission/utils.c 2020-05-14 20:23:46.340145553 +0200
@@ -1627,7 +1627,7 @@
char buf[128];
tr_snprintf(buf, sizeof(buf), "%.*f", DBL_DIG, x);
- if ((pt = strstr(buf, localeconv()->decimal_point)) != NULL)
+ if ((pt = strstr(buf, ".")) != NULL)
{
pt[precision != 0 ? precision + 1 : 0] = '\0';
}

View File

@ -1,53 +1,45 @@
diff -u -r ../transmission-2.82/libtransmission/platform-quota.c ./libtransmission/platform-quota.c
--- ../transmission-2.82/libtransmission/platform-quota.c 2013-08-09 04:45:44.000000000 +0200
+++ ./libtransmission/platform-quota.c 2014-02-10 17:07:13.000000000 +0100
@@ -22,7 +22,7 @@
#include <ufs/ufs/quota.h> /* quotactl() */
#elif defined (__sun)
#include <sys/fs/ufs_quota.h> /* quotactl */
- #else
+ #elif !defined(__ANDROID__)
#include <sys/quota.h> /* quotactl() */
#endif
#ifdef HAVE_GETMNTENT
@@ -71,7 +71,9 @@
static const char *
getdev (const char * path)
{
-#ifdef HAVE_GETMNTENT
+#ifdef __ANDROID__
+ return NULL;
+#elif defined(HAVE_GETMNTENT)
FILE * fp;
@@ -122,8 +124,9 @@
static const char *
getfstype (const char * device)
{
-
-#ifdef HAVE_GETMNTENT
+#ifdef __ANDROID__
+ return NULL;
+#elif defined(HAVE_GETMNTENT)
FILE * fp;
#ifdef __sun
@@ -198,6 +201,9 @@
static int64_t
getquota (const char * device)
{
+#ifdef __ANDROID__
+ return -1;
+#else
struct dqblk dq;
int64_t limit;
int64_t freespace;
@@ -258,6 +264,7 @@
--- ../platform-quota.c.orig 2020-05-14 20:26:21.167021182 +0200
+++ ./libtransmission/platform-quota.c 2020-05-14 21:35:02.917361346 +0200
@@ -26,7 +26,7 @@
#endif
/* something went wrong */
return -1;
#elif defined(__sun)
#include <sys/fs/ufs_quota.h> /* quotactl */
-#else
+#elif !defined(__ANDROID__)
#include <sys/quota.h> /* quotactl() */
#endif
#ifdef HAVE_GETMNTENT
@@ -77,7 +77,9 @@
static char const* getdev(char const* path)
{
-#ifdef HAVE_GETMNTENT
+#ifdef __ANDROID__
+ return NULL;
+#elif defined(HAVE_GETMNTENT)
FILE* fp;
@@ -315,11 +317,12 @@
static int64_t getquota(char const* device)
{
-#if defined(__DragonFly__)
+#ifdef __ANDROID__
+ return -1;
+#elif defined(__DragonFly__)
struct ufs_dqblk dq;
#else
struct dqblk dq;
-#endif
int64_t limit;
int64_t freespace;
int64_t spaceused;
@@ -389,6 +392,7 @@
/* something went wrong */
return -1;
+#endif
}
#ifdef HAVE_XQM
#endif