transmission-gtk: update to 3.00
This commit is contained in:
parent
cb23c90d39
commit
e9a7dd856a
34
x11-packages/transmission-gtk/arpa_inet_h.patch
Normal file
34
x11-packages/transmission-gtk/arpa_inet_h.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff -u -r ../transmission-2.82/third-party/libnatpmp/getgateway.h ./third-party/libnatpmp/getgateway.h
|
||||
--- ../transmission-2.82/third-party/libnatpmp/getgateway.h 2013-08-09 04:47:55.000000000 +0200
|
||||
+++ ./third-party/libnatpmp/getgateway.h 2014-01-28 23:57:43.000000000 +0100
|
||||
@@ -40,6 +40,8 @@
|
||||
#endif
|
||||
#include "declspec.h"
|
||||
|
||||
+#include <arpa/inet.h>
|
||||
+
|
||||
/* getdefaultgateway() :
|
||||
* return value :
|
||||
* 0 : success
|
||||
--- ../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>
|
||||
|
||||
NATPMP_LIBSPEC int initnatpmp(natpmp_t * p, int forcegw, in_addr_t forcedgw)
|
||||
{
|
||||
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
|
||||
@@ -51,6 +51,8 @@
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
+#include <arpa/inet.h>
|
||||
+
|
||||
typedef struct {
|
||||
int s; /* socket */
|
||||
in_addr_t gateway; /* default gateway (IPv4) */
|
@ -1,30 +1,23 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://transmissionbt.com/
|
||||
TERMUX_PKG_DESCRIPTION="Easy, lean and powerful BitTorrent client (gtk3)"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=2.94
|
||||
TERMUX_PKG_REVISION=20
|
||||
TERMUX_PKG_SRCURL=https://github.com/transmission/transmission/archive/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=440c2fd0f89b1ab59d8a4b79ecd7bffd61bc000e36fb5b6c8e88142a4fadbb1f
|
||||
|
||||
TERMUX_PKG_DEPENDS="atk, gdk-pixbuf, glib, gtk3, libcairo, libcurl, libevent, openssl, pango, zlib"
|
||||
TERMUX_PKG_VERSION=3.00
|
||||
TERMUX_PKG_GIT_BRANCH=$TERMUX_PKG_VERSION
|
||||
TERMUX_PKG_SRCURL=https://github.com/transmission/transmission.git
|
||||
TERMUX_PKG_DEPENDS="atk, gdk-pixbuf, glib, gtk3, libcairo, libcurl, libevent, miniupnpc, openssl, pango, zlib"
|
||||
TERMUX_PKG_CONFLICTS="transmission"
|
||||
TERMUX_PKG_REPLACES="transmission"
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--enable-nls
|
||||
--enable-cli
|
||||
--enable-gtk
|
||||
--enable-lightweight
|
||||
--cache-file=termux_configure.cache
|
||||
"
|
||||
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="share/icons/hicolor/icon-theme.cache"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-nls --enable-cli --enable-gtk --enable-lightweight --cache-file=termux_configure.cache"
|
||||
# transmission already puts timestamps in the info printed to stdout so no need for svlogd -tt,
|
||||
# therefore we override the transmission/log run script
|
||||
TERMUX_PKG_SERVICE_SCRIPT=(
|
||||
"transmission" 'exec transmission-daemon -f 2>&1'
|
||||
"transmission/log" 'mkdir -p "$LOGDIR/sv/transmission"\nexec svlogd "$LOGDIR/sv/transmission"'
|
||||
)
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CFLAGS+=" -D_POSIX_C_SOURCE=200809L"
|
||||
./autogen.sh
|
||||
# liblog for android logging in syslog hack:
|
||||
LDFLAGS+=" -landroid-shmem -llog"
|
||||
|
||||
echo "ac_cv_func_getmntent=no" >> termux_configure.cache
|
||||
echo "ac_cv_search_getmntent=false" >> termux_configure.cache
|
||||
|
22
x11-packages/transmission-gtk/fix_paths.patch
Normal file
22
x11-packages/transmission-gtk/fix_paths.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/libtransmission/platform.c b/libtransmission/platform.c
|
||||
index cf0ecd825..1540dbf4f 100644
|
||||
--- a/libtransmission/platform.c
|
||||
+++ b/libtransmission/platform.c
|
||||
@@ -593,7 +593,7 @@ char const* tr_getWebClientDir(tr_session const* session UNUSED)
|
||||
{
|
||||
char const* pkg = PACKAGE_DATA_DIR;
|
||||
char* xdg = tr_env_get_string("XDG_DATA_DIRS", NULL);
|
||||
- char const* fallback = "/usr/local/share:/usr/share";
|
||||
+ char const* fallback = "@TERMUX_PREFIX@/share";
|
||||
char* buf = tr_strdup_printf("%s:%s:%s", pkg != NULL ? pkg : "", xdg != NULL ? xdg : "", fallback);
|
||||
tr_free(xdg);
|
||||
tmp = buf;
|
||||
@@ -649,7 +649,7 @@ char* tr_getSessionIdDir(void)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
|
||||
- return tr_strdup("/tmp");
|
||||
+ return tr_strdup("@TERMUX_PREFIX@/tmp");
|
||||
|
||||
#else
|
||||
|
@ -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 */
|
11
x11-packages/transmission-gtk/no_locale.patch
Normal file
11
x11-packages/transmission-gtk/no_locale.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ./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';
|
||||
}
|
45
x11-packages/transmission-gtk/no_quota.patch
Normal file
45
x11-packages/transmission-gtk/no_quota.patch
Normal file
@ -0,0 +1,45 @@
|
||||
--- ../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
|
||||
#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
|
||||
}
|
||||
|
||||
#endif
|
@ -1,11 +0,0 @@
|
||||
diff -uNr transmission-2.94/libtransmission/fdlimit.c transmission-2.94.mod/libtransmission/fdlimit.c
|
||||
--- transmission-2.94/libtransmission/fdlimit.c 2018-05-01 20:18:29.000000000 +0300
|
||||
+++ transmission-2.94.mod/libtransmission/fdlimit.c 2018-10-06 01:38:32.818041397 +0300
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
+#include <sys/select.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/time.h> /* getrlimit */
|
@ -1,53 +0,0 @@
|
||||
diff -uNr transmission-2.94/libtransmission/platform-quota.c transmission-2.94.mod/libtransmission/platform-quota.c
|
||||
--- transmission-2.94/libtransmission/platform-quota.c 2018-05-01 20:18:29.000000000 +0300
|
||||
+++ transmission-2.94.mod/libtransmission/platform-quota.c 2018-10-06 01:38:32.831374787 +0300
|
||||
@@ -25,7 +25,7 @@
|
||||
#endif
|
||||
#elif defined (__sun)
|
||||
#include <sys/fs/ufs_quota.h> /* quotactl */
|
||||
- #else
|
||||
+ #elif !defined(__ANDROID__)
|
||||
#include <sys/quota.h> /* quotactl() */
|
||||
#endif
|
||||
#ifdef HAVE_GETMNTENT
|
||||
@@ -76,7 +76,9 @@
|
||||
static const char *
|
||||
getdev (const char * path)
|
||||
{
|
||||
-#ifdef HAVE_GETMNTENT
|
||||
+#ifdef __ANDROID__
|
||||
+ return NULL;
|
||||
+#elif defined(HAVE_GETMNTENT)
|
||||
|
||||
FILE * fp;
|
||||
|
||||
@@ -127,8 +129,9 @@
|
||||
static const char *
|
||||
getfstype (const char * device)
|
||||
{
|
||||
-
|
||||
-#ifdef HAVE_GETMNTENT
|
||||
+#ifdef __ANDROID__
|
||||
+ return NULL;
|
||||
+#elif defined(HAVE_GETMNTENT)
|
||||
|
||||
FILE * fp;
|
||||
#ifdef __sun
|
||||
@@ -244,6 +247,9 @@
|
||||
static int64_t
|
||||
getquota (const char * device)
|
||||
{
|
||||
+#ifdef __ANDROID__
|
||||
+ return -1;
|
||||
+#else
|
||||
struct dqblk dq;
|
||||
int64_t limit;
|
||||
int64_t freespace;
|
||||
@@ -304,6 +310,7 @@
|
||||
#endif
|
||||
/* something went wrong */
|
||||
return -1;
|
||||
+#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -uNr transmission-2.94/libtransmission/platform.c transmission-2.94.mod/libtransmission/platform.c
|
||||
--- transmission-2.94/libtransmission/platform.c 2018-05-01 20:18:29.000000000 +0300
|
||||
+++ transmission-2.94.mod/libtransmission/platform.c 2018-10-06 01:44:35.722770450 +0300
|
||||
@@ -543,7 +543,7 @@
|
||||
{
|
||||
const char * pkg = PACKAGE_DATA_DIR;
|
||||
char * xdg = tr_env_get_string ("XDG_DATA_DIRS", NULL);
|
||||
- const char * fallback = "/usr/local/share:/usr/share";
|
||||
+ const char * fallback = "@TERMUX_PREFIX@/share";
|
||||
char * buf = tr_strdup_printf ("%s:%s:%s", (pkg?pkg:""), (xdg?xdg:""), fallback);
|
||||
tr_free (xdg);
|
||||
tmp = buf;
|
@ -1,12 +0,0 @@
|
||||
diff -uNr transmission-2.94/libtransmission/utils.c transmission-2.94.mod/libtransmission/utils.c
|
||||
--- transmission-2.94/libtransmission/utils.c 2018-05-01 20:18:29.000000000 +0300
|
||||
+++ transmission-2.94.mod/libtransmission/utils.c 2018-10-06 01:38:32.831374787 +0300
|
||||
@@ -1416,7 +1416,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);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
diff -uNr transmission-2.94/third-party/libnatpmp/getgateway.h transmission-2.94.mod/third-party/libnatpmp/getgateway.h
|
||||
--- transmission-2.94/third-party/libnatpmp/getgateway.h 2018-05-01 20:18:29.000000000 +0300
|
||||
+++ transmission-2.94.mod/third-party/libnatpmp/getgateway.h 2018-10-06 01:38:32.811374701 +0300
|
||||
@@ -40,6 +40,8 @@
|
||||
#endif
|
||||
#include "declspec.h"
|
||||
|
||||
+#include <arpa/inet.h>
|
||||
+
|
||||
/* getdefaultgateway() :
|
||||
* return value :
|
||||
* 0 : success
|
@ -1,12 +0,0 @@
|
||||
diff -uNr transmission-2.94/third-party/libnatpmp/natpmp.c transmission-2.94.mod/third-party/libnatpmp/natpmp.c
|
||||
--- transmission-2.94/third-party/libnatpmp/natpmp.c 2018-05-01 20:18:29.000000000 +0300
|
||||
+++ transmission-2.94.mod/third-party/libnatpmp/natpmp.c 2018-10-06 01:38:32.814708049 +0300
|
||||
@@ -53,6 +53,8 @@
|
||||
#include "natpmp.h"
|
||||
#include "getgateway.h"
|
||||
|
||||
+#include <arpa/inet.h>
|
||||
+
|
||||
LIBSPEC int initnatpmp(natpmp_t * p, int forcegw, in_addr_t forcedgw)
|
||||
{
|
||||
#ifdef WIN32
|
@ -1,12 +0,0 @@
|
||||
diff -uNr transmission-2.94/third-party/libnatpmp/natpmp.h transmission-2.94.mod/third-party/libnatpmp/natpmp.h
|
||||
--- transmission-2.94/third-party/libnatpmp/natpmp.h 2018-05-01 20:18:29.000000000 +0300
|
||||
+++ transmission-2.94.mod/third-party/libnatpmp/natpmp.h 2018-10-06 01:38:32.814708049 +0300
|
||||
@@ -51,6 +51,8 @@
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
+#include <arpa/inet.h>
|
||||
+
|
||||
typedef struct {
|
||||
int s; /* socket */
|
||||
in_addr_t gateway; /* default gateway (IPv4) */
|
@ -1,12 +0,0 @@
|
||||
diff -uNr transmission-2.94/third-party/miniupnp/miniupnpc.c transmission-2.94.mod/third-party/miniupnp/miniupnpc.c
|
||||
--- transmission-2.94/third-party/miniupnp/miniupnpc.c 2018-05-01 20:18:29.000000000 +0300
|
||||
+++ transmission-2.94.mod/third-party/miniupnp/miniupnpc.c 2018-10-06 01:43:49.465939838 +0300
|
||||
@@ -385,7 +385,7 @@
|
||||
#if !defined(_WIN32) && !defined(__amigaos__) && !defined(__amigaos4__)
|
||||
/* first try to get infos from minissdpd ! */
|
||||
if(!minissdpdsock)
|
||||
- minissdpdsock = "/var/run/minissdpd.sock";
|
||||
+ minissdpdsock = "@TERMUX_PREFIX@/var/run/minissdpd.sock";
|
||||
while(!devlist && deviceList[deviceIndex]) {
|
||||
devlist = getDevicesFromMiniSSDPD(deviceList[deviceIndex],
|
||||
minissdpdsock);
|
@ -1,12 +0,0 @@
|
||||
diff -uNr transmission-2.94/third-party/miniupnp/miniwget.c transmission-2.94.mod/third-party/miniupnp/miniwget.c
|
||||
--- transmission-2.94/third-party/miniupnp/miniwget.c 2018-05-01 20:18:29.000000000 +0300
|
||||
+++ transmission-2.94.mod/third-party/miniupnp/miniwget.c 2018-10-06 01:38:32.821374744 +0300
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <netdb.h>
|
||||
#define closesocket close
|
||||
#endif /* #else _WIN32 */
|
||||
-#if defined(__sun) || defined(sun)
|
||||
+#if defined(__sun) || defined(sun) || defined __ANDROID__
|
||||
#define MIN(x,y) (((x)<(y))?(x):(y))
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user