qbittorrent: build-style is gnu-configure

This commit is contained in:
Đoàn Trần Công Danh 2021-03-03 21:42:43 +07:00
parent 150ddcc8ff
commit dce5ccb0af

View file

@ -3,7 +3,10 @@ pkgname=qbittorrent
version=4.3.3
revision=2
create_wrksrc=yes
build_style=qmake
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"
@ -15,10 +18,6 @@ changelog="https://www.qbittorrent.org/news.php"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=5966fdceab877fa3fedd9776a5f8ec6ce55308048e1d4a16b819d9b650dbc137
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-svg-devel"
fi
do_extract() {
local n=${pkgname}-${version}
mkdir -p build-nox build-x11
@ -27,57 +26,12 @@ do_extract() {
}
do_configure() {
local opts="--prefix=/usr" build opts
opts+=" --disable-systemd"
opts+=" --with-boost=${XBPS_CROSS_BASE}/usr"
opts+=" --with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib"
if [ "$CROSS_BUILD" ]; then
opts+=" --host=${XBPS_CROSS_TRIPLET}"
fi
for f in build-x11:--enable-gui:--disable-webui \
build-nox:--disable-gui:--enable-webui; do
build=${f%%:*}
f=${f#*:}
opts+=" ${f/:/ }"
cd ${wrksrc}/${build}
./bootstrap.sh
./configure ${opts}
echo "[Paths]" > qt.conf
echo "Sysroot=${XBPS_CROSS_BASE}" >> qt.conf
echo "Prefix=${XBPS_CROSS_BASE}/usr" >> qt.conf
echo "ArchData=${XBPS_CROSS_BASE}/usr/lib/qt5" >> qt.conf
echo "Data=${XBPS_CROSS_BASE}/usr/share/qt5" >> qt.conf
echo "Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt5" >> qt.conf
echo "Headers=${XBPS_CROSS_BASE}/usr/include/qt5" >> qt.conf
echo "Libraries=${XBPS_CROSS_BASE}/usr/lib" >> qt.conf
echo "LibraryExecutables=/usr/lib/qt5/libexec" >> qt.conf
echo "Binaries=/usr/lib/qt5/bin" >> qt.conf
echo "Tests=${XBPS_CROSS_BASE}/usr/tests" >> qt.conf
echo "Plugins=/usr/lib/qt5/plugins" >> qt.conf
echo "Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/imports" >> qt.conf
echo "Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/qml" >> qt.conf
echo "Translations=${XBPS_CROSS_BASE}/usr/share/qt5/translations" >> qt.conf
echo "Settings=${XBPS_CROSS_BASE}/etc/xdg" >> qt.conf
echo "Examples=${XBPS_CROSS_BASE}/usr/share/qt5/examples" >> qt.conf
echo "HostPrefix=/usr" >> qt.conf
echo "HostData=/usr/lib/qt5" >> qt.conf
echo "HostBinaries=/usr/lib/qt5/bin" >> qt.conf
echo "HostLibraries=/usr/lib" >> qt.conf
echo "Spec=linux-g++" >> qt.conf
echo "TargetSpec=linux-g++" >> qt.conf
qmake-qt5 \
PREFIX=/usr \
LIB=/usr/lib \
QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX \
QMAKE_CFLAGS="${CFLAGS}" \
QMAKE_CXXFLAGS="${CXXFLAGS}" \
QMAKE_LFLAGS="${LDFLAGS}" \
-qtconf qt.conf
if [ "${XBPS_CROSS_BASE}" ]; then
vsed -i src/Makefile \
-e "s; /usr/lib/libQt5; ${XBPS_CROSS_BASE}/usr/lib/libQt5;g"
fi
done
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
}
do_build() {