qbittorrent_dynamic: update to latest version

* qBittorrent: 4.4.2
* qt6base: 6.2.4
* qt6tools: 6.2.4
* rblibtorrent: 2.0.6
This commit is contained in:
sbwml 2022-05-04 11:42:53 +08:00
parent 1b281e1cdd
commit 6776cbc689
6 changed files with 266 additions and 225 deletions

View File

@ -1,4 +1,4 @@
qBittorrent - A BitTorrent client in Qt
qBittorrent - A BitTorrent client in Qt6
------------------------------------------
## How to build

View File

@ -7,12 +7,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=qbittorrent
PKG_VERSION:=4.4.1
PKG_VERSION:=4.4.2
PKG_RELEASE=1
PKG_SOURCE:=qBittorrent-release-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/qbittorrent/qBittorrent/tar.gz/release-4.4.1?
PKG_HASH:=144a609514a7b516e65c4a4e32e49529b5e3949a713daf86332cd95867c991ba
PKG_SOURCE_URL:=https://codeload.github.com/qbittorrent/qBittorrent/tar.gz/release-$(PKG_VERSION)?
PKG_HASH:=f9406eb982a4b8a084341fb0bc30bd8b50babe5dcf4197204ab407b06e20e8a3
PKG_BUILD_DIR:=$(BUILD_DIR)/qBittorrent-release-$(PKG_VERSION)
@ -20,25 +20,28 @@ PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:qbittorrent:qbittorrent
PKG_BUILD_DEPENDS:=qttools
PKG_BUILD_DEPENDS:=qttools/host boost
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/qbittorrent
SECTION:=net
CATEGORY:=Network
SUBMENU:=BitTorrent
DEPENDS:=+libgcc +libstdcpp \
DEPENDS:=+USE_GLIBC:librt +USE_GLIBC:libpthread +libgcc +libstdcpp \
+rblibtorrent \
+libopenssl \
+qt5-core \
+qt5-network \
+qt5-sql \
+qt5-xml \
+libqt6core \
+libqt6network \
+libqt6network-tlsbackend-openssl \
+libqt6sql \
+libqt6sql-sqlite \
+libqt6xml \
+zlib
TITLE:=bittorrent client programmed in C++ / Qt
URL:=https://www.qbittorrent.org/
@ -53,16 +56,33 @@ define Package/qbittorrent/description
well as many features.
endef
CONFIGURE_ARGS += \
--disable-gui \
--enable-stacktrace=no \
--with-boost=$(STAGING_DIR)/usr
CMAKE_OPTIONS += \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DQT6=ON \
-DSTACKTRACE=OFF \
-DWEBUI=ON \
-DGUI=OFF \
-DVERBOSE_CONFIGURE=ON \
-DQT_ADDITIONAL_PACKAGES_PREFIX_PATH=$(STAGING_DIR_HOSTPKG)
MAKE_VARS += \
INSTALL_ROOT="$(PKG_INSTALL_DIR)"
ifdef CONFIG_USE_MIPS16
TARGET_CFLAGS += -minterlink-mips16
endif
ifdef CONFIG_USE_GLIBC
TARGET_LDFLAGS += -ldl -lrt -lpthread
endif
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -flto
ifeq ($(ARCH),i386)
ifneq ($(findstring pentium-mmx,$(CONFIG_CPU_TYPE)),)
TARGET_CFLAGS := $(filter-out -flto,$(TARGET_CFLAGS))
TARGET_LDFLAGS := $(filter-out -flto,$(TARGET_LDFLAGS))
endif
endif
define Package/qbittorrent/conffiles
/etc/config/qbittorrent

View File

@ -7,8 +7,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=qtbase
PKG_BASE:=5.15
PKG_BUGFIX:=2
PKG_BASE:=6.2
PKG_BUGFIX:=4
PKG_VERSION:=$(PKG_BASE).$(PKG_BUGFIX)
PKG_RELEASE:=1
@ -18,27 +18,37 @@ PKG_SOURCE_URL:= \
http://master.qt.io/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://qt.mirror.constant.com/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules
PKG_HASH:=909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8
PKG_HASH:=d9924d6fd4fa5f8e24458c87f73ef3dfc1e7c9b877a5407c040d89e6736e2634
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-everywhere-src-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-everywhere-src-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=qtbase/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PKG_CPE_ID:=cpe:/a:qt:qt
CMAKE_INSTALL:=1
# Force to use strip instead of sstrip
STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/qtbase/Default
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=Qt5
SUBMENU:=Qt6
TITLE:=qtbase
URL:=http://qt-project.org
DEPENDS:=+libgcc +libstdcpp @!LINUX_2_6_36
DEPENDS:=+libc +libgcc +libstdcpp +USE_GLIBC:librt +USE_GLIBC:libpthread @!LINUX_2_6_36 @!(ARM&&CPU_32v4)
endef
define Package/qtbase/description
This package provides the Qt5 libraries.
This package provides the Qt6 libraries.
Qt is a cross-platform application development framework for desktop, embedded and mobile.
Supported Platforms include Linux, OS X, Windows, VxWorks, QNX, Android, iOS, BlackBerry,
@ -50,152 +60,177 @@ define Package/qtbase/description
- core
- network
- xml
- sql
endef
define Package/qtbase
$(call Package/qtbase/Default)
TITLE+=all libs
DEPENDS+=$(QTBASE_DEPENDS)
endef
define Package/qtbase/install
true
$(call Package/qtbase/Default)
HIDDEN:=1
endef
define Package/qtbase/config
config QT5_INCLUDE_ATOMIC
bool "Depends on libatomic"
default y if !(arm_v7 || ARCH_64BIT || TARGET_x86)
default n
menu "qtbase"
comment "Qtbase Libraries"
$(foreach lib,$(QTBASE_LIBS),
config PACKAGE_libqt6$(lib)
tristate "libqt6$(lib)"
default m if ALL
help
Check this options to add the libatomic to the dependences.
- You'd better to confirm whether your compiler need the external libatomic.
Otherwise, it is not recommended to modify this option mannually.
menu "Select Qtbase Libraries"
comment "Qtbase Libraries"
$(foreach lib,$(QTBASE_LIBS),
config PACKAGE_qt5-$(lib)
prompt "Qtbase $(lib) library."
default m if ALL
)
endmenu
$(Package/libqt6$(lib)/description)
)
endmenu
endef
PKG_CONFIG_DEPENDS = CONFIG_QT5_INCLUDE_ATOMIC
#LBITS = $(shell $(TARGET_CC) -dM -E - </dev/null | grep -q "__LP64__" && echo 64 || echo 32)
#
#ifeq ($(LBITS),64)
# export USE_64=1
#endif
EXTRA_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
EXTRA_LDFLAGS += -Wl,--gc-sections,--as-needed
ifeq ($(CONFIG_CPU_TYPE),"xscale")
TARGET_CFLAGS+= -mfloat-abi=softfp
endif
CONFIGURE_ARGS = \
-sysroot $(STAGING_DIR) \
-hostprefix $(STAGING_DIR_HOSTPKG) \
-extprefix $(STAGING_DIR)/usr \
-prefix /usr \
-archdatadir /usr/share/Qt \
-datadir /usr/share/Qt \
-device linux-generic-g++ \
-device-option CROSS_COMPILE="$(TARGET_CROSS)" \
-device-option COMPILER_FLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
-device-option LINKER_FLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
-confirm-license \
-opensource \
-release \
-shared \
-strip \
-no-rpath \
-no-use-gold-linker \
-ltcg \
-mimetype-database \
-openssl-linked \
-qt-doubleconversion \
-system-pcre \
-system-zlib \
$(if $(findstring i386,$(ARCH)),-no-sse2 -no-sse4.1) \
-no-angle \
-no-cups \
-no-dbus \
-no-directfb \
-no-dtls\
-no-egl \
-no-eglfs \
-no-freetype \
-no-gbm \
-no-glib \
-no-gtk \
-no-gui \
-no-harfbuzz \
-no-iconv \
-no-icu \
-no-kms \
-no-libjpeg \
-no-libmd4c \
-no-libpng \
-no-libudev \
-no-mtdev \
-no-opengl \
-no-opengles3 \
-no-openvg \
-no-pch \
-no-slog2 \
-sql-sqlite \
-no-trace \
-no-tslib \
-no-vulkan \
-no-widgets \
-no-xcb \
-no-xkbcommon \
-no-zstd \
-no-compile-examples \
-no-feature-concurrent \
-no-feature-gssapi \
-no-feature-testlib \
-make libs \
-nomake examples \
-nomake tests \
-nomake tools \
-v
ifdef CONFIG_USE_GLIBC
TARGET_LDFLAGS += -ldl -lrt -lpthread
endif
TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -flto
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
endef
CMAKE_SHARED_LDFLAGS:=$(filter-out -Wl$(comma)-Bsymbolic-functions,$(CMAKE_SHARED_LDFLAGS))
define Build/InstallDev
$(MAKE) -C $(PKG_BUILD_DIR) install
endef
CMAKE_HOST_OPTIONS += \
-DQT_FORCE_MIN_CMAKE_VERSION_FOR_BUILDING_QT=3.19 \
-DCMAKE_STAGING_PREFIX=$(STAGING_DIR_HOSTPKG) \
-DCMAKE_BUILD_TYPE=Release \
-DFEATURE_optimize_size=ON \
-DBUILD_SHARED_LIBS=OFF \
-DFEATURE_concurrent=OFF \
-DFEATURE_dbus=OFF \
-DFEATURE_gui=OFF \
-DFEATURE_sql=OFF \
-DFEATURE_testlib=OFF \
-DFEATURE_zstd=OFF \
-DINPUT_openssl=no
CMAKE_OPTIONS += \
-DQT_FORCE_MIN_CMAKE_VERSION_FOR_BUILDING_QT=3.19 \
-DQT_FORCE_MIN_CMAKE_VERSION_FOR_USING_QT=3.19 \
-DCMAKE_SYSROOT=$(STAGING_DIR) \
-DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_ARCHDATADIR=/usr/share/Qt6 \
-DINSTALL_DATADIR=/usr/share/Qt6 \
-DQT_HOST_PATH=$(STAGING_DIR_HOSTPKG) \
-DQT_QMAKE_TARGET_MKSPEC=devices/linux-generic-g++ \
-DQT_QMAKE_DEVICE_OPTIONS=CROSS_COMPILE="$(TARGET_CROSS);COMPILER_FLAGS=$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS);LINKER_FLAGS=$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DFEATURE_optimize_size=ON \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_SKIP_RPATH=TRUE \
-DFEATURE_system_zlib=ON \
-DFEATURE_cups=OFF \
-DFEATURE_dbus=OFF \
-DFEATURE_libudev=OFF \
-DFEATURE_widgets=OFF \
-DFEATURE_zstd=OFF \
-DFEATURE_concurrent=OFF \
-DFEATURE_testlib=OFF \
-DQT_BUILD_EXAMPLES=OFF \
-DQT_BUILD_TESTS=OFF \
\
-DFEATURE_system_doubleconversion=OFF \
-DFEATURE_system_pcre2=ON \
-DFEATURE_mimetype_database=ON \
-DFEATURE_glib=OFF \
-DFEATURE_icu=OFF \
\
-DFEATURE_gui=OFF \
-DFEATURE_freetype=OFF \
-DFEATURE_gbm=OFF \
-DFEATURE_harfbuzz=OFF \
-DFEATURE_jpeg=OFF \
-DFEATURE_png=OFF \
-DFEATURE_mtdev=OFF \
-DINPUT_opengl=no \
-DFEATURE_tslib=OFF \
-DFEATURE_xcb=OFF \
-DFEATURE_xcb_xlib=OFF \
-DFEATURE_xkbcommon=OFF \
\
-DINPUT_openssl=linked \
-DFEATURE_libproxy=OFF \
-DFEATURE_gssapi=OFF \
\
-DFEATURE_sql=ON \
-DFEATURE_system_sqlite=OFF \
-DFEATURE_sql_db2=OFF \
-DFEATURE_sql_ibase=OFF \
-DFEATURE_sql_mysql=OFF \
-DFEATURE_sql_oci=OFF \
-DFEATURE_sql_odbc=OFF \
-DFEATURE_sql_psql=OFF \
\
-DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=OFF \
-DLIBATOMIC_LIBS="-latomic"
define Package/qtbase/Default/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/libQt5$(shell echo $(2) | sed -e 's/\b[[:alpha:]]/\u&/g').so* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libQt6$(shell echo $(2) | sed -e 's/\b[[:alpha:]]/\u&/g').so* $(1)/usr/lib
endef
# 1: library short name
# 2: dependencies on other qtbase libraries (short name)
# 3: dependencies on other packages
define DefineQtbaseLibrary
QTBASE_DEPENDS+=+qt5-$(1)
PKG_CONFIG_DEPENDS+=CONFIG_PACKAGE_libqt6$(1)
QTBASE_LIBS+=$(1)
define Package/qt5-$(1)
define Package/libqt6$(1)
$(call Package/qtbase/Default)
TITLE+=$(1)
DEPENDS+=$(foreach lib,$(2),+qt5-$(lib)) $(3)
TITLE+=$(1) library
DEPENDS+=$(foreach lib,$(2),+libqt6$(lib)) $(3)
ABI_VERSION:=6
HIDDEN:=1
endef
define Package/qt5-$(1)/description
This package contains the qt5 $(1) library.
define Package/libqt6$(1)/description
This package contains the qtbase $(1) library.
endef
define Package/qt5-$(1)/install
define Package/libqt6$(1)/install
$(call Package/qtbase/Default/install,$$(1),$(1))
endef
endef
$(eval $(call DefineQtbaseLibrary,core,,+QT5_INCLUDE_ATOMIC:libatomic +libpcre2-16 +zlib))
$(eval $(call DefineQtbaseLibrary,core,,+libatomic +libpcre2-16 +zlib))
$(eval $(call DefineQtbaseLibrary,network,core,+libopenssl +zlib))
$(eval $(call DefineQtbaseLibrary,xml,core,))
$(eval $(call DefineQtbaseLibrary,sql,core))
$(eval $(call DefineQtbaseLibrary,sql,core,))
$(foreach lib,$(QTBASE_LIBS),$(eval $(call BuildPackage,qt5-$(lib))))
define Package/qtbase/Plugins/install
$(INSTALL_DIR) $(1)/usr/share/Qt6/plugins/$(2)
$(CP) $(PKG_INSTALL_DIR)/usr/share/Qt6/plugins/$(2)/lib$(3).so $(1)/usr/share/Qt6/plugins/$(2)
endef
# 1: plugin directory
# 2: plugin short name
# 3: so file name
# 4: dependencies on other qtbase libraries (short name)
# 5: dependencies on other packages
define DefineQtbasePlugin
$(call DefineQtbaseLibrary,$(2),$(4),$(5))
define Package/libqt6$(2)/install
$(call Package/qtbase/Plugins/install,$$(1),$(1),$(3))
endef
endef
$(eval $(call DefineQtbasePlugin,sqldrivers,sql-sqlite,qsqlite,core sql,+libpcre2-16 +zlib))
$(eval $(call DefineQtbasePlugin,tls,network-tlsbackend-openssl,qopensslbackend,core network,+libopenssl +libpcre2-16 +zlib))
$(foreach lib,$(QTBASE_LIBS),$(eval $(call BuildPackage,libqt6$(lib))))
$(eval $(call HostBuild))
$(eval $(call BuildPackage,qtbase))

View File

@ -1,36 +0,0 @@
diff --color -uNr a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
--- a/src/corelib/global/qendian.h 2020-10-27 16:02:11.000000000 +0800
+++ b/src/corelib/global/qendian.h 2021-07-19 06:21:23.185297425 +0800
@@ -43,7 +43,7 @@
#include <QtCore/qfloat16.h>
#include <QtCore/qglobal.h>
-
+#include <limits>
// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
#include <stdlib.h>
#include <string.h>
diff --color -uNr a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
--- a/src/corelib/global/qfloat16.h 2020-10-27 16:02:11.000000000 +0800
+++ b/src/corelib/global/qfloat16.h 2021-07-19 06:22:10.387349829 +0800
@@ -44,7 +44,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qmetatype.h>
#include <string.h>
-
+#include <limits>
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
// All processors that support AVX2 do support F16C too. That doesn't mean
// we're allowed to use the intrinsics directly, so we'll do it only for
diff --color -uNr a/src/corelib/text/qbytearraymatcher.h b/src/corelib/text/qbytearraymatcher.h
--- a/src/corelib/text/qbytearraymatcher.h 2020-10-27 16:02:11.000000000 +0800
+++ b/src/corelib/text/qbytearraymatcher.h 2021-07-19 06:22:30.139372013 +0800
@@ -41,7 +41,7 @@
#define QBYTEARRAYMATCHER_H
#include <QtCore/qbytearray.h>
-
+#include <limits>
QT_BEGIN_NAMESPACE

View File

@ -7,8 +7,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=qttools
PKG_BASE:=5.15
PKG_BUGFIX:=2
PKG_BASE:=6.2
PKG_BUGFIX:=4
PKG_VERSION:=$(PKG_BASE).$(PKG_BUGFIX)
PKG_RELEASE:=1
@ -18,34 +18,50 @@ PKG_SOURCE_URL:= \
http://master.qt.io/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://qt.mirror.constant.com/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules
PKG_HASH:=c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-everywhere-src-$(PKG_VERSION)
PKG_HASH:=17f40689c4a1706a1b7db22fa92f6ab79f7b698a89e100cab4d10e19335f8267
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=qtbase
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-everywhere-src-$(PKG_VERSION)
PKG_HOST_ONLY:=1
HOST_BUILD_PARALLEL:=1
HOST_BUILD_DEPENDS:=qtbase/host
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
include $(INCLUDE_DIR)/package.mk
define Package/qttools
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=Qt5
SUBMENU:=Qt6
TITLE:=qttools
URL:=http://qt-project.org
BUILDONLY:=1
endef
define Build/Configure
cd $(PKG_BUILD_DIR) && qmake -o Makefile qttools.pro
endef
HOST_CONFIGURE_ARGS = \
-no-feature-assistant \
-no-feature-clang \
-no-feature-clangcpp \
-no-feature-designer \
-no-feature-distancefieldgenerator \
-no-feature-kmap2qmap \
-no-feature-macdeployqt \
-no-feature-pixeltool \
-no-feature-qdbus \
-no-feature-qev \
-no-feature-qtattributionsscanner \
-no-feature-qtdiag \
-no-feature-qtplugininfo \
-no-feature-windeployqt \
-- \
-DCMAKE_DISABLE_FIND_PACKAGE_Clang=TRUE \
-DCMAKE_DISABLE_FIND_PACKAGE_WrapLibClang=TRUE
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
endef
define Build/InstallDev
$(MAKE) -C $(PKG_BUILD_DIR) install
define Host/Configure
cd $(HOST_BUILD_DIR) && $(STAGING_DIR_HOSTPKG)/bin/qt-configure-module . $(HOST_CONFIGURE_ARGS)
endef
$(eval $(call BuildPackage,qttools))
$(eval $(call HostBuild))

View File

@ -1,15 +1,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rblibtorrent
PKG_VERSION:=1.2.15
PKG_RELEASE=1
PKG_VERSION:=2.0.6
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/arvidn/libtorrent.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=9c5b26b8d9bdb168256566a2986c563187638e5a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MIRROR_HASH:=15c9d37a56cf09b22b9d1eeec8a0c21eff7c9fb6b30b04c4cba9a61d5201d57a
PKG_SOURCE:=libtorrent-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/arvidn/libtorrent/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=75b17d9db3adf0da5896edeaff4db3879f38ee66be953dc9567089db83a070be
PKG_BUILD_DIR:=$(BUILD_DIR)/libtorrent-$(PKG_VERSION)
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYING
@ -19,50 +17,58 @@ PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/rblibtorrent
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Rasterbar BitTorrent library
URL:=https://www.libtorrent.org/
DEPENDS:=+libgcc +libstdcpp +libopenssl +boost +boost-system +boost-chrono +boost-random
MAINTAINER:=Arvid Norberg <arvid@libtorrent.org>
TITLE:=C++ bittorrent library by Rasterbar Software
URL:=https://www.libtorrent.org
DEPENDS:=+boost +boost-system +libatomic +libc +libgcc +libopenssl +libstdcpp +USE_GLIBC:libpthread
ABI_VERSION:=2.0
endef
define Package/rblibtorrent/description
Rasterbar libtorrent is a C++ library that aims to be a good alternative to
all the other bittorrent implementations around. It is a library and not a
full featured client, although it comes with a working example client.
Rasterbar libtorrent is a C++ library that aims to be a good alternative to
all the other bittorrent implementations around. It is a library and not a
full featured client, although it comes with a working example client.
endef
TARGET_CFLAGS += $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
TARGET_LDFLAGS += -lstdc++
CONFIGURE_ARGS += \
--disable-debug \
--disable-rpath \
--enable-encryption \
--enable-deprecated-functions \
--with-gnu-ld \
--with-openssl=$(STAGING_DIR)/usr \
--with-boost=$(STAGING_DIR)/usr \
--with-libiconv \
--with-libiconv-prefix=$(ICONV_PREFIX)
define Build/Configure
cd $(PKG_BUILD_DIR) ; \
sh autotool.sh
$(call Build/Configure/Default)
TRY_SIGNAL_VERSION:=751a7e5a5be14892bcfdff1e63c653bcbf71cf39
TRY_SIGNAL_FILE:=$(PKG_NAME)-try_signal-$(TRY_SIGNAL_VERSION).tar.xz
define Download/try_signal
VERSION:=$(TRY_SIGNAL_VERSION)
SUBDIR:=deps/try_signal
FILE:=$(TRY_SIGNAL_FILE)
URL:=https://github.com/arvidn/try_signal.git
MIRROR_HASH:=32a432e35e81c79f21c49744f00696c112e0deab45d15d91c61ceb63fe25a5f8
PROTO:=git
endef
$(eval $(call Download,try_signal))
define Build/Prepare
$(Build/Prepare/Default)
xzcat $(DL_DIR)/$(TRY_SIGNAL_FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
endef
TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -flto
CMAKE_OPTIONS += \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-Ddeprecated-functions=OFF \
-Dlogging=OFF \
-DCMAKE_CXX_STANDARD=17 \
-Dpython-bindings=$(if $(CONFIG_PACKAGE_python3-libtorrent),ON,OFF) \
-Dpython-egg-info=$(if $(CONFIG_PACKAGE_python3-libtorrent),ON,OFF)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libtorrent $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent-rasterbar.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent-rasterbar.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent-rasterbar.pc $(1)/usr/lib/pkgconfig/
endef