Update to version 0.16.12 and make this build with boost >= 1.50.

(now works in miro-3.5.1 and qbittorrent-3.1.3 driving NetBSD/i386)
This commit is contained in:
ndb 2013-12-12 13:35:14 +00:00 committed by Thomas Klausner
parent e5b96724b7
commit 6f204319bd
16 changed files with 43 additions and 262 deletions

View file

@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.6 2012/10/03 09:10:41 asau Exp $
# $NetBSD: Makefile,v 1.7 2013/12/12 13:35:15 noud4 Exp $
#
PKGREVISION= 1
CATEGORIES= net
MAINTAINER= ryoon@NetBSD.org
HOMEPAGE= http://www.rasterbar.com/products/libtorrent/index.html

View file

@ -1,9 +1,9 @@
# $NetBSD: Makefile.common,v 1.5 2012/10/03 09:10:41 asau Exp $
# $NetBSD: Makefile.common,v 1.6 2013/12/12 13:35:15 noud4 Exp $
#
# used by wip/py-libtorrent-rasterbar/Makefile
# used by wip/libtorrent-rasterbar/Makefile
DISTNAME= libtorrent-rasterbar-0.14.12
DISTNAME= libtorrent-rasterbar-0.16.12
CATEGORIES= net
MASTER_SITES= http://libtorrent.googlecode.com/files/ \
${MASTER_SITE_SOURCEFORGE:=libtorrent/}

13
libtorrent-rasterbar/TODO Normal file
View file

@ -0,0 +1,13 @@
linking:
CXXLD libtorrent-rasterbar.la
ld: .libs/torrent.o(.text+0x18f16): unresolvable relocation against symbol `_ZNKSs5emptyEv'
ld: final link failed: Nonrepresentable section on output
probably related to:
https://code.google.com/p/libtorrent/issues/detail?id=382
http://comments.gmane.org/gmane.comp.lib.boost.build/25685
patch-src_Makefile.in linking works, the lib is usable,
and the patch should be improved.

View file

@ -1,15 +1,6 @@
$NetBSD: distinfo,v 1.3 2011/05/11 09:18:46 ryo-on Exp $
$NetBSD: distinfo,v 1.4 2013/12/12 13:35:15 noud4 Exp $
SHA1 (libtorrent-rasterbar-0.14.12.tar.gz) = e1165fccd4a34ed1d686b350b88e9a5a321b7515
RMD160 (libtorrent-rasterbar-0.14.12.tar.gz) = 2fea2f10b0351ff7b269258ecc57a267415620cf
Size (libtorrent-rasterbar-0.14.12.tar.gz) = 1989687 bytes
SHA1 (patch-configure) = 8b4a21bbb1ee24330dfa486a683267e3bed724a9
SHA1 (patch-include_libtorrent_create__torrent.hpp) = d6318a15effd0627c8c2cb135e1ed8d98f183009
SHA1 (patch-include_libtorrent_debug.hpp) = 3d5b8c3bb2742fc010e021f0ee7bbd4e70cc4e66
SHA1 (patch-include_libtorrent_udp__socket.hpp) = abd91baded429cb8e2be2258e0dcca563390112f
SHA1 (patch-src_create__torrent.cpp) = 5a7f06948b22d9cc587c373a3f741db55679fac5
SHA1 (patch-src_file.cpp) = bebfad460872fec2808aea7b8087bd055c1e68ae
SHA1 (patch-src_file__storage.cpp) = e1e5e969dc062a8a19d6eea298b932891544823e
SHA1 (patch-src_logger.cpp) = d6d341847b150ba621bdbd32b19e1ffe12199eea
SHA1 (patch-src_storage.cpp) = 2ad34c34333c7c15827a767ec0ead8b0157533b8
SHA1 (patch-src_torrent__info.cpp) = 0ac049c727219ebaeed868ddf880880872951738
SHA1 (libtorrent-rasterbar-0.16.12.tar.gz) = cd326fd2609c3d00c25dabdd441a0704efbf0207
RMD160 (libtorrent-rasterbar-0.16.12.tar.gz) = 61956d465297f4ad7c989d5839f8a5abacba9e86
Size (libtorrent-rasterbar-0.16.12.tar.gz) = 3002825 bytes
SHA1 (patch-src_Makefile.in) = 4d82afaacb30c13daeb7c7736e2799e083d76980

View file

@ -1,24 +0,0 @@
$NetBSD: patch-configure,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Replace == with =, improve compatibility
--- configure.orig 2010-09-07 05:47:12.000000000 +0000
+++ configure
@@ -18743,7 +18743,7 @@ $as_echo "" >&6; }
;;
esac
-if [ "x$PYTHON_INSTALL_PARAMS" == "x" ]; then
+if [ "x$PYTHON_INSTALL_PARAMS" = "x" ]; then
PYTHON_INSTALL_PARAMS='--prefix=$(DESTDIR)$(prefix)'
fi
@@ -18856,7 +18856,7 @@ $as_echo "" >&6; }
;;
esac
-if [ "x$enable_shared" == "xyes" ]; then
+if [ "x$enable_shared" = "xyes" ]; then
$as_echo "#define TORRENT_BUILDING_SHARED /**/" >>confdefs.h

View file

@ -1,15 +0,0 @@
$NetBSD: patch-include_libtorrent_create__torrent.hpp,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Support Boost 1.46.1
--- include/libtorrent/create_torrent.hpp.orig 2009-11-02 05:31:07.000000000 +0000
+++ include/libtorrent/create_torrent.hpp
@@ -152,7 +152,7 @@ namespace libtorrent
#if BOOST_VERSION < 103600
std::string leaf = i->path().leaf();
#else
- std::string leaf = i->path().filename();
+ std::string leaf = i->path().filename().string();
#endif
if (leaf == ".." || leaf == ".") continue;
add_files_impl(fs, p, l / leaf, pred);

View file

@ -1,15 +0,0 @@
$NetBSD: patch-include_libtorrent_debug.hpp,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Support Boost 1.46.1
--- include/libtorrent/debug.hpp.orig 2008-10-05 01:41:54.000000000 +0000
+++ include/libtorrent/debug.hpp
@@ -64,7 +64,7 @@ namespace libtorrent
try
{
#endif
- fs::path dir(fs::complete(logpath / ("libtorrent_logs" + boost::lexical_cast<std::string>(instance))));
+ fs::path dir(fs::absolute(logpath / ("libtorrent_logs" + boost::lexical_cast<std::string>(instance))));
if (!fs::exists(dir)) fs::create_directories(dir);
m_file.open((dir / filename).string().c_str(), std::ios_base::out | (append ? std::ios_base::app : std::ios_base::out));
*this << "\n\n\n*** starting log ***\n";

View file

@ -1,14 +0,0 @@
$NetBSD: patch-include_libtorrent_udp__socket.hpp,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Support Boost 1.46.1
--- include/libtorrent/udp_socket.hpp.orig 2010-07-25 01:26:41.000000000 +0000
+++ include/libtorrent/udp_socket.hpp
@@ -37,6 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/buffer.hpp"
#include "libtorrent/session_settings.hpp"
+#include <list>
#include <vector>
#include <boost/function.hpp>
#include <boost/thread/mutex.hpp>

View file

@ -0,0 +1,22 @@
$NetBSD: patch-src_Makefile.in,v 1.1 2013/12/12 13:35:15 noud4 Exp $
to link against boost >= 1.50
--- src/Makefile.in.orig 2013-12-12 10:51:24.000000000 +0000
+++ src/Makefile.in
@@ -192,10 +192,11 @@ AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-libtorrent_rasterbar_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
- $(AM_CXXFLAGS) $(CXXFLAGS) $(libtorrent_rasterbar_la_LDFLAGS) \
- $(LDFLAGS) -o $@
+libtorrent_rasterbar_la_LINK = ${LIBTOOL} --mode=link \
+ ${CC} -o ${.TARGET:.a=.la} \
+ ${OBJS:.o=.lo} \
+ -rpath ${PREFIX}/lib \
+ $(libtorrent_rasterbar_la_LDFLAGS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false

View file

@ -1,15 +0,0 @@
$NetBSD: patch-src_create__torrent.cpp,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Support Boost 1.46.1
--- src/create_torrent.cpp.orig 2010-01-19 01:42:35.000000000 +0000
+++ src/create_torrent.cpp
@@ -217,7 +217,7 @@ namespace libtorrent
for (fs::path::iterator j = boost::next(i->path.begin());
j != i->path.end(); ++j)
{
- path_e.list().push_back(entry(*j));
+ path_e.list().push_back(entry(j->string()));
}
}
}

View file

@ -1,15 +0,0 @@
$NetBSD: patch-src_file.cpp,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Support Boost 1.46.1
--- src/file.cpp.orig 2010-02-14 04:05:22.000000000 +0000
+++ src/file.cpp
@@ -207,7 +207,7 @@ namespace libtorrent
| S_IRGRP | S_IWGRP
| S_IROTH | S_IWOTH;
- m_fd = ::open(path.external_file_string().c_str()
+ m_fd = ::open(path.native().c_str()
, map_open_mode(mode.m_mask), permissions);
if (m_fd == -1)

View file

@ -1,18 +0,0 @@
$NetBSD: patch-src_file__storage.cpp,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Support Boost 1.46.1
--- src/file_storage.cpp.orig 2008-10-05 01:41:56.000000000 +0000
+++ src/file_storage.cpp
@@ -147,9 +147,9 @@ namespace libtorrent
else
{
if (m_files.empty())
- m_name = *file.begin();
+ m_name = file.begin()->string();
}
- TORRENT_ASSERT(m_name == *file.begin());
+ TORRENT_ASSERT(m_name == file.begin()->string());
file_entry e;
m_files.push_back(e);
m_files.back().size = size;

View file

@ -1,15 +0,0 @@
$NetBSD: patch-src_logger.cpp,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Support Boost 1.46.1
--- src/logger.cpp.orig 2009-02-08 08:13:05.000000000 +0000
+++ src/logger.cpp
@@ -63,7 +63,7 @@ namespace
{
logger_peer_plugin(std::string const& filename)
{
- fs::path dir(fs::complete("libtorrent_ext_logs"));
+ fs::path dir(fs::absolute("libtorrent_ext_logs"));
if (!fs::exists(dir)) fs::create_directories(dir);
m_file.open((dir / filename).string().c_str(), std::ios_base::out | std::ios_base::out);
m_file << "\n\n\n";

View file

@ -1,94 +0,0 @@
$NetBSD: patch-src_storage.cpp,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Support Boost 1.46.1
--- src/storage.cpp.orig 2010-09-05 23:59:03.000000000 +0000
+++ src/storage.cpp
@@ -161,7 +161,7 @@ namespace libtorrent
template <class Path>
void recursive_copy(Path const& old_path, Path const& new_path, error_code& ec)
{
- using boost::filesystem::basic_directory_iterator;
+ using boost::filesystem::directory_iterator;
#ifndef BOOST_NO_EXCEPTIONS
try {
#endif
@@ -169,7 +169,7 @@ namespace libtorrent
if (is_directory(old_path))
{
create_directory(new_path);
- for (basic_directory_iterator<Path> i(old_path), end; i != end; ++i)
+ for (directory_iterator i(old_path), end; i != end; ++i)
{
#if BOOST_VERSION < 103600
recursive_copy(i->path(), new_path / i->path().leaf(), ec);
@@ -202,13 +202,13 @@ namespace libtorrent
template <class Path>
void recursive_remove(Path const& old_path)
{
- using boost::filesystem::basic_directory_iterator;
+ using boost::filesystem::directory_iterator;
#ifndef BOOST_NO_EXCEPTIONS
try {
#endif
if (is_directory(old_path))
{
- for (basic_directory_iterator<Path> i(old_path), end; i != end; ++i)
+ for (directory_iterator i(old_path), end; i != end; ++i)
recursive_remove(i->path());
remove(old_path);
}
@@ -301,7 +301,7 @@ namespace libtorrent
|| (!compact_mode && size < s->first))
{
if (error) *error = "filesize mismatch for file '"
- + i->path.external_file_string()
+ + i->path.native()
+ "', size: " + boost::lexical_cast<std::string>(size)
+ ", expected to be " + boost::lexical_cast<std::string>(s->first)
+ " bytes";
@@ -314,7 +314,7 @@ namespace libtorrent
(!compact_mode && (time > s->second + 5 * 60 || time < s->second - 1)))
{
if (error) *error = "timestamp mismatch for file '"
- + i->path.external_file_string()
+ + i->path.native()
+ "', modification date: " + boost::lexical_cast<std::string>(time)
+ ", expected to have modification date "
+ boost::lexical_cast<std::string>(s->second);
@@ -334,7 +334,7 @@ namespace libtorrent
if (mapped) m_mapped_files.reset(new file_storage(*mapped));
TORRENT_ASSERT(m_files.begin() != m_files.end());
- m_save_path = fs::complete(path);
+ m_save_path = fs::absolute(path);
TORRENT_ASSERT(m_save_path.is_complete());
}
@@ -781,7 +781,7 @@ namespace libtorrent
{
if (i->size != fs->first)
{
- error = "file size for '" + i->path.external_file_string()
+ error = "file size for '" + i->path.native()
+ "' was expected to be "
+ boost::lexical_cast<std::string>(i->size) + " bytes";
return false;
@@ -828,7 +828,7 @@ namespace libtorrent
for (file_storage::iterator i = f.begin()
, end(f.end()); i != end; ++i)
{
- to_move.insert(to_move.begin(), *i->path.begin());
+ to_move.insert(to_move.begin(), i->path.begin()->string());
}
for (std::set<std::string>::const_iterator i = to_move.begin()
@@ -1461,7 +1461,7 @@ namespace libtorrent
{
if (m_storage->move_storage(save_path))
{
- m_save_path = fs::complete(save_path);
+ m_save_path = fs::absolute(save_path);
return 0;
}
return -1;

View file

@ -1,17 +0,0 @@
$NetBSD: patch-src_torrent__info.cpp,v 1.1 2011/05/11 09:18:46 ryo-on Exp $
* Support Boost 1.46.1
--- src/torrent_info.cpp.orig 2009-11-28 09:43:38.000000000 +0000
+++ src/torrent_info.cpp
@@ -199,8 +199,8 @@ namespace libtorrent
fs::path new_path;
for (fs::path::const_iterator i = p.begin(); i != p.end(); ++i)
{
- if (!valid_path_element(*i)) continue;
- new_path /= *i;
+ if (!valid_path_element(i->string())) continue;
+ new_path /= i->string();
}
TORRENT_ASSERT(!new_path.is_complete());
return new_path;

View file

@ -1,2 +0,0 @@
* Resolve ImportError: /usr/pkg/lib/python2.6/site-packages/libtorrent.so: Undefined PLT symbol "_ZN10libtorrent8is_digitEc" (symnum = 79)
* libtorrent-rasterbar is broken.