mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 22:18:55 +02:00
103
net-p2p/rtorrent/patches/rtorrent_x86-0.9.6.patchset
Normal file
103
net-p2p/rtorrent/patches/rtorrent_x86-0.9.6.patchset
Normal file
@@ -0,0 +1,103 @@
|
||||
From 818adc5bba3ee6963f320bdfdfd19b268fe71044 Mon Sep 17 00:00:00 2001
|
||||
From: miqlas <zmizsei@extrowerk.com>
|
||||
Date: Sun, 31 Jul 2016 12:51:31 +0200
|
||||
Subject: [PATCH] Haiku Fix
|
||||
|
||||
---
|
||||
src/core/poll_manager.cc | 4 ++++
|
||||
src/input/path_input.cc | 12 +++++++++++-
|
||||
src/utils/directory.cc | 9 +++++++++
|
||||
src/utils/directory.h | 4 ++++
|
||||
4 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/poll_manager.cc b/src/core/poll_manager.cc
|
||||
index 1a3a0a5..741dd7e 100644
|
||||
--- a/src/core/poll_manager.cc
|
||||
+++ b/src/core/poll_manager.cc
|
||||
@@ -48,6 +48,10 @@
|
||||
#include "manager.h"
|
||||
#include "poll_manager.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <sys/select.h>
|
||||
+#endif
|
||||
+
|
||||
namespace core {
|
||||
|
||||
torrent::Poll*
|
||||
diff --git a/src/input/path_input.cc b/src/input/path_input.cc
|
||||
index fa8afda..55a09da 100644
|
||||
--- a/src/input/path_input.cc
|
||||
+++ b/src/input/path_input.cc
|
||||
@@ -48,6 +48,12 @@
|
||||
|
||||
#include "path_input.h"
|
||||
|
||||
+#ifndef DT_DIR
|
||||
+/* dirent.d_type is a BSD extension, not part of POSIX */
|
||||
+#include <sys/stat.h>
|
||||
+#include <dirent.h>
|
||||
+#endif
|
||||
+
|
||||
namespace input {
|
||||
|
||||
PathInput::PathInput() :
|
||||
@@ -75,7 +81,11 @@ PathInput::pressed(int key) {
|
||||
|
||||
struct _transform_filename {
|
||||
void operator () (utils::directory_entry& entry) {
|
||||
- if (entry.d_type == DT_DIR)
|
||||
+ #ifdef __HAIKU__
|
||||
+ if (S_ISDIR(entry.d_type))
|
||||
+ #else
|
||||
+ if (entry.d_type == DT_DIR)
|
||||
+ #endif
|
||||
entry.d_name += '/';
|
||||
}
|
||||
};
|
||||
diff --git a/src/utils/directory.cc b/src/utils/directory.cc
|
||||
index f934aeb..73d23f9 100644
|
||||
--- a/src/utils/directory.cc
|
||||
+++ b/src/utils/directory.cc
|
||||
@@ -46,6 +46,10 @@
|
||||
|
||||
#include "directory.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+struct stat st;
|
||||
+#endif
|
||||
+
|
||||
namespace utils {
|
||||
|
||||
// Keep this?
|
||||
@@ -89,7 +93,12 @@ Directory::update(int flags) {
|
||||
#else
|
||||
itr->d_fileno = entry->d_fileno;
|
||||
itr->d_reclen = entry->d_reclen;
|
||||
+ #ifdef __HAIKU__
|
||||
+ lstat(rak::path_expand(m_path).c_str(), &st);
|
||||
+ itr->d_type = st.st_mode;
|
||||
+ #else
|
||||
itr->d_type = entry->d_type;
|
||||
+ #endif
|
||||
#endif
|
||||
|
||||
#ifdef DIRENT_NAMLEN_EXISTS_FOOBAR
|
||||
diff --git a/src/utils/directory.h b/src/utils/directory.h
|
||||
index ec8027b..f11a418 100644
|
||||
--- a/src/utils/directory.h
|
||||
+++ b/src/utils/directory.h
|
||||
@@ -41,6 +41,10 @@
|
||||
#include <vector>
|
||||
#include <inttypes.h>
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#define d_fileno d_ino
|
||||
+#endif
|
||||
+
|
||||
namespace utils {
|
||||
|
||||
struct directory_entry {
|
||||
--
|
||||
2.7.0
|
||||
|
||||
71
net-p2p/rtorrent/rtorrent-0.9.6.recipe
Normal file
71
net-p2p/rtorrent/rtorrent-0.9.6.recipe
Normal file
@@ -0,0 +1,71 @@
|
||||
SUMMARY="BitTorrent Client using libtorrent"
|
||||
DESCRIPTION="rTorrent is a text-based ncurses BitTorrent client written in C++, \
|
||||
based on the libTorrent libraries for Unix, whose author's goal is 'a \
|
||||
focus on high performance and good code'."
|
||||
HOMEPAGE="http://libtorrent.rakshasa.no/"
|
||||
COPYRIGHT="2005-2016 Jari Sundell"
|
||||
LICENSE="GNU LGPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/rakshasa/rtorrent/archive/$portVersion.zip"
|
||||
CHECKSUM_SHA256="228cd2fac94860dcee42a03f4bdc6a4deeec9b33ed7de356b64fc5e175481ee8"
|
||||
PATCHES="rtorrent_x86-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86 ?x86_gcc2 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
rtorrent$secondaryArchSuffix = $portVersion
|
||||
cmd:rtorrent$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libgettextpo$secondaryArchSuffix
|
||||
lib:libncursesw$secondaryArchSuffix
|
||||
lib:libsigc_2.0$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libtorrent$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcppunit$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libgettextlib$secondaryArchSuffix
|
||||
devel:libncursesw${secondaryArchSuffix}
|
||||
devel:libsigc_2.0$secondaryArchSuffix
|
||||
devel:libtorrent$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:autoreconf
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:gettext$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:sed
|
||||
cmd:strip$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -vfi
|
||||
export CFLAGS=-D_BSD_SOURCE
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
strip $binDir/*
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
Reference in New Issue
Block a user