mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 22:18:55 +02:00
Transmission 2.82 recipe and patch
This commit is contained in:
108
net-p2p/transmission/patches/transmission-2.82.patch
Normal file
108
net-p2p/transmission/patches/transmission-2.82.patch
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
diff -ur transmission-2.82/libtransmission/platform-quota.c transmission-2.82-haiku/libtransmission/platform-quota.c
|
||||||
|
--- transmission-2.82/libtransmission/platform-quota.c 2013-08-09 02:45:44.822345728 +0000
|
||||||
|
+++ transmission-2.82-haiku/libtransmission/platform-quota.c 2013-12-27 10:29:53.872415232 +0000
|
||||||
|
@@ -16,7 +16,7 @@
|
||||||
|
#include <unistd.h> /* getuid() */
|
||||||
|
#include <event2/util.h> /* evutil_ascii_strcasecmp () */
|
||||||
|
|
||||||
|
-#ifndef WIN32
|
||||||
|
+#if !defined(WIN32) && !defined(__HAIKU__)
|
||||||
|
#include <sys/types.h> /* types needed by quota.h */
|
||||||
|
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
|
#include <ufs/ufs/quota.h> /* quotactl() */
|
||||||
|
@@ -67,7 +67,7 @@
|
||||||
|
****
|
||||||
|
***/
|
||||||
|
|
||||||
|
-#ifndef WIN32
|
||||||
|
+#if !defined(WIN32) && !defined(__HAIKU__)
|
||||||
|
static const char *
|
||||||
|
getdev (const char * path)
|
||||||
|
{
|
||||||
|
@@ -300,7 +300,7 @@
|
||||||
|
{
|
||||||
|
int64_t ret = -1;
|
||||||
|
|
||||||
|
-#ifndef WIN32
|
||||||
|
+#if !defined(WIN32) && !defined(__HAIKU__)
|
||||||
|
|
||||||
|
if (info->fstype && !evutil_ascii_strcasecmp(info->fstype, "xfs"))
|
||||||
|
{
|
||||||
|
@@ -347,7 +347,7 @@
|
||||||
|
|
||||||
|
info = tr_new0 (struct tr_device_info, 1);
|
||||||
|
info->path = tr_strdup (path);
|
||||||
|
-#ifndef WIN32
|
||||||
|
+#if !defined(WIN32) && !defined(__HAIKU__)
|
||||||
|
info->device = tr_strdup (getblkdev (path));
|
||||||
|
info->fstype = tr_strdup (getfstype (path));
|
||||||
|
#endif
|
||||||
|
diff -ur transmission-2.82/third-party/miniupnp/connecthostport.c transmission-2.82-haiku/third-party/miniupnp/connecthostport.c
|
||||||
|
--- transmission-2.82/third-party/miniupnp/connecthostport.c 2013-08-09 02:47:50.398196736 +0000
|
||||||
|
+++ transmission-2.82-haiku/third-party/miniupnp/connecthostport.c 2013-12-27 10:30:00.589037568 +0000
|
||||||
|
@@ -24,6 +24,7 @@
|
||||||
|
#else /* #ifdef _WIN32 */
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
+#include <sys/select.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#define closesocket close
|
||||||
|
#include <netdb.h>
|
||||||
|
diff -ur transmission-2.82/third-party/miniupnp/miniupnpc.c transmission-2.82-haiku/third-party/miniupnp/miniupnpc.c
|
||||||
|
--- transmission-2.82/third-party/miniupnp/miniupnpc.c 2013-08-09 02:47:50.894435328 +0000
|
||||||
|
+++ transmission-2.82-haiku/third-party/miniupnp/miniupnpc.c 2013-12-27 10:30:00.625737728 +0000
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(MACOSX) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun)
|
||||||
|
+#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(MACOSX) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__HAIKU__)
|
||||||
|
#define HAS_IP_MREQN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff -ur transmission-2.82/third-party/miniupnp/portlistingparse.c transmission-2.82-haiku/third-party/miniupnp/portlistingparse.c
|
||||||
|
--- transmission-2.82/third-party/miniupnp/portlistingparse.c 2013-08-09 02:47:50.074186752 +0000
|
||||||
|
+++ transmission-2.82-haiku/third-party/miniupnp/portlistingparse.c 2013-12-27 10:30:00.638582784 +0000
|
||||||
|
@@ -28,7 +28,7 @@
|
||||||
|
|
||||||
|
/* Helper function */
|
||||||
|
static UNSIGNED_INTEGER
|
||||||
|
-atoui(const char * p, int l)
|
||||||
|
+my_atoui(const char * p, int l)
|
||||||
|
{
|
||||||
|
UNSIGNED_INTEGER r = 0;
|
||||||
|
while(l > 0 && *p)
|
||||||
|
@@ -92,7 +92,7 @@
|
||||||
|
pm->remoteHost[l] = '\0';
|
||||||
|
break;
|
||||||
|
case NewExternalPort:
|
||||||
|
- pm->externalPort = (unsigned short)atoui(data, l);
|
||||||
|
+ pm->externalPort = (unsigned short)my_atoui(data, l);
|
||||||
|
break;
|
||||||
|
case NewProtocol:
|
||||||
|
if(l > 3)
|
||||||
|
@@ -101,21 +101,21 @@
|
||||||
|
pm->protocol[l] = '\0';
|
||||||
|
break;
|
||||||
|
case NewInternalPort:
|
||||||
|
- pm->internalPort = (unsigned short)atoui(data, l);
|
||||||
|
+ pm->internalPort = (unsigned short)my_atoui(data, l);
|
||||||
|
break;
|
||||||
|
case NewInternalClient:
|
||||||
|
memcpy(pm->internalClient, data, l);
|
||||||
|
pm->internalClient[l] = '\0';
|
||||||
|
break;
|
||||||
|
case NewEnabled:
|
||||||
|
- pm->enabled = (unsigned char)atoui(data, l);
|
||||||
|
+ pm->enabled = (unsigned char)my_atoui(data, l);
|
||||||
|
break;
|
||||||
|
case NewDescription:
|
||||||
|
memcpy(pm->description, data, l);
|
||||||
|
pm->description[l] = '\0';
|
||||||
|
break;
|
||||||
|
case NewLeaseTime:
|
||||||
|
- pm->leaseTime = atoui(data, l);
|
||||||
|
+ pm->leaseTime = my_atoui(data, l);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
104
net-p2p/transmission/transmission-2.82.recipe
Normal file
104
net-p2p/transmission/transmission-2.82.recipe
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
SUMMARY="Transmission is a cross-platform open source BitTorrent client"
|
||||||
|
DESCRIPTION="Transmission is a cross-platform BitTorrent client that is:
|
||||||
|
|
||||||
|
Open Source.
|
||||||
|
|
||||||
|
Transmission is an open source, volunteer-based project. Unlike some BitTorrent clients, Transmission doesn't play games with its users to make money:
|
||||||
|
|
||||||
|
Transmission doesn't bundle toolbars, pop-up ads, flash ads, twitter tools, or anything else.
|
||||||
|
It doesn't hold some feaures back for a payware version.
|
||||||
|
Its source code is available for anyone to review.
|
||||||
|
We don't track our users, and our website and forums have no third-party ads or analytics.
|
||||||
|
|
||||||
|
Easy.
|
||||||
|
|
||||||
|
Transmission is designed for easy, powerful use. We've set the defaults to Just Work and it only takes a few clicks to configure advanced features like watch directories, bad peer blocklists, and the web interface.
|
||||||
|
|
||||||
|
Lean.
|
||||||
|
|
||||||
|
In separate benchmarks, Linux Format and Lacrocivious both found Transmission to use less CPU than any other GUI client. It even used less CPU than some non-GUI clients.
|
||||||
|
|
||||||
|
Transmission also has the lowest memory footprint of any major BitTorrent client.
|
||||||
|
|
||||||
|
Imageshack chose Transmission for its BitTorrent farms because the competition requires amounts of memory several times greater than Transmission.
|
||||||
|
|
||||||
|
Transmission's small footprint is one reason why many home device manufacturers, such as FON, Belkin, and Networked Media Tank ship with Transmission. When Belkin and Vuze Inc. partnered to write a Torrent Genie to let people who ran Vuze and owned a Belkin router keep sharing files even when Vuze wasn't running, they decided to use Transmission -- not Vuze's own BitTorrent client -- on the router.
|
||||||
|
|
||||||
|
Native.
|
||||||
|
|
||||||
|
Unlike many cross-platform applications, Transmission integrates seamlessly with your operating system.
|
||||||
|
|
||||||
|
Powerful.
|
||||||
|
|
||||||
|
Transmission has the features you want from a BitTorrent client: encryption, a web interface, peer exchange, magnet links, DHT, µTP, UPnP and NAT-PMP port forwarding, webseed support, watch directories, tracker editing, global and per-torrent speed limits, and more."
|
||||||
|
|
||||||
|
HOMEPAGE="http://www.transmissionbt.com/"
|
||||||
|
SRC_URI="https://transmission.cachefly.net/transmission-2.82.tar.xz"
|
||||||
|
CHECKSUM_MD5="a5ef870c0410b12d10449c2d36fa4661"
|
||||||
|
|
||||||
|
REVISION="1"
|
||||||
|
|
||||||
|
ARCHITECTURES="x86 ?x86_64"
|
||||||
|
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||||
|
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||||
|
# for a different secondary architecture.
|
||||||
|
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||||
|
else
|
||||||
|
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
|
||||||
|
fi
|
||||||
|
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
|
||||||
|
|
||||||
|
PROVIDES="
|
||||||
|
transmission = $portVersion
|
||||||
|
cmd:transmission_cli$secondaryArchSuffix
|
||||||
|
cmd:transmission_create$secondaryArchSuffix
|
||||||
|
cmd:transmission_daemon$secondaryArchSuffix
|
||||||
|
cmd:transmission_edit$secondaryArchSuffix
|
||||||
|
cmd:transmission_remote$secondaryArchSuffix
|
||||||
|
cmd:transmission_show$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
REQUIRES="
|
||||||
|
haiku$secondaryArchSuffix >= $haikuVersion
|
||||||
|
lib:libssl$secondaryArchSuffix
|
||||||
|
lib:libcrypto$secondaryArchSuffix
|
||||||
|
lib:libcurl$secondaryArchSuffix
|
||||||
|
lib:libevent$secondaryArchSuffix
|
||||||
|
lib:libiconv$secondaryArchSuffix
|
||||||
|
lib:libintl$secondaryArchSuffix
|
||||||
|
lib:libz$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
BUILD_REQUIRES="
|
||||||
|
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||||
|
devel:libssl$secondaryArchSuffix
|
||||||
|
devel:libcurl$secondaryArchSuffix
|
||||||
|
devel:libz$secondaryArchSuffix
|
||||||
|
devel:libevent$secondaryArchSuffix
|
||||||
|
devel:libiconv$secondaryArchSuffix
|
||||||
|
devel:libgettextlib$secondaryArchSuffix >= 0.14.1
|
||||||
|
intltool >= 0.40
|
||||||
|
"
|
||||||
|
BUILD_PREREQUIRES="
|
||||||
|
cmd:gcc$secondaryArchSuffix
|
||||||
|
cmd:ld$secondaryArchSuffix
|
||||||
|
cmd:pkg_config$secondaryArchSuffix
|
||||||
|
cmd:make
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="Transmission
|
||||||
|
MIT
|
||||||
|
GNU GPL v2
|
||||||
|
"
|
||||||
|
COPYRIGHT="2005-2013. All code is copyrighted by the respective authors."
|
||||||
|
|
||||||
|
PATCHES="transmission-2.82.patch"
|
||||||
|
|
||||||
|
BUILD()
|
||||||
|
{
|
||||||
|
runConfigure ./configure --without-gtk --datadir=$dataDir
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTALL()
|
||||||
|
{
|
||||||
|
make install
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user