mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
Merge pull request #9952 from neheb/rt
rtorrent: Switch to static linking
This commit is contained in:
@@ -1,65 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2006-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libsigc++
|
||||
PKG_VERSION:=2.10.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNOME/libsigc++/2.10
|
||||
PKG_HASH:=b1ca0253379596f9c19f070c83d362b12dfd39c0a3ea1dd813e8e21c1a097a98
|
||||
|
||||
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
|
||||
PKG_LICENSE:=LGPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libsigcxx
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=typesafe callback system for standard C++
|
||||
URL:=https://libsigcplusplus.github.io/libsigcplusplus/
|
||||
DEPENDS:=+libstdcpp
|
||||
endef
|
||||
|
||||
define Package/libsigcxx/description
|
||||
It allows you to define signals and to connect those signals to any
|
||||
callback function, either global or a member function, regardless of
|
||||
whether it is static or virtual.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--disable-benchmark \
|
||||
--disable-documentation \
|
||||
--disable-deprecated-api \
|
||||
--disable-warnings \
|
||||
--without-boost
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/sigc++-2.0 $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/sigc++-2.0 $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sigc++-2.0.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libsigcxx/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libsigcxx))
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libtorrent
|
||||
PKG_VERSION:=0.13.8
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/rakshasa/libtorrent/tar.gz/v$(PKG_VERSION)?
|
||||
@@ -22,7 +22,6 @@ PKG_LICENSE_FILES:=COPYING
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_REMOVE_FILES:=autogen.sh
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -31,7 +30,7 @@ define Package/libtorrent
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Rakshasa's BitTorrent library
|
||||
URL:=https://rakshasa.github.io/rtorrent/
|
||||
DEPENDS:=+libopenssl +libsigcxx +zlib
|
||||
DEPENDS:=+libopenssl +libstdcpp +zlib
|
||||
endef
|
||||
|
||||
define Package/libtorrent/description
|
||||
@@ -59,14 +58,9 @@ define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.a $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libtorrent/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libtorrent))
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
--- a/src/data/hash_queue.cc
|
||||
+++ b/src/data/hash_queue.cc
|
||||
@@ -38,9 +38,10 @@
|
||||
|
||||
#define __STDC_FORMAT_MACROS
|
||||
|
||||
+#include <chrono>
|
||||
+#include <thread>
|
||||
#include <functional>
|
||||
#include <rak/functional.h>
|
||||
-#include <unistd.h>
|
||||
|
||||
#include "torrent/exceptions.h"
|
||||
#include "torrent/data/download_data.h"
|
||||
@@ -137,7 +138,7 @@ HashQueue::remove(HashQueueNode::id_type id) {
|
||||
|
||||
while ((done_itr = m_done_chunks.find(hash_chunk)) == m_done_chunks.end()) {
|
||||
pthread_mutex_unlock(&m_done_chunks_lock);
|
||||
- usleep(100);
|
||||
+ std::this_thread::sleep_for(std::chrono::microseconds(100));
|
||||
pthread_mutex_lock(&m_done_chunks_lock);
|
||||
}
|
||||
|
||||
--- a/src/torrent/utils/thread_base.cc
|
||||
+++ b/src/torrent/utils/thread_base.cc
|
||||
@@ -37,8 +37,9 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <cstring>
|
||||
+#include <chrono>
|
||||
+#include <thread>
|
||||
#include <signal.h>
|
||||
-#include <unistd.h>
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "poll.h"
|
||||
@@ -97,7 +98,7 @@ thread_base::stop_thread_wait() {
|
||||
release_global_lock();
|
||||
|
||||
while (!is_inactive()) {
|
||||
- usleep(1000);
|
||||
+ std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
|
||||
acquire_global_lock();
|
||||
@@ -161,7 +162,7 @@ thread_base::event_loop(thread_base* thread) {
|
||||
}
|
||||
|
||||
// Add the sleep call when testing interrupts, etc.
|
||||
- // usleep(50);
|
||||
+ // std::this_thread::sleep_for(std::chrono::microseconds(50));
|
||||
|
||||
int poll_flags = 0;
|
||||
|
||||
Reference in New Issue
Block a user