qbittorrent: build with qt6

Closes: #51805 [via git-merge-pr]
This commit is contained in:
Mateusz Sylwestrzak 2024-08-12 15:30:48 +02:00 committed by classabbyamp
parent 1708ea8a42
commit d499733e66
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
1 changed files with 24 additions and 35 deletions

View File

@ -1,15 +1,12 @@
# Template file for 'qbittorrent'
pkgname=qbittorrent
version=4.6.5
revision=1
create_wrksrc=yes
build_style=gnu-configure
build_helper=qmake
configure_args="--disable-systemd --with-boost=${XBPS_CROSS_BASE}/usr
--with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib"
hostmakedepends="automake libtool pkg-config qt5-host-tools qt5-qmake qt5-tools"
makedepends="libtorrent-rasterbar-devel qt5-declarative-devel qt5-svg-devel"
depends="qt5-svg"
revision=2
build_style=cmake
configure_args="-DQT6=ON -DSYSTEMD=OFF -DGUI=ON -DWEBUI=OFF"
hostmakedepends="pkg-config qt6-tools qt6-declarative-host-tools"
makedepends="libtorrent-rasterbar-devel qt6-base-private-devel qt6-declarative-devel qt6-svg-devel"
depends="qt6-svg"
short_desc="Free software alternative to µtorrent"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="GPL-2.0-or-later"
@ -19,38 +16,30 @@ distfiles="${SOURCEFORGE_SITE}/qbittorrent/qbittorrent-${version}.tar.xz"
checksum=89cd79f58af4db346a9744e4bf61181c4bd40cce201b79a9f54ac31a8676e921
CXXFLAGS=-std=gnu++17
do_extract() {
local n=${pkgname}-${version}
mkdir -p build-nox build-x11
vsrcextract -C build-x11 ${n}.tar.xz
vsrcextract -C build-nox ${n}.tar.xz
post_configure() { # qbittorrent-nox
configure_args="${configure_args//DGUI=ON/DGUI=OFF}"
configure_args="${configure_args//DWEBUI=OFF/DWEBUI=ON}"
(
cmake_builddir="nox-build"
do_configure
)
}
do_configure() {
cd ${wrksrc}/build-x11
./bootstrap.sh
QT_QMAKE=${XBPS_WRAPPERDIR} ./configure ${configure_args} --enable-gui --disable-webui
cd ${wrksrc}/build-nox
./bootstrap.sh
QT_QMAKE=${XBPS_WRAPPERDIR} ./configure ${configure_args} --disable-gui --enable-webui
post_build() { # qbittorrent-nox
(
cmake_builddir="nox-build"
do_build
)
}
do_build() {
cd ${wrksrc}/build-x11
make ${makejobs} CC="$CC" CXX="$CXX" LINK="$CXX"
cd ${wrksrc}/build-nox
make ${makejobs} CC="$CC" CXX="$CXX" LINK="$CXX"
}
do_install() {
cd ${wrksrc}/build-x11
make ${makejobs} INSTALL_ROOT=${DESTDIR} install
post_install() { # qbittorrent-nox
(
DESTDIR="${DESTDIR/qbittorrent/qbittorrent-nox}"
cmake_builddir="nox-build"
do_install
)
}
qbittorrent-nox_package() {
short_desc+=" - no X11"
pkg_install() {
cd ${wrksrc}/build-nox
make ${makejobs} INSTALL_ROOT=${PKGDESTDIR} install
}
}