summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-23 23:12:32 +0100
committerSam James <sam@gentoo.org>2022-05-23 23:12:32 +0100
commitdedbdc466c8e0bdac003e60c0f158548967dc348 (patch)
tree4f2ccf0cb99e2ce0f6d2e90b64aea474562359de /net-p2p/qbittorrent/qbittorrent-9999.ebuild
parentsci-libs/gdal: needs hdf5[cxx] (diff)
downloadgentoo-dedbdc466c8e0bdac003e60c0f158548967dc348.tar.gz
gentoo-dedbdc466c8e0bdac003e60c0f158548967dc348.tar.bz2
gentoo-dedbdc466c8e0bdac003e60c0f158548967dc348.zip
net-p2p/qbittorrent: add 4.4.3
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-p2p/qbittorrent/qbittorrent-9999.ebuild')
-rw-r--r--net-p2p/qbittorrent/qbittorrent-9999.ebuild69
1 files changed, 51 insertions, 18 deletions
diff --git a/net-p2p/qbittorrent/qbittorrent-9999.ebuild b/net-p2p/qbittorrent/qbittorrent-9999.ebuild
index 85869e0799fd..e66a7bbca615 100644
--- a/net-p2p/qbittorrent/qbittorrent-9999.ebuild
+++ b/net-p2p/qbittorrent/qbittorrent-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit cmake systemd xdg
+inherit cmake multibuild systemd xdg
DESCRIPTION="BitTorrent client in C++ and Qt"
HOMEPAGE="https://www.qbittorrent.org
@@ -21,7 +21,8 @@ fi
LICENSE="GPL-2"
SLOT="0"
IUSE="+dbus +gui webui"
-REQUIRED_USE="dbus? ( gui )"
+REQUIRED_USE="dbus? ( gui )
+ || ( gui webui )"
RDEPEND="
>=dev-libs/boost-1.65.0-r1:=
@@ -45,30 +46,62 @@ BDEPEND="dev-qt/linguist-tools:5
DOCS=( AUTHORS Changelog CONTRIBUTING.md README.md TODO )
+src_prepare() {
+ MULTIBUILD_VARIANTS=( base )
+ use webui && MULTIBUILD_VARIANTS+=( webui )
+
+ cmake_src_prepare
+}
+
src_configure() {
- local mycmakeargs=(
- -DDBUS=$(usex dbus)
- -DGUI=$(usex gui)
- -DWEBUI=$(usex webui)
+ multibuild_src_configure() {
+ local mycmakeargs=(
+ -DDBUS=$(usex dbus)
+
+ # musl lacks execinfo.h
+ -DSTACKTRACE=$(usex !elibc_musl)
+
+ # We always want to install unit files
+ -DSYSTEMD=ON
+ -DSYSTEMD_SERVICES_INSTALL_DIR=$(systemd_get_systemunitdir)
- # musl lacks execinfo.h
- -DSTACKTRACE=$(usex !elibc_musl)
+ # More verbose build logs are preferable for bug reports
+ -DVERBOSE_CONFIGURE=ON
- # We always want to install unit files
- -DSYSTEMD=ON
- -DSYSTEMD_SERVICES_INSTALL_DIR=$(systemd_get_systemunitdir)
+ # Not yet in ::gentoo
+ -DQT6=OFF
- # More verbose build logs are preferable for bug reports
- -DVERBOSE_CONFIGURE=ON
+ # We do these in multibuild, see bug #839531 for why.
+ # Fedora has to do the same thing.
+ -DGUI=$(usex gui)
+ )
- # Not yet in ::gentoo
- -DQT6=OFF
- )
+ if [[ ${MULTIBUILD_VARIANT} == webui ]] ; then
+ mycmakeargs+=(
+ -DGUI=OFF
+ -DWEBUI=ON
+ )
+ else
+ mycmakeargs+=( -DWEBUI=OFF )
+ fi
- cmake_src_configure
+ cmake_src_configure
+ }
+
+ multibuild_foreach_variant multibuild_src_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake_src_compile
}
src_install() {
- cmake_src_install
+ multibuild_foreach_variant cmake_src_install
+
+ if ! use webui ; then
+ # No || die deliberately as it doesn't always exist
+ rm "${D}/$(systemd_get_systemunitdir)"/qbittorrent-nox*.service
+ fi
+
einstalldocs
}