qbittorrent: build qbittorrent-nox

Build both, the X11 and the no-X11 versions of qbittorrent.

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
Jürgen Buchmüller 2018-08-03 20:46:54 +02:00
parent 5b18b99477
commit ccd7430285
No known key found for this signature in database
GPG Key ID: 6764EC32352D0647
2 changed files with 54 additions and 30 deletions

View File

@ -1,10 +0,0 @@
--- src/app/qtsingleapplication/qtlocalpeer.cpp 2015-05-10 03:31:33.000000000 +0200
+++ src/app/qtsingleapplication/qtlocalpeer.cpp 2015-07-11 11:09:17.135167272 +0200
@@ -42,6 +42,7 @@
#include "qtlocalpeer.h"
#include <QCoreApplication>
#include <QTime>
+#include <QDataStream>
#if defined(Q_OS_WIN)
#include <QLibrary>

View File

@ -1,14 +1,15 @@
# Template file for 'qbittorrent' # Template file for 'qbittorrent'
pkgname=qbittorrent pkgname=qbittorrent
version=4.1.1 version=4.1.1
revision=3 revision=4
create_wrksrc=yes
build_style=qmake build_style=qmake
hostmakedepends="automake libtool pkg-config qt5-host-tools qt5-tools" hostmakedepends="automake libtool pkg-config qt5-host-tools qt5-tools"
makedepends="libtorrent-rasterbar-devel qt5-declarative-devel qt5-svg-devel" makedepends="libtorrent-rasterbar-devel qt5-declarative-devel qt5-svg-devel"
depends="qt5-svg" depends="qt5-svg"
short_desc="Free software alternative to µtorrent" short_desc="Free software alternative to µtorrent"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>" maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2" license="GPL-2.0-or-later"
homepage="http://www.qbittorrent.org/" homepage="http://www.qbittorrent.org/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.xz" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=8edc7a7fff8aa45e7bf763c91f30e064e1d7acd3f6efecb12fee420b75457ee7 checksum=8edc7a7fff8aa45e7bf763c91f30e064e1d7acd3f6efecb12fee420b75457ee7
@ -17,27 +18,60 @@ if [ -n "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-declarative-devel qt5-svg-devel" hostmakedepends+=" qt5-declarative-devel qt5-svg-devel"
fi fi
build_options="gui webui" do_extract() {
desc_option_gui="Enable the graphical user interface" local n=${pkgname}-${version}
desc_option_webui="Enable the web user interface" mkdir build-nox build-x11
build_options_default="gui" tar xf ${XBPS_SRCDISTDIR}/${n}/${n}.tar.xz --strip-components=1 -C build-x11
tar xf ${XBPS_SRCDISTDIR}/${n}/${n}.tar.xz --strip-components=1 -C build-nox
}
pre_configure() { do_configure() {
local conf="--prefix=/usr" local opts="--prefix=/usr" build opts
conf+=" --disable-systemd" opts+=" --disable-systemd"
conf+=" --with-boost=${XBPS_CROSS_BASE}/usr" opts+=" --with-boost=${XBPS_CROSS_BASE}/usr"
conf+=" --with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib" opts+=" --with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib"
if [ -n "$CROSS_BUILD" ]; then if [ -n "$CROSS_BUILD" ]; then
conf+=" --host=${XBPS_CROSS_TRIPLET}" opts+=" --host=${XBPS_CROSS_TRIPLET}"
fi fi
./bootstrap.sh for f in build-x11:--enable-gui:--disable-webui \
./configure ${conf} $(vopt_enable gui) $(vopt_enable webui) build-nox:--disable-gui:--enable-webui; do
build=${f%%:*}
f=${f#*:}
opts+=" ${f/:/ }"
cd ${wrksrc}/${build}
./bootstrap.sh
./configure ${opts}
qmake-qt5 ${configure_args} \
PREFIX=/usr \
LIB=/usr/lib \
QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX \
QMAKE_CFLAGS="${CFLAGS}" \
QMAKE_CXXFLAGS="${CXXFLAGS}" \
QMAKE_LFLAGS="${LDFLAGS}"
sed -i src/Makefile \
-e "s;^\(CC\\s*=\) .*;\1 $CC;" \
-e "s;^\(CXX\\s*=\) .*;\1 $CXX;" \
-e "s;^\(LINK\\s*=\) .*;\1 $CXX;" \
-e "s;@g++ ;@$CXX ;"
done
} }
post_configure() { do_build() {
sed -i src/Makefile \ cd ${wrksrc}/build-x11
-e "s;^\(CC\\s*=\) .*;\1 $CC;" \ make ${makejobs}
-e "s;^\(CXX\\s*=\) .*;\1 $CXX;" \ cd ${wrksrc}/build-nox
-e "s;^\(LINK\\s*=\) .*;\1 $CXX;" \ make ${makejobs}
-e "s;@g++ ;@$CXX ;" }
do_install() {
cd ${wrksrc}/build-x11
make ${makejobs} INSTALL_ROOT=${DESTDIR} install
}
qbittorrent-nox_package() {
short_desc=" - no X11"
pkg_install() {
cd ${wrksrc}/build-nox
make ${makejobs} INSTALL_ROOT=${PKGDESTDIR} install
}
} }