summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authortron <tron>2008-12-05 16:31:52 +0000
committertron <tron>2008-12-05 16:31:52 +0000
commit2fb9f3d1ac17b34561bcc50bf8cc148cba18d177 (patch)
treefc4fbbcf62e569ecd1a229f62c589102eda1d0ee /net
parent2cd975f4a205e55f862e7857be555136536ed364 (diff)
downloadpkgsrc-2fb9f3d1ac17b34561bcc50bf8cc148cba18d177.tar.gz
Add patch from <http://libtorrent.rakshasa.no/ticket/1184> to fix the build
under Solaris and DragonFly. Patch provided by Rumko in private e-mail.
Diffstat (limited to 'net')
-rw-r--r--net/rtorrent/distinfo5
-rw-r--r--net/rtorrent/patches/patch-ac22
-rw-r--r--net/rtorrent/patches/patch-ad44
-rw-r--r--net/rtorrent/patches/patch-ae13
4 files changed, 83 insertions, 1 deletions
diff --git a/net/rtorrent/distinfo b/net/rtorrent/distinfo
index 21bc1051ce0..949a064f297 100644
--- a/net/rtorrent/distinfo
+++ b/net/rtorrent/distinfo
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.18 2008/12/03 12:57:40 tron Exp $
+$NetBSD: distinfo,v 1.19 2008/12/05 16:31:52 tron Exp $
SHA1 (rtorrent-0.8.2.tar.gz) = 891093c5d600c2e3853eadbbec369a12dfe6ec11
RMD160 (rtorrent-0.8.2.tar.gz) = e86b0082d1788e4e7cd8fcf631f7f857d642c799
Size (rtorrent-0.8.2.tar.gz) = 506015 bytes
SHA1 (patch-ab) = 87873bb32166d00398ab0ef6421a6fe85a55c914
+SHA1 (patch-ac) = b62de9ce834aa0422ec173e694d07e88aa1e2f47
+SHA1 (patch-ad) = 902a95e7edcd4f1f6c4cebe04c28e5ddefc650cf
+SHA1 (patch-ae) = cd24c34d28d1c15f028a3ba7b786e40592c7a395
diff --git a/net/rtorrent/patches/patch-ac b/net/rtorrent/patches/patch-ac
new file mode 100644
index 00000000000..c0e6418a6fe
--- /dev/null
+++ b/net/rtorrent/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1 2008/12/05 16:31:52 tron Exp $
+
+--- src/input/path_input.cc.orig 2008-12-05 13:19:28 +0100
++++ src/input/path_input.cc 2008-12-05 13:25:19 +0100
+@@ -42,7 +42,7 @@
+ #include <rak/path.h>
+
+ #include <sys/types.h>
+-#include <sys/dir.h>
++#include <sys/stat.h>
+
+ #include "path_input.h"
+
+@@ -72,7 +72,7 @@
+
+ struct _transform_filename {
+ void operator () (utils::directory_entry& entry) {
+- if (entry.d_type == DT_DIR)
++ if (S_ISDIR(entry.d_type))
+ entry.d_name += '/';
+ }
+ };
diff --git a/net/rtorrent/patches/patch-ad b/net/rtorrent/patches/patch-ad
new file mode 100644
index 00000000000..a297a493b9c
--- /dev/null
+++ b/net/rtorrent/patches/patch-ad
@@ -0,0 +1,44 @@
+$NetBSD: patch-ad,v 1.1 2008/12/05 16:31:52 tron Exp $
+
+--- src/utils/directory.cc.orig 2008-12-05 13:20:16 +0100
++++ src/utils/directory.cc 2008-12-05 13:27:27 +0100
+@@ -38,6 +38,7 @@
+
+ #include <algorithm>
+ #include <functional>
++#include <sys/stat.h>
+ #include <dirent.h>
+ #include <rak/path.h>
+ #include <torrent/exceptions.h>
+@@ -63,6 +64,8 @@
+ if (m_path.empty())
+ throw torrent::input_error("Directory::update() tried to open an empty path.");
+
++ std::string path=rak::path_expand(m_path);
++
+- DIR* d = opendir(rak::path_expand(m_path).c_str());
++ DIR* d = opendir(path.c_str());
+
+ if (d == NULL)
+@@ -73,12 +76,18 @@
+ while ((entry = readdir(d)) != NULL) {
+ if ((flags & update_hide_dot) && entry->d_name[0] == '.')
+ continue;
++
++ std::string full_path = path + '/';
++ full_path += entry->d_name;
++
++ struct stat sb;
++ if (stat(full_path.c_str(), &sb))
++ continue;
+
+ iterator itr = base_type::insert(end(), value_type());
+
+- itr->d_fileno = entry->d_fileno;
+- itr->d_reclen = entry->d_reclen;
+- itr->d_type = entry->d_type;
++ itr->d_fileno = sb.st_ino;
++ itr->d_type = sb.st_mode;
+
+ #ifdef DIRENT_NAMLEN_EXISTS_FOOBAR
+ itr->d_name = std::string(entry->d_name, entry->d_name + entry->d_namlen);
diff --git a/net/rtorrent/patches/patch-ae b/net/rtorrent/patches/patch-ae
new file mode 100644
index 00000000000..fc3b803ea5c
--- /dev/null
+++ b/net/rtorrent/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2008/12/05 16:31:52 tron Exp $
+
+--- src/utils/directory.h.orig 2008-12-05 13:22:18 +0100
++++ src/utils/directory.h 2008-12-05 13:22:24 +0100
+@@ -49,7 +49,6 @@
+
+ // The name and types should match POSIX.
+ uint32_t d_fileno;
+- uint32_t d_reclen;
+- uint8_t d_type;
++ uint32_t d_type;
+
+ std::string d_name;