diff --git a/srcpkgs/qbittorrent/template b/srcpkgs/qbittorrent/template index ea1163ab87..56e64d4f59 100644 --- a/srcpkgs/qbittorrent/template +++ b/srcpkgs/qbittorrent/template @@ -4,7 +4,7 @@ version=4.1.6 revision=1 create_wrksrc=yes build_style=qmake -hostmakedepends="automake libtool pkg-config qt5-host-tools qt5-tools" +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" short_desc="Free software alternative to µtorrent" @@ -15,12 +15,12 @@ distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.xz" checksum=25c629381454814c9d897693162482de8a049de8745680922b012d46377756a8 if [ "$CROSS_BUILD" ]; then - hostmakedepends+=" qt5-declarative-devel qt5-svg-devel" + hostmakedepends+=" qt5-svg-devel" fi do_extract() { local n=${pkgname}-${version} - mkdir build-nox build-x11 + mkdir -p build-nox build-x11 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 } @@ -41,26 +41,48 @@ do_configure() { cd ${wrksrc}/${build} ./bootstrap.sh ./configure ${opts} - qmake-qt5 ${configure_args} \ + cat > qt.conf <<_EOF +[Paths] +Sysroot=${XBPS_CROSS_BASE} +Prefix=${XBPS_CROSS_BASE}/usr +ArchData=${XBPS_CROSS_BASE}/usr/lib/qt5 +Data=${XBPS_CROSS_BASE}/usr/share/qt5 +Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt5 +Headers=${XBPS_CROSS_BASE}/usr/include/qt5 +Libraries=${XBPS_CROSS_BASE}/usr/lib +LibraryExecutables=/usr/lib/qt5/libexec +Binaries=/usr/lib/qt5/bin +Tests=${XBPS_CROSS_BASE}/usr/tests +Plugins=/usr/lib/qt5/plugins +Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/imports +Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/qml +Translations=${XBPS_CROSS_BASE}/usr/share/qt5/translations +Settings=${XBPS_CROSS_BASE}/etc/xdg +Examples=${XBPS_CROSS_BASE}/usr/share/qt5/examples +HostPrefix=/usr +HostData=/usr/lib/qt5 +HostBinaries=/usr/lib/qt5/bin +HostLibraries=/usr/lib +Spec=linux-g++ +TargetSpec=linux-g++ +_EOF + 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}" - vsed -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 ;" + QMAKE_LFLAGS="${LDFLAGS}" \ + -qtconf qt.conf + vsed -i src/Makefile -e "s; /usr/lib/libQt5; ${XBPS_CROSS_BASE}/usr/lib/libQt5;g" done } do_build() { cd ${wrksrc}/build-x11 - make ${makejobs} + make ${makejobs} CC="$CC" CXX="$CXX" LINK="$CXX" cd ${wrksrc}/build-nox - make ${makejobs} + make ${makejobs} CC="$CC" CXX="$CXX" LINK="$CXX" } do_install() {