summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/deluge')
-rw-r--r--net-p2p/deluge/Manifest2
-rw-r--r--net-p2p/deluge/deluge-1.3.15-r2.ebuild143
-rw-r--r--net-p2p/deluge/deluge-1.3.15-r3.ebuild134
-rw-r--r--net-p2p/deluge/deluge-1.3.9999.ebuild134
-rw-r--r--net-p2p/deluge/deluge-2.1.1-r1.ebuild170
-rw-r--r--net-p2p/deluge/deluge-2.1.1-r4.ebuild178
-rw-r--r--net-p2p/deluge/deluge-9999.ebuild181
-rw-r--r--net-p2p/deluge/files/deluge-1.3.12-fix_scheduler_plugin.patch22
-rw-r--r--net-p2p/deluge/files/deluge-1.3.15-r1-fix-preferences-ui.patch32
-rw-r--r--net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch42
-rw-r--r--net-p2p/deluge/files/deluge-2.1.1-ayatana.patch17
-rw-r--r--net-p2p/deluge/files/deluge-2.1.1-consoleui-deferred.patch13
-rw-r--r--net-p2p/deluge/files/deluge-2.1.1-twisted-22.10.patch31
-rw-r--r--net-p2p/deluge/files/deluge-web.init-2 (renamed from net-p2p/deluge/files/deluge-web.init)4
-rw-r--r--net-p2p/deluge/files/deluge-web.service-3 (renamed from net-p2p/deluge/files/deluge-web.service-2)3
-rw-r--r--net-p2p/deluge/files/deluge-web.service-410
-rw-r--r--net-p2p/deluge/metadata.xml22
17 files changed, 540 insertions, 598 deletions
diff --git a/net-p2p/deluge/Manifest b/net-p2p/deluge/Manifest
index 9f49e45f37be..640b58957ce0 100644
--- a/net-p2p/deluge/Manifest
+++ b/net-p2p/deluge/Manifest
@@ -1 +1 @@
-DIST deluge-1.3.15.tar.bz2 1775913 BLAKE2B 9d5224766051d52b6e075dcafab5716793081c78ba69da616fc98f2c463ddc7676b2c2ce8f54b81e1480cf4344582245733033cf5927a9692bc43ec0a23f0001 SHA512 1d0f93a8c5081b807a390f79101d7f26751b0dfc47efe4c3573541014f9e5969461e2d421d17646c17fb81eb4f66f25f5ddce63b9bd226989adb7d7506146bda
+DIST deluge-2.1.1.tar.xz 2541968 BLAKE2B 3fe59ad8b402281dd0e19504d10a8d9e2967911e9967613a0d5a146d9ca261cb59d2208f8bd529e7f1da824e125ffb590d12b337dd9655e78b54252b021ae8da SHA512 e94208981aee45f42b88e1c544b07e7b0d0f2c4ade6b7f37257b69d4a3394c89aff217cde699e79ad59de6d2ee4eca7a558f2b85505d2140ba73f1f76f184455
diff --git a/net-p2p/deluge/deluge-1.3.15-r2.ebuild b/net-p2p/deluge/deluge-1.3.15-r2.ebuild
deleted file mode 100644
index f49c58d5c41a..000000000000
--- a/net-p2p/deluge/deluge-1.3.15-r2.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 )
-DISTUTILS_SINGLE_IMPL=1
-PLOCALES="af ar ast be bg bn bs ca cs cy da de el en_AU en_CA en_GB eo es et eu fa fi fo fr fy ga gl he hi hr hu id is it iu ja ka kk km kn ko ku ky la lb lt lv mk ml ms nap nb nds nl nn oc pl pms pt pt_BR ro ru si sk sl sr sv ta te th tl tlh tr uk ur vi zh_CN zh_HK zh_TW"
-inherit distutils-r1 eutils systemd user l10n
-
-DESCRIPTION="BitTorrent client with a client/server model"
-HOMEPAGE="https://deluge-torrent.org/"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="git://deluge-torrent.org/${PN}.git
- http://git.deluge-torrent.org/${PN}"
- SRC_URI=""
-else
- SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
- KEYWORDS="amd64 ~arm ~ppc ~sparc x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="console geoip gtk libnotify sound webinterface"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- sound? ( gtk )
- libnotify? ( gtk )
-"
-PATCHES=(
- "${FILESDIR}/${PN}-1.3.5-disable_libtorrent_internal_copy.patch"
- "${FILESDIR}/${PN}-1.3.15-r1-fix-preferences-ui.patch"
-)
-
-CDEPEND="net-libs/libtorrent-rasterbar[python,${PYTHON_USEDEP}]"
-DEPEND="${CDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]
- dev-util/intltool"
-RDEPEND="${CDEPEND}
- dev-python/chardet[${PYTHON_USEDEP}]
- dev-python/pyopenssl[${PYTHON_USEDEP}]
- dev-python/pyxdg[${PYTHON_USEDEP}]
- dev-python/setproctitle[${PYTHON_USEDEP}]
- || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
- (
- >=dev-python/twisted-core-13.0[${PYTHON_USEDEP}]
- >=dev-python/twisted-web-13.0[${PYTHON_USEDEP}]
- )
- )
- geoip? ( dev-python/geoip-python[${PYTHON_USEDEP}] )
- gtk? (
- sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
- dev-python/pygobject:2[${PYTHON_USEDEP}]
- >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
- gnome-base/librsvg
- libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
- )
- webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
-
-python_prepare_all() {
- local args=(
- -e "/Compiling po file/a \\\tuptoDate = False"
- )
- sed -i "${args[@]}" -- 'setup.py' || die
- args=(
- -e 's|"new_release_check": True|"new_release_check": False|'
- -e 's|"check_new_releases": True|"check_new_releases": False|'
- -e 's|"show_new_releases": True|"show_new_releases": False|'
- )
- sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
-
- local loc_dir="${S}/deluge/i18n"
- l10n_find_plocales_changes "${loc_dir}" "" ".po"
- rm_loc() {
- rm -vf "${loc_dir}/${1}.po" || die
- }
- l10n_for_each_disabled_locale_do rm_loc
-
- distutils-r1_python_prepare_all
-}
-
-esetup.py() {
- # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
- # Override this call from the distutils-r1 eclass.
- # This does not respect the distutils-r1 API. DONOT copy this example.
- set -- "${PYTHON}" setup.py "$@"
- echo "$@"
- "$@" || die
-}
-
-python_install_all() {
- distutils-r1_python_install_all
- if ! use console ; then
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/console/" || die
- rm -f "${D}/usr/bin/deluge-console" || die
- rm -f "${D}/usr/share/man/man1/deluge-console.1" ||die
- fi
- if ! use gtk ; then
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/gtkui/" || die
- rm -rf "${D}/usr/share/icons/" || die
- rm -f "${D}/usr/bin/deluge-gtk" || die
- rm -f "${D}/usr/share/man/man1/deluge-gtk.1" || die
- rm -f "${D}/usr/share/applications/deluge.desktop" || die
- fi
- if use webinterface; then
- newinitd "${FILESDIR}/deluge-web.init" deluge-web
- newconfd "${FILESDIR}/deluge-web.conf" deluge-web
- systemd_newunit "${FILESDIR}/deluge-web.service-2" deluge-web.service
- systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
- else
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/web/" || die
- rm -f "${D}/usr/bin/deluge-web" || die
- rm -f "${D}/usr/share/man/man1/deluge-web.1" || die
- fi
- newinitd "${FILESDIR}"/deluged.init-2 deluged
- newconfd "${FILESDIR}"/deluged.conf-2 deluged
- systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
- systemd_install_serviced "${FILESDIR}"/deluged.service.conf
-}
-
-pkg_postinst() {
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
- elog
- elog "If, after upgrading, deluge doesn't work, please remove the"
- elog "'~/.config/deluge' directory and try again, but make a backup"
- elog "first!"
- elog
- elog "To start the daemon either run 'deluged' as user"
- elog "or modify /etc/conf.d/deluged and run"
- elog "/etc/init.d/deluged start as root"
- elog "You can still use deluge the old way"
- elog
- elog "Systemd unit files for deluged and deluge-web no longer source"
- elog "/etc/conf.d/deluge* files. Environment variable customization now"
- elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
- elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
- elog
- elog "For more information look at https://dev.deluge-torrent.org/wiki/Faq"
- elog
-}
diff --git a/net-p2p/deluge/deluge-1.3.15-r3.ebuild b/net-p2p/deluge/deluge-1.3.15-r3.ebuild
deleted file mode 100644
index d3ef7813a7a0..000000000000
--- a/net-p2p/deluge/deluge-1.3.15-r3.ebuild
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-PYTHON_COMPAT=( python2_7 )
-DISTUTILS_SINGLE_IMPL=1
-inherit distutils-r1 systemd user
-
-DESCRIPTION="BitTorrent client with a client/server model"
-HOMEPAGE="https://deluge-torrent.org/"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="git://deluge-torrent.org/${PN}.git
- http://git.deluge-torrent.org/${PN}"
- SRC_URI=""
-else
- SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
- KEYWORDS="amd64 ~arm ~ppc ~sparc x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="console geoip gtk libnotify sound webinterface"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- sound? ( gtk )
- libnotify? ( gtk )
-"
-PATCHES=(
- "${FILESDIR}/${PN}-1.3.5-disable_libtorrent_internal_copy.patch"
- "${FILESDIR}/${PN}-1.3.15-r1-fix-preferences-ui.patch"
-)
-
-DEPEND="<net-libs/libtorrent-rasterbar-1.2[python,${PYTHON_USEDEP}]
- dev-python/setuptools[${PYTHON_USEDEP}]
- dev-util/intltool"
-RDEPEND="<net-libs/libtorrent-rasterbar-1.2[python,${PYTHON_USEDEP}]
- dev-python/chardet[${PYTHON_USEDEP}]
- dev-python/pyopenssl[${PYTHON_USEDEP}]
- dev-python/pyxdg[${PYTHON_USEDEP}]
- dev-python/setproctitle[${PYTHON_USEDEP}]
- || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
- (
- >=dev-python/twisted-core-13.0[${PYTHON_USEDEP}]
- >=dev-python/twisted-web-13.0[${PYTHON_USEDEP}]
- )
- )
- geoip? ( dev-python/geoip-python[${PYTHON_USEDEP}] )
- gtk? (
- sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
- dev-python/pygobject:2[${PYTHON_USEDEP}]
- >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
- gnome-base/librsvg
- libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
- )
- webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
-
-python_prepare_all() {
- local args=(
- -e "/Compiling po file/a \\\tuptoDate = False"
- )
- sed -i "${args[@]}" -- 'setup.py' || die
- args=(
- -e 's|"new_release_check": True|"new_release_check": False|'
- -e 's|"check_new_releases": True|"check_new_releases": False|'
- -e 's|"show_new_releases": True|"show_new_releases": False|'
- )
- sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
-
- distutils-r1_python_prepare_all
-}
-
-esetup.py() {
- # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
- # Override this call from the distutils-r1 eclass.
- # This does not respect the distutils-r1 API. DONOT copy this example.
- set -- "${PYTHON}" setup.py "$@"
- echo "$@"
- "$@" || die
-}
-
-python_install_all() {
- distutils-r1_python_install_all
- if ! use console ; then
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/console/" || die
- rm -f "${D}/usr/bin/deluge-console" || die
- rm -f "${D}/usr/share/man/man1/deluge-console.1" ||die
- fi
- if ! use gtk ; then
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/gtkui/" || die
- rm -rf "${D}/usr/share/icons/" || die
- rm -f "${D}/usr/bin/deluge-gtk" || die
- rm -f "${D}/usr/share/man/man1/deluge-gtk.1" || die
- rm -f "${D}/usr/share/applications/deluge.desktop" || die
- fi
- if use webinterface; then
- newinitd "${FILESDIR}/deluge-web.init" deluge-web
- newconfd "${FILESDIR}/deluge-web.conf" deluge-web
- systemd_newunit "${FILESDIR}/deluge-web.service-2" deluge-web.service
- systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
- else
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/web/" || die
- rm -f "${D}/usr/bin/deluge-web" || die
- rm -f "${D}/usr/share/man/man1/deluge-web.1" || die
- fi
- newinitd "${FILESDIR}"/deluged.init-2 deluged
- newconfd "${FILESDIR}"/deluged.conf-2 deluged
- systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
- systemd_install_serviced "${FILESDIR}"/deluged.service.conf
-}
-
-pkg_postinst() {
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
- elog
- elog "If, after upgrading, deluge doesn't work, please remove the"
- elog "'~/.config/deluge' directory and try again, but make a backup"
- elog "first!"
- elog
- elog "To start the daemon either run 'deluged' as user"
- elog "or modify /etc/conf.d/deluged and run"
- elog "/etc/init.d/deluged start as root"
- elog "You can still use deluge the old way"
- elog
- elog "Systemd unit files for deluged and deluge-web no longer source"
- elog "/etc/conf.d/deluge* files. Environment variable customization now"
- elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
- elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
- elog
- elog "For more information look at https://dev.deluge-torrent.org/wiki/Faq"
- elog
-}
diff --git a/net-p2p/deluge/deluge-1.3.9999.ebuild b/net-p2p/deluge/deluge-1.3.9999.ebuild
deleted file mode 100644
index 5abf8ffb3d04..000000000000
--- a/net-p2p/deluge/deluge-1.3.9999.ebuild
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-PYTHON_COMPAT=( python2_7 )
-DISTUTILS_SINGLE_IMPL=1
-inherit distutils-r1 systemd user
-
-DESCRIPTION="BitTorrent client with a client/server model"
-HOMEPAGE="https://deluge-torrent.org/"
-
-if [[ ${PV} == 1.3.9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="git://deluge-torrent.org/${PN}.git
- http://git.deluge-torrent.org/${PN}"
- EGIT_BRANCH="1.3-stable"
- SRC_URI=""
-else
- SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
- KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="console geoip gtk libnotify sound webinterface"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- sound? ( gtk )
- libnotify? ( gtk )
-"
-PATCHES=(
- "${FILESDIR}/${PN}-1.3.5-disable_libtorrent_internal_copy.patch"
-)
-
-DEPEND="<net-libs/libtorrent-rasterbar-1.2[python,${PYTHON_USEDEP}]
- dev-python/setuptools[${PYTHON_USEDEP}]
- dev-util/intltool"
-RDEPEND="<net-libs/libtorrent-rasterbar-1.2[python,${PYTHON_USEDEP}]
- dev-python/chardet[${PYTHON_USEDEP}]
- dev-python/pyopenssl[${PYTHON_USEDEP}]
- dev-python/pyxdg[${PYTHON_USEDEP}]
- dev-python/setproctitle[${PYTHON_USEDEP}]
- || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
- (
- >=dev-python/twisted-core-13.0[${PYTHON_USEDEP}]
- >=dev-python/twisted-web-13.0[${PYTHON_USEDEP}]
- )
- )
- geoip? ( dev-python/geoip-python[${PYTHON_USEDEP}] )
- gtk? (
- sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
- dev-python/pygobject:2[${PYTHON_USEDEP}]
- >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
- gnome-base/librsvg
- libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
- )
- webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
-
-python_prepare_all() {
- local args=(
- -e "/Compiling po file/a \\\tuptoDate = False"
- )
- sed -i "${args[@]}" -- 'setup.py' || die
- args=(
- -e 's|"new_release_check": True|"new_release_check": False|'
- -e 's|"check_new_releases": True|"check_new_releases": False|'
- -e 's|"show_new_releases": True|"show_new_releases": False|'
- )
- sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
-
- distutils-r1_python_prepare_all
-}
-
-esetup.py() {
- # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
- # Override this call from the distutils-r1 eclass.
- # This does not respect the distutils-r1 API. DONOT copy this example.
- set -- "${PYTHON}" setup.py "$@"
- echo "$@"
- "$@" || die
-}
-
-python_install_all() {
- distutils-r1_python_install_all
- if ! use console ; then
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/console/" || die
- rm -f "${D}/usr/bin/deluge-console" || die
- rm -f "${D}/usr/share/man/man1/deluge-console.1" ||die
- fi
- if ! use gtk ; then
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/gtkui/" || die
- rm -rf "${D}/usr/share/icons/" || die
- rm -f "${D}/usr/bin/deluge-gtk" || die
- rm -f "${D}/usr/share/man/man1/deluge-gtk.1" || die
- rm -f "${D}/usr/share/applications/deluge.desktop" || die
- fi
- if use webinterface; then
- newinitd "${FILESDIR}/deluge-web.init" deluge-web
- newconfd "${FILESDIR}/deluge-web.conf" deluge-web
- systemd_newunit "${FILESDIR}/deluge-web.service-2" deluge-web.service
- systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
- else
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/web/" || die
- rm -f "${D}/usr/bin/deluge-web" || die
- rm -f "${D}/usr/share/man/man1/deluge-web.1" || die
- fi
- newinitd "${FILESDIR}"/deluged.init-2 deluged
- newconfd "${FILESDIR}"/deluged.conf-2 deluged
- systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
- systemd_install_serviced "${FILESDIR}"/deluged.service.conf
-}
-
-pkg_postinst() {
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
- elog
- elog "If, after upgrading, deluge doesn't work, please remove the"
- elog "'~/.config/deluge' directory and try again, but make a backup"
- elog "first!"
- elog
- elog "To start the daemon either run 'deluged' as user"
- elog "or modify /etc/conf.d/deluged and run"
- elog "/etc/init.d/deluged start as root"
- elog "You can still use deluge the old way"
- elog
- elog "Systemd unit files for deluged and deluge-web no longer source"
- elog "/etc/conf.d/deluge* files. Environment variable customization now"
- elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
- elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
- elog
- elog "For more information look at https://dev.deluge-torrent.org/wiki/Faq"
- elog
-}
diff --git a/net-p2p/deluge/deluge-2.1.1-r1.ebuild b/net-p2p/deluge/deluge-2.1.1-r1.ebuild
new file mode 100644
index 000000000000..04ff97d96706
--- /dev/null
+++ b/net-p2p/deluge/deluge-2.1.1-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1 systemd xdg
+
+DESCRIPTION="BitTorrent client with a client/server model"
+HOMEPAGE="https://deluge-torrent.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.deluge-torrent.org/${PN}"
+else
+ SRC_URI="http://download.deluge-torrent.org/source/$(ver_cut 1-2)/${P}.tar.xz"
+ KEYWORDS="amd64 ~arm ~arm64 ~ppc ~riscv x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="console gui libnotify sound webinterface"
+REQUIRED_USE="
+ libnotify? ( gui )
+ sound? ( gui )
+"
+
+BDEPEND="
+ dev-util/intltool
+ test? (
+ $(python_gen_cond_dep '
+ >=dev-python/pytest-twisted-1.13.4-r1[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+RDEPEND="
+ acct-group/deluge
+ acct-user/deluge
+ net-libs/libtorrent-rasterbar:=[python,${PYTHON_SINGLE_USEDEP}]
+ $(python_gen_cond_dep '
+ gui? (
+ sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ gnome-base/librsvg
+ libnotify? ( x11-libs/libnotify )
+ )
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/distro[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/rencode[${PYTHON_USEDEP}]
+ dev-python/setproctitle[${PYTHON_USEDEP}]
+ || (
+ >=dev-python/twisted-17.1.0[ssl(-),${PYTHON_USEDEP}]
+ >=dev-python/twisted-17.1.0[crypt(-),${PYTHON_USEDEP}]
+ )
+ >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}]
+ dev-python/mako[${PYTHON_USEDEP}]
+ ')
+"
+
+PATCHES=( "${FILESDIR}/${P}-twisted-22.10.patch" )
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ local args=(
+ -e 's|"new_release_check": True|"new_release_check": False|'
+ -e 's|"check_new_releases": True|"check_new_releases": False|'
+ -e 's|"show_new_releases": True|"show_new_releases": False|'
+ )
+ sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ # Upstream CI/CD skips these and they seem to intentionally segfault to collect core dumps...
+ deluge/plugins/Stats/deluge_stats/tests/test_stats.py
+ # Skipped upstream
+ deluge/tests/test_security.py
+ )
+ local EPYTEST_DESELECT=(
+ # Skipped upstream
+ 'deluge/plugins/WebUi/deluge_webui/tests/test_plugin_webui.py::TestWebUIPlugin::test_enable_webui'
+ 'deluge/tests/test_torrent.py::TestTorrent::test_torrent_error_resume_data_unaltered'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_seo_svg_with_sni'
+ # never returns
+ 'deluge/tests/test_ui_entry.py::TestConsoleScriptEntryWithDaemon'
+ # failing network(?)-related tests, even with sandbox disabled
+ 'deluge/tests/test_common.py::TestCommon::test_is_interface'
+ # fails
+ 'deluge/tests/test_core.py::TestCore::test_pause_torrents'
+ # fails because of network sandbox
+ 'deluge/tests/test_core.py::TestCore::test_test_listen_port'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_deluge_png'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_hebrew'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_with_redirect'
+ # segfaults with FEATURES="network-sandbox"
+ 'deluge/tests/test_core.py::TestCore::test_pause_torrent'
+ )
+
+ # dev-python/pytest-twisted has disabled autoloading
+ epytest -m "not (todo or gtkui)" -p pytest_twisted -v
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if ! use console ; then
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/console/" || die
+ rm "${ED}/usr/bin/deluge-console" || die
+ rm "${ED}/usr/share/man/man1/deluge-console.1" ||die
+ fi
+ if ! use gui ; then
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/gtk3/" || die
+ rm -r "${ED}/usr/share/icons/" || die
+ rm "${ED}/usr/bin/deluge-gtk" || die
+ rm "${ED}/usr/share/man/man1/deluge-gtk.1" || die
+ else
+ mkdir -p "${ED}/usr/share/applications/" || die
+ cp "${WORKDIR}/${P}/deluge/ui/data/share/applications/deluge.desktop" "${ED}/usr/share/applications/" || die
+ mkdir -p "${ED}/usr/share/metainfo" || die
+ cp "${WORKDIR}/${P}/deluge/ui/data/share/appdata/deluge.appdata.xml" "${ED}/usr/share/metainfo/" || die
+ fi
+
+ if use webinterface; then
+ newinitd "${FILESDIR}/deluge-web.init-2" deluge-web
+ newconfd "${FILESDIR}/deluge-web.conf" deluge-web
+ systemd_newunit "${FILESDIR}/deluge-web.service-3" deluge-web.service
+ systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
+ else
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/web/" || die
+ rm "${ED}/usr/bin/deluge-web" || die
+ rm "${ED}/usr/share/man/man1/deluge-web.1" || die
+ fi
+
+ newinitd "${FILESDIR}"/deluged.init-2 deluged
+ newconfd "${FILESDIR}"/deluged.conf-2 deluged
+ systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
+ systemd_install_serviced "${FILESDIR}"/deluged.service.conf
+
+ python_optimize
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ elog
+ elog "If, after upgrading, deluge doesn't work please back up and then"
+ elog "remove your '~/.config/deluge' directory and try again"
+ elog
+ elog "To start the daemon either run 'deluged' as user"
+ elog "or modify /etc/conf.d/deluged and run"
+ elog "/etc/init.d/deluged start as root"
+ elog "You can still use deluge the old way"
+ elog
+ elog "Systemd unit files for deluged and deluge-web no longer source"
+ elog "/etc/conf.d/deluge* files. Environment variable customization now"
+ elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
+ elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
+ elog
+ elog "For more information see https://dev.deluge-torrent.org/wiki/Faq"
+ elog
+}
diff --git a/net-p2p/deluge/deluge-2.1.1-r4.ebuild b/net-p2p/deluge/deluge-2.1.1-r4.ebuild
new file mode 100644
index 000000000000..5f5ebcd7702f
--- /dev/null
+++ b/net-p2p/deluge/deluge-2.1.1-r4.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1 systemd xdg
+
+DESCRIPTION="BitTorrent client with a client/server model"
+HOMEPAGE="https://deluge-torrent.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.deluge-torrent.org/${PN}"
+else
+ SRC_URI="http://download.deluge-torrent.org/source/$(ver_cut 1-2)/${P}.tar.xz"
+ KEYWORDS="amd64 ~arm ~arm64 ~ppc ~riscv x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="console gui libnotify sound webinterface"
+REQUIRED_USE="
+ libnotify? ( gui )
+ sound? ( gui )
+"
+
+BDEPEND="
+ dev-util/intltool
+ test? (
+ $(python_gen_cond_dep '
+ >=dev-python/pytest-twisted-1.13.4-r1[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+RDEPEND="
+ acct-group/deluge
+ acct-user/deluge
+ net-libs/libtorrent-rasterbar:=[python,${PYTHON_SINGLE_USEDEP}]
+ $(python_gen_cond_dep '
+ gui? (
+ sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ gnome-base/librsvg
+ libnotify? ( x11-libs/libnotify )
+ )
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/distro[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/rencode[${PYTHON_USEDEP}]
+ dev-python/setproctitle[${PYTHON_USEDEP}]
+ || (
+ >=dev-python/twisted-17.1.0[ssl(-),${PYTHON_USEDEP}]
+ >=dev-python/twisted-17.1.0[crypt(-),${PYTHON_USEDEP}]
+ )
+ >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}]
+ dev-python/mako[${PYTHON_USEDEP}]
+ ')
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-twisted-22.10.patch"
+ # https://dev.deluge-torrent.org/ticket/3598
+ "${FILESDIR}/${P}-ayatana.patch"
+ # https://dev.deluge-torrent.org/ticket/3582
+ "${FILESDIR}/${P}-consoleui-deferred.patch"
+)
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ local args=(
+ -e 's|"new_release_check": True|"new_release_check": False|'
+ -e 's|"check_new_releases": True|"check_new_releases": False|'
+ -e 's|"show_new_releases": True|"show_new_releases": False|'
+ )
+ sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ # Upstream CI/CD skips these and they seem to intentionally segfault to collect core dumps...
+ deluge/plugins/Stats/deluge_stats/tests/test_stats.py
+ # Skipped upstream
+ deluge/tests/test_security.py
+ )
+ local EPYTEST_DESELECT=(
+ # Skipped upstream
+ 'deluge/plugins/WebUi/deluge_webui/tests/test_plugin_webui.py::TestWebUIPlugin::test_enable_webui'
+ 'deluge/tests/test_torrent.py::TestTorrent::test_torrent_error_resume_data_unaltered'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_seo_svg_with_sni'
+ # never returns
+ 'deluge/tests/test_ui_entry.py::TestConsoleScriptEntryWithDaemon'
+ # failing network(?)-related tests, even with sandbox disabled
+ 'deluge/tests/test_common.py::TestCommon::test_is_interface'
+ # fails
+ 'deluge/tests/test_core.py::TestCore::test_pause_torrents'
+ # fails because of network sandbox
+ 'deluge/tests/test_core.py::TestCore::test_test_listen_port'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_deluge_png'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_hebrew'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_with_redirect'
+ # segfaults with FEATURES="network-sandbox"
+ 'deluge/tests/test_core.py::TestCore::test_pause_torrent'
+ )
+
+ # dev-python/pytest-twisted has disabled autoloading
+ epytest -m "not (todo or gtkui)" -p pytest_twisted -v
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if ! use console ; then
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/console/" || die
+ rm "${ED}/usr/bin/deluge-console" || die
+ rm "${ED}/usr/share/man/man1/deluge-console.1" ||die
+ fi
+ if ! use gui ; then
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/gtk3/" || die
+ rm -r "${ED}/usr/share/icons/" || die
+ rm "${ED}/usr/bin/deluge-gtk" || die
+ rm "${ED}/usr/share/man/man1/deluge-gtk.1" || die
+ else
+ mkdir -p "${ED}/usr/share/applications/" || die
+ cp "${WORKDIR}/${P}/deluge/ui/data/share/applications/deluge.desktop" "${ED}/usr/share/applications/" || die
+ mkdir -p "${ED}/usr/share/metainfo" || die
+ cp "${WORKDIR}/${P}/deluge/ui/data/share/appdata/deluge.appdata.xml" "${ED}/usr/share/metainfo/" || die
+ fi
+
+ if use webinterface; then
+ newinitd "${FILESDIR}/deluge-web.init-2" deluge-web
+ newconfd "${FILESDIR}/deluge-web.conf" deluge-web
+ systemd_newunit "${FILESDIR}/deluge-web.service-4" deluge-web.service
+ systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
+ else
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/web/" || die
+ rm "${ED}/usr/bin/deluge-web" || die
+ rm "${ED}/usr/share/man/man1/deluge-web.1" || die
+ fi
+
+ newinitd "${FILESDIR}"/deluged.init-2 deluged
+ newconfd "${FILESDIR}"/deluged.conf-2 deluged
+ systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
+ systemd_install_serviced "${FILESDIR}"/deluged.service.conf
+
+ python_optimize
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ elog
+ elog "If, after upgrading, deluge doesn't work please back up and then"
+ elog "remove your '~/.config/deluge' directory and try again"
+ elog
+ elog "To start the daemon either run 'deluged' as user"
+ elog "or modify /etc/conf.d/deluged and run"
+ elog "'/etc/init.d/deluged start' as root if you use OpenRC"
+ elog "or"
+ elog "'systemctl start deluged.service' as root if you use systemd"
+ elog "You can still use deluge the old way"
+ elog
+ elog "Systemd unit files for deluged and deluge-web no longer source"
+ elog "/etc/conf.d/deluge* files. Environment variable customization now"
+ elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
+ elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
+ elog
+ elog "For more information see https://dev.deluge-torrent.org/wiki/Faq"
+ elog
+}
diff --git a/net-p2p/deluge/deluge-9999.ebuild b/net-p2p/deluge/deluge-9999.ebuild
index 7d98de7bce8b..f6ab3f627406 100644
--- a/net-p2p/deluge/deluge-9999.ebuild
+++ b/net-p2p/deluge/deluge-9999.ebuild
@@ -1,128 +1,157 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=8
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
-PLOCALES="af ar ast be bg bn bs ca cs cy da de el en_AU en_CA en_GB eo es et eu fa fi fo fr fy ga gl he hi hr hu id is it iu ja ka kk km kn ko ku ky la lb lt lv mk ml ms nap nb nds nl nn oc pl pms pt pt_BR ro ru si sk sl sr sv ta te th tl tlh tr uk ur vi zh_CN zh_HK zh_TW"
-inherit distutils-r1 eutils systemd user l10n
+inherit distutils-r1 systemd xdg
DESCRIPTION="BitTorrent client with a client/server model"
HOMEPAGE="https://deluge-torrent.org/"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
- EGIT_REPO_URI="git://deluge-torrent.org/${PN}.git
- http://git.deluge-torrent.org/${PN}"
- SRC_URI=""
+ EGIT_REPO_URI="https://git.deluge-torrent.org/${PN}"
else
- SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
- KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86"
+ SRC_URI="http://download.deluge-torrent.org/source/$(ver_cut 1-2)/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~riscv"
fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="console geoip gtk libnotify sound webinterface"
+IUSE="console gui libnotify sound webinterface"
REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- sound? ( gtk )
- libnotify? ( gtk )
+ libnotify? ( gui )
+ sound? ( gui )
"
-PATCHES=(
- "${FILESDIR}/${PN}-1.3.12-fix_scheduler_plugin.patch"
-)
-
-CDEPEND=">=net-libs/libtorrent-rasterbar-0.14.9[python,${PYTHON_USEDEP}]"
-DEPEND="${CDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]
- dev-util/intltool"
-RDEPEND="${CDEPEND}
- dev-python/chardet[${PYTHON_USEDEP}]
- dev-python/pyopenssl[${PYTHON_USEDEP}]
- dev-python/pyxdg[${PYTHON_USEDEP}]
- dev-python/setproctitle[${PYTHON_USEDEP}]
- || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
- >=dev-python/twisted-web-13.0[${PYTHON_USEDEP}]
- )
- geoip? ( dev-libs/geoip )
- gtk? (
- sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
- dev-python/pygobject:2[${PYTHON_USEDEP}]
- >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
- gnome-base/librsvg
- libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
+
+BDEPEND="
+ dev-util/intltool
+ test? (
+ $(python_gen_cond_dep '
+ >=dev-python/pytest-twisted-1.13.4-r1[${PYTHON_USEDEP}]
+ ')
)
- webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
+"
+
+RDEPEND="
+ acct-group/deluge
+ acct-user/deluge
+ net-libs/libtorrent-rasterbar:=[python,${PYTHON_SINGLE_USEDEP}]
+ $(python_gen_cond_dep '
+ gui? (
+ sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ gnome-base/librsvg
+ libnotify? ( x11-libs/libnotify )
+ )
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/distro[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/rencode[${PYTHON_USEDEP}]
+ dev-python/setproctitle[${PYTHON_USEDEP}]
+ || (
+ >=dev-python/twisted-17.1.0[ssl(-),${PYTHON_USEDEP}]
+ >=dev-python/twisted-17.1.0[crypt(-),${PYTHON_USEDEP}]
+ )
+ >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}]
+ dev-python/mako[${PYTHON_USEDEP}]
+ ')
+"
+
+distutils_enable_tests pytest
python_prepare_all() {
local args=(
- -e "/Compiling po file/a \\\tuptoDate = False"
- )
- sed -i "${args[@]}" -- 'setup.py' || die
- args=(
-e 's|"new_release_check": True|"new_release_check": False|'
-e 's|"check_new_releases": True|"check_new_releases": False|'
-e 's|"show_new_releases": True|"show_new_releases": False|'
)
sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
- local loc_dir="${S}/deluge/i18n"
- l10n_find_plocales_changes "${loc_dir}" "" ".po"
- rm_loc() {
- rm -vf "${loc_dir}/${1}.po" || die
- }
- l10n_for_each_disabled_locale_do rm_loc
-
distutils-r1_python_prepare_all
}
-esetup.py() {
- # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
- # Override this call from the distutils-r1 eclass.
- # This does not respect the distutils-r1 API. DONOT copy this example.
- set -- "${PYTHON}" setup.py "$@"
- echo "$@"
- "$@" || die
+python_test() {
+ local EPYTEST_IGNORE=(
+ # Upstream CI/CD skips these and they seem to intentionally segfault to collect core dumps...
+ deluge/plugins/Stats/deluge_stats/tests/test_stats.py
+ # Skipped upstream
+ deluge/tests/test_security.py
+ )
+ local EPYTEST_DESELECT=(
+ # Skipped upstream
+ 'deluge/plugins/WebUi/deluge_webui/tests/test_plugin_webui.py::TestWebUIPlugin::test_enable_webui'
+ 'deluge/tests/test_torrent.py::TestTorrent::test_torrent_error_resume_data_unaltered'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_seo_svg_with_sni'
+ # never returns
+ 'deluge/tests/test_ui_entry.py::TestConsoleScriptEntryWithDaemon'
+ # failing network(?)-related tests, even with sandbox disabled
+ 'deluge/tests/test_common.py::TestCommon::test_is_interface'
+ # fails
+ 'deluge/tests/test_core.py::TestCore::test_pause_torrents'
+ # fails because of network sandbox
+ 'deluge/tests/test_core.py::TestCore::test_test_listen_port'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_deluge_png'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_hebrew'
+ 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_with_redirect'
+ # segfaults with FEATURES="network-sandbox"
+ 'deluge/tests/test_core.py::TestCore::test_pause_torrent'
+ )
+
+ # dev-python/pytest-twisted has disabled autoloading
+ epytest -m "not (todo or gtkui)" -p pytest_twisted -v
}
python_install_all() {
distutils-r1_python_install_all
if ! use console ; then
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/console/" || die
- rm -f "${D}/usr/bin/deluge-console" || die
- rm -f "${D}/usr/share/man/man1/deluge-console.1" ||die
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/console/" || die
+ rm "${ED}/usr/bin/deluge-console" || die
+ rm "${ED}/usr/share/man/man1/deluge-console.1" ||die
fi
- if ! use gtk ; then
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/gtkui/" || die
- rm -rf "${D}/usr/share/icons/" || die
- rm -f "${D}/usr/bin/deluge-gtk" || die
- rm -f "${D}/usr/share/man/man1/deluge-gtk.1" || die
- rm -f "${D}/usr/share/applications/deluge.desktop" || die
+ if ! use gui ; then
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/gtk3/" || die
+ rm -r "${ED}/usr/share/icons/" || die
+ rm "${ED}/usr/bin/deluge-gtk" || die
+ rm "${ED}/usr/share/man/man1/deluge-gtk.1" || die
+ else
+ mkdir -p "${ED}/usr/share/applications/" || die
+ cp "${WORKDIR}/${P}/deluge/ui/data/share/applications/deluge.desktop" "${ED}/usr/share/applications/" || die
+ mkdir -p "${ED}/usr/share/metainfo" || die
+ cp "${WORKDIR}/${P}/deluge/ui/data/share/appdata/deluge.appdata.xml" "${ED}/usr/share/metainfo/" || die
fi
+
if use webinterface; then
- newinitd "${FILESDIR}/deluge-web.init" deluge-web
+ newinitd "${FILESDIR}/deluge-web.init-2" deluge-web
newconfd "${FILESDIR}/deluge-web.conf" deluge-web
- systemd_newunit "${FILESDIR}/deluge-web.service-2" deluge-web.service
+ systemd_newunit "${FILESDIR}/deluge-web.service-3" deluge-web.service
systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
else
- rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/web/" || die
- rm -f "${D}/usr/bin/deluge-web" || die
- rm -f "${D}/usr/share/man/man1/deluge-web.1" || die
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/web/" || die
+ rm "${ED}/usr/bin/deluge-web" || die
+ rm "${ED}/usr/share/man/man1/deluge-web.1" || die
fi
+
newinitd "${FILESDIR}"/deluged.init-2 deluged
newconfd "${FILESDIR}"/deluged.conf-2 deluged
systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
systemd_install_serviced "${FILESDIR}"/deluged.service.conf
+
+ python_optimize
}
pkg_postinst() {
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ xdg_pkg_postinst
+
elog
- elog "If, after upgrading, deluge doesn't work, please remove the"
- elog "'~/.config/deluge' directory and try again, but make a backup"
- elog "first!"
+ elog "If, after upgrading, deluge doesn't work please back up and then"
+ elog "remove your '~/.config/deluge' directory and try again"
elog
elog "To start the daemon either run 'deluged' as user"
elog "or modify /etc/conf.d/deluged and run"
@@ -134,6 +163,6 @@ pkg_postinst() {
elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
elog
- elog "For more information look at https://dev.deluge-torrent.org/wiki/Faq"
+ elog "For more information see https://dev.deluge-torrent.org/wiki/Faq"
elog
}
diff --git a/net-p2p/deluge/files/deluge-1.3.12-fix_scheduler_plugin.patch b/net-p2p/deluge/files/deluge-1.3.12-fix_scheduler_plugin.patch
deleted file mode 100644
index fda64aa2b393..000000000000
--- a/net-p2p/deluge/files/deluge-1.3.12-fix_scheduler_plugin.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From cdf301601fe71bd697f3796cf0a5656d437d140e Mon Sep 17 00:00:00 2001
-From: Calum Lind <calumlind+deluge@gmail.com>
-Date: Wed, 16 Sep 2015 15:11:56 +0100
-Subject: [Scheduler] Revert erroneous fix backported from develop branch
-
- * The issue this was intended to fix only occurs on develop branch
----
- deluge/plugins/scheduler/scheduler/core.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/deluge/plugins/scheduler/scheduler/core.py b/deluge/plugins/scheduler/scheduler/core.py
-index 9fb81df..f0e2392 100644
---- a/deluge/plugins/scheduler/scheduler/core.py
-+++ b/deluge/plugins/scheduler/scheduler/core.py
-@@ -127,7 +127,7 @@ class Core(CorePluginBase):
- """
- core_config = deluge.configmanager.ConfigManager("core.conf")
- for setting in CONTROLLED_SETTINGS:
-- component.get("PreferencesManager").do_config_set_func(setting, core_config[setting])
-+ core_config.apply_set_functions(setting)
- # Resume the session if necessary
- component.get("Core").session.resume()
diff --git a/net-p2p/deluge/files/deluge-1.3.15-r1-fix-preferences-ui.patch b/net-p2p/deluge/files/deluge-1.3.15-r1-fix-preferences-ui.patch
deleted file mode 100644
index a63e5de10de1..000000000000
--- a/net-p2p/deluge/files/deluge-1.3.15-r1-fix-preferences-ui.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 38d7b7cdfde3c50d6263602ffb03af92fcbfa52e Mon Sep 17 00:00:00 2001
-From: Calum Lind <calumlind+deluge@gmail.com>
-Date: Sat, 13 May 2017 00:05:48 +0100
-Subject: [GTKUI] Fix keyerror showing prefs
-
- * Fix the single_proxy ui to True as unlikely any users using <=0.15
- and need to have different proxy type settings.
----
- deluge/ui/gtkui/preferences.py | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py
-index 645ad26..efcd93d 100644
---- a/deluge/ui/gtkui/preferences.py
-+++ b/deluge/ui/gtkui/preferences.py
-@@ -318,11 +318,8 @@ class Preferences(component.Component):
- }
- # Add proxy stuff
-
-- # Display workaround for single proxy in libtorrent >v0.16
-- try:
-- lt_single_proxy = component.get("PreferencesManager").LT_SINGLE_PROXY
-- except AttributeError:
-- lt_single_proxy = False
-+ # Display workaround for single proxy in libtorrent >= v0.16
-+ lt_single_proxy = True
-
- for t in ("peer", "web_seed", "tracker", "dht"):
- if lt_single_proxy and not t == "peer":
---
-cgit v1.1
-
diff --git a/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch b/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch
deleted file mode 100644
index 349261426de8..000000000000
--- a/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -205,38 +205,7 @@
-
- _ext_modules = []
-
--# Check for a system libtorrent and if found, then do not build the libtorrent extension
--build_libtorrent = True
--try:
-- from deluge._libtorrent import lt
--except ImportError:
-- build_libtorrent = True
--else:
-- build_libtorrent = False
--
--if build_libtorrent:
-- got_libtorrent = False
-- if not os.path.exists("libtorrent"):
-- import subprocess
-- if subprocess.call(['./get_libtorrent.sh']) > 0:
-- got_libtorrent = False
-- else:
-- got_libtorrent = True
-- else:
-- got_libtorrent = True
--
-- if got_libtorrent:
-- # There isn't a system libtorrent library, so let's build the one included with deluge
-- libtorrent = Extension(
-- 'libtorrent',
-- extra_compile_args = _extra_compile_args,
-- include_dirs = _include_dirs,
-- libraries = _libraries,
-- library_dirs = _library_dirs,
-- sources = _sources
-- )
--
-- _ext_modules = [libtorrent]
-+import deluge._libtorrent
-
- desktop_data = 'deluge/data/share/applications/deluge.desktop'
-
diff --git a/net-p2p/deluge/files/deluge-2.1.1-ayatana.patch b/net-p2p/deluge/files/deluge-2.1.1-ayatana.patch
new file mode 100644
index 000000000000..72f6378ada88
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-2.1.1-ayatana.patch
@@ -0,0 +1,17 @@
+Index: deluge/ui/gtk3/preferences.py
+===================================================================
+--- a/deluge/ui/gtk3/preferences.py (revision 930cf87103284941514283c2a5f6c55cdc56294d)
++++ b/deluge/ui/gtk3/preferences.py (revision dbedf7f639931afb635c68ac42194b1816155b54)
+@@ -31,6 +31,10 @@
+
+ try:
+- require_version('AppIndicator3', '0.1')
+- from gi.repository import AppIndicator3 # noqa: F401
++ try:
++ require_version('AyatanaAppIndicator3', '0.1')
++ from gi.repository import AyatanaAppIndicator3 # noqa: F401
++ except (ValueError, ImportError):
++ require_version('AppIndicator3', '0.1')
++ from gi.repository import AppIndicator3 # noqa: F401
+ except (ImportError, ValueError):
+ appindicator = False
diff --git a/net-p2p/deluge/files/deluge-2.1.1-consoleui-deferred.patch b/net-p2p/deluge/files/deluge-2.1.1-consoleui-deferred.patch
new file mode 100644
index 000000000000..55917cca6762
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-2.1.1-consoleui-deferred.patch
@@ -0,0 +1,13 @@
+Bug: https://dev.deluge-torrent.org/ticket/3582
+git: https://github.com/deluge-torrent/deluge/pull/408
+
+diff -ru a/deluge/ui/console/__init__.py b/deluge/ui/console/__init__.py
+--- a/deluge/ui/console/__init__.py 2022-06-28 11:57:49.000000000 -0700
++++ b/deluge/ui/console/__init__.py 2023-05-01 18:32:19.261457877 -0700
+@@ -12,5 +12,4 @@
+
+
+ def start():
+-
+- return Console().start()
++ Console().start()
diff --git a/net-p2p/deluge/files/deluge-2.1.1-twisted-22.10.patch b/net-p2p/deluge/files/deluge-2.1.1-twisted-22.10.patch
new file mode 100644
index 000000000000..689721e76266
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-2.1.1-twisted-22.10.patch
@@ -0,0 +1,31 @@
+From 29dd0fcf8a6b6256d111b2ceb67798ae73c3e0b1 Mon Sep 17 00:00:00 2001
+From: DjLegolas <djlegolas@protonmail.com>
+Date: Mon, 7 Nov 2022 01:05:55 +0200
+Subject: [PATCH] [WebUI] Fix `TypeError` in DelugeWeb constractor
+
+In `twisted 22.10`, a check new for passing the `path` variable as
+`bytes` in the `putChild` method.
+We were enforcing this on every other place but the `__init__` of
+`DelugeWeb` itself.
+
+Ref: https://github.com/twisted/twisted/pull/11718
+Closes: https://dev.deluge-torrent.org/ticket/3566
+---
+ deluge/ui/web/server.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py
+index f391a78d27..020cf9ef4f 100644
+--- a/deluge/ui/web/server.py
++++ b/deluge/ui/web/server.py
+@@ -682,7 +682,9 @@ def __init__(self, options=None, daemon=True):
+
+ if self.base != '/':
+ # Strip away slashes and serve on the base path as well as root path
+- self.top_level.putChild(self.base.strip('/'), self.top_level)
++ self.top_level.putChild(
++ self.base.strip('/').encode('utf-8'), self.top_level
++ )
+
+ setup_translation()
+
diff --git a/net-p2p/deluge/files/deluge-web.init b/net-p2p/deluge/files/deluge-web.init-2
index 1e0b4833f072..2617e1b30d9e 100644
--- a/net-p2p/deluge/files/deluge-web.init
+++ b/net-p2p/deluge/files/deluge-web.init-2
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2 or later
depend() {
@@ -41,7 +41,7 @@ start() {
start-stop-daemon --start --background --pidfile \
/run/deluge-web.pid --make-pidfile \
--exec /usr/bin/deluge-web --user "${DELUGE_WEB_USER%:*}" \
- -e HOME="${DELUGE_WEB_USER_HOME}" -- ${DELUGE_WEB_OPTS}
+ -e HOME="${DELUGE_WEB_USER_HOME}" -- --do-not-daemonize ${DELUGE_WEB_OPTS}
eend $?
}
diff --git a/net-p2p/deluge/files/deluge-web.service-2 b/net-p2p/deluge/files/deluge-web.service-3
index adb38300a30e..5e0049e7ac23 100644
--- a/net-p2p/deluge/files/deluge-web.service-2
+++ b/net-p2p/deluge/files/deluge-web.service-3
@@ -4,8 +4,7 @@ Documentation=man:deluge-web
After=deluged.service
[Service]
-ExecStart=/usr/bin/deluge-web -c ${DELUGED_HOME} ${DELUGED_OPTS}
+ExecStart=/usr/bin/deluge-web -d -c ${DELUGED_HOME} ${DELUGED_OPTS}
[Install]
WantedBy=multi-user.target
-
diff --git a/net-p2p/deluge/files/deluge-web.service-4 b/net-p2p/deluge/files/deluge-web.service-4
new file mode 100644
index 000000000000..9ebfcbc84745
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-web.service-4
@@ -0,0 +1,10 @@
+[Unit]
+Description=Deluge WebUI
+Documentation=man:deluge-web
+After=deluged.service
+
+[Service]
+ExecStart=/usr/bin/deluge-web -d -c ${DELUGE_WEB_HOME} ${DELUGE_WEB_OPTS}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/deluge/metadata.xml b/net-p2p/deluge/metadata.xml
index 5a74432b6fe5..7b68e8a01656 100644
--- a/net-p2p/deluge/metadata.xml
+++ b/net-p2p/deluge/metadata.xml
@@ -1,21 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>paolo.pedroni@iol.it</email>
<name>Paolo Pedroni</name>
</maintainer>
<maintainer type="person">
- <email>k_f@gentoo.org</email>
- <name>Kristian Fiskerstrand</name>
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
</maintainer>
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Gentoo Proxy Maintainers Project</name>
</maintainer>
-<use>
- <flag name="webinterface">Install dependencies needed for the web
- interface</flag>
- <flag name="console">Enable default console UI</flag>
-</use>
+ <use>
+ <flag name="webinterface">Install dependencies needed for the web interface</flag>
+ <flag name="console">Enable default console UI</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">deluge-torrent/deluge</remote-id>
+ </upstream>
</pkgmetadata>