make it build with clang
This commit is contained in:
parent
1bc53755a7
commit
fc85990bbe
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.55 2017/04/10 11:46:32 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.56 2017/05/19 22:26:32 espie Exp $
|
||||
|
||||
COMMENT= ncurses BitTorrent client based on libTorrent
|
||||
|
||||
@ -31,7 +31,8 @@ BUILD_DEPENDS= devel/cppunit
|
||||
LIB_DEPENDS= net/libtorrent>=0.13.4 \
|
||||
net/curl
|
||||
|
||||
CONFIGURE_STYLE= gnu
|
||||
CONFIGURE_STYLE= autoconf
|
||||
AUTOCONF_VERSION= 2.69
|
||||
CONFIGURE_ENV += LDFLAGS=-pthread
|
||||
CONFIGURE_ARGS= --disable-debug
|
||||
|
||||
@ -41,4 +42,12 @@ post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/rtorrent.rc \
|
||||
${PREFIX}/share/examples/rtorrent/rtorrent.rc
|
||||
|
||||
.include <bsd.port.arch.mk>
|
||||
.if ${PROPERTIES:Mclang}
|
||||
# this patches *only* files containing tr1 to no longer refer to tr1
|
||||
# we do it pre-patch, because autoconf passes right after us
|
||||
pre-patch:
|
||||
find ${WRKDIST} -type f|xargs fgrep -lw tr1|xargs sed -i.bak -e 's,<tr1/,<,' -e 's/std::tr1/std/g' -e 's/tr1::placeholders::/std::placeholders::/g' -e 's/tr1::bind/std::bind/g'
|
||||
CXXFLAGS += -std=c++11
|
||||
.endif
|
||||
.include <bsd.port.mk>
|
||||
|
17
net/rtorrent/patches/patch-src_core_manager_cc
Normal file
17
net/rtorrent/patches/patch-src_core_manager_cc
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-src_core_manager_cc,v 1.1 2017/05/19 22:26:32 espie Exp $
|
||||
|
||||
Index: src/core/manager.cc
|
||||
--- src/core/manager.cc.orig
|
||||
+++ src/core/manager.cc
|
||||
@@ -74,6 +74,11 @@
|
||||
|
||||
namespace core {
|
||||
|
||||
+const int Manager::create_start;
|
||||
+const int Manager::create_tied;
|
||||
+const int Manager::create_quiet;
|
||||
+const int Manager::create_raw_data;
|
||||
+
|
||||
void
|
||||
Manager::push_log(const char* msg) {
|
||||
m_log_important->lock_and_push_log(msg, strlen(msg), 0);
|
13
net/rtorrent/patches/patch-src_core_poll_manager_cc
Normal file
13
net/rtorrent/patches/patch-src_core_poll_manager_cc
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-src_core_poll_manager_cc,v 1.3 2017/05/19 22:26:32 espie Exp $
|
||||
|
||||
Index: src/core/poll_manager.cc
|
||||
--- src/core/poll_manager.cc.orig
|
||||
+++ src/core/poll_manager.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <stdexcept>
|
||||
#include <unistd.h>
|
||||
+#include <sys/select.h>
|
||||
#include <torrent/exceptions.h>
|
||||
#include <torrent/poll_epoll.h>
|
||||
#include <torrent/poll_kqueue.h>
|
13
net/rtorrent/patches/patch-src_display_window_file_list_cc
Normal file
13
net/rtorrent/patches/patch-src_display_window_file_list_cc
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-src_display_window_file_list_cc,v 1.5 2017/05/19 22:26:32 espie Exp $
|
||||
|
||||
Index: src/display/window_file_list.cc
|
||||
--- src/display/window_file_list.cc.orig
|
||||
+++ src/display/window_file_list.cc
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <torrent/data/file.h>
|
||||
#include <torrent/data/file_list.h>
|
||||
#include <torrent/data/file_list_iterator.h>
|
||||
+#include <locale>
|
||||
|
||||
#include "core/download.h"
|
||||
#include "ui/element_file_list.h"
|
20
net/rtorrent/patches/patch-src_rpc_exec_file_cc
Normal file
20
net/rtorrent/patches/patch-src_rpc_exec_file_cc
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-src_rpc_exec_file_cc,v 1.1 2017/05/19 22:26:32 espie Exp $
|
||||
|
||||
Index: src/rpc/exec_file.cc
|
||||
--- src/rpc/exec_file.cc.orig
|
||||
+++ src/rpc/exec_file.cc
|
||||
@@ -52,6 +52,14 @@ namespace rpc {
|
||||
|
||||
// Close m_logFd.
|
||||
|
||||
+const unsigned int ExecFile::max_args;
|
||||
+const unsigned int ExecFile::buffer_size;
|
||||
+
|
||||
+const int ExecFile::flag_expand_tilde;
|
||||
+const int ExecFile::flag_throw;
|
||||
+const int ExecFile::flag_capture;
|
||||
+const int ExecFile::flag_background;
|
||||
+
|
||||
int
|
||||
ExecFile::execute(const char* file, char* const* argv, int flags) {
|
||||
// Write the execued command and its parameters to the log fd.
|
29
net/rtorrent/patches/patch-src_rpc_object_storage_cc
Normal file
29
net/rtorrent/patches/patch-src_rpc_object_storage_cc
Normal file
@ -0,0 +1,29 @@
|
||||
$OpenBSD: patch-src_rpc_object_storage_cc,v 1.1 2017/05/19 22:26:32 espie Exp $
|
||||
|
||||
Index: src/rpc/object_storage.cc
|
||||
--- src/rpc/object_storage.cc.orig
|
||||
+++ src/rpc/object_storage.cc
|
||||
@@ -44,6 +44,23 @@
|
||||
|
||||
namespace rpc {
|
||||
|
||||
+const unsigned int object_storage::flag_generic_type;
|
||||
+const unsigned int object_storage::flag_bool_type;
|
||||
+const unsigned int object_storage::flag_value_type;
|
||||
+const unsigned int object_storage::flag_string_type;
|
||||
+const unsigned int object_storage::flag_list_type;
|
||||
+const unsigned int object_storage::flag_function_type;
|
||||
+const unsigned int object_storage::flag_multi_type;
|
||||
+
|
||||
+const unsigned int object_storage::mask_type;
|
||||
+
|
||||
+const unsigned int object_storage::flag_constant;
|
||||
+const unsigned int object_storage::flag_static;
|
||||
+const unsigned int object_storage::flag_private;
|
||||
+const unsigned int object_storage::flag_rlookup;
|
||||
+
|
||||
+const size_t object_storage::key_size;
|
||||
+
|
||||
object_storage::local_iterator
|
||||
object_storage::find_local(const torrent::raw_string& key) {
|
||||
std::size_t n = hash_fixed_key_type::hash(key.data(), key.size()) % bucket_count();
|
13
net/rtorrent/patches/patch-src_signal_handler_cc
Normal file
13
net/rtorrent/patches/patch-src_signal_handler_cc
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-src_signal_handler_cc,v 1.1 2017/05/19 22:26:32 espie Exp $
|
||||
|
||||
Index: src/signal_handler.cc
|
||||
--- src/signal_handler.cc.orig
|
||||
+++ src/signal_handler.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdexcept>
|
||||
+#include <string>
|
||||
#include "rak/error_number.h"
|
||||
#include "signal_handler.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user