Browse Source

transmission: Update from 2.84 to 2.92

android-5
Fredrik Fornwall 9 years ago
parent
commit
4f16bcb43a
  1. 2
      packages/transmission/build.sh
  2. 14
      packages/transmission/fdlimit.c.patch
  3. 11
      packages/transmission/libtransmission-fdlimit.c.patch
  4. 83
      packages/transmission/no_setlocale_in_variant_c.patch

2
packages/transmission/build.sh

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://www.transmissionbt.com/
TERMUX_PKG_DESCRIPTION="Easy, lean and powerful BitTorrent client"
TERMUX_PKG_DEPENDS="curl, libevent, openssl"
TERMUX_PKG_VERSION=2.84
TERMUX_PKG_VERSION=2.92
TERMUX_PKG_SRCURL=https://transmission.cachefly.net/transmission-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-gtk --enable-lightweight --cache-file=termux_configure.cache"

14
packages/transmission/fdlimit.c.patch

@ -1,14 +0,0 @@
fallocate64() is already defined in <fcntl.h> for android-21
diff -u -r ../transmission-2.84/libtransmission/fdlimit.c ./libtransmission/fdlimit.c
--- ../transmission-2.84/libtransmission/fdlimit.c 2014-07-01 13:08:59.298910687 -0400
+++ ./libtransmission/fdlimit.c 2014-12-20 05:47:58.563577502 -0500
@@ -22,7 +22,7 @@
#include <fcntl.h>
#endif
-#ifdef HAVE_FALLOCATE64
+#if defined HAVE_FALLOCATE64 && !(defined __ANDROID__)
/* FIXME can't find the right #include voodoo to pick up the declaration.. */
extern int fallocate64 (int fd, int mode, uint64_t offset, uint64_t len);
#endif

11
packages/transmission/libtransmission-fdlimit.c.patch

@ -0,0 +1,11 @@
diff -u -r ../transmission-2.92/libtransmission/fdlimit.c ./libtransmission/fdlimit.c
--- ../transmission-2.92/libtransmission/fdlimit.c 2015-10-23 21:35:22.638234970 -0400
+++ ./libtransmission/fdlimit.c 2016-03-07 20:32:58.075869242 -0500
@@ -11,6 +11,7 @@
#include <errno.h>
#include <inttypes.h>
#include <string.h>
+#include <sys/select.h>
#ifndef _WIN32
#include <sys/time.h> /* getrlimit */

83
packages/transmission/no_setlocale_in_variant_c.patch

@ -1,83 +0,0 @@
diff -u -r ../transmission-2.82/libtransmission/variant.c ./libtransmission/variant.c
--- ../transmission-2.82/libtransmission/variant.c 2013-08-09 04:45:40.000000000 +0200
+++ ./libtransmission/variant.c 2014-02-10 17:30:57.000000000 +0100
@@ -22,7 +22,9 @@
#include <sys/stat.h>
#endif
+#ifndef __ANDROID__
#include <locale.h> /* setlocale() */
+#endif
#include <unistd.h> /* write() */
#include <event2/buffer.h>
@@ -308,14 +310,20 @@
if (!success && tr_variantIsString (v))
{
char * endptr;
+#ifndef __ANDROID__
char locale[128];
+#endif
double d;
/* the json spec requires a '.' decimal point regardless of locale */
+#ifndef __ANDROID__
tr_strlcpy (locale, setlocale (LC_NUMERIC, NULL), sizeof (locale));
setlocale (LC_NUMERIC, "POSIX");
+#endif
d = strtod (getStr (v), &endptr);
+#ifndef __ANDROID__
setlocale (LC_NUMERIC, locale);
+#endif
if ((success = (getStr (v) != endptr) && !*endptr))
*setme = d;
@@ -1088,12 +1096,16 @@
struct evbuffer *
tr_variantToBuf (const tr_variant * v, tr_variant_fmt fmt)
{
+#ifndef __ANDROID__
char lc_numeric[128];
+#endif
struct evbuffer * buf = evbuffer_new();
+#ifndef __ANDROID__
/* parse with LC_NUMERIC="C" to ensure a "." decimal separator */
tr_strlcpy (lc_numeric, setlocale (LC_NUMERIC, NULL), sizeof (lc_numeric));
setlocale (LC_NUMERIC, "C");
+#endif
evbuffer_expand (buf, 4096); /* alloc a little memory to start off with */
@@ -1113,7 +1125,9 @@
}
/* restore the previous locale */
+#ifndef __ANDROID__
setlocale (LC_NUMERIC, lc_numeric);
+#endif
return buf;
}
@@ -1272,9 +1286,11 @@
int err;
char lc_numeric[128];
+#ifndef __ANDROID__
/* parse with LC_NUMERIC="C" to ensure a "." decimal separator */
tr_strlcpy (lc_numeric, setlocale (LC_NUMERIC, NULL), sizeof (lc_numeric));
setlocale (LC_NUMERIC, "C");
+#endif
switch (fmt)
{
@@ -1288,7 +1304,9 @@
break;
}
+#ifndef __ANDROID__
/* restore the previous locale */
setlocale (LC_NUMERIC, lc_numeric);
+#endif
return err;
}
Loading…
Cancel
Save