From 6776cbc6899520297b27d9ab35b1fa0db731a3d6 Mon Sep 17 00:00:00 2001 From: sbwml <984419930@qq.com> Date: Wed, 4 May 2022 11:42:53 +0800 Subject: [PATCH] qbittorrent_dynamic: update to latest version * qBittorrent: 4.4.2 * qt6base: 6.2.4 * qt6tools: 6.2.4 * rblibtorrent: 2.0.6 --- README.md | 2 +- qBittorrent/Makefile | 52 +++++-- qtbase/Makefile | 273 +++++++++++++++++++-------------- qtbase/patches/010-gcc11.patch | 36 ----- qttools/Makefile | 48 ++++-- rblibtorrent/Makefile | 80 +++++----- 6 files changed, 266 insertions(+), 225 deletions(-) delete mode 100644 qtbase/patches/010-gcc11.patch diff --git a/README.md b/README.md index 6f8e992..3b9fdfa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -qBittorrent - A BitTorrent client in Qt +qBittorrent - A BitTorrent client in Qt6 ------------------------------------------ ## How to build diff --git a/qBittorrent/Makefile b/qBittorrent/Makefile index 7d12bdd..1e9989f 100644 --- a/qBittorrent/Makefile +++ b/qBittorrent/Makefile @@ -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 diff --git a/qtbase/Makefile b/qtbase/Makefile index dea0c41..ae14beb 100644 --- a/qtbase/Makefile +++ b/qtbase/Makefile @@ -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 - - #include -- -+#include - // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems - #include - #include -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 - #include - #include -- -+#include - #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 -- -+#include - QT_BEGIN_NAMESPACE - - diff --git a/qttools/Makefile b/qttools/Makefile index 40d726c..2e7db0f 100644 --- a/qttools/Makefile +++ b/qttools/Makefile @@ -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)) diff --git a/rblibtorrent/Makefile b/rblibtorrent/Makefile index fc4a388..ddb5786 100644 --- a/rblibtorrent/Makefile +++ b/rblibtorrent/Makefile @@ -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 + 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