diff --git a/net/rtorrent/Makefile b/net/rtorrent/Makefile index 1b23c5ba89..77a2cea19f 100644 --- a/net/rtorrent/Makefile +++ b/net/rtorrent/Makefile @@ -9,12 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rtorrent PKG_VERSION:=0.9.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/rakshasa/rtorrent/tar.gz/v$(PKG_VERSION)? PKG_HASH:=bc889ce1dde475ec56aa72ae996912ff58723226a4f4256fef4f1f8636d991d4 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=Rosen Penev PKG_LICENSE:=GPL-2.0-or-later @@ -23,7 +22,7 @@ PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_REMOVE_FILES:=autogen.sh +PKG_BUILD_DEPENDS:=libtorrent include $(INCLUDE_DIR)/package.mk @@ -33,7 +32,7 @@ define Package/rtorrent/Default CATEGORY:=Network TITLE:=BitTorrent client for ncurses URL:=https://github.com/rakshasa/rtorrent - DEPENDS:=+libcurl +libtorrent +libncurses +libpthread + DEPENDS:=+libcurl +libncurses +libpthread +libopenssl +libstdcpp +zlib endef define Package/rtorrent/Default/description @@ -66,8 +65,8 @@ $(call Package/rtorrent/Default/description) endef CONFIGURE_ARGS += \ - --enable-shared \ - --disable-static \ + --enable-static \ + --disable-shared \ --disable-debug \ --with-libcurl="$(STAGING_DIR)/usr" \ --with-ncurses \ @@ -78,6 +77,7 @@ CONFIGURE_ARGS += --with-xmlrpc-c endif TARGET_CXXFLAGS += -faligned-new +TARGET_LDFLAGS += -lcrypto -lz define Package/rtorrent/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/net/rtorrent/patches/130-usleep.patch b/net/rtorrent/patches/130-usleep.patch new file mode 100644 index 0000000000..c3463e4be9 --- /dev/null +++ b/net/rtorrent/patches/130-usleep.patch @@ -0,0 +1,33 @@ +From b3d75a642177f21f00d18f0e46bca4a9f363d08e Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 23 Aug 2019 13:35:28 -0700 +Subject: [PATCH] Replace usleep with C++11 sleep_for + +usleep was deprecated with POSIX 2008 and optionally unavailable with +uClibc-ng. +--- + src/thread_base.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/thread_base.cc b/src/thread_base.cc +index 081791d4..275015ab 100644 +--- a/src/thread_base.cc ++++ b/src/thread_base.cc +@@ -42,6 +42,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -66,7 +68,7 @@ class lt_cacheline_aligned thread_queue_hack { + + thread_queue_hack() { std::memset(this, 0, sizeof(thread_queue_hack)); } + +- void lock() { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) usleep(0); } ++ void lock() { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) std::this_thread::sleep_for(std::chrono::microseconds(0)); } + void unlock() { __sync_bool_compare_and_swap(&m_lock, 1, 0); } + + iterator begin() { return m_queue; }