Transmission: fix build

This commit is contained in:
Gerasim Troeglazov
2020-06-10 20:40:29 +10:00
parent 0c29345e14
commit 50da90a4da
2 changed files with 70 additions and 10 deletions

View File

@@ -1,11 +1,11 @@
From 36f9475fc73bc609f29fc6de2081cb140b839e11 Mon Sep 17 00:00:00 2001
From d7f9dfcba425734b64e31fa5595edfbe5c496768 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 4a7d4e9..048b7b4 100644
index e7d1f6d..ee11876 100644
--- a/libtransmission/platform-quota.c
+++ b/libtransmission/platform-quota.c
@@ -13,7 +13,7 @@
@@ -105,20 +105,20 @@ index 19e3054..2b1bce8 100644
default:
break;
--
2.14.2
2.26.0
From 29e44144fdecbff475757f7c47292b5e3af0d485 Mon Sep 17 00:00:00 2001
From b3ab37a63b744fe01b3b54a7ef62dc418fbf4f82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sat, 4 Nov 2017 14:24:02 +0100
Subject: Haiku supporting patches
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac0989b..1aac8b0 100644
index da28e31..ee6f98b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -538,6 +538,13 @@ if(HAVE_LIBM)
@@ -522,6 +522,13 @@ if(HAVE_LIBM)
set(LIBM_LIBRARY m)
endif()
@@ -133,10 +133,10 @@ index ac0989b..1aac8b0 100644
enable_testing()
include(CTest)
diff --git a/libtransmission/CMakeLists.txt b/libtransmission/CMakeLists.txt
index 4865dee..b796fde 100644
index b5230b9..0dbfbf6 100644
--- a/libtransmission/CMakeLists.txt
+++ b/libtransmission/CMakeLists.txt
@@ -244,6 +244,8 @@ target_link_libraries(${TR_NAME}
@@ -248,6 +248,8 @@ target_link_libraries(${TR_NAME}
${B64_LIBRARIES}
${LIBINTL_LIBRARY}
${LIBM_LIBRARY}
@@ -146,5 +146,65 @@ index 4865dee..b796fde 100644
if(ICONV_FOUND)
--
2.14.2
2.26.0
From 16b0d9c87710d01a7d7304a200a34d60bd643e48 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 10 Jun 2020 20:35:03 +1000
Subject: Use haiku int types for UTP library
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee6f98b..cbe06e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -339,7 +339,8 @@ if(ENABLE_UTP)
COMMAND "${CMAKE_COMMAND}" -E copy "${THIRD_PARTY_DIR}/utp_config.h" "<SOURCE_DIR>/utp_config.h"
COMMAND "${CMAKE_COMMAND}" -E chdir "<SOURCE_DIR>" patch -p1 --binary -i "${THIRD_PARTY_DIR}/utp-01-ticket-5002.patch"
COMMAND "${CMAKE_COMMAND}" -E chdir "<SOURCE_DIR>" patch -p1 --binary -i "${THIRD_PARTY_DIR}/utp-02-win32.patch"
- COMMAND "${CMAKE_COMMAND}" -E chdir "<SOURCE_DIR>" patch -p1 --binary -i "${THIRD_PARTY_DIR}/utp-03-msvc14.patch")
+ COMMAND "${CMAKE_COMMAND}" -E chdir "<SOURCE_DIR>" patch -p1 --binary -i "${THIRD_PARTY_DIR}/utp-03-msvc14.patch"
+ COMMAND "${CMAKE_COMMAND}" -E chdir "<SOURCE_DIR>" patch -p1 --binary -i "${THIRD_PARTY_DIR}/utp-04-haikutypes.patch")
endif()
tr_add_external_auto_library(B64 b64
diff --git a/third-party/utp-04-haikutypes.patch b/third-party/utp-04-haikutypes.patch
new file mode 100644
index 0000000..8350d02
--- /dev/null
+++ b/third-party/utp-04-haikutypes.patch
@@ -0,0 +1,30 @@
+diff --git a/utypes.h b/utypes.h
+--- a/utypes.h
++++ b/utypes.h
+@@ -3,6 +3,9 @@
+
+ // standard types
+ typedef unsigned char byte;
++#ifdef __HAIKU__
++#include <SupportDefs.h>
++#else
+ typedef unsigned char uint8;
+ typedef signed char int8;
+ typedef unsigned short uint16;
+@@ -18,6 +21,7 @@
+ typedef unsigned long long uint64;
+ typedef long long int64;
+ #endif
++#endif
+
+ /* compile-time assert */
+ #ifndef CASSERT
+@@ -35,7 +39,7 @@
+ typedef const char * cstr;
+ typedef char * str;
+
+-#ifndef __cplusplus
++#if !defined(__cplusplus) && !defined(__HAIKU__)
+ typedef uint8 bool;
+ #endif
+
--
2.26.0

View File

@@ -19,7 +19,7 @@ COPYRIGHT="2005-2016 Transmission authors and contributors
LICENSE="Transmission
MIT
GNU GPL v2"
REVISION="6"
REVISION="7"
SOURCE_URI="https://github.com/transmission/transmission-releases/raw/master/transmission-$portVersion.tar.xz"
CHECKSUM_SHA256="35442cc849f91f8df982c3d0d479d650c6ca19310a994eccdaa79a4af3916b7d"
PATCHES="transmission-$portVersion.patchset"