new package: transmission-gtk - same as 'transmission' from termux-packages but with gtk3 support
This commit is contained in:
parent
2832655766
commit
5d968b6a54
29
x11-packages/transmission-gtk/build.sh
Normal file
29
x11-packages/transmission-gtk/build.sh
Normal file
@ -0,0 +1,29 @@
|
||||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
|
||||
|
||||
TERMUX_PKG_HOMEPAGE=https://transmissionbt.com/
|
||||
TERMUX_PKG_DESCRIPTION="Easy, lean and powerful BitTorrent client (gtk3)"
|
||||
TERMUX_PKG_VERSION=2.94
|
||||
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-x, libcurl, libevent, openssl, pango-x"
|
||||
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_step_pre_configure() {
|
||||
./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
|
||||
chmod a-w termux_configure.cache
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
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 */
|
@ -0,0 +1,53 @@
|
||||
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
|
||||
|
@ -0,0 +1,12 @@
|
||||
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;
|
@ -0,0 +1,12 @@
|
||||
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);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
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
|
@ -0,0 +1,12 @@
|
||||
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
|
@ -0,0 +1,12 @@
|
||||
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) */
|
@ -0,0 +1,12 @@
|
||||
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);
|
@ -0,0 +1,12 @@
|
||||
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