summaryrefslogtreecommitdiff
path: root/net-p2p/qbittorrent/qbittorrent-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /net-p2p/qbittorrent/qbittorrent-9999.ebuild
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
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
}