diff options
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/qbittorrent/qbittorrent-4.5.5-r2.ebuild | 142 | ||||
-rw-r--r-- | net-p2p/qbittorrent/qbittorrent-4.6.2-r1.ebuild (renamed from net-p2p/qbittorrent/qbittorrent-4.6.2.ebuild) | 15 | ||||
-rw-r--r-- | net-p2p/qbittorrent/qbittorrent-9999.ebuild | 13 |
3 files changed, 161 insertions, 9 deletions
diff --git a/net-p2p/qbittorrent/qbittorrent-4.5.5-r2.ebuild b/net-p2p/qbittorrent/qbittorrent-4.5.5-r2.ebuild new file mode 100644 index 000000000000..fb5b46da02b2 --- /dev/null +++ b/net-p2p/qbittorrent/qbittorrent-4.5.5-r2.ebuild @@ -0,0 +1,142 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake edo multibuild systemd xdg + +DESCRIPTION="BitTorrent client in C++ and Qt" +HOMEPAGE="https://www.qbittorrent.org" + +if [[ ${PV} == *9999 ]]; then + EGIT_REPO_URI="https://github.com/qbittorrent/qBittorrent.git" + inherit git-r3 +else + SRC_URI="https://github.com/qbittorrent/qBittorrent/archive/release-${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" + S="${WORKDIR}"/qBittorrent-release-${PV} +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+dbus +gui qt6 test webui systemd" +RESTRICT="!test? ( test )" +REQUIRED_USE="|| ( gui webui )" + +RDEPEND=" + >=dev-libs/openssl-1.1.1:= + >=net-libs/libtorrent-rasterbar-1.2.18:= + >=sys-libs/zlib-1.2.11 + virtual/libiconv + gui? ( + dev-libs/geoip + !qt6? ( + dev-qt/qtgui:5 + dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + dbus? ( dev-qt/qtdbus:5 ) + ) + qt6? ( + dev-qt/qtbase:6[dbus?,gui,widgets] + dev-qt/qtsvg:6 + ) + ) + qt6? ( dev-qt/qtbase:6[network,ssl,sql,sqlite,xml(+)] ) + !qt6? ( + dev-qt/qtcore:5 + dev-qt/qtnetwork:5[ssl] + dev-qt/qtsql:5[sqlite] + dev-qt/qtxml:5 + ) + webui? ( + acct-group/qbittorrent + acct-user/qbittorrent + ) +" +DEPEND=" + ${RDEPEND} + dev-libs/boost + test? ( + !qt6? ( dev-qt/qttest:5 ) + )" +BDEPEND=" + !qt6? ( dev-qt/linguist-tools:5 ) + qt6? ( dev-qt/qttools:6[linguist] ) + virtual/pkgconfig" + +DOCS=( AUTHORS Changelog CONTRIBUTING.md README.md ) + +src_prepare() { + MULTIBUILD_VARIANTS=() + use gui && MULTIBUILD_VARIANTS+=( gui ) + use webui && MULTIBUILD_VARIANTS+=( nogui ) + + cmake_src_prepare +} + +src_configure() { + my_src_configure() { + local mycmakeargs=( + # musl lacks execinfo.h + -DSTACKTRACE=$(usex !elibc_musl) + + # More verbose build logs are preferable for bug reports + -DVERBOSE_CONFIGURE=ON + + -DQT6=$(usex qt6) + + -DWEBUI=$(usex webui) + + -DTESTING=$(usex test) + ) + + if [[ ${MULTIBUILD_VARIANT} == "gui" ]]; then + # We do this in multibuild, see bug #839531 for why. + # Fedora has to do the same thing. + mycmakeargs+=( + -DGUI=ON + -DDBUS=$(usex dbus) + -DSYSTEMD=OFF + ) + else + mycmakeargs+=( + -DGUI=OFF + -DDBUS=OFF + ) + + use systemd && mycmakeargs+=( + # The systemd service calls qbittorrent-nox, which is only + # installed when GUI=OFF. + -DSYSTEMD=ON + -DSYSTEMD_SERVICES_INSTALL_DIR="$(systemd_get_systemunitdir)" + ) + fi + + cmake_src_configure + } + + multibuild_foreach_variant my_src_configure +} + +src_compile() { + multibuild_foreach_variant cmake_src_compile +} + +src_test() { + my_src_test() { + cd "${BUILD_DIR}"/test || die + edo ctest . + } + + multibuild_foreach_variant my_src_test +} + +src_install() { + multibuild_foreach_variant cmake_src_install + einstalldocs + + if use webui; then + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + fi +} diff --git a/net-p2p/qbittorrent/qbittorrent-4.6.2.ebuild b/net-p2p/qbittorrent/qbittorrent-4.6.2-r1.ebuild index f3b8bfcb67b6..60d5656adf61 100644 --- a/net-p2p/qbittorrent/qbittorrent-4.6.2.ebuild +++ b/net-p2p/qbittorrent/qbittorrent-4.6.2-r1.ebuild @@ -24,8 +24,6 @@ RESTRICT="!test? ( test )" REQUIRED_USE="|| ( gui webui )" RDEPEND=" - acct-group/qbittorrent - acct-user/qbittorrent >=dev-libs/openssl-1.1.1:= >=net-libs/libtorrent-rasterbar-1.2.19:= >=sys-libs/zlib-1.2.11 @@ -47,7 +45,12 @@ RDEPEND=" >=dev-qt/qtbase-6.2:6[dbus?,gui,widgets] >=dev-qt/qtsvg-6.2:6 ) - )" + ) + webui? ( + acct-group/qbittorrent + acct-user/qbittorrent + ) +" DEPEND=" ${RDEPEND} >=dev-libs/boost-1.71 @@ -126,6 +129,8 @@ src_install() { multibuild_foreach_variant cmake_src_install einstalldocs - newconfd "${FILESDIR}/${PN}.confd" "${PN}" - newinitd "${FILESDIR}/${PN}.initd" "${PN}" + if use webui; then + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + fi } diff --git a/net-p2p/qbittorrent/qbittorrent-9999.ebuild b/net-p2p/qbittorrent/qbittorrent-9999.ebuild index d2fd716fffa9..7c839c086c0b 100644 --- a/net-p2p/qbittorrent/qbittorrent-9999.ebuild +++ b/net-p2p/qbittorrent/qbittorrent-9999.ebuild @@ -48,8 +48,11 @@ RDEPEND=" dev-qt/qtsql:5[sqlite] dev-qt/qtxml:5 ) - acct-group/qbittorrent - acct-user/qbittorrent" + webui? ( + acct-group/qbittorrent + acct-user/qbittorrent + ) +" DEPEND=" ${RDEPEND} dev-libs/boost @@ -132,6 +135,8 @@ src_install() { multibuild_foreach_variant cmake_src_install einstalldocs - newconfd "${FILESDIR}/${PN}.confd" "${PN}" - newinitd "${FILESDIR}/${PN}.initd" "${PN}" + if use webui; then + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + fi } |