mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
transmission: add a recipe for version 2.84
* remove old recipes patches * enable x86_64 * clean description
This commit is contained in:
@@ -1,179 +0,0 @@
|
||||
diff -Naur transmission-1.42-orig/configure.ac transmission-1.42/configure.ac
|
||||
--- transmission-1.42-orig/configure.ac 2009-03-07 00:31:25.000000000 +0000
|
||||
+++ transmission-1.42/configure.ac 2009-03-07 00:31:54.000000000 +0000
|
||||
@@ -43,7 +43,7 @@
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
if test "x$GCC" = "xyes" ; then
|
||||
- CFLAGS="-g -Wall -Wformat-security -W -Wmissing-prototypes -Wdeclaration-after-statement -O3 -funroll-loops"
|
||||
+ CFLAGS="-g -Wall -Wformat-security -W -Wmissing-prototypes -O3 -funroll-loops"
|
||||
CXXFLAGS="-g -Wall -Wformat-security -W -O3 -funroll-loops"
|
||||
fi
|
||||
|
||||
diff -Naur transmission-1.42-orig/libtransmission/platform.c transmission-1.42/libtransmission/platform.c
|
||||
--- transmission-1.42-orig/libtransmission/platform.c 2009-03-07 00:31:25.000000000 +0000
|
||||
+++ transmission-1.42/libtransmission/platform.c 2009-03-07 00:33:53.000000000 +0000
|
||||
@@ -22,6 +22,8 @@
|
||||
#else
|
||||
#ifdef SYS_DARWIN
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
+ #elif defined(__HAIKU__)
|
||||
+ #include <FindDirectory.h>
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500 /* needed for recursive locks. */
|
||||
@@ -298,7 +300,7 @@
|
||||
|
||||
if( !path )
|
||||
{
|
||||
-#ifdef __BEOS__
|
||||
+#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
char buf[MAX_PATH_LENGTH];
|
||||
find_directory( B_USER_SETTINGS_DIRECTORY,
|
||||
dev_for_path( "/boot" ), true,
|
||||
@@ -348,7 +350,7 @@
|
||||
|
||||
if( !path )
|
||||
{
|
||||
-#if defined( __BEOS__ ) || defined( WIN32 )
|
||||
+#if defined( __BEOS__ ) || defined(__HAIKU__) || defined( WIN32 )
|
||||
path = tr_buildPath( getOldConfigDir( ), "Cache", NULL );
|
||||
#elif defined( SYS_DARWIN )
|
||||
path = tr_buildPath( getHomeDir( ), "Library", "Caches", "Transmission", NULL );
|
||||
@@ -467,6 +469,9 @@
|
||||
#ifdef SYS_DARWIN
|
||||
s = tr_buildPath( getHomeDir( ), "Library",
|
||||
"Application Support", "Transmission", NULL );
|
||||
+#elif defined(__HAIKU__)
|
||||
+ s = tr_buildPath( getHomeDir( ), "config",
|
||||
+ "settings", "Transmission", NULL );
|
||||
#elif defined( WIN32 )
|
||||
char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
|
||||
SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata );
|
||||
diff -Naur transmission-1.42-orig/third-party/libevent/test/bench.c transmission-1.42/third-party/libevent/test/bench.c
|
||||
--- transmission-1.42-orig/third-party/libevent/test/bench.c 2009-03-07 00:31:23.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/bench.c 2009-03-07 00:33:53.000000000 +0000
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
diff -Naur transmission-1.42-orig/third-party/libevent/test/regress.c transmission-1.42/third-party/libevent/test/regress.c
|
||||
--- transmission-1.42-orig/third-party/libevent/test/regress.c 2009-03-07 00:31:23.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress.c 2009-03-07 00:33:53.000000000 +0000
|
||||
@@ -43,7 +43,7 @@
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <sys/wait.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
diff -Naur transmission-1.42-orig/third-party/libevent/test/regress_dns.c transmission-1.42/third-party/libevent/test/regress_dns.c
|
||||
--- transmission-1.42-orig/third-party/libevent/test/regress_dns.c 2009-03-07 00:31:23.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress_dns.c 2009-03-07 00:33:53.000000000 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sys/queue.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
switch (type) {
|
||||
case DNS_IPv6_AAAA: {
|
||||
-#if defined(HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP)
|
||||
+#if defined(HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
|
||||
struct in6_addr *in6_addrs = addresses;
|
||||
char buf[INET6_ADDRSTRLEN+1];
|
||||
int i;
|
||||
@@ -258,7 +258,7 @@
|
||||
break;
|
||||
}
|
||||
case DNS_IPv6_AAAA: {
|
||||
-#if defined (HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP)
|
||||
+#if defined (HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
|
||||
struct in6_addr *in6_addrs = addresses;
|
||||
char buf[INET6_ADDRSTRLEN+1];
|
||||
if (memcmp(&in6_addrs[0].s6_addr, "abcdefghijklmnop", 16)
|
||||
diff -Naur transmission-1.42-orig/third-party/libevent/test/regress_http.c transmission-1.42/third-party/libevent/test/regress_http.c
|
||||
--- transmission-1.42-orig/third-party/libevent/test/regress_http.c 2009-03-07 00:31:23.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress_http.c 2009-03-07 00:33:53.000000000 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sys/queue.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
diff -Naur transmission-1.42-orig/third-party/libevent/test/regress_rpc.c transmission-1.42/third-party/libevent/test/regress_rpc.c
|
||||
--- transmission-1.42-orig/third-party/libevent/test/regress_rpc.c 2009-03-07 00:31:23.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress_rpc.c 2009-03-07 00:33:53.000000000 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sys/queue.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
diff -Naur transmission-1.42-orig/third-party/libnatpmp/getgateway.c transmission-1.42/third-party/libnatpmp/getgateway.c
|
||||
--- transmission-1.42-orig/third-party/libnatpmp/getgateway.c 2009-03-07 00:31:23.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libnatpmp/getgateway.c 2009-03-07 00:33:53.000000000 +0000
|
||||
@@ -37,6 +37,18 @@
|
||||
#undef USE_SYSCTL_NET_ROUTE
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#undef USE_PROC_NET_ROUTE
|
||||
+#undef USE_SOCKET_ROUTE
|
||||
+#undef USE_SYSCTL_NET_ROUTE
|
||||
+/* Note: 2009-jan-10
|
||||
+ *
|
||||
+ * Haiku uses a BSD-like network stack.
|
||||
+ * However its network stack is not yet feature complete.
|
||||
+ * So for now, a workaround is needed */
|
||||
+#define USE_HAIKU_WORKAROUND
|
||||
+#endif
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
#undef USE_PROC_NET_ROUTE
|
||||
#undef USE_SOCKET_ROUTE
|
||||
@@ -82,6 +94,14 @@
|
||||
#define FAILED (-1)
|
||||
#endif
|
||||
|
||||
+
|
||||
+#ifdef USE_HAIKU_WORKAROUND
|
||||
+int getdefaultgateway(in_addr_t * addr)
|
||||
+{
|
||||
+ return FAILED;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#ifdef USE_PROC_NET_ROUTE
|
||||
int getdefaultgateway(in_addr_t * addr)
|
||||
{
|
||||
diff -Naur transmission-1.42-orig/third-party/miniupnp/upnpreplyparse.h transmission-1.42/third-party/miniupnp/upnpreplyparse.h
|
||||
--- transmission-1.42-orig/third-party/miniupnp/upnpreplyparse.h 2009-03-07 00:31:24.000000000 +0000
|
||||
+++ transmission-1.42/third-party/miniupnp/upnpreplyparse.h 2009-03-07 00:34:44.000000000 +0000
|
||||
@@ -8,7 +8,7 @@
|
||||
#ifndef __UPNPREPLYPARSE_H__
|
||||
#define __UPNPREPLYPARSE_H__
|
||||
|
||||
-#if defined(NO_SYS_QUEUE_H) || defined(WIN32)
|
||||
+#if defined(NO_SYS_QUEUE_H) || defined(WIN32) || defined(__HAIKU__)
|
||||
#include "bsdqueue.h"
|
||||
#else
|
||||
#include <sys/queue.h>
|
||||
@@ -1,331 +0,0 @@
|
||||
diff -Naur transmission-1.42-original/libtransmission/Makefile.am transmission-1.42/libtransmission/Makefile.am
|
||||
--- transmission-1.42-original/libtransmission/Makefile.am 2009-01-10 18:04:06.000000000 +0000
|
||||
+++ transmission-1.42/libtransmission/Makefile.am 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -12,6 +12,7 @@
|
||||
noinst_LIBRARIES = libtransmission.a
|
||||
|
||||
libtransmission_a_SOURCES = \
|
||||
+ basename.c \
|
||||
bandwidth.c \
|
||||
bencode.c \
|
||||
blocklist.c \
|
||||
@@ -95,6 +96,7 @@
|
||||
tracker.h \
|
||||
tr-getopt.h \
|
||||
transmission.h \
|
||||
+ trcompat.h \
|
||||
trevent.h \
|
||||
upnp.h \
|
||||
utils.h \
|
||||
diff -Naur transmission-1.42-original/libtransmission/Makefile.in transmission-1.42/libtransmission/Makefile.in
|
||||
--- transmission-1.42-original/libtransmission/Makefile.in 2009-01-10 18:04:06.000000000 +0000
|
||||
+++ transmission-1.42/libtransmission/Makefile.in 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -369,6 +369,7 @@
|
||||
|
||||
noinst_LIBRARIES = libtransmission.a
|
||||
libtransmission_a_SOURCES = \
|
||||
+ basename.c \
|
||||
bandwidth.c \
|
||||
bencode.c \
|
||||
blocklist.c \
|
||||
@@ -452,6 +453,7 @@
|
||||
tracker.h \
|
||||
tr-getopt.h \
|
||||
transmission.h \
|
||||
+ trcompat.h \
|
||||
trevent.h \
|
||||
upnp.h \
|
||||
utils.h \
|
||||
diff -Naur transmission-1.42-original/libtransmission/basename.c transmission-1.42/libtransmission/basename.c
|
||||
--- transmission-1.42-original/libtransmission/basename.c 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ transmission-1.42/libtransmission/basename.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -0,0 +1,68 @@
|
||||
+/* $Id: basename.c 2684 2007-08-08 23:33:23Z charles $ */
|
||||
+/* $OpenBSD: basename.c,v 1.14 2005/08/08 08:05:33 espie Exp $ */
|
||||
+
|
||||
+/*
|
||||
+ * Copyright (c) 1997, 2004 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#if !defined(HAVE_BASENAME) || defined(__HAIKU__)
|
||||
+
|
||||
+#include <errno.h>
|
||||
+#include <string.h>
|
||||
+#include <unistd.h> /* for MAXPATHLEN */
|
||||
+#include <sys/param.h>
|
||||
+
|
||||
+char *
|
||||
+basename(const char *path)
|
||||
+{
|
||||
+ static char bname[MAXPATHLEN];
|
||||
+ size_t len;
|
||||
+ const char *endp, *startp;
|
||||
+
|
||||
+ /* Empty or NULL string gets treated as "." */
|
||||
+ if (path == NULL || *path == '\0') {
|
||||
+ bname[0] = '.';
|
||||
+ bname[1] = '\0';
|
||||
+ return (bname);
|
||||
+ }
|
||||
+
|
||||
+ /* Strip any trailing slashes */
|
||||
+ endp = path + strlen(path) - 1;
|
||||
+ while (endp > path && *endp == '/')
|
||||
+ endp--;
|
||||
+
|
||||
+ /* All slashes becomes "/" */
|
||||
+ if (endp == path && *endp == '/') {
|
||||
+ bname[0] = '/';
|
||||
+ bname[1] = '\0';
|
||||
+ return (bname);
|
||||
+ }
|
||||
+
|
||||
+ /* Find the start of the base */
|
||||
+ startp = endp;
|
||||
+ while (startp > path && *(startp - 1) != '/')
|
||||
+ startp--;
|
||||
+
|
||||
+ len = endp - startp + 1;
|
||||
+ if (len >= sizeof(bname)) {
|
||||
+ errno = ENAMETOOLONG;
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+ memcpy(bname, startp, len);
|
||||
+ bname[len] = '\0';
|
||||
+ return (bname);
|
||||
+}
|
||||
+
|
||||
+#endif /* HAVE_BASENAME */
|
||||
diff -Naur transmission-1.42-original/libtransmission/platform.c transmission-1.42/libtransmission/platform.c
|
||||
--- transmission-1.42-original/libtransmission/platform.c 2009-01-10 18:04:07.000000000 +0000
|
||||
+++ transmission-1.42/libtransmission/platform.c 2009-01-10 18:56:46.000000000 +0000
|
||||
@@ -22,6 +22,8 @@
|
||||
#else
|
||||
#ifdef SYS_DARWIN
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
+ #elif defined(__HAIKU__)
|
||||
+ #include <FindDirectory.h>
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500 /* needed for recursive locks. */
|
||||
@@ -298,7 +300,7 @@
|
||||
|
||||
if( !path )
|
||||
{
|
||||
-#ifdef __BEOS__
|
||||
+#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
char buf[MAX_PATH_LENGTH];
|
||||
find_directory( B_USER_SETTINGS_DIRECTORY,
|
||||
dev_for_path( "/boot" ), true,
|
||||
@@ -348,7 +350,7 @@
|
||||
|
||||
if( !path )
|
||||
{
|
||||
-#if defined( __BEOS__ ) || defined( WIN32 )
|
||||
+#if defined( __BEOS__ ) || defined(__HAIKU__) || defined( WIN32 )
|
||||
path = tr_buildPath( getOldConfigDir( ), "Cache", NULL );
|
||||
#elif defined( SYS_DARWIN )
|
||||
path = tr_buildPath( getHomeDir( ), "Library", "Caches", "Transmission", NULL );
|
||||
@@ -467,6 +469,9 @@
|
||||
#ifdef SYS_DARWIN
|
||||
s = tr_buildPath( getHomeDir( ), "Library",
|
||||
"Application Support", "Transmission", NULL );
|
||||
+#elif defined(__HAIKU__)
|
||||
+ s = tr_buildPath( getHomeDir( ), "config",
|
||||
+ "settings", "Transmission", NULL );
|
||||
#elif defined( WIN32 )
|
||||
char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
|
||||
SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata );
|
||||
diff -Naur transmission-1.42-original/libtransmission/trcompat.h transmission-1.42/libtransmission/trcompat.h
|
||||
--- transmission-1.42-original/libtransmission/trcompat.h 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ transmission-1.42/libtransmission/trcompat.h 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -0,0 +1,38 @@
|
||||
+/******************************************************************************
|
||||
+ * $Id: trcompat.h 3651 2007-10-30 19:16:06Z charles $
|
||||
+ *
|
||||
+ * Copyright (c) 2005-2007 Transmission authors and contributors
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the "Software"),
|
||||
+ * to deal in the Software without restriction, including without limitation
|
||||
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
+ * and/or sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be included in
|
||||
+ * all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
+ * DEALINGS IN THE SOFTWARE.
|
||||
+ *****************************************************************************/
|
||||
+#ifndef TRCOMPAT_H
|
||||
+#define TRCOMPAT_H
|
||||
+
|
||||
+
|
||||
+#ifdef __HAIKU__
|
||||
+/* This is a work-around until libgen.h is added */
|
||||
+/* see : http://dev.haiku-os.org/ticket/2093 for more information */
|
||||
+#undef HAVE_BASENAME
|
||||
+#endif
|
||||
+
|
||||
+#ifndef HAVE_BASENAME
|
||||
+ char* basename(const char *path);
|
||||
+#endif
|
||||
+
|
||||
+#endif /* TRCOMPAT_H */
|
||||
diff -Naur transmission-1.42-original/libtransmission/utils.c transmission-1.42/libtransmission/utils.c
|
||||
--- transmission-1.42-original/libtransmission/utils.c 2009-01-10 18:04:07.000000000 +0000
|
||||
+++ transmission-1.42/libtransmission/utils.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -30,7 +30,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h> /* strerror, memset */
|
||||
|
||||
+#ifndef HAVE_BASENAME
|
||||
+ char* basename(const char *path);
|
||||
+#else
|
||||
#include <libgen.h> /* basename */
|
||||
+#endif
|
||||
+
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -46,6 +51,7 @@
|
||||
#endif
|
||||
|
||||
#include "transmission.h"
|
||||
+#include "trcompat.h"
|
||||
#include "utils.h"
|
||||
#include "platform.h"
|
||||
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/bench.c transmission-1.42/third-party/libevent/test/bench.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/bench.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/bench.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/regress.c transmission-1.42/third-party/libevent/test/regress.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/regress.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -43,7 +43,7 @@
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <sys/wait.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/regress_dns.c transmission-1.42/third-party/libevent/test/regress_dns.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/regress_dns.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress_dns.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sys/queue.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
switch (type) {
|
||||
case DNS_IPv6_AAAA: {
|
||||
-#if defined(HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP)
|
||||
+#if defined(HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
|
||||
struct in6_addr *in6_addrs = addresses;
|
||||
char buf[INET6_ADDRSTRLEN+1];
|
||||
int i;
|
||||
@@ -258,7 +258,7 @@
|
||||
break;
|
||||
}
|
||||
case DNS_IPv6_AAAA: {
|
||||
-#if defined (HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP)
|
||||
+#if defined (HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
|
||||
struct in6_addr *in6_addrs = addresses;
|
||||
char buf[INET6_ADDRSTRLEN+1];
|
||||
if (memcmp(&in6_addrs[0].s6_addr, "abcdefghijklmnop", 16)
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/regress_http.c transmission-1.42/third-party/libevent/test/regress_http.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/regress_http.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress_http.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sys/queue.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/regress_rpc.c transmission-1.42/third-party/libevent/test/regress_rpc.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/regress_rpc.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress_rpc.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sys/queue.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
diff -Naur transmission-1.42-original/third-party/libnatpmp/getgateway.c transmission-1.42/third-party/libnatpmp/getgateway.c
|
||||
--- transmission-1.42-original/third-party/libnatpmp/getgateway.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libnatpmp/getgateway.c 2009-01-10 19:34:17.000000000 +0000
|
||||
@@ -37,6 +37,18 @@
|
||||
#undef USE_SYSCTL_NET_ROUTE
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#undef USE_PROC_NET_ROUTE
|
||||
+#undef USE_SOCKET_ROUTE
|
||||
+#undef USE_SYSCTL_NET_ROUTE
|
||||
+/* Note: 2009-jan-10
|
||||
+ *
|
||||
+ * Haiku uses a BSD-like network stack.
|
||||
+ * However its network stack is not yet feature complete.
|
||||
+ * So for now, a workaround is needed */
|
||||
+#define USE_HAIKU_WORKAROUND
|
||||
+#endif
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
#undef USE_PROC_NET_ROUTE
|
||||
#undef USE_SOCKET_ROUTE
|
||||
@@ -82,6 +94,14 @@
|
||||
#define FAILED (-1)
|
||||
#endif
|
||||
|
||||
+
|
||||
+#ifdef USE_HAIKU_WORKAROUND
|
||||
+int getdefaultgateway(in_addr_t * addr)
|
||||
+{
|
||||
+ return FAILED;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#ifdef USE_PROC_NET_ROUTE
|
||||
int getdefaultgateway(in_addr_t * addr)
|
||||
{
|
||||
@@ -1,155 +0,0 @@
|
||||
diff -Naur transmission-1.42-original/libtransmission/platform.c transmission-1.42/libtransmission/platform.c
|
||||
--- transmission-1.42-original/libtransmission/platform.c 2009-01-10 18:04:07.000000000 +0000
|
||||
+++ transmission-1.42/libtransmission/platform.c 2009-01-10 18:56:46.000000000 +0000
|
||||
@@ -22,6 +22,8 @@
|
||||
#else
|
||||
#ifdef SYS_DARWIN
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
+ #elif defined(__HAIKU__)
|
||||
+ #include <FindDirectory.h>
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500 /* needed for recursive locks. */
|
||||
@@ -298,7 +300,7 @@
|
||||
|
||||
if( !path )
|
||||
{
|
||||
-#ifdef __BEOS__
|
||||
+#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
char buf[MAX_PATH_LENGTH];
|
||||
find_directory( B_USER_SETTINGS_DIRECTORY,
|
||||
dev_for_path( "/boot" ), true,
|
||||
@@ -348,7 +350,7 @@
|
||||
|
||||
if( !path )
|
||||
{
|
||||
-#if defined( __BEOS__ ) || defined( WIN32 )
|
||||
+#if defined( __BEOS__ ) || defined(__HAIKU__) || defined( WIN32 )
|
||||
path = tr_buildPath( getOldConfigDir( ), "Cache", NULL );
|
||||
#elif defined( SYS_DARWIN )
|
||||
path = tr_buildPath( getHomeDir( ), "Library", "Caches", "Transmission", NULL );
|
||||
@@ -467,6 +469,9 @@
|
||||
#ifdef SYS_DARWIN
|
||||
s = tr_buildPath( getHomeDir( ), "Library",
|
||||
"Application Support", "Transmission", NULL );
|
||||
+#elif defined(__HAIKU__)
|
||||
+ s = tr_buildPath( getHomeDir( ), "config",
|
||||
+ "settings", "Transmission", NULL );
|
||||
#elif defined( WIN32 )
|
||||
char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
|
||||
SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata );
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/bench.c transmission-1.42/third-party/libevent/test/bench.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/bench.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/bench.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/regress.c transmission-1.42/third-party/libevent/test/regress.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/regress.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -43,7 +43,7 @@
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <sys/wait.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/regress_dns.c transmission-1.42/third-party/libevent/test/regress_dns.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/regress_dns.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress_dns.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sys/queue.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
switch (type) {
|
||||
case DNS_IPv6_AAAA: {
|
||||
-#if defined(HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP)
|
||||
+#if defined(HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
|
||||
struct in6_addr *in6_addrs = addresses;
|
||||
char buf[INET6_ADDRSTRLEN+1];
|
||||
int i;
|
||||
@@ -258,7 +258,7 @@
|
||||
break;
|
||||
}
|
||||
case DNS_IPv6_AAAA: {
|
||||
-#if defined (HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP)
|
||||
+#if defined (HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
|
||||
struct in6_addr *in6_addrs = addresses;
|
||||
char buf[INET6_ADDRSTRLEN+1];
|
||||
if (memcmp(&in6_addrs[0].s6_addr, "abcdefghijklmnop", 16)
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/regress_http.c transmission-1.42/third-party/libevent/test/regress_http.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/regress_http.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress_http.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sys/queue.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
diff -Naur transmission-1.42-original/third-party/libevent/test/regress_rpc.c transmission-1.42/third-party/libevent/test/regress_rpc.c
|
||||
--- transmission-1.42-original/third-party/libevent/test/regress_rpc.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libevent/test/regress_rpc.c 2009-01-10 18:56:45.000000000 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <sys/queue.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
diff -Naur transmission-1.42-original/third-party/libnatpmp/getgateway.c transmission-1.42/third-party/libnatpmp/getgateway.c
|
||||
--- transmission-1.42-original/third-party/libnatpmp/getgateway.c 2009-01-10 18:03:59.000000000 +0000
|
||||
+++ transmission-1.42/third-party/libnatpmp/getgateway.c 2009-01-10 19:34:17.000000000 +0000
|
||||
@@ -37,6 +37,18 @@
|
||||
#undef USE_SYSCTL_NET_ROUTE
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#undef USE_PROC_NET_ROUTE
|
||||
+#undef USE_SOCKET_ROUTE
|
||||
+#undef USE_SYSCTL_NET_ROUTE
|
||||
+/* Note: 2009-jan-10
|
||||
+ *
|
||||
+ * Haiku uses a BSD-like network stack.
|
||||
+ * However its network stack is not yet feature complete.
|
||||
+ * So for now, a workaround is needed */
|
||||
+#define USE_HAIKU_WORKAROUND
|
||||
+#endif
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
#undef USE_PROC_NET_ROUTE
|
||||
#undef USE_SOCKET_ROUTE
|
||||
@@ -82,6 +94,14 @@
|
||||
#define FAILED (-1)
|
||||
#endif
|
||||
|
||||
+
|
||||
+#ifdef USE_HAIKU_WORKAROUND
|
||||
+int getdefaultgateway(in_addr_t * addr)
|
||||
+{
|
||||
+ return FAILED;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#ifdef USE_PROC_NET_ROUTE
|
||||
int getdefaultgateway(in_addr_t * addr)
|
||||
{
|
||||
@@ -1,428 +0,0 @@
|
||||
diff -Naur transmission-1.72/cli/Makefile.am transmission-1.72-haiku/cli/Makefile.am
|
||||
--- transmission-1.72/cli/Makefile.am 2009-06-17 00:01:54.000000000 +0000
|
||||
+++ transmission-1.72-haiku/cli/Makefile.am 2009-07-09 10:05:58.000000000 +0000
|
||||
@@ -26,6 +26,5 @@
|
||||
$(LIBCURL_LIBS) \
|
||||
$(ZLIB_LIBS) \
|
||||
$(OPENSSL_LIBS) \
|
||||
- $(PTHREAD_LIBS) \
|
||||
- -lm
|
||||
+ $(PTHREAD_LIBS)
|
||||
|
||||
diff -Naur transmission-1.72/configure.ac transmission-1.72-haiku/configure.ac
|
||||
--- transmission-1.72/configure.ac 2009-06-17 00:01:56.000000000 +0000
|
||||
+++ transmission-1.72-haiku/configure.ac 2009-07-09 10:10:19.000000000 +0000
|
||||
@@ -163,7 +163,8 @@
|
||||
dnl build our copy of libevent whether we use it or not,
|
||||
dnl because "make dist" needs its Makefiles to exist, and
|
||||
dnl AM_CONDITIONAL + AC_CONFIG_SUBDIRS don't seem to play nice
|
||||
-AC_CONFIG_SUBDIRS([third-party/libevent])
|
||||
+dnl (HaikuPorts only: require an installed copy)
|
||||
+dnl AC_CONFIG_SUBDIRS([third-party/libevent])
|
||||
libevent_source=bundled
|
||||
AC_CHECK_LIB([event],[evutil_vsnprintf],
|
||||
[libevent_found=yes],
|
||||
@@ -179,13 +180,19 @@
|
||||
fi
|
||||
fi
|
||||
if test "x$libevent_source" = "xbundled"; then
|
||||
+ dnl (HaikuPorts only: require an installed copy)
|
||||
+ AC_MSG_ERROR("libevent not found!")
|
||||
AC_MSG_WARN([using our own libevent from third-party/libevent/])
|
||||
AC_MSG_WARN([if you are cross-compiling this is probably NOT what you want.])
|
||||
LIBEVENT_CFLAGS="-I\$(top_srcdir)/third-party/libevent -I\$(top_builddir)/third-party/libevent"
|
||||
LIBEVENT_LIBS="\$(top_builddir)/third-party/libevent/libevent.la"
|
||||
else
|
||||
LIBEVENT_CFLAGS=""
|
||||
- LIBEVENT_LIBS="-levent -lrt"
|
||||
+ dnl FIXME Shouldn't libtool handle this?
|
||||
+ case "${host_os}" in
|
||||
+ haiku*) LIBEVENT_LIBS="-levent" ;;
|
||||
+ *) LIBEVENT_LIBS="-levent -lrt" ;;
|
||||
+ esac
|
||||
fi
|
||||
AC_SUBST(LIBEVENT_CFLAGS)
|
||||
AC_SUBST(LIBEVENT_LIBS)
|
||||
@@ -277,17 +284,19 @@
|
||||
fi
|
||||
|
||||
use_nls=no
|
||||
-if test "x$enable_nls" = "xyes" ; then
|
||||
- use_nls=yes
|
||||
- IT_PROG_INTLTOOL([0.40.0],[no-xml])
|
||||
- AC_CHECK_HEADERS([libintl.h])
|
||||
- GETTEXT_PACKAGE=transmission
|
||||
- AC_SUBST(GETTEXT_PACKAGE)
|
||||
- AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
|
||||
- AM_GLIB_GNU_GETTEXT
|
||||
- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
|
||||
- AC_SUBST(transmissionlocaledir)
|
||||
-fi
|
||||
+dnl HACK for Haiku: comment this whole part because we don't need it and
|
||||
+dnl it would require us to have intltool installed only to run autoconf
|
||||
+dnl if test "x$enable_nls" = "xyes" ; then
|
||||
+dnl use_nls=yes
|
||||
+dnl IT_PROG_INTLTOOL([0.40.0],[no-xml])
|
||||
+dnl AC_CHECK_HEADERS([libintl.h])
|
||||
+dnl GETTEXT_PACKAGE=transmission
|
||||
+dnl AC_SUBST(GETTEXT_PACKAGE)
|
||||
+dnl AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
|
||||
+dnl AM_GLIB_GNU_GETTEXT
|
||||
+dnl transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
|
||||
+dnl AC_SUBST(transmissionlocaledir)
|
||||
+dnl fi
|
||||
|
||||
|
||||
dnl ----------------------------------------------------------------------------
|
||||
diff -Naur transmission-1.72/daemon/Makefile.am transmission-1.72-haiku/daemon/Makefile.am
|
||||
--- transmission-1.72/daemon/Makefile.am 2009-06-17 00:01:54.000000000 +0000
|
||||
+++ transmission-1.72-haiku/daemon/Makefile.am 2009-07-09 10:05:58.000000000 +0000
|
||||
@@ -28,7 +28,7 @@
|
||||
$(LIBCURL_LIBS) \
|
||||
$(ZLIB_LIBS) \
|
||||
$(OPENSSL_LIBS) \
|
||||
- $(PTHREAD_LIBS) -lm
|
||||
+ $(PTHREAD_LIBS)
|
||||
|
||||
noinst_HEADERS = \
|
||||
watch.h
|
||||
diff -Naur transmission-1.72/libtransmission/JSON_parser.c transmission-1.72-haiku/libtransmission/JSON_parser.c
|
||||
--- transmission-1.72/libtransmission/JSON_parser.c 2009-06-17 00:01:44.000000000 +0000
|
||||
+++ transmission-1.72-haiku/libtransmission/JSON_parser.c 2009-07-09 10:12:28.000000000 +0000
|
||||
@@ -73,6 +73,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* This can be removed once http://dev.haiku-os.org/ticket/3408 is fixed */
|
||||
+#ifdef __HAIKU__
|
||||
+# define strtold strtod
|
||||
+#endif
|
||||
|
||||
#define true 1
|
||||
#define false 0
|
||||
diff -Naur transmission-1.72/libtransmission/Makefile.am transmission-1.72-haiku/libtransmission/Makefile.am
|
||||
--- transmission-1.72/libtransmission/Makefile.am 2009-06-17 00:01:44.000000000 +0000
|
||||
+++ transmission-1.72-haiku/libtransmission/Makefile.am 2009-07-09 10:05:58.000000000 +0000
|
||||
@@ -132,8 +132,7 @@
|
||||
$(LIBCURL_LIBS) \
|
||||
$(OPENSSL_LIBS) \
|
||||
$(PTHREAD_LIBS) \
|
||||
- $(ZLIB_LIBS) \
|
||||
- -lm
|
||||
+ $(ZLIB_LIBS)
|
||||
|
||||
bencode_test_SOURCES = bencode-test.c
|
||||
bencode_test_LDADD = ${apps_ldadd}
|
||||
diff -Naur transmission-1.72/libtransmission/fdlimit.c transmission-1.72-haiku/libtransmission/fdlimit.c
|
||||
--- transmission-1.72/libtransmission/fdlimit.c 2009-06-17 00:01:44.000000000 +0000
|
||||
+++ transmission-1.72-haiku/libtransmission/fdlimit.c 2009-07-09 10:05:58.000000000 +0000
|
||||
@@ -585,7 +585,6 @@
|
||||
#endif
|
||||
tr_err( _( "Couldn't create socket: %s" ),
|
||||
tr_strerror( sockerrno ) );
|
||||
- s = -sockerrno;
|
||||
}
|
||||
|
||||
if( s > -1 )
|
||||
diff -Naur transmission-1.72/libtransmission/net.c transmission-1.72-haiku/libtransmission/net.c
|
||||
--- transmission-1.72/libtransmission/net.c 2009-06-17 00:01:44.000000000 +0000
|
||||
+++ transmission-1.72-haiku/libtransmission/net.c 2009-07-09 10:05:58.000000000 +0000
|
||||
@@ -195,25 +195,6 @@
|
||||
return memcmp( &a->addr, &b->addr, sizes[a->type] );
|
||||
}
|
||||
|
||||
-tr_bool
|
||||
-tr_net_hasIPv6( tr_port port )
|
||||
-{
|
||||
- static tr_bool result = FALSE;
|
||||
- static tr_bool alreadyDone = FALSE;
|
||||
-
|
||||
- if( !alreadyDone )
|
||||
- {
|
||||
- int fd = tr_netBindTCP( &tr_in6addr_any, port, TRUE );
|
||||
- if( fd >= 0 || -fd != EAFNOSUPPORT ) /* we support ipv6 */
|
||||
- result = TRUE;
|
||||
- if( fd >= 0 )
|
||||
- EVUTIL_CLOSESOCKET( fd );
|
||||
- alreadyDone = TRUE;
|
||||
- }
|
||||
-
|
||||
- return result;
|
||||
-}
|
||||
-
|
||||
/***********************************************************************
|
||||
* TCP sockets
|
||||
**********************************************************************/
|
||||
@@ -368,8 +349,8 @@
|
||||
return s;
|
||||
}
|
||||
|
||||
-int
|
||||
-tr_netBindTCP( const tr_address * addr, tr_port port, tr_bool suppressMsgs )
|
||||
+static int
|
||||
+tr_netBindTCPImpl( const tr_address * addr, tr_port port, tr_bool suppressMsgs, int * errOut )
|
||||
{
|
||||
static const int domains[NUM_TR_AF_INET_TYPES] = { AF_INET, AF_INET6 };
|
||||
struct sockaddr_storage sock;
|
||||
@@ -380,11 +361,14 @@
|
||||
assert( tr_isAddress( addr ) );
|
||||
|
||||
fd = socket( domains[addr->type], SOCK_STREAM, 0 );
|
||||
- if( fd < 0 )
|
||||
+ if( fd < 0 ) {
|
||||
+ *errOut = sockerrno;
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
if( evutil_make_socket_nonblocking( fd ) < 0 ) {
|
||||
EVUTIL_CLOSESOCKET( fd );
|
||||
+ *errOut = sockerrno;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -395,8 +379,10 @@
|
||||
#ifdef IPV6_V6ONLY
|
||||
if( addr->type == TR_AF_INET6 )
|
||||
if( setsockopt( fd, IPPROTO_IPV6, IPV6_V6ONLY, &optval, sizeof( optval ) ) == -1 )
|
||||
- if( sockerrno != ENOPROTOOPT ) /* if the kernel doesn't support it, ignore it */
|
||||
- return -sockerrno;
|
||||
+ if( sockerrno != ENOPROTOOPT ) { /* if the kernel doesn't support it, ignore it */
|
||||
+ *errOut = sockerrno;
|
||||
+ return -1;
|
||||
+ }
|
||||
#endif
|
||||
|
||||
addrlen = setup_sockaddr( addr, htons( port ), &sock );
|
||||
@@ -406,7 +392,8 @@
|
||||
tr_err( _( "Couldn't bind port %d on %s: %s" ),
|
||||
port, tr_ntop_non_ts( addr ), tr_strerror( err ) );
|
||||
EVUTIL_CLOSESOCKET( fd );
|
||||
- return -err;
|
||||
+ *errOut = err;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
if( !suppressMsgs )
|
||||
@@ -414,13 +401,42 @@
|
||||
|
||||
if( listen( fd, 128 ) == -1 ) {
|
||||
EVUTIL_CLOSESOCKET( fd );
|
||||
- return -sockerrno;
|
||||
+ *errOut = sockerrno;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
int
|
||||
+tr_netBindTCP( const tr_address * addr, tr_port port, tr_bool suppressMsgs )
|
||||
+{
|
||||
+ int unused;
|
||||
+ return tr_netBindTCPImpl( addr, port, suppressMsgs, &unused );
|
||||
+}
|
||||
+
|
||||
+tr_bool
|
||||
+tr_net_hasIPv6( tr_port port )
|
||||
+{
|
||||
+ static tr_bool result = FALSE;
|
||||
+ static tr_bool alreadyDone = FALSE;
|
||||
+
|
||||
+ if( !alreadyDone )
|
||||
+ {
|
||||
+ int err;
|
||||
+ int fd = tr_netBindTCPImpl( &tr_in6addr_any, port, TRUE, &err );
|
||||
+ if( fd >= 0 || err != EAFNOSUPPORT ) /* we support ipv6 */
|
||||
+ result = TRUE;
|
||||
+ if( fd >= 0 )
|
||||
+ EVUTIL_CLOSESOCKET( fd );
|
||||
+ tr_inf( "IPv6 support: %s", result ? "yes" : "no" );
|
||||
+ alreadyDone = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
tr_netAccept( tr_session * session UNUSED,
|
||||
int b,
|
||||
tr_address * addr,
|
||||
diff -Naur transmission-1.72/libtransmission/net.h transmission-1.72-haiku/libtransmission/net.h
|
||||
--- transmission-1.72/libtransmission/net.h 2009-06-17 00:01:44.000000000 +0000
|
||||
+++ transmission-1.72-haiku/libtransmission/net.h 2009-07-09 10:13:49.000000000 +0000
|
||||
@@ -56,6 +56,32 @@
|
||||
#define sockerrno errno
|
||||
#endif
|
||||
|
||||
+/* To be removed once those macros are added to Haiku's headers */
|
||||
+#ifndef IN6ADDR_ANY_INIT
|
||||
+ #define IN6ADDR_ANY_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}
|
||||
+#endif
|
||||
+#ifndef INET6_ADDRSTRLEN
|
||||
+ #define INET6_ADDRSTRLEN 46
|
||||
+#endif
|
||||
+#ifndef IN6_IS_ADDR_V4MAPPED
|
||||
+ #define IN6_IS_ADDR_V4MAPPED(a) \
|
||||
+ ((((const uint32_t *) (a))[0] == 0) && \
|
||||
+ (((const uint32_t *) (a))[1] == 0) && \
|
||||
+ (((const uint32_t *) (a))[2] == htonl(0xFFFF)))
|
||||
+#endif
|
||||
+#ifndef IN6_IS_ADDR_V4COMPAT
|
||||
+ #define IN6_IS_ADDR_V4COMPAT(a) \
|
||||
+ ((((const uint32_t *) (a))[0] == 0) && \
|
||||
+ (((const uint32_t *) (a))[1] == 0) && \
|
||||
+ (((const uint32_t *) (a))[2] == 0) && \
|
||||
+ (ntohl(((const uint32_t *) (a))[2]) > 1))
|
||||
+#endif
|
||||
+#ifndef IN6_IS_ADDR_LINKLOCAL
|
||||
+ #define IN6_IS_ADDR_LINKLOCAL(a) \
|
||||
+ ((((const uint32_t *) (a))[0] & htonl(0xFFC00000)) \
|
||||
+ == htonl(0xFE800000))
|
||||
+#endif
|
||||
+
|
||||
struct tr_session;
|
||||
|
||||
typedef enum tr_address_type
|
||||
diff -Naur transmission-1.72/libtransmission/platform.c transmission-1.72-haiku/libtransmission/platform.c
|
||||
--- transmission-1.72/libtransmission/platform.c 2009-06-17 00:01:44.000000000 +0000
|
||||
+++ transmission-1.72-haiku/libtransmission/platform.c 2009-07-09 10:07:24.000000000 +0000
|
||||
@@ -17,7 +17,9 @@
|
||||
#ifdef SYS_DARWIN
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
-
|
||||
+ #ifdef __HAIKU__
|
||||
+ #include <FindDirectory.h>
|
||||
+ #endif
|
||||
#define _XOPEN_SOURCE 600 /* needed for recursive locks. */
|
||||
#ifndef __USE_UNIX98
|
||||
#define __USE_UNIX98 /* some older Linuxes need it spelt out for them */
|
||||
@@ -271,6 +273,10 @@
|
||||
char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
|
||||
SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata );
|
||||
path = tr_buildPath( appdata, "Transmission", NULL );
|
||||
+#elif defined( __HAIKU__ )
|
||||
+ char buf[MAX_PATH_LENGTH];
|
||||
+ find_directory( B_USER_SETTINGS_DIRECTORY, -1, true, buf, sizeof(buf) );
|
||||
+ path = tr_buildPath( buf, "Transmission", NULL );
|
||||
#else
|
||||
path = tr_buildPath( getHomeDir( ), ".transmission", NULL );
|
||||
#endif
|
||||
@@ -431,6 +437,10 @@
|
||||
char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
|
||||
SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata );
|
||||
s = tr_buildPath( appdata, appname, NULL );
|
||||
+#elif defined( __HAIKU__ )
|
||||
+ char buf[MAX_PATH_LENGTH];
|
||||
+ find_directory( B_USER_SETTINGS_DIRECTORY, -1, true, buf, sizeof(buf) );
|
||||
+ s = tr_buildPath( buf, appname, NULL );
|
||||
#else
|
||||
if( ( s = getenv( "XDG_CONFIG_HOME" ) ) )
|
||||
s = tr_buildPath( s, appname, NULL );
|
||||
@@ -486,7 +496,11 @@
|
||||
}
|
||||
|
||||
if( user_dir == NULL )
|
||||
+#ifdef __HAIKU__
|
||||
+ user_dir = tr_buildPath( getHomeDir( ), "Desktop", NULL );
|
||||
+#else
|
||||
user_dir = tr_buildPath( getHomeDir( ), "Downloads", NULL );
|
||||
+#endif
|
||||
|
||||
tr_free( content );
|
||||
tr_free( config_file );
|
||||
diff -Naur transmission-1.72/third-party/Makefile.am transmission-1.72-haiku/third-party/Makefile.am
|
||||
--- transmission-1.72/third-party/Makefile.am 2009-06-17 00:01:54.000000000 +0000
|
||||
+++ transmission-1.72-haiku/third-party/Makefile.am 2009-07-09 10:05:58.000000000 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
-SUBDIRS = libnatpmp miniupnp dht libevent
|
||||
+SUBDIRS = libnatpmp miniupnp dht
|
||||
|
||||
EXTRA_DIST = macosx-libevent-config.h
|
||||
|
||||
diff -Naur transmission-1.72/third-party/libnatpmp/getgateway.c transmission-1.72-haiku/third-party/libnatpmp/getgateway.c
|
||||
--- transmission-1.72/third-party/libnatpmp/getgateway.c 2009-06-17 00:01:54.000000000 +0000
|
||||
+++ transmission-1.72-haiku/third-party/libnatpmp/getgateway.c 2009-07-09 10:05:58.000000000 +0000
|
||||
@@ -75,6 +75,12 @@
|
||||
#define MAX_KEY_LENGTH 255
|
||||
#define MAX_VALUE_LENGTH 16383
|
||||
#endif
|
||||
+#ifdef __HAIKU__
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+#include <net/if.h>
|
||||
+#include <sys/sockio.h>
|
||||
+#endif
|
||||
#include "getgateway.h"
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -421,3 +427,56 @@
|
||||
}
|
||||
#endif /* #ifdef USE_WIN32_CODE */
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+int getdefaultgateway(in_addr_t *addr)
|
||||
+{
|
||||
+ int fd, ret = -1;
|
||||
+ struct ifconf config;
|
||||
+ void *buffer = NULL;
|
||||
+ struct ifreq *interface;
|
||||
+
|
||||
+ if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (ioctl(fd, SIOCGRTSIZE, &config, sizeof(config)) != 0) {
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ if (config.ifc_value < 1) {
|
||||
+ goto fail; /* No routes */
|
||||
+ }
|
||||
+ if ((buffer = malloc(config.ifc_value)) == NULL) {
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ config.ifc_len = config.ifc_value;
|
||||
+ config.ifc_buf = buffer;
|
||||
+ if (ioctl(fd, SIOCGRTTABLE, &config, sizeof(config)) != 0) {
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ for (interface = buffer;
|
||||
+ (uint8_t *)interface < (uint8_t *)buffer + config.ifc_len; ) {
|
||||
+ struct route_entry route = interface->ifr_route;
|
||||
+ int intfSize;
|
||||
+ if (route.flags & (RTF_GATEWAY | RTF_DEFAULT)) {
|
||||
+ *addr = ((struct sockaddr_in *)route.gateway)->sin_addr.s_addr;
|
||||
+ ret = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+ intfSize = sizeof(route) + IF_NAMESIZE;
|
||||
+ if (route.destination != NULL) {
|
||||
+ intfSize += route.destination->sa_len;
|
||||
+ }
|
||||
+ if (route.mask != NULL) {
|
||||
+ intfSize += route.mask->sa_len;
|
||||
+ }
|
||||
+ if (route.gateway != NULL) {
|
||||
+ intfSize += route.gateway->sa_len;
|
||||
+ }
|
||||
+ interface = (struct ifreq *)((uint8_t *)interface + intfSize);
|
||||
+ }
|
||||
+fail:
|
||||
+ free(buffer);
|
||||
+ close(fd);
|
||||
+ return ret;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
diff -Naur transmission-1.72/third-party/miniupnp/upnpreplyparse.h transmission-1.72-haiku/third-party/miniupnp/upnpreplyparse.h
|
||||
--- transmission-1.72/third-party/miniupnp/upnpreplyparse.h 2009-06-17 00:01:54.000000000 +0000
|
||||
+++ transmission-1.72-haiku/third-party/miniupnp/upnpreplyparse.h 2009-07-09 10:05:59.000000000 +0000
|
||||
@@ -8,7 +8,7 @@
|
||||
#ifndef __UPNPREPLYPARSE_H__
|
||||
#define __UPNPREPLYPARSE_H__
|
||||
|
||||
-#if defined(NO_SYS_QUEUE_H) || defined(WIN32)
|
||||
+#if defined(NO_SYS_QUEUE_H) || defined(WIN32) || defined(__HAIKU__)
|
||||
#include "bsdqueue.h"
|
||||
#else
|
||||
#include <sys/queue.h>
|
||||
@@ -1,116 +0,0 @@
|
||||
diff -Naur transmission-1.73/configure.ac transmission-1.73-haiku/configure.ac
|
||||
--- transmission-1.73/configure.ac 2009-07-18 01:21:12.000000000 +0000
|
||||
+++ transmission-1.73-haiku/configure.ac 2009-07-18 17:57:20.000000000 +0000
|
||||
@@ -167,7 +167,8 @@
|
||||
dnl build our copy of libevent whether we use it or not,
|
||||
dnl because "make dist" needs its Makefiles to exist, and
|
||||
dnl AM_CONDITIONAL + AC_CONFIG_SUBDIRS don't seem to play nice
|
||||
-AC_CONFIG_SUBDIRS([third-party/libevent])
|
||||
+dnl (HaikuPorts: require an installed copy)
|
||||
+dnl AC_CONFIG_SUBDIRS([third-party/libevent])
|
||||
libevent_source=bundled
|
||||
AC_CHECK_LIB([event],[evutil_vsnprintf],
|
||||
[libevent_found=yes],
|
||||
@@ -183,6 +184,8 @@
|
||||
fi
|
||||
fi
|
||||
if test "x$libevent_source" = "xbundled"; then
|
||||
+ dnl (HaikuPorts: require an installed copy)
|
||||
+ AC_MSG_ERROR("libevent not found!")
|
||||
AC_MSG_WARN([using our own libevent from third-party/libevent/])
|
||||
AC_MSG_WARN([if you are cross-compiling this is probably NOT what you want.])
|
||||
LIBEVENT_CFLAGS="-I\$(top_srcdir)/third-party/libevent -I\$(top_builddir)/third-party/libevent"
|
||||
@@ -313,17 +316,19 @@
|
||||
dnl it should be safe to re-edit 0.40 back down to 0.23
|
||||
|
||||
use_nls=no
|
||||
-if test "x$enable_nls" = "xyes" ; then
|
||||
- use_nls=yes
|
||||
- IT_PROG_INTLTOOL([0.40.0],[no-xml])
|
||||
- AC_CHECK_HEADERS([libintl.h])
|
||||
- GETTEXT_PACKAGE=transmission
|
||||
- AC_SUBST(GETTEXT_PACKAGE)
|
||||
- AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
|
||||
- AM_GLIB_GNU_GETTEXT
|
||||
- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
|
||||
- AC_SUBST(transmissionlocaledir)
|
||||
-fi
|
||||
+dnl (HaikuPorts: until intltool is ported, need to comment out this part
|
||||
+dnl otherwise autoconf won't generate a proper configure)
|
||||
+dnl if test "x$enable_nls" = "xyes" ; then
|
||||
+dnl use_nls=yes
|
||||
+dnl IT_PROG_INTLTOOL([0.40.0],[no-xml])
|
||||
+dnl AC_CHECK_HEADERS([libintl.h])
|
||||
+dnl GETTEXT_PACKAGE=transmission
|
||||
+dnl AC_SUBST(GETTEXT_PACKAGE)
|
||||
+dnl AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
|
||||
+dnl AM_GLIB_GNU_GETTEXT
|
||||
+dnl transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
|
||||
+dnl AC_SUBST(transmissionlocaledir)
|
||||
+dnl fi
|
||||
|
||||
|
||||
dnl ----------------------------------------------------------------------------
|
||||
diff -Naur transmission-1.73/libtransmission/JSON_parser.c transmission-1.73-haiku/libtransmission/JSON_parser.c
|
||||
--- transmission-1.73/libtransmission/JSON_parser.c 2009-07-18 01:20:54.000000000 +0000
|
||||
+++ transmission-1.73-haiku/libtransmission/JSON_parser.c 2009-07-18 17:54:44.000000000 +0000
|
||||
@@ -75,6 +75,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* This can be removed once http://dev.haiku-os.org/ticket/3408 is fixed */
|
||||
+#ifdef __HAIKU__
|
||||
+# define strtold strtod
|
||||
+#endif
|
||||
|
||||
#define true 1
|
||||
#define false 0
|
||||
diff -Naur transmission-1.73/libtransmission/net.h transmission-1.73-haiku/libtransmission/net.h
|
||||
--- transmission-1.73/libtransmission/net.h 2009-07-18 01:20:54.000000000 +0000
|
||||
+++ transmission-1.73-haiku/libtransmission/net.h 2009-07-18 17:54:44.000000000 +0000
|
||||
@@ -56,6 +56,32 @@
|
||||
#define sockerrno errno
|
||||
#endif
|
||||
|
||||
+/* To be removed once those macros are added to Haiku's headers */
|
||||
+#ifndef IN6ADDR_ANY_INIT
|
||||
+ #define IN6ADDR_ANY_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}
|
||||
+#endif
|
||||
+#ifndef INET6_ADDRSTRLEN
|
||||
+ #define INET6_ADDRSTRLEN 46
|
||||
+#endif
|
||||
+#ifndef IN6_IS_ADDR_V4MAPPED
|
||||
+ #define IN6_IS_ADDR_V4MAPPED(a) \
|
||||
+ ((((const uint32_t *) (a))[0] == 0) && \
|
||||
+ (((const uint32_t *) (a))[1] == 0) && \
|
||||
+ (((const uint32_t *) (a))[2] == htonl(0xFFFF)))
|
||||
+#endif
|
||||
+#ifndef IN6_IS_ADDR_V4COMPAT
|
||||
+ #define IN6_IS_ADDR_V4COMPAT(a) \
|
||||
+ ((((const uint32_t *) (a))[0] == 0) && \
|
||||
+ (((const uint32_t *) (a))[1] == 0) && \
|
||||
+ (((const uint32_t *) (a))[2] == 0) && \
|
||||
+ (ntohl(((const uint32_t *) (a))[2]) > 1))
|
||||
+#endif
|
||||
+#ifndef IN6_IS_ADDR_LINKLOCAL
|
||||
+ #define IN6_IS_ADDR_LINKLOCAL(a) \
|
||||
+ ((((const uint32_t *) (a))[0] & htonl(0xFFC00000)) \
|
||||
+ == htonl(0xFE800000))
|
||||
+#endif
|
||||
+
|
||||
struct tr_session;
|
||||
|
||||
typedef enum tr_address_type
|
||||
diff -Naur transmission-1.73/third-party/Makefile.am transmission-1.73-haiku/third-party/Makefile.am
|
||||
--- transmission-1.73/third-party/Makefile.am 2009-07-18 01:21:07.000000000 +0000
|
||||
+++ transmission-1.73-haiku/third-party/Makefile.am 2009-07-18 17:58:54.000000000 +0000
|
||||
@@ -4,7 +4,8 @@
|
||||
DHT_DIR =
|
||||
endif
|
||||
|
||||
-SUBDIRS = libnatpmp miniupnp libevent $(DHT_DIR)
|
||||
+# HaikuPorts: require an installed copy of libevent
|
||||
+SUBDIRS = libnatpmp miniupnp $(DHT_DIR)
|
||||
|
||||
EXTRA_DIST = \
|
||||
macosx-libevent-config.h \
|
||||
@@ -1,57 +0,0 @@
|
||||
diff -Naur transmission-1.93/configure.ac transmission-1.93-haiku/configure.ac
|
||||
--- transmission-1.93/configure.ac 2010-05-01 21:35:58.020447232 +0000
|
||||
+++ transmission-1.93-haiku/configure.ac 2010-05-05 23:28:25.129761280 +0000
|
||||
@@ -205,7 +205,8 @@
|
||||
dnl build our copy of libevent whether we use it or not,
|
||||
dnl because "make dist" needs its Makefiles to exist, and
|
||||
dnl AM_CONDITIONAL + AC_CONFIG_SUBDIRS don't seem to play nice
|
||||
-AC_CONFIG_SUBDIRS([third-party/libevent])
|
||||
+dnl (HaikuPorts: require an installed copy)
|
||||
+dnl AC_CONFIG_SUBDIRS([third-party/libevent])
|
||||
libevent_source=bundled
|
||||
AC_CHECK_LIB([event],[evutil_vsnprintf],
|
||||
[libevent_found=yes],
|
||||
@@ -221,6 +222,8 @@
|
||||
fi
|
||||
fi
|
||||
if test "x$libevent_source" = "xbundled"; then
|
||||
+ dnl (HaikuPorts: require an installed copy)
|
||||
+ AC_MSG_ERROR("libevent not found!")
|
||||
AC_MSG_WARN([using our own libevent from third-party/libevent/])
|
||||
AC_MSG_WARN([if you are cross-compiling this is probably NOT what you want.])
|
||||
LIBEVENT_CFLAGS="-I\$(top_srcdir)/third-party/libevent -I\$(top_builddir)/third-party/libevent"
|
||||
diff -Naur transmission-1.93/libtransmission/JSON_parser.c transmission-1.93-haiku/libtransmission/JSON_parser.c
|
||||
--- transmission-1.93/libtransmission/JSON_parser.c 2010-05-01 21:35:04.035389440 +0000
|
||||
+++ transmission-1.93-haiku/libtransmission/JSON_parser.c 2010-05-05 23:28:25.131858432 +0000
|
||||
@@ -75,6 +75,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* This can be removed once http://dev.haiku-os.org/ticket/3408 is fixed */
|
||||
+#ifdef __HAIKU__
|
||||
+# define strtold strtod
|
||||
+#endif
|
||||
|
||||
#define true 1
|
||||
#define false 0
|
||||
diff -Naur transmission-1.93/third-party/Makefile.am transmission-1.93-haiku/third-party/Makefile.am
|
||||
--- transmission-1.93/third-party/Makefile.am 2010-05-01 21:35:49.039059456 +0000
|
||||
+++ transmission-1.93-haiku/third-party/Makefile.am 2010-05-05 23:28:25.131072000 +0000
|
||||
@@ -1,4 +1,5 @@
|
||||
-SUBDIRS = libnatpmp miniupnp libevent dht
|
||||
+# HaikuPorts: require an installed copy of libevent
|
||||
+SUBDIRS = libnatpmp miniupnp dht
|
||||
|
||||
EXTRA_DIST = \
|
||||
macosx-libevent-config.h \
|
||||
diff -Naur transmission-1.93/third-party/miniupnp/connecthostport.c transmission-1.93-haiku/third-party/miniupnp/connecthostport.c
|
||||
--- transmission-1.93/third-party/miniupnp/connecthostport.c 2010-05-01 21:35:46.041680896 +0000
|
||||
+++ transmission-1.93-haiku/third-party/miniupnp/connecthostport.c 2010-05-05 23:24:18.628621312 +0000
|
||||
@@ -29,6 +29,7 @@
|
||||
#ifndef USE_GETHOSTBYNAME
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/select.h>
|
||||
#endif /* #ifndef USE_GETHOSTBYNAME */
|
||||
#endif /* #else WIN32 */
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
diff -Naur transmission-2.01/libtransmission/JSON_parser.c transmission-2.01-haiku/libtransmission/JSON_parser.c
|
||||
--- transmission-2.01/libtransmission/JSON_parser.c 2010-06-27 01:28:16.064225280 +0000
|
||||
+++ transmission-2.01-haiku/libtransmission/JSON_parser.c 2010-07-10 06:08:57.465829888 +0000
|
||||
@@ -80,6 +80,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* This can be removed once http://dev.haiku-os.org/ticket/3408 is fixed */
|
||||
+#ifdef __HAIKU__
|
||||
+# define strtold strtod
|
||||
+#endif
|
||||
|
||||
#define true 1
|
||||
#define false 0
|
||||
diff -Naur transmission-2.01/third-party/miniupnp/connecthostport.c transmission-2.01-haiku/third-party/miniupnp/connecthostport.c
|
||||
--- transmission-2.01/third-party/miniupnp/connecthostport.c 2010-06-27 01:28:53.066584576 +0000
|
||||
+++ transmission-2.01-haiku/third-party/miniupnp/connecthostport.c 2010-07-10 06:08:57.467664896 +0000
|
||||
@@ -29,6 +29,7 @@
|
||||
#ifndef USE_GETHOSTBYNAME
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/select.h>
|
||||
#endif /* #ifndef USE_GETHOSTBYNAME */
|
||||
#endif /* #else WIN32 */
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
diff -Naur transmission-2.12/libtransmission/JSON_parser.c transmission-2.12-haiku/libtransmission/JSON_parser.c
|
||||
--- transmission-2.12/libtransmission/JSON_parser.c 2010-06-27 01:28:16.064225280 +0000
|
||||
+++ transmission-2.12-haiku/libtransmission/JSON_parser.c 2010-07-10 06:08:57.465829888 +0000
|
||||
@@ -80,6 +80,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* This can be removed once http://dev.haiku-os.org/ticket/3408 is fixed */
|
||||
+#ifdef __HAIKU__
|
||||
+# define strtold strtod
|
||||
+#endif
|
||||
|
||||
#define true 1
|
||||
#define false 0
|
||||
diff -Naur transmission-2.12/third-party/miniupnp/connecthostport.c transmission-2.12-haiku/third-party/miniupnp/connecthostport.c
|
||||
--- transmission-2.12/third-party/miniupnp/connecthostport.c 2010-06-27 01:28:53.066584576 +0000
|
||||
+++ transmission-2.12-haiku/third-party/miniupnp/connecthostport.c 2010-07-10 06:08:57.467664896 +0000
|
||||
@@ -29,6 +29,7 @@
|
||||
#ifndef USE_GETHOSTBYNAME
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/select.h>
|
||||
#endif /* #ifndef USE_GETHOSTBYNAME */
|
||||
#endif /* #else WIN32 */
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
diff -Naur transmission-2.21/configure.ac transmission-2.21-haiku/configure.ac
|
||||
--- transmission-2.21/configure.ac 2011-02-08 22:14:33.063700992 +0100
|
||||
+++ transmission-2.21-haiku/configure.ac 2011-02-22 02:05:20.924319744 +0100
|
||||
@@ -85,7 +85,7 @@
|
||||
AC_C_INLINE
|
||||
if test "x$GCC" = "xyes" ; then
|
||||
|
||||
- CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings -Winline -Wfloat-equal"
|
||||
+ CFLAGS="$CFLAGS -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wwrite-strings -Winline"
|
||||
|
||||
dnl figure out gcc version
|
||||
AC_MSG_CHECKING([gcc version])
|
||||
@@ -95,6 +95,10 @@
|
||||
GCC_VERSION_NUM=`(expr $GCC_MAJOR "*" 100 + $GCC_MINOR) 2>/dev/null`
|
||||
|
||||
AC_MSG_RESULT($GCC_VERSION)
|
||||
+ if test $GCC_VERSION_NUM -ge 300; then
|
||||
+ dnl these aren't in gcc 2
|
||||
+ CFLAGS="$CFLAGS -std=gnu99 -Wmissing-format-attribute -Wunused-parameter -Wfloat-equal"
|
||||
+ fi
|
||||
if test $GCC_VERSION_NUM -ge 304; then
|
||||
dnl these were added in 3.4
|
||||
CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
|
||||
diff -Naur transmission-2.21/third-party/miniupnp/connecthostport.c transmission-2.21-haiku/third-party/miniupnp/connecthostport.c
|
||||
--- transmission-2.21/third-party/miniupnp/connecthostport.c 2011-02-08 22:14:30.000524288 +0100
|
||||
+++ transmission-2.21-haiku/third-party/miniupnp/connecthostport.c 2011-02-22 02:05:20.925106176 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
#ifndef USE_GETHOSTBYNAME
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/select.h>
|
||||
#endif /* #ifndef USE_GETHOSTBYNAME */
|
||||
#endif /* #else WIN32 */
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
diff -Naur transmission-2.73/third-party/miniupnp/connecthostport.c transmission-2.73-haiku/transmission-2.73/third-party/miniupnp/connecthostport.c
|
||||
--- transmission-2.73/third-party/miniupnp/connecthostport.c 2012-10-24 13:01:10.429654016 +0000
|
||||
+++ transmission-2.73-haiku/transmission-2.73/third-party/miniupnp/connecthostport.c 2012-12-08 17:06:33.040632320 +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 -Naur transmission-2.73/third-party/miniupnp/miniupnpc.c transmission-2.73-haiku/transmission-2.73/third-party/miniupnp/miniupnpc.c
|
||||
--- transmission-2.73/third-party/miniupnp/miniupnpc.c 2012-10-24 13:01:10.457703424 +0000
|
||||
+++ transmission-2.73-haiku/transmission-2.73/third-party/miniupnp/miniupnpc.c 2012-12-08 17:09:12.018087936 +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 -Naur transmission-2.73/third-party/miniupnp/portlistingparse.c transmission-2.73-haiku/transmission-2.73/third-party/miniupnp/portlistingparse.c
|
||||
--- transmission-2.73/third-party/miniupnp/portlistingparse.c 2012-10-24 13:01:10.221511680 +0000
|
||||
+++ transmission-2.73-haiku/transmission-2.73/third-party/miniupnp/portlistingparse.c 2012-12-08 17:09:49.941359104 +0000
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/* Helper function */
|
||||
static UNSIGNED_INTEGER
|
||||
-atoui(const char * p, int l)
|
||||
+_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)_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)_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)_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 = _atoui(data, l);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1,69 +0,0 @@
|
||||
diff -Naur transmission-2.75/third-party/miniupnp/connecthostport.c transmission-2.75-haiku/third-party/miniupnp/connecthostport.c
|
||||
--- transmission-2.75/third-party/miniupnp/connecthostport.c 2012-10-24 13:01:10.429654016 +0000
|
||||
+++ transmission-2.75-haiku/third-party/miniupnp/connecthostport.c 2012-12-08 17:06:33.040632320 +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 -Naur transmission-2.75/third-party/miniupnp/miniupnpc.c transmission-2.75-haiku/third-party/miniupnp/miniupnpc.c
|
||||
--- transmission-2.75/third-party/miniupnp/miniupnpc.c 2012-10-24 13:01:10.457703424 +0000
|
||||
+++ transmission-2.75-haiku/third-party/miniupnp/miniupnpc.c 2012-12-08 17:09:12.018087936 +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 -Naur transmission-2.75/third-party/miniupnp/portlistingparse.c transmission-2.75-haiku/third-party/miniupnp/portlistingparse.c
|
||||
--- transmission-2.75/third-party/miniupnp/portlistingparse.c 2012-10-24 13:01:10.221511680 +0000
|
||||
+++ transmission-2.75-haiku/third-party/miniupnp/portlistingparse.c 2012-12-08 17:09:49.941359104 +0000
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/* Helper function */
|
||||
static UNSIGNED_INTEGER
|
||||
-atoui(const char * p, int l)
|
||||
+_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)_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)_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)_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 = _atoui(data, l);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
109
net-p2p/transmission/patches/transmission-2.84.patchset
Normal file
109
net-p2p/transmission/patches/transmission-2.84.patchset
Normal file
@@ -0,0 +1,109 @@
|
||||
From d350c9f0569a19eb2d8b56dfd39cfc638f5bd21e Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 5 Sep 2014 14:57:25 +0000
|
||||
Subject: haiku patch
|
||||
|
||||
|
||||
diff --git a/libtransmission/platform-quota.c b/libtransmission/platform-quota.c
|
||||
index e8a2771..538eb68 100644
|
||||
--- a/libtransmission/platform-quota.c
|
||||
+++ b/libtransmission/platform-quota.c
|
||||
@@ -13,7 +13,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() */
|
||||
@@ -69,7 +69,7 @@
|
||||
****
|
||||
***/
|
||||
|
||||
-#ifndef WIN32
|
||||
+#if !defined(WIN32) && !defined(__HAIKU__)
|
||||
static const char *
|
||||
getdev (const char * path)
|
||||
{
|
||||
@@ -344,7 +344,7 @@ tr_getQuotaFreeSpace (const struct tr_device_info * info)
|
||||
{
|
||||
int64_t ret = -1;
|
||||
|
||||
-#ifndef WIN32
|
||||
+#if !defined(WIN32) && !defined(__HAIKU__)
|
||||
|
||||
if (info->fstype && !evutil_ascii_strcasecmp(info->fstype, "xfs"))
|
||||
{
|
||||
@@ -391,7 +391,7 @@ tr_device_info_create (const char * path)
|
||||
|
||||
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 --git a/third-party/miniupnp/miniupnpc.c b/third-party/miniupnp/miniupnpc.c
|
||||
index 85b7d75..7c40326 100644
|
||||
--- a/third-party/miniupnp/miniupnpc.c
|
||||
+++ b/third-party/miniupnp/miniupnpc.c
|
||||
@@ -17,7 +17,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(MACOSX) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun)
|
||||
+#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(MACOSX) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__HAIKU__)
|
||||
#define HAS_IP_MREQN
|
||||
#endif
|
||||
|
||||
diff --git a/third-party/miniupnp/portlistingparse.c b/third-party/miniupnp/portlistingparse.c
|
||||
index 19e3054..2b1bce8 100644
|
||||
--- a/third-party/miniupnp/portlistingparse.c
|
||||
+++ b/third-party/miniupnp/portlistingparse.c
|
||||
@@ -28,7 +28,7 @@ static const struct {
|
||||
|
||||
/* 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)
|
||||
@@ -94,7 +94,7 @@ data(void * d, const char * data, int l)
|
||||
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)
|
||||
@@ -103,21 +103,21 @@ data(void * d, const char * data, int l)
|
||||
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;
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -1,296 +0,0 @@
|
||||
diff -Naur transmission-1.51+-orig/configure.ac transmission-1.51+/configure.ac
|
||||
--- transmission-1.51+-orig/configure.ac 2009-03-07 01:50:35.000000000 +0000
|
||||
+++ transmission-1.51+/configure.ac 2009-03-07 02:01:02.000000000 +0000
|
||||
@@ -62,7 +62,7 @@
|
||||
AC_C_INLINE
|
||||
if test "x$GCC" = "xyes" ; then
|
||||
|
||||
- CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings"
|
||||
+ CFLAGS="$CFLAGS -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wwrite-strings"
|
||||
|
||||
dnl figure out gcc version
|
||||
AC_MSG_CHECKING([gcc version])
|
||||
@@ -74,7 +74,7 @@
|
||||
AC_MSG_RESULT($GCC_VERSION)
|
||||
if test $GCC_VERSION_NUM -ge 304; then
|
||||
dnl these were added in 3.4
|
||||
- CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
|
||||
+ CFLAGS="$CFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
diff -Naur transmission-1.51+-orig/libtransmission/platform.c transmission-1.51+/libtransmission/platform.c
|
||||
--- transmission-1.51+-orig/libtransmission/platform.c 2009-03-07 01:50:34.000000000 +0000
|
||||
+++ transmission-1.51+/libtransmission/platform.c 2009-03-07 02:08:38.000000000 +0000
|
||||
@@ -16,6 +16,8 @@
|
||||
#else
|
||||
#ifdef SYS_DARWIN
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
+ #elif defined(__HAIKU__)
|
||||
+ #include <FindDirectory.h>
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500 /* needed for recursive locks. */
|
||||
@@ -263,6 +265,12 @@
|
||||
|
||||
if( !path )
|
||||
{
|
||||
+#if defined(__HAIKU__)
|
||||
+ char buf[MAX_PATH_LENGTH];
|
||||
+ find_directory( B_USER_SETTINGS_DIRECTORY,
|
||||
+ dev_for_path( "/boot" ), true,
|
||||
+ buf, sizeof( buf ) );
|
||||
+ path = tr_buildPath( buf, "Transmission", NULL );
|
||||
#ifdef SYS_DARWIN
|
||||
path = tr_buildPath( getHomeDir( ), "Library",
|
||||
"Application Support",
|
||||
@@ -305,7 +313,7 @@
|
||||
|
||||
if( !path )
|
||||
{
|
||||
-#if defined( WIN32 )
|
||||
+#if defined(__HAIKU__) || defined( WIN32 )
|
||||
path = tr_buildPath( getOldConfigDir( ), "Cache", NULL );
|
||||
#elif defined( SYS_DARWIN )
|
||||
path = tr_buildPath( getHomeDir( ), "Library", "Caches", "Transmission", NULL );
|
||||
@@ -427,6 +435,9 @@
|
||||
#ifdef SYS_DARWIN
|
||||
s = tr_buildPath( getHomeDir( ), "Library", "Application Support",
|
||||
appname, NULL );
|
||||
+#elif defined(__HAIKU__)
|
||||
+ s = tr_buildPath( getHomeDir( ), "config",
|
||||
+ "settings", "Transmission", NULL );
|
||||
#elif defined( WIN32 )
|
||||
char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
|
||||
SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata );
|
||||
diff -Naur transmission-1.51+-orig/third-party/libnatpmp/getgateway.c transmission-1.51+/third-party/libnatpmp/getgateway.c
|
||||
--- transmission-1.51+-orig/third-party/libnatpmp/getgateway.c 2009-03-07 01:50:34.000000000 +0000
|
||||
+++ transmission-1.51+/third-party/libnatpmp/getgateway.c 2009-03-07 02:11:30.000000000 +0000
|
||||
@@ -37,6 +37,18 @@
|
||||
#undef USE_SYSCTL_NET_ROUTE
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#undef USE_PROC_NET_ROUTE
|
||||
+#undef USE_SOCKET_ROUTE
|
||||
+#undef USE_SYSCTL_NET_ROUTE
|
||||
+/* Note: 2009-jan-10
|
||||
+ *
|
||||
+ * Haiku uses a BSD-like network stack.
|
||||
+ * However its network stack is not yet feature complete.
|
||||
+ * So for now, a workaround is needed */
|
||||
+#define USE_HAIKU_WORKAROUND
|
||||
+#endif
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
#undef USE_PROC_NET_ROUTE
|
||||
#undef USE_SOCKET_ROUTE
|
||||
@@ -82,6 +94,13 @@
|
||||
#define FAILED (-1)
|
||||
#endif
|
||||
|
||||
+#ifdef USE_HAIKU_WORKAROUND
|
||||
+int getdefaultgateway(in_addr_t * addr)
|
||||
+{
|
||||
+ return FAILED;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#ifdef USE_PROC_NET_ROUTE
|
||||
int getdefaultgateway(in_addr_t * addr)
|
||||
{
|
||||
diff -Naur transmission-1.51+-orig/third-party/miniupnp/upnpreplyparse.h transmission-1.51+/third-party/miniupnp/upnpreplyparse.h
|
||||
--- transmission-1.51+-orig/third-party/miniupnp/upnpreplyparse.h 2009-03-07 01:50:34.000000000 +0000
|
||||
+++ transmission-1.51+/third-party/miniupnp/upnpreplyparse.h 2009-03-07 02:12:06.000000000 +0000
|
||||
@@ -8,7 +8,7 @@
|
||||
#ifndef __UPNPREPLYPARSE_H__
|
||||
#define __UPNPREPLYPARSE_H__
|
||||
|
||||
-#if defined(NO_SYS_QUEUE_H) || defined(WIN32)
|
||||
+#if defined(NO_SYS_QUEUE_H) || defined(WIN32) || defined(__HAIKU__)
|
||||
#include "bsdqueue.h"
|
||||
#else
|
||||
#include <sys/queue.h>
|
||||
diff -Naur transmission-1.51+-orig/transmission-1.42-haiku-gcc2-rev4.diff transmission-1.51+/transmission-1.42-haiku-gcc2-rev4.diff
|
||||
--- transmission-1.51+-orig/transmission-1.42-haiku-gcc2-rev4.diff 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ transmission-1.51+/transmission-1.42-haiku-gcc2-rev4.diff 2009-03-07 05:43:55.000000000 +0000
|
||||
@@ -0,0 +1,179 @@
|
||||
+diff -Naur transmission-1.42-orig/configure.ac transmission-1.42/configure.ac
|
||||
+--- transmission-1.42-orig/configure.ac 2009-03-07 00:31:25.000000000 +0000
|
||||
++++ transmission-1.42/configure.ac 2009-03-07 00:31:54.000000000 +0000
|
||||
+@@ -43,7 +43,7 @@
|
||||
+ AC_PROG_CC
|
||||
+ AC_PROG_CXX
|
||||
+ if test "x$GCC" = "xyes" ; then
|
||||
+- CFLAGS="-g -Wall -Wformat-security -W -Wmissing-prototypes -Wdeclaration-after-statement -O3 -funroll-loops"
|
||||
++ CFLAGS="-g -Wall -Wformat-security -W -Wmissing-prototypes -O3 -funroll-loops"
|
||||
+ CXXFLAGS="-g -Wall -Wformat-security -W -O3 -funroll-loops"
|
||||
+ fi
|
||||
+
|
||||
+diff -Naur transmission-1.42-orig/libtransmission/platform.c transmission-1.42/libtransmission/platform.c
|
||||
+--- transmission-1.42-orig/libtransmission/platform.c 2009-03-07 00:31:25.000000000 +0000
|
||||
++++ transmission-1.42/libtransmission/platform.c 2009-03-07 00:33:53.000000000 +0000
|
||||
+@@ -22,6 +22,8 @@
|
||||
+ #else
|
||||
+ #ifdef SYS_DARWIN
|
||||
+ #include <CoreFoundation/CoreFoundation.h>
|
||||
++ #elif defined(__HAIKU__)
|
||||
++ #include <FindDirectory.h>
|
||||
+ #endif
|
||||
+
|
||||
+ #define _XOPEN_SOURCE 500 /* needed for recursive locks. */
|
||||
+@@ -298,7 +300,7 @@
|
||||
+
|
||||
+ if( !path )
|
||||
+ {
|
||||
+-#ifdef __BEOS__
|
||||
++#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
+ char buf[MAX_PATH_LENGTH];
|
||||
+ find_directory( B_USER_SETTINGS_DIRECTORY,
|
||||
+ dev_for_path( "/boot" ), true,
|
||||
+@@ -348,7 +350,7 @@
|
||||
+
|
||||
+ if( !path )
|
||||
+ {
|
||||
+-#if defined( __BEOS__ ) || defined( WIN32 )
|
||||
++#if defined( __BEOS__ ) || defined(__HAIKU__) || defined( WIN32 )
|
||||
+ path = tr_buildPath( getOldConfigDir( ), "Cache", NULL );
|
||||
+ #elif defined( SYS_DARWIN )
|
||||
+ path = tr_buildPath( getHomeDir( ), "Library", "Caches", "Transmission", NULL );
|
||||
+@@ -467,6 +469,9 @@
|
||||
+ #ifdef SYS_DARWIN
|
||||
+ s = tr_buildPath( getHomeDir( ), "Library",
|
||||
+ "Application Support", "Transmission", NULL );
|
||||
++#elif defined(__HAIKU__)
|
||||
++ s = tr_buildPath( getHomeDir( ), "config",
|
||||
++ "settings", "Transmission", NULL );
|
||||
+ #elif defined( WIN32 )
|
||||
+ char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
|
||||
+ SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata );
|
||||
+diff -Naur transmission-1.42-orig/third-party/libevent/test/bench.c transmission-1.42/third-party/libevent/test/bench.c
|
||||
+--- transmission-1.42-orig/third-party/libevent/test/bench.c 2009-03-07 00:31:23.000000000 +0000
|
||||
++++ transmission-1.42/third-party/libevent/test/bench.c 2009-03-07 00:33:53.000000000 +0000
|
||||
+@@ -44,7 +44,7 @@
|
||||
+ #include <windows.h>
|
||||
+ #else
|
||||
+ #include <sys/socket.h>
|
||||
+-#include <sys/signal.h>
|
||||
++#include <signal.h>
|
||||
+ #include <sys/resource.h>
|
||||
+ #endif
|
||||
+ #include <fcntl.h>
|
||||
+diff -Naur transmission-1.42-orig/third-party/libevent/test/regress.c transmission-1.42/third-party/libevent/test/regress.c
|
||||
+--- transmission-1.42-orig/third-party/libevent/test/regress.c 2009-03-07 00:31:23.000000000 +0000
|
||||
++++ transmission-1.42/third-party/libevent/test/regress.c 2009-03-07 00:33:53.000000000 +0000
|
||||
+@@ -43,7 +43,7 @@
|
||||
+ #ifndef WIN32
|
||||
+ #include <sys/socket.h>
|
||||
+ #include <sys/wait.h>
|
||||
+-#include <sys/signal.h>
|
||||
++#include <signal.h>
|
||||
+ #include <unistd.h>
|
||||
+ #include <netdb.h>
|
||||
+ #endif
|
||||
+diff -Naur transmission-1.42-orig/third-party/libevent/test/regress_dns.c transmission-1.42/third-party/libevent/test/regress_dns.c
|
||||
+--- transmission-1.42-orig/third-party/libevent/test/regress_dns.c 2009-03-07 00:31:23.000000000 +0000
|
||||
++++ transmission-1.42/third-party/libevent/test/regress_dns.c 2009-03-07 00:33:53.000000000 +0000
|
||||
+@@ -42,7 +42,7 @@
|
||||
+ #include <sys/queue.h>
|
||||
+ #ifndef WIN32
|
||||
+ #include <sys/socket.h>
|
||||
+-#include <sys/signal.h>
|
||||
++#include <signal.h>
|
||||
+ #include <netinet/in.h>
|
||||
+ #include <arpa/inet.h>
|
||||
+ #include <unistd.h>
|
||||
+@@ -89,7 +89,7 @@
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case DNS_IPv6_AAAA: {
|
||||
+-#if defined(HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP)
|
||||
++#if defined(HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
|
||||
+ struct in6_addr *in6_addrs = addresses;
|
||||
+ char buf[INET6_ADDRSTRLEN+1];
|
||||
+ int i;
|
||||
+@@ -258,7 +258,7 @@
|
||||
+ break;
|
||||
+ }
|
||||
+ case DNS_IPv6_AAAA: {
|
||||
+-#if defined (HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP)
|
||||
++#if defined (HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
|
||||
+ struct in6_addr *in6_addrs = addresses;
|
||||
+ char buf[INET6_ADDRSTRLEN+1];
|
||||
+ if (memcmp(&in6_addrs[0].s6_addr, "abcdefghijklmnop", 16)
|
||||
+diff -Naur transmission-1.42-orig/third-party/libevent/test/regress_http.c transmission-1.42/third-party/libevent/test/regress_http.c
|
||||
+--- transmission-1.42-orig/third-party/libevent/test/regress_http.c 2009-03-07 00:31:23.000000000 +0000
|
||||
++++ transmission-1.42/third-party/libevent/test/regress_http.c 2009-03-07 00:33:53.000000000 +0000
|
||||
+@@ -42,7 +42,7 @@
|
||||
+ #include <sys/queue.h>
|
||||
+ #ifndef WIN32
|
||||
+ #include <sys/socket.h>
|
||||
+-#include <sys/signal.h>
|
||||
++#include <signal.h>
|
||||
+ #include <unistd.h>
|
||||
+ #include <netdb.h>
|
||||
+ #endif
|
||||
+diff -Naur transmission-1.42-orig/third-party/libevent/test/regress_rpc.c transmission-1.42/third-party/libevent/test/regress_rpc.c
|
||||
+--- transmission-1.42-orig/third-party/libevent/test/regress_rpc.c 2009-03-07 00:31:23.000000000 +0000
|
||||
++++ transmission-1.42/third-party/libevent/test/regress_rpc.c 2009-03-07 00:33:53.000000000 +0000
|
||||
+@@ -42,7 +42,7 @@
|
||||
+ #include <sys/queue.h>
|
||||
+ #ifndef WIN32
|
||||
+ #include <sys/socket.h>
|
||||
+-#include <sys/signal.h>
|
||||
++#include <signal.h>
|
||||
+ #include <unistd.h>
|
||||
+ #include <netdb.h>
|
||||
+ #endif
|
||||
+diff -Naur transmission-1.42-orig/third-party/libnatpmp/getgateway.c transmission-1.42/third-party/libnatpmp/getgateway.c
|
||||
+--- transmission-1.42-orig/third-party/libnatpmp/getgateway.c 2009-03-07 00:31:23.000000000 +0000
|
||||
++++ transmission-1.42/third-party/libnatpmp/getgateway.c 2009-03-07 00:33:53.000000000 +0000
|
||||
+@@ -37,6 +37,18 @@
|
||||
+ #undef USE_SYSCTL_NET_ROUTE
|
||||
+ #endif
|
||||
+
|
||||
++#ifdef __HAIKU__
|
||||
++#undef USE_PROC_NET_ROUTE
|
||||
++#undef USE_SOCKET_ROUTE
|
||||
++#undef USE_SYSCTL_NET_ROUTE
|
||||
++/* Note: 2009-jan-10
|
||||
++ *
|
||||
++ * Haiku uses a BSD-like network stack.
|
||||
++ * However its network stack is not yet feature complete.
|
||||
++ * So for now, a workaround is needed */
|
||||
++#define USE_HAIKU_WORKAROUND
|
||||
++#endif
|
||||
++
|
||||
+ #ifdef __APPLE__
|
||||
+ #undef USE_PROC_NET_ROUTE
|
||||
+ #undef USE_SOCKET_ROUTE
|
||||
+@@ -82,6 +94,14 @@
|
||||
+ #define FAILED (-1)
|
||||
+ #endif
|
||||
+
|
||||
++
|
||||
++#ifdef USE_HAIKU_WORKAROUND
|
||||
++int getdefaultgateway(in_addr_t * addr)
|
||||
++{
|
||||
++ return FAILED;
|
||||
++}
|
||||
++#endif
|
||||
++
|
||||
+ #ifdef USE_PROC_NET_ROUTE
|
||||
+ int getdefaultgateway(in_addr_t * addr)
|
||||
+ {
|
||||
+diff -Naur transmission-1.42-orig/third-party/miniupnp/upnpreplyparse.h transmission-1.42/third-party/miniupnp/upnpreplyparse.h
|
||||
+--- transmission-1.42-orig/third-party/miniupnp/upnpreplyparse.h 2009-03-07 00:31:24.000000000 +0000
|
||||
++++ transmission-1.42/third-party/miniupnp/upnpreplyparse.h 2009-03-07 00:34:44.000000000 +0000
|
||||
+@@ -8,7 +8,7 @@
|
||||
+ #ifndef __UPNPREPLYPARSE_H__
|
||||
+ #define __UPNPREPLYPARSE_H__
|
||||
+
|
||||
+-#if defined(NO_SYS_QUEUE_H) || defined(WIN32)
|
||||
++#if defined(NO_SYS_QUEUE_H) || defined(WIN32) || defined(__HAIKU__)
|
||||
+ #include "bsdqueue.h"
|
||||
+ #else
|
||||
+ #include <sys/queue.h>
|
||||
@@ -1,29 +0,0 @@
|
||||
DESCRIPTION="Transmission"
|
||||
HOMEPAGE="http://www.transmissionbt.com/"
|
||||
SRC_URI="http://mirrors.m0k.org/transmission/files/transmission-1.72.tar.bz2"
|
||||
CHECKSUM_MD5="4ebbb9d4c27a019f5aced926818be4fa"
|
||||
REVISION="1"
|
||||
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
|
||||
STATUS_HAIKU="stable"
|
||||
# pkgconfig is only a build dependency
|
||||
DEPEND="dev-util/pkgconfig >= 0.23
|
||||
net-misc/curl >= 7.20.1
|
||||
dev-libs/libevent >= 1.4.11"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd transmission-1.72
|
||||
autoreconf -vfi
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd transmission-1.72
|
||||
make install
|
||||
}
|
||||
LICENSE="Transmission
|
||||
MIT
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2005-2010. All code is copyrighted by the respective authors."
|
||||
@@ -1,29 +0,0 @@
|
||||
DESCRIPTION="Transmission"
|
||||
HOMEPAGE="http://www.transmissionbt.com/"
|
||||
SRC_URI="http://mirrors.m0k.org/transmission/files/transmission-1.73.tar.bz2"
|
||||
CHECKSUM_MD5="9c1b5d84fb9ddbbd50b5776c1cd6daa4"
|
||||
REVISION="1"
|
||||
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
|
||||
STATUS_HAIKU="stable"
|
||||
# pkgconfig is only a build dependency
|
||||
DEPEND="dev-util/pkgconfig >= 0.23
|
||||
net-misc/curl >= 7.20.1
|
||||
dev-libs/libevent >= 1.4.11"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd transmission-1.73
|
||||
autoreconf -vfi
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd transmission-1.73
|
||||
make install
|
||||
}
|
||||
LICENSE="Transmission
|
||||
MIT
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2005-2010. All code is copyrighted by the respective authors."
|
||||
@@ -1,31 +0,0 @@
|
||||
DESCRIPTION="Transmission"
|
||||
HOMEPAGE="http://www.transmissionbt.com/"
|
||||
SRC_URI="http://mirrors.m0k.org/transmission/files/transmission-1.93.tar.bz2"
|
||||
CHECKSUM_MD5="f68358d03e46bec5704bbaa894990152"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
|
||||
|
||||
# pkgconfig is only a build dependency
|
||||
# note: intlool, xml-parser, & gettext are now required
|
||||
DEPEND="dev-util/pkgconfig >= 0.23
|
||||
net-misc/curl >= 7.20.1
|
||||
dev-libs/libevent >= 1.4.11"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd transmission-1.93
|
||||
autoreconf -vfi
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd transmission-1.93
|
||||
make install
|
||||
}
|
||||
LICENSE="Transmission
|
||||
MIT
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2005-2010. All code is copyrighted by the respective authors."
|
||||
@@ -1,31 +0,0 @@
|
||||
DESCRIPTION="Transmission"
|
||||
HOMEPAGE="http://www.transmissionbt.com/"
|
||||
SRC_URI="http://mirrors.m0k.org/transmission/files/transmission-2.01.tar.bz2"
|
||||
CHECKSUM_MD5="2e896b86fd55c3563ef85cd01a2141a3"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
|
||||
|
||||
# pkgconfig is only a build dependency
|
||||
# note: intlool, XML-Parser, & gettext are now required
|
||||
DEPEND="dev-util/pkgconfig >= 0.23
|
||||
net-misc/curl >= 7.20.1
|
||||
dev-libs/libevent >= 1.4.11"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd transmission-2.01
|
||||
autoreconf -vfi
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd transmission-2.01
|
||||
make install
|
||||
}
|
||||
LICENSE="Transmission
|
||||
MIT
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2005-2010. All code is copyrighted by the respective authors."
|
||||
@@ -1,31 +0,0 @@
|
||||
DESCRIPTION="Transmission"
|
||||
HOMEPAGE="http://www.transmissionbt.com/"
|
||||
SRC_URI="http://download.transmissionbt.com/files/transmission-2.12.tar.bz2"
|
||||
CHECKSUM_MD5="f3d34fdbbf3ae25635f9e7bf7e662cd9"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
|
||||
|
||||
# pkgconfig is only a build dependency
|
||||
# note: intlool, XML-Parser, & gettext are now required
|
||||
DEPEND="dev-util/pkgconfig >= 0.23
|
||||
net-misc/curl >= 7.20.1
|
||||
dev-libs/libevent >= 1.4.11"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd transmission-2.12
|
||||
autoreconf -vfi
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd transmission-2.12
|
||||
make install
|
||||
}
|
||||
LICENSE="Transmission
|
||||
MIT
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2005-2010. All code is copyrighted by the respective authors."
|
||||
@@ -1,38 +0,0 @@
|
||||
DESCRIPTION="Transmission"
|
||||
HOMEPAGE="http://www.transmissionbt.com/"
|
||||
SRC_URI="http://download.transmissionbt.com/files/transmission-2.21.tar.bz2"
|
||||
CHECKSUM_MD5="65a00e3423834121c274717bde2b4dd9"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
|
||||
# pkgconfig is only a build dependency
|
||||
# note: intlool, XML-Parser, & gettext are now required
|
||||
DEPEND="dev-util/pkgconfig >= 0.23
|
||||
net-misc/curl >= 7.20.1
|
||||
dev-libs/libevent >= 2.0.10"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd transmission-2.21
|
||||
autoreconf -vfi
|
||||
|
||||
# Transmission doesn't think it's a bug, so we will have to remove this
|
||||
sed -i 's/IT_PROG_INTLTOOL(0.35.0,no-xml)/ /' configure
|
||||
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
|
||||
--disable-nls \
|
||||
--mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \
|
||||
--localedir=`finddir B_COMMON_DATA_DIRECTORY`/locale \
|
||||
--datarootdir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd transmission-2.21
|
||||
make install
|
||||
}
|
||||
LICENSE="Transmission
|
||||
MIT
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2005-2011. All code is copyrighted by the respective authors."
|
||||
@@ -1,37 +0,0 @@
|
||||
DESCRIPTION="Transmission"
|
||||
HOMEPAGE="http://www.transmissionbt.com/"
|
||||
SRC_URI="http://download.transmissionbt.com/files/transmission-2.73.tar.bz2"
|
||||
CHECKSUM_MD5="03927018656c4b54a92156ab59a8de74"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
|
||||
|
||||
# pkgconfig is only a build dependency
|
||||
# note: intlool, XML-Parser, & gettext are now required
|
||||
DEPEND="dev-util/pkgconfig >= 0.23
|
||||
net-misc/curl >= 7.16.3
|
||||
dev-libs/libevent >= 2.0.10
|
||||
dev-libs/openssl >= 0.9.8"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd transmission-2.73
|
||||
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
|
||||
--disable-nls \
|
||||
--mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \
|
||||
--localedir=`finddir B_COMMON_DATA_DIRECTORY`/locale \
|
||||
--datarootdir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd transmission-2.73
|
||||
make install
|
||||
}
|
||||
LICENSE="Transmission
|
||||
MIT
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2005-2011. All code is copyrighted by the respective authors."
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
DESCRIPTION="Transmission"
|
||||
HOMEPAGE="http://www.transmissionbt.com/"
|
||||
SRC_URI="http://download.transmissionbt.com/files/transmission-2.75.tar.bz2"
|
||||
CHECKSUM_MD5="ae3a3e7532560c16324e6c8a6386ad22"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
|
||||
|
||||
# pkgconfig is only a build dependency
|
||||
# note: intlool, XML-Parser, & gettext are now required
|
||||
DEPEND="dev-util/pkgconfig >= 0.23
|
||||
net-misc/curl >= 7.16.3
|
||||
dev-libs/libevent >= 2.0.10
|
||||
dev-libs/openssl >= 0.9.8"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd transmission-2.75
|
||||
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
|
||||
--disable-nls \
|
||||
--mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \
|
||||
--localedir=`finddir B_COMMON_DATA_DIRECTORY`/locale \
|
||||
--datarootdir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd transmission-2.75
|
||||
make install
|
||||
}
|
||||
LICENSE="Transmission
|
||||
MIT
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2005-2013. All code is copyrighted by the respective authors."
|
||||
|
||||
76
net-p2p/transmission/transmission-2.84.recipe
Normal file
76
net-p2p/transmission/transmission-2.84.recipe
Normal file
@@ -0,0 +1,76 @@
|
||||
SUMMARY="Transmission is a cross-platform open source BitTorrent client"
|
||||
DESCRIPTION="
|
||||
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/"
|
||||
LICENSE="Transmission
|
||||
MIT
|
||||
GNU GPL v2
|
||||
"
|
||||
COPYRIGHT="2005-2013. All code is copyrighted by the respective authors."
|
||||
SRC_URI="https://transmission.cachefly.net/transmission-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="a9fc1936b4ee414acc732ada04e84339d6755cd0d097bcbd11ba2cfc540db9eb"
|
||||
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"
|
||||
|
||||
PATCHES="transmission-$portVersion.patchset"
|
||||
|
||||
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
|
||||
cmd:awk
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure --without-gtk --datadir=$dataDir
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
Reference in New Issue
Block a user