Merged haikuports/haikuports into master

This commit is contained in:
diversys
2014-09-07 09:44:38 +04:00
49 changed files with 799 additions and 2363 deletions

View File

@@ -0,0 +1,247 @@
From 5a9ff734d38b382f532b485f68dc84a3ab361549 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 31 Aug 2014 11:17:41 +0000
Subject: haiku patch
diff --git a/main-loop.c b/main-loop.c
index 3cc79f8..f33839b 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -81,7 +81,9 @@ static int qemu_signal_init(void)
*/
sigemptyset(&set);
sigaddset(&set, SIG_IPI);
+#ifndef __HAIKU__
sigaddset(&set, SIGIO);
+#endif
sigaddset(&set, SIGALRM);
sigaddset(&set, SIGBUS);
pthread_sigmask(SIG_BLOCK, &set, NULL);
diff --git a/os-posix.c b/os-posix.c
index cb2a7f7..ae5b02c 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -334,6 +334,9 @@ bool is_daemonized(void)
int os_mlock(void)
{
+#ifdef __HAIKU__
+ return ENOSYS;
+#else
int ret = 0;
ret = mlockall(MCL_CURRENT | MCL_FUTURE);
@@ -342,4 +345,5 @@ int os_mlock(void)
}
return ret;
+#endif
}
diff --git a/target-xtensa/xtensa-semi.c b/target-xtensa/xtensa-semi.c
index 16e9d8c..d6f49c5 100644
--- a/target-xtensa/xtensa-semi.c
+++ b/target-xtensa/xtensa-semi.c
@@ -95,59 +95,53 @@ enum {
static uint32_t errno_h2g(int host_errno)
{
- static const uint32_t guest_errno[] = {
- [EPERM] = TARGET_EPERM,
- [ENOENT] = TARGET_ENOENT,
- [ESRCH] = TARGET_ESRCH,
- [EINTR] = TARGET_EINTR,
- [EIO] = TARGET_EIO,
- [ENXIO] = TARGET_ENXIO,
- [E2BIG] = TARGET_E2BIG,
- [ENOEXEC] = TARGET_ENOEXEC,
- [EBADF] = TARGET_EBADF,
- [ECHILD] = TARGET_ECHILD,
- [EAGAIN] = TARGET_EAGAIN,
- [ENOMEM] = TARGET_ENOMEM,
- [EACCES] = TARGET_EACCES,
- [EFAULT] = TARGET_EFAULT,
+ switch (host_errno) {
+ case 0: return 0;
+ case EPERM: return TARGET_EPERM;
+ case ENOENT: return TARGET_ENOENT;
+ case ESRCH: return TARGET_ESRCH;
+ case EINTR: return TARGET_EINTR;
+ case EIO: return TARGET_EIO;
+ case ENXIO: return TARGET_ENXIO;
+ case E2BIG: return TARGET_E2BIG;
+ case ENOEXEC: return TARGET_ENOEXEC;
+ case EBADF: return TARGET_EBADF;
+ case ECHILD: return TARGET_ECHILD;
+ case EAGAIN: return TARGET_EAGAIN;
+ case ENOMEM: return TARGET_ENOMEM;
+ case EACCES: return TARGET_EACCES;
+ case EFAULT: return TARGET_EFAULT;
#ifdef ENOTBLK
- [ENOTBLK] = TARGET_ENOTBLK,
+ case ENOTBLK: return TARGET_ENOTBLK;
#endif
- [EBUSY] = TARGET_EBUSY,
- [EEXIST] = TARGET_EEXIST,
- [EXDEV] = TARGET_EXDEV,
- [ENODEV] = TARGET_ENODEV,
- [ENOTDIR] = TARGET_ENOTDIR,
- [EISDIR] = TARGET_EISDIR,
- [EINVAL] = TARGET_EINVAL,
- [ENFILE] = TARGET_ENFILE,
- [EMFILE] = TARGET_EMFILE,
- [ENOTTY] = TARGET_ENOTTY,
+ case EBUSY: return TARGET_EBUSY;
+ case EEXIST: return TARGET_EEXIST;
+ case EXDEV: return TARGET_EXDEV;
+ case ENODEV: return TARGET_ENODEV;
+ case ENOTDIR: return TARGET_ENOTDIR;
+ case EISDIR: return TARGET_EISDIR;
+ case EINVAL: return TARGET_EINVAL;
+ case ENFILE: return TARGET_ENFILE;
+ case EMFILE: return TARGET_EMFILE;
+ case ENOTTY: return TARGET_ENOTTY;
#ifdef ETXTBSY
- [ETXTBSY] = TARGET_ETXTBSY,
+ case ETXTBSY: return TARGET_ETXTBSY;
#endif
- [EFBIG] = TARGET_EFBIG,
- [ENOSPC] = TARGET_ENOSPC,
- [ESPIPE] = TARGET_ESPIPE,
- [EROFS] = TARGET_EROFS,
- [EMLINK] = TARGET_EMLINK,
- [EPIPE] = TARGET_EPIPE,
- [EDOM] = TARGET_EDOM,
- [ERANGE] = TARGET_ERANGE,
- [ENOSYS] = TARGET_ENOSYS,
+ case EFBIG: return TARGET_EFBIG;
+ case ENOSPC: return TARGET_ENOSPC;
+ case ESPIPE: return TARGET_ESPIPE;
+ case EROFS: return TARGET_EROFS;
+ case EMLINK: return TARGET_EMLINK;
+ case EPIPE: return TARGET_EPIPE;
+ case EDOM: return TARGET_EDOM;
+ case ERANGE: return TARGET_ERANGE;
+ case ENOSYS: return TARGET_ENOSYS;
#ifdef ELOOP
- [ELOOP] = TARGET_ELOOP,
+ case ELOOP: return TARGET_ELOOP;
#endif
};
- if (host_errno == 0) {
- return 0;
- } else if (host_errno > 0 && host_errno < ARRAY_SIZE(guest_errno) &&
- guest_errno[host_errno]) {
- return guest_errno[host_errno];
- } else {
- return TARGET_EINVAL;
- }
+ return TARGET_EINVAL;
}
void HELPER(simcall)(CPUXtensaState *env)
diff --git a/util/compatfd.c b/util/compatfd.c
index 341ada6..e50416d 100644
--- a/util/compatfd.c
+++ b/util/compatfd.c
@@ -17,7 +17,9 @@
#include "qemu/compatfd.h"
#include "qemu/thread.h"
+#ifndef __HAIKU__
#include <sys/syscall.h>
+#endif
struct sigfd_compat_info
{
diff --git a/util/qemu-openpty.c b/util/qemu-openpty.c
index 4c53211..d7c43c4 100644
--- a/util/qemu-openpty.c
+++ b/util/qemu-openpty.c
@@ -35,7 +35,9 @@
#include "config-host.h"
#include "qemu-common.h"
-#if defined(__GLIBC__)
+#if defined(__HAIKU__)
+# include <termios.h>
+#elif defined(__GLIBC__)
# include <pty.h>
#elif defined CONFIG_BSD
# include <termios.h>
--
1.8.3.4
From e0895f808d4c77cc8630d657eef0275d8e3d7333 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 31 Aug 2014 11:23:00 +0000
Subject: sys/signal.h =>
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index cdbfb2e..6779c03 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -60,7 +60,7 @@ extern int daemon(int, int);
#include <sys/mman.h>
#include <libgen.h>
#include <setjmp.h>
-#include <sys/signal.h>
+#include <signal.h>
#ifdef CONFIG_LINUX
#include <sys/syscall.h>
--
1.8.3.4
From f832224f8dc050d8bab5cf71bd4a358d3b3f27bb Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 1 Sep 2014 07:28:08 +0000
Subject: we use libbsd instead of libutil
diff --git a/tests/Makefile b/tests/Makefile
index 4b2e1bb..ac248d0 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -341,7 +341,7 @@ tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_hel
tests/test-qemu-opts$(EXESUF): tests/test-qemu-opts.o libqemuutil.a libqemustub.a
ifeq ($(CONFIG_POSIX),y)
-LIBS += -lutil
+LIBS += -lbsd
endif
# QTest rules
--
1.8.3.4
From c2ca444897e667046f3c266feb7489317f27d403 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 6 Sep 2014 20:35:22 +0000
Subject: adapt configure for x86_64
* define _POSIX_C_SOURCE for memalign
diff --git a/configure b/configure
index f7685b5..3c063fb 100755
--- a/configure
+++ b/configure
@@ -659,8 +659,9 @@ AIX)
;;
Haiku)
haiku="yes"
+ CFLAGS="$CFLAGS -D_POSIX_C_SOURCE"
QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS $QEMU_CFLAGS"
- LIBS="-lposix_error_mapper -lnetwork $LIBS"
+ LIBS="-lposix_error_mapper -lnetwork -lbsd $LIBS"
;;
*)
audio_drv_list="oss"
--
1.8.3.4

View File

@@ -0,0 +1,104 @@
SUMMARY="QEMU is a generic and open source machine emulator and virtualizer."
DESCRIPTION="
QEMU is a generic and open source machine emulator and virtualizer.
QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a \
different machine (e.g. your own PC). By using dynamic translation, it \
achieves very good performance.
"
HOMEPAGE="http://wiki.qemu.org/"
SRC_URI="http://wiki.qemu-project.org/download/qemu-$portVersion.tar.bz2"
CHECKSUM_SHA256="397e23184f4bf613589a8fe0c6542461dc2afdf17ed337e97e6fd2f31e8f8802"
COPYRIGHT="2003-2014 Fabrice Bellard"
LICENSE="GNU GPL v2"
REVISION="2"
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"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
qemu$secondaryArchSuffix = $portVersion
cmd:qemu$secondaryArchSuffix = $portVersion
cmd:qemu_img$secondaryArchSuffix = $portVersion
cmd:qemu_io$secondaryArchSuffix = $portVersion
cmd:qemu_system_aarch64$secondaryArchSuffix = $portVersion
cmd:qemu_system_alpha$secondaryArchSuffix = $portVersion
cmd:qemu_system_arm$secondaryArchSuffix = $portVersion
cmd:qemu_system_cris$secondaryArchSuffix = $portVersion
cmd:qemu_system_i386$secondaryArchSuffix = $portVersion
cmd:qemu_system_lm32$secondaryArchSuffix = $portVersion
cmd:qemu_system_m68k$secondaryArchSuffix = $portVersion
cmd:qemu_system_microblaze$secondaryArchSuffix = $portVersion
cmd:qemu_system_microblazeel$secondaryArchSuffix = $portVersion
cmd:qemu_system_mips$secondaryArchSuffix = $portVersion
cmd:qemu_system_mips64$secondaryArchSuffix = $portVersion
cmd:qemu_system_mips64el$secondaryArchSuffix = $portVersion
cmd:qemu_system_mipsel$secondaryArchSuffix = $portVersion
cmd:qemu_system_moxie$secondaryArchSuffix = $portVersion
cmd:qemu_system_or32$secondaryArchSuffix = $portVersion
cmd:qemu_system_ppc$secondaryArchSuffix = $portVersion
cmd:qemu_system_ppc64$secondaryArchSuffix = $portVersion
cmd:qemu_system_ppcemb$secondaryArchSuffix = $portVersion
cmd:qemu_system_s390x$secondaryArchSuffix = $portVersion
cmd:qemu_system_sh4$secondaryArchSuffix = $portVersion
cmd:qemu_system_sh4eb$secondaryArchSuffix = $portVersion
cmd:qemu_system_sparc$secondaryArchSuffix = $portVersion
cmd:qemu_system_sparc64$secondaryArchSuffix = $portVersion
cmd:qemu_system_unicore32$secondaryArchSuffix = $portVersion
cmd:qemu_system_x86_64$secondaryArchSuffix = $portVersion
cmd:qemu_system_xtensa$secondaryArchSuffix = $portVersion
cmd:qemu_system_xtensaeb$secondaryArchSuffix = $portVersion
"
PATCHES="qemu-$portVersion.patchset"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libz$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libstdc++$secondaryArchSuffix
lib:libsdl$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix >= 0.38
lib:libpixman_1$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libz$secondaryArchSuffix
devel:libfdt$secondaryArchSuffix
devel:libsdl$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix >= 0.38
devel:libpixman_1${secondaryArchSuffix}
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:find
cmd:pkg_config$secondaryArchSuffix
cmd:pod2man
cmd:python
"
BUILD()
{
runConfigure --omit-buildspec ./configure
make $jobArgs
}
INSTALL()
{
make install
# provide convenience symlink to just "qemu"
ln -s qemu-system-i386 $binDir/qemu
# Remove empty config file.
rm $settingsDir/qemu/target-x86_64.conf
}

View File

@@ -10,7 +10,7 @@ HOMEPAGE="http://www.midnight-commander.org"
COPYRIGHT="2007 MC Team"
LICENSE="GNU GPL v2"
CHECKSUM_SHA256="5f2fd570a798dc0cc06374adffef8ca403588c4e73dfdf908e9a4311718153fe"
CHECKSUM_SHA256="36d6191a47ec5d89d3788e48846fb620c481816441ff25264add8898d277b657"
SRC_URI="http://ftp.midnight-commander.org/mc-$portVersion.tar.xz"
@@ -19,7 +19,7 @@ REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PATCHES="mc-4.8.12.patch"
PATCHES="mc-4.8.13.patch"
GLOBAL_WRITABLE_FILES="settings/mc directory keep-old"
@@ -39,11 +39,11 @@ REQUIRES="
lib:libssh2$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
glib2$secondaryArchSuffix >= 2.38.1
lib:libglib_2.0$secondaryArchSuffix >= 0.38
"
BUILD_REQUIRES="
devel:libglib_2.0$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix >= 0.38
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libncurses$secondaryArchSuffix

View File

@@ -1,43 +0,0 @@
diff --git mc-4.8.12/lib/tty/tty-ncurses.c mc-4.8.12-haiku/lib/tty/tty-ncurses.c
--- mc-4.8.12/lib/tty/tty-ncurses.c
+++ mc-4.8.12-haiku/lib/tty/tty-ncurses.c
@@ -66,7 +66,7 @@
/*** file scope macro definitions ****************************************************************/
-#if defined(_AIX) && !defined(CTRL)
+#if !defined(CTRL)
#define CTRL(x) ((x) & 0x1f)
#endif
diff --git mc-4.8.12/lib/mcconfig/paths.c mc-4.8.12-haiku/lib/mcconfig/paths.c
--- mc-4.8.12/lib/mcconfig/paths.c
+++ mc-4.8.12-haiku/lib/mcconfig/paths.c
@@ -289,6 +289,7 @@
mc_config_init_config_paths (GError ** error)
{
char *dir;
+ char *defined_userconf_dir;
if (xdg_vars_initialized)
return;
@@ -346,7 +347,6 @@
mc_config_fix_migrated_rules ();
#else /* MC_HOMEDIR_XDG */
- char *defined_userconf_dir;
defined_userconf_dir = tilde_expand (MC_USERCONF_DIR);
if (g_path_is_absolute (defined_userconf_dir))
diff --git mc-4.8.12/lib/tty/tty-slang.h mc-4.8.12-haiku/lib/tty/tty-slang.h
--- mc-4.8.12/lib/tty/tty-slang.h
+++ mc-4.8.12-haiku/lib/tty/tty-slang.h
@@ -1,6 +1,7 @@
#ifndef MC__TTY_SLANG_H
#define MC__TTY_SLANG_H
+#define REAL_UNIX_SYSTEM
#ifdef HAVE_SLANG_SLANG_H
#include <slang/slang.h>

View File

@@ -0,0 +1,53 @@
diff --git mc-4.8.13/lib/tty/tty-ncurses.c mc-4.8.13-haiku/lib/tty/tty-ncurses.c
--- mc-4.8.13/lib/tty/tty-ncurses.c
+++ mc-4.8.13-haiku/lib/tty/tty-ncurses.c
@@ -66,7 +66,7 @@
/*** file scope macro definitions ****************************************************************/
-#if defined(_AIX) && !defined(CTRL)
+#if !defined(CTRL)
#define CTRL(x) ((x) & 0x1f)
#endif
diff --git mc-4.8.13/lib/tty/tty-slang.h mc-4.8.13-haiku/lib/tty/tty-slang.h
--- mc-4.8.13/lib/tty/tty-slang.h
+++ mc-4.8.13-haiku/lib/tty/tty-slang.h
@@ -1,6 +1,7 @@
#ifndef MC__TTY_SLANG_H
#define MC__TTY_SLANG_H
+#define REAL_UNIX_SYSTEM
#ifdef HAVE_SLANG_SLANG_H
#include <slang/slang.h>
--- mc-4.8.13/lib/mcconfig/paths.c 2014-09-06 19:04:12.000000000 +0400
+++ mc-4.8.13-haiku/lib/mcconfig/paths.c 2014-09-06 19:07:53.861143040 +0400
@@ -286,7 +286,8 @@
mc_config_init_config_paths (GError ** mcerror)
{
char *dir;
-
+ char *defined_userconf_dir;
+
mc_return_if_error (mcerror);
if (xdg_vars_initialized)
@@ -345,7 +346,6 @@
mc_config_fix_migrated_rules ();
#else /* MC_HOMEDIR_XDG */
- char *defined_userconf_dir;
defined_userconf_dir = tilde_expand (MC_USERCONF_DIR);
if (g_path_is_absolute (defined_userconf_dir))
--- mc-4.8.13/src/filemanager/ext.c.dist 2014-09-06 19:15:37.899940352 +0400
+++ mc-4.8.13-haiku/src/filemanager/ext.c 2014-09-06 19:14:42.802422784 +0400
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <strings.h>
#include <unistd.h>
#include "lib/global.h"

View File

@@ -2,16 +2,17 @@ SUMMARY="A CSS parser and selection engine"
DESCRIPTION="
LibCSS is a CSS (Cascading Style Sheet) parser and selection engine.
"
HOMEPAGE="http://www.netsurf-browser.org/projects/libcss/"
HOMEPAGE="http://www.netsurf-browser.org/projects/libcss/"
COPYRIGHT="2007-2014 J-M Bell"
LICENSE="MIT"
SRC_URI="http://download.netsurf-browser.org/libs/releases/libcss-$portVersion-src.tar.gz"
CHECKSUM_SHA256="0be9509d9d352abdeec87764c1f8ba13950d9dc4f63acade0477209b7fd21748"
REVISION="2"
LICENSE="MIT"
COPYRIGHT="2007-2014 J-M Bell"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PATCHES="libcss-0.3.0.patchset"
PROVIDES="
libcss$secondaryArchSuffix = $portVersion
lib:libcss$secondaryArchSuffix = $portVersion
@@ -27,8 +28,6 @@ BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libparserutils${secondaryArchSuffix} >= 0.2.0
devel:libwapcaplet${secondaryArchSuffix} >= 0.2.1
netsurf_buildsystem >= 1.2
devel:libiconv
"
@@ -38,9 +37,9 @@ BUILD_PREREQUIRES="
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
netsurf_buildsystem >= 1.2
"
PATCHES="libcss-0.3.0.patchset"
BUILD()
{
make PREFIX=$prefix NSSHARED=/system/data/netsurf-buildsystem \
@@ -55,6 +54,8 @@ INSTALL()
prepareInstalledDevelLib libcss
fixPkgconfig
# devel package
packageEntries devel $developDir
}
@@ -64,6 +65,8 @@ TEST()
LDFLAGS="-liconv -lwapcaplet -lparserutils"
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
libcss${secondaryArchSuffix}_devel = $portVersion
devel:libcss$secondaryArchSuffix = $portVersion

View File

@@ -16,7 +16,7 @@ COPYRIGHT="2000-2007 Niels Provos, 2005 Nick Mathewson, and other contributors."
REVISION="5"
ARCHITECTURES="x86_gcc2 x86"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="

View File

@@ -1,21 +0,0 @@
DESCRIPTION="LibParserUtils is a library for building efficient parsers"
HOMEPAGE="http://www.netsurf-browser.org/projects/libparserutils/"
SRC_URI="http://download.netsurf-browser.org/libs/releases/libparserutils-0.1.1-src.tar.gz"
REVISION="1"
STATUS_HAIKU="stable"
BUILD()
{
cd libparserutils-0.1.1
make
}
INSTALL()
{
cd libparserutils-0.1.1
make install
}
LICENSE="MIT
GNU GPL v2"
COPYRIGHT="2003 - 2012 The NetSurf Developers"

View File

@@ -1,9 +1,7 @@
SUMMARY="A library for building efficient parsers"
DESCRIPTION="
LibParserUtils is a library for building efficient parsers.
"
HOMEPAGE="http://www.netsurf-browser.org/projects/libparserutils/"
SRC_URI="http://download.netsurf-browser.org/libs/releases/libparserutils-0.2.0-src.tar.gz"
DESCRIPTION="LibParserUtils is a library for building efficient parsers."
HOMEPAGE="http://www.netsurf-browser.org/projects/libparserutils/"
SRC_URI="http://download.netsurf-browser.org/libs/releases/libparserutils-$portVersion-src.tar.gz"
CHECKSUM_SHA256="55c50abbffaaebe17acba43008ee2c4085401ce618e505fafa7c75baaa813da7"
REVISION="1"
LICENSE="MIT"

View File

@@ -1,21 +0,0 @@
DESCRIPTION="LibWapcaplet is a string internment library"
HOMEPAGE="http://www.netsurf-browser.org/projects/libwapcaplet/"
SRC_URI="http://download.netsurf-browser.org/libs/releases/libwapcaplet-0.1.1-src.tar.gz"
REVISION="1"
STATUS_HAIKU="stable"
BUILD()
{
cd libwapcaplet-0.1.1
make
}
INSTALL()
{
cd libwapcaplet-0.1.1
make install
}
LICENSE="MIT
GNU GPL v2"
COPYRIGHT="2003 - 2012 The NetSurf Developers"

View File

@@ -31,6 +31,7 @@ BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc
cmd:make
"

View File

@@ -19,7 +19,7 @@ COPYRIGHT="1994-1996, 1999-2002, 2004, 2005 Free Software Foundation, Inc."
REVISION="3"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="

View File

@@ -3,13 +3,13 @@ DESCRIPTION="
NetSurf build framework for compiling some of their libraries.
"
HOMEPAGE="http://git.netsurf-browser.org/buildsystem.git/"
SRC_URI="http://download.netsurf-browser.org/libs/releases/buildsystem-1.2.tar.gz"
SRC_URI="http://download.netsurf-browser.org/libs/releases/buildsystem-$portVersion.tar.gz"
CHECKSUM_SHA256="3903a4a1551c9c202e1d2047344c4f3598c8d9d6c35ebf8cc2e18874bd0c9d61"
REVISION="1"
LICENSE="MIT"
COPYRIGHT="2009-2014 The NetSurf Browser project"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
@@ -30,7 +30,7 @@ BUILD_PREREQUIRES="
cmd:make
"
SOURCE_DIR="buildsystem-1.2"
SOURCE_DIR="buildsystem-$portVersion"
PATCHES="netsurf_buildsystem-1.1.patchset"
BUILD()
{

View File

@@ -4,10 +4,10 @@ DESCRIPTION="
or received over the network.
"
HOMEPAGE="https://github.com/HaikuArchive/NetPulse"
SRC_URI="git://github.com/jscipione/NetPulse#a04b459309827ace18418539618bf07511000aac"
SRC_URI="git://github.com/HaikuArchives/NetPulse#b0fd89f775ede64de2ef3f211fdec2881a73346d"
COPYRIGHT="Copyright 2001 Carlos Hasan"
LICENSE="MIT"
REVISION="1"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

View File

@@ -24,8 +24,8 @@ SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
flac$secondaryArchSuffix = $portVersion compat >= 1
lib:libFLAC++$secondaryArchSuffix = 8.3.0 compat >= 8
lib:libFLAC$secondaryArchSuffix = 6.3.0 compat >= 6
lib:libFLAC$secondaryArchSuffix = 8.3.0 compat >= 8
lib:libFLAC++$secondaryArchSuffix = 6.3.0 compat >= 6
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES

View File

@@ -1,68 +0,0 @@
SUMMARY="A Free, High-Quality, and Portable Font Engine"
DESCRIPTION="
FreeType is written in C, designed to be small, efficient, highly \
customizable, and portable while capable of producing high-quality output \
(glyph images) of most vector and bitmap font formats.
"
HOMEPAGE="http://www.freetype.org"
LICENSE="FreeType"
COPYRIGHT="1996-2012 David Turner, Robert Wilhelm, Werner Lemberg, et al."
SRC_URI="http://download.savannah.gnu.org/releases/freetype/freetype-2.4.9.tar.bz2"
CHECKSUM_SHA256="c4204ac1d48e99d4375a2f32bf4f3f92780a9d9f015e64e57e852f6c004859b9"
REVISION="3"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
freetype$secondaryArchSuffix = $portVersion
lib:libfreetype$secondaryArchSuffix = 6.8.1 compat >= 6
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libz$secondaryArchSuffix >= 1
"
BUILD_REQUIRES="
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
"
BUILD()
{
./autogen.sh
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs libfreetype
fixPkgconfig
# devel package
packageEntries devel \
$binDir \
$dataRootDir/aclocal \
$developDir
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
freetype${secondaryArchSuffix}_devel = $portVersion
cmd:freetype_config${secondaryArchSuffix} = $portVersion
devel:libfreetype${secondaryArchSuffix} = 6.8.1 compat >= 6
"
REQUIRES_devel="
freetype${secondaryArchSuffix} == $portVersion base
"

View File

@@ -1,79 +0,0 @@
SUMMARY="A Free, High-Quality, and Portable Font Engine"
DESCRIPTION="
FreeType is written in C, designed to be small, efficient, highly \
customizable, and portable while capable of producing high-quality output \
(glyph images) of most vector and bitmap font formats.
"
HOMEPAGE="http://www.freetype.org"
LICENSE="FreeType"
COPYRIGHT="1996-2013 David Turner, Robert Wilhelm, Werner Lemberg, et al."
SRC_URI="http://download.savannah.gnu.org/releases/freetype/freetype-2.5.2.tar.bz2"
CHECKSUM_SHA256="4ff4bd393aa01071ec7b849d035508a505a78f88b2bcf25ff11e58e43c0b9def"
REVISION="3"
ARCHITECTURES="x86_gcc2 x86 x86_64 arm"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
freetype$secondaryArchSuffix = $portVersion
lib:libfreetype$secondaryArchSuffix = 6.11.1 compat >= 6
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libbz2$secondaryArchSuffix
lib:libz$secondaryArchSuffix >= 1
lib:libpng$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
devel:libbz2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtool >= 2.4.2
cmd:make
cmd:which
"
BUILD()
{
./autogen.sh
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs libfreetype
fixPkgconfig
# Freetype headers are in a freetype2 subdirectory, but fixPkgconfig removes
# that from the pkg-config file, making it difficult for other ports to use
# freetype with pkg-config.
sed -i -e "s,^includedir=.*,includedir=$prefix/$relativeIncludeDir/freetype2," \
$developLibDir/pkgconfig/freetype2.pc
# devel package
packageEntries devel \
$binDir \
$dataRootDir/aclocal \
$developDir
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
freetype${secondaryArchSuffix}_devel = $portVersion
cmd:freetype_config${secondaryArchSuffix} = $portVersion
devel:libfreetype${secondaryArchSuffix} = 6.11.1 compat >= 6
"
REQUIRES_devel="
freetype${secondaryArchSuffix} == $portVersion base
"

View File

@@ -13,6 +13,9 @@ REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64 arm"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
# Uncomment next line to enable subpixel rendering and subpixel hinting
#PATCHES="freetype-$portVersion.patchset"
PROVIDES="
freetype$secondaryArchSuffix = $portVersion
lib:libfreetype$secondaryArchSuffix = 6.11.2 compat >= 6

View File

@@ -1,24 +0,0 @@
DESCRIPTION="Freetype - A Free, High-Quality, and Portable Font Engine"
HOMEPAGE="http://www.freetype.org"
SRC_URI="http://download.savannah.gnu.org/releases/freetype/freetype-2.4.9.tar.bz2"
CHECKSUM_MD5="77a893dae81fd5b896632715ca041179"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD()
{
cd freetype-2.4.9
sh ./autogen.sh
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--includedir=/boot/develop/headers/3rdparty \
--datarootdir=`finddir B_COMMON_DATA_DIRECTORY`
make
}
INSTALL()
{
cd freetype-2.4.9
make install
}
LICENSE="FreeType"
COPYRIGHT="1996-2012 David Turner, Robert Wilhelm, Werner Lemberg, et al."

View File

@@ -1,12 +0,0 @@
diff -urN freetype-2.4.9/include/freetype/config/ftoption.h freetype-2.4.9-enable-subpixel-rendering/include/freetype/config/ftoption.h
--- freetype-2.4.9/include/freetype/config/ftoption.h 2011-07-20 04:46:15.035913728 +0000
+++ freetype-2.4.9-enable-subpixel-rendering/include/freetype/config/ftoption.h 2012-09-05 16:30:50.453509120 +0000
@@ -92,7 +92,7 @@
/* This is done to allow FreeType clients to run unmodified, forcing */
/* them to display normal gray-level anti-aliased glyphs. */
/* */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/*************************************************************************/

View File

@@ -0,0 +1,31 @@
From 5dc597d69f711c41cb6c6e48276e0ef5eade1375 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 5 Sep 2014 15:43:17 +0400
Subject: Enabling subpixel rendering and subpixel hinting
diff --git a/include/config/ftoption.h b/include/config/ftoption.h
index 5b11f0e..5042c23 100644
--- a/include/config/ftoption.h
+++ b/include/config/ftoption.h
@@ -92,7 +92,7 @@ FT_BEGIN_HEADER
/* This is done to allow FreeType clients to run unmodified, forcing */
/* them to display normal gray-level anti-aliased glyphs. */
/* */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/*************************************************************************/
@@ -604,7 +604,7 @@ FT_BEGIN_HEADER
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
/* defined. */
/* */
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
/*************************************************************************/
--
1.8.3.4

View File

@@ -5,30 +5,36 @@ list of paths and texts which can be rendered easily. The library does not do \
the actual rendering.
"
HOMEPAGE="http://www.netsurf-browser.org/projects/libsvgtiny"
COPYRIGHT="2003-2014 The NetSurf Developers"
LICENSE="MIT"
SRC_URI="http://download.netsurf-browser.org/libs/releases/libsvgtiny-$portVersion-src.tar.gz"
CHECKSUM_SHA256="a5ad4ba467e2ba10ac13fb881937655c5d0ef8e9582ede6a2c73447c87d06e90"
REVISION="1"
ARCHITECTURES="x86_gcc2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="libsvgtiny-0.1.1.patchset"
PROVIDES="
libsvgtiny = $portVersion
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES="
devel:libwapcaplet
devel:libdom
devel:libhubbub
devel:libparserutils
netsurf_buildsystem
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
netsurf_buildsystem
cmd:gcc
gperf
cmd:gperf
cmd:make
cmd:pkg_config
"
PATCHES="libsvgtiny-0.1.1.patchset"
BUILD()
{
make PREFIX=$prefix NSSHARED=/system/data/netsurf-buildsystem \
@@ -42,12 +48,17 @@ INSTALL()
prepareInstalledDevelLib libsvgtiny
fixPkgconfig
# devel package
packageEntries devel $developDir
}
LICENSE="MIT"
COPYRIGHT="2003-2014 The NetSurf Developers"
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
libsvgtiny_devel = $portVersion
devel:libsvgtiny = $portVersion
"
REQUIRES_devel="
libsvgtiny$secondaryArchSuffix == $portVersion base
"

View File

@@ -4,27 +4,27 @@ Fluidsynth is a software real-time synthesizer based on the Soundfont 2 \
specifications.
"
HOMEPAGE="http://www.fluidsynth.org/"
SRC_URI="http://sourceforge.net/projects/fluidsynth/files/fluidsynth-1.1.6/fluidsynth-1.1.6.tar.bz2/download"
SRC_URI="http://sourceforge.net/projects/fluidsynth/files/fluidsynth-$portVersion/fluidsynth-$portVersion.tar.bz2"
CHECKSUM_SHA256="d28b47dfbf7f8e426902ae7fa2981d821fbf84f41da9e1b85be933d2d748f601"
LICENSE="GNU LGPL v2.1"
COPYRIGHT="2007-2012 Josh Green, Pedro Lopez-Cabanillas, David Henningsson"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
REVISION="3"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PATCHES="fluidsynth-1.1.6.patchset"
PROVIDES="
fluidsynth${secondaryArchSuffix} = $portVersion
lib:libfluidsynth${secondaryArchSuffix} = 1.1.6 compat >= 1.0
lib:libfluidsynth${secondaryArchSuffix} = 1.5.2 compat >= 1
cmd:fluidsynth${secondaryArchSuffix}
"
REQUIRES="
haiku${secondaryArchSuffix} >= $haikuVersion
lib:libflac$secondaryArchSuffix
glib2$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
@@ -37,7 +37,7 @@ REQUIRES="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
devel:libflac$secondaryArchSuffix
devel:libgthread_2.0$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libncurses$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
@@ -85,7 +85,7 @@ INSTALL()
PROVIDES_devel="
fluidsynth${secondaryArchSuffix}_devel = $portVersion
devel:libfluidsynth$secondaryArchSuffix = $portVersion compat >= 1
devel:libfluidsynth$secondaryArchSuffix = 1.5.2 compat >= 1
"
REQUIRES_devel="
fluidsynth$secondaryArchSuffix == $portVersion base

View File

@@ -1,15 +1,24 @@
SUMMARY="LibDOM is an implementation of the W3C DOM"
DESCRIPTION="An implementation of the W3C DOM for NetSurf, written in C."
HOMEPAGE="http://www.netsurf-browser.org/projects/libdom/"
HOMEPAGE="http://www.netsurf-browser.org/projects/libdom/"
LICENSE="MIT"
COPYRIGHT="2007-2014 J-M Bell"
SRC_URI="http://download.netsurf-browser.org/libs/releases/libdom-$portVersion-src.tar.gz"
CHECKSUM_SHA256="e86c11e313cdfbbe9674ad14125093240e23a2fa9e6f05b996d6b655e40c2dd4"
REVISION="1"
ARCHITECTURES="x86_gcc2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="libdom-$portVersion.patchset"
PROVIDES="
libdom = $portVersion
lib:libdom = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
devel:libexpat
devel:libhubbub
@@ -27,7 +36,6 @@ BUILD_PREREQUIRES="
cmd:pkg_config
"
PATCHES="libdom-$portVersion.patchset"
BUILD()
{
make PREFIX=$prefix NSSHARED=/system/data/netsurf-buildsystem
@@ -48,10 +56,12 @@ TEST()
make PREFIX=$prefix NSSHARED=/system/data/netsurf-buildsystem test
}
LICENSE="MIT"
COPYRIGHT="2007-2014 J-M Bell"
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
libdom_devel = $portVersion
devel:libdom = $portVersion
"
REQUIRES_devel="
libdom$secondaryArchSuffix == $portVersion base
"

View File

@@ -0,0 +1,64 @@
SUMMARY="NAT-PMP client library"
DESCRIPTION="
libnatpmp is a portable client library implementing the protocol NAT-PMP. It \
is based on non blocking sockets and all call of the API are asynchronous.
"
HOMEPAGE="http://miniupnp.free.fr/libnatpmp.html"
COPYRIGHT="
2007-2009 Thomas Bernard
"
LICENSE="BSD (3-clause)"
SRC_URI="http://miniupnp.free.fr/files/download.php?file=libnatpmp-$portVersion.tar.gz"
SRC_FILENAME="libnatpmp-$portVersion.tar.gz"
CHECKSUM_SHA256="b2ce5e626a21c795cba2d118f26e54aaa89de29d4611c440fafc49a2a5bedabb"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PATCHES="libnatpmp-$portVersion.patchset"
PROVIDES="
libnatpmp$secondaryArchSuffix = $portVersion
lib:libnatpmp$secondaryArchSuffix = 1
cmd:natpmpc
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
make $jobArgs
}
INSTALL()
{
make install INSTALLPREFIX=$prefix
mkdir -p $(dirname $includeDir)
mv $prefix/include $includeDir
prepareInstalledDevelLibs libnatpmp
# devel package
packageEntries devel \
$developDir
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
libnatpmp${secondaryArchSuffix}_devel = $portVersion
devel:libnatpmp$secondaryArchSuffix = 1
"
REQUIRES_devel="
libnatpmp$secondaryArchSuffix == $portVersion base
"

View File

@@ -0,0 +1,36 @@
From 71ea76c0f3842a048e6f004d291176a1399ca9f5 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 5 Sep 2014 15:37:36 +0000
Subject: Haiku patch
diff --git a/Makefile b/Makefile
index b67b3e8..181a9ef 100644
--- a/Makefile
+++ b/Makefile
@@ -55,6 +55,9 @@ else
SONAMEFLAGS=-Wl,-soname,$(JNISHAREDLIB)
endif
endif
+ifeq ($(OS), Haiku)
+LDFLAGS += -lnetwork
+endif
HEADERS = natpmp.h
diff --git a/getgateway.c b/getgateway.c
index 45c6e6f..dd73356 100644
--- a/getgateway.c
+++ b/getgateway.c
@@ -67,7 +67,7 @@ POSSIBILITY OF SUCH DAMAGE.
#undef USE_SYSCTL_NET_ROUTE
#endif
-#if !defined(USE_PROC_NET_ROUTE) && !defined(USE_SOCKET_ROUTE) && !defined(USE_SYSCTL_NET_ROUTE)
+#if !defined(USE_PROC_NET_ROUTE) && !defined(USE_SOCKET_ROUTE) && !defined(USE_SYSCTL_NET_ROUTE) && !defined(__HAIKU__)
int getdefaultgateway(in_addr_t * addr)
{
return -1;
--
1.8.3.4

View File

@@ -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>

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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>

View File

@@ -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 \

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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;

View File

@@ -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;

View 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

View File

@@ -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>

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View 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
}

View File

@@ -12,14 +12,19 @@ HOMEPAGE="http://www.netsurf-browser.org/"
# Do NOT use the netsurf-all package. It contains a bunch of subprojects which
# we build as separate packages. NetSurf is statically linked to them, so the
# resulting binary is the same.
SRC_URI="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-$portVersion-src.tar.gz"
CHECKSUM_SHA256="04ffeb8335c59cbc23371b79ae3b178002e6e95c35225ef62db4b155ecc7e213"
SRC_URI="git://git.netsurf-browser.org/netsurf.git#9b62f1ec53b089e6697131a3653c78ff85a5e4d1"
REVISION="1"
ARCHITECTURES="!x86_gcc2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
REQUIRES="
haiku >= $haikuVersion
lib:libcurl
lib:libexpat
lib:libiconv
lib:libpng
lib:libjpeg
lib:libssl
lib:libz
lib:libhubbub
"
BUILD_REQUIRES="