1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00

net-p2p/deluge: update to 2.0.3

2.0 release notes: https://deluge.readthedocs.io/en/latest/releases/2.0.html
2.0.3 changelog: https://deluge.readthedocs.io/en/latest/changelog.html

This update includes migrating to python3/gtk3 stack and some extra stability
fixes from upstream repository, not yet released.

The port still need rc-scripts to be adjusted to run in headless mode out of
the box, but user may just toggle "Auto-connect to selected daemon" and
"Auto-start localhost daemon" or click "Start daemon" button in connection
manager window to make things happen. This (rc-scripts update) would be done
later when time permits.

PR:		241202
Reported by:	many
This commit is contained in:
Ruslan Makhmatkhanov 2020-04-22 15:04:24 +00:00
parent 403e3f73b8
commit a8e2db6af3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=532483
8 changed files with 93 additions and 88 deletions

View File

@ -1,10 +1,9 @@
# $FreeBSD$
PORTNAME= deluge
DISTVERSIONPREFIX= ${PORTNAME}-
DISTVERSION= 1.3.15
PORTREVISION= 11
DISTVERSION= 2.0.3
CATEGORIES= net-p2p python
MASTER_SITES= CHEESESHOP
PKGNAMESUFFIX= -cli
MAINTAINER= rm@FreeBSD.org
@ -13,7 +12,9 @@ COMMENT= CLI part of bittorrent client using Python and libtorrent-rasterbar
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= intltool-merge:textproc/intltool
BUILD_DEPENDS= intltool-merge:textproc/intltool \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel \
${PYTHON_PKGNAMEPREFIX}slimit>0:www/py-slimit
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}xdg>=0.18:devel/py-xdg@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}libtorrent-rasterbar>=0:net-p2p/py-libtorrent-rasterbar@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}openssl>=0.8:security/py-openssl@${PY_FLAVOR} \
@ -21,12 +22,15 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}xdg>=0.18:devel/py-xdg@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mako>=0.2.5:textproc/py-mako@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}service_identity>=0:security/py-service_identity@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}twisted>=0:devel/py-twisted@${PY_FLAVOR} \
${PY_PILLOW}
${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}rencode>0:converters/py-rencode@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}zope.interface>0:devel/py-zope.interface@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}distro>0:sysutils/py-distro@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setproctitle>0:devel/py-setproctitle@${PY_FLAVOR}
USES= gettext python:2.7
USES= gettext python:3.5+
USE_PYTHON= autoplist distutils
USE_GITHUB= yes
GH_ACCOUNT= deluge-torrent
NO_ARCH= yes
@ -35,39 +39,22 @@ SUB_LIST+= PYTHON_CMD=${PYTHON_CMD}
OPTIONS_DEFINE= DOCS
PORTDOCS= ChangeLog README
PORTDOCS= CHANGELOG.md README.md
post-patch:
@${REINPLACE_CMD} -e '/"new_release_check":/s|True,|False,|g ; \
/"geoip_db_location":/s|/usr/share/GeoIP/GeoIP.dat|${LOCALBASE}/share/GeoIP/GeoIP.dat|g' \
@${REINPLACE_CMD} -e "/'new_release_check':/s|True,|False,|g ; \
/'geoip_db_location':/s|/usr/share/GeoIP/GeoIP.dat|${LOCALBASE}/share/GeoIP/GeoIP.dat|g" \
${WRKSRC}/deluge/core/preferencesmanager.py
@${REINPLACE_CMD} -e '/"check_new_releases":/s|True,|False,|g ; \
/"show_new_releases":/s|True,|False,|g' \
${WRKSRC}/deluge/ui/gtkui/gtkui.py
@${REINPLACE_CMD} -e "/'check_new_releases':/s|True,|False,|g ; \
/'show_new_releases':/s|True,|False,|g" \
${WRKSRC}/deluge/ui/gtk3/gtkui.py
post-install:
# do these by hand, else they wind up in the wrong place
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps ; \
${INSTALL_DATA} ${WRKSRC}/deluge/data/icons/scalable/apps/deluge.svg \
${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
.for size in 16 22 24 32 36 48 64 72 96 128 192 256
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${size}x${size}/apps ; \
${INSTALL_DATA} ${WRKSRC}/deluge/data/icons/hicolor/${size}x${size}/apps/deluge.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${size}x${size}/apps
.endfor
.for pic in png xpm
${INSTALL_DATA} ${WRKSRC}/deluge/data/pixmaps/deluge.${pic} \
${STAGEDIR}${PREFIX}/share/pixmaps
.endfor
# install man pages
.for man in deluge.1 deluge-console.1 deluge-gtk.1 deluge-web.1 deluged.1
${INSTALL_MAN} ${WRKSRC}/docs/man/${man} ${STAGEDIR}${MANPREFIX}/man/man1/
.endfor
${INSTALL_DATA} ${WRKSRC}/deluge/data/share/applications/deluge.desktop \
${STAGEDIR}${PREFIX}/share/applications
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1507830736
SHA256 (deluge-torrent-deluge-deluge-1.3.15_GH0.tar.gz) = 6f2accf55bd97828f81ea13d5f29087103eb4f95b6be957323e23174cdc86826
SIZE (deluge-torrent-deluge-deluge-1.3.15_GH0.tar.gz) = 3036240
TIMESTAMP = 1576604768
SHA256 (deluge-2.0.3.tar.gz) = bd26950f417de2a5b26827d989935a30e770f880c22cb59ca69f781cdc9a14c9
SIZE (deluge-2.0.3.tar.gz) = 3428443

View File

@ -0,0 +1,11 @@
Vendor fix for https://dev.deluge-torrent.org/ticket/3278
===================================================================
--- deluge/argparserbase.py (revision d417c4b0f9fd0702ebf986546ab884d2a9517e4e)
+++ deluge/argparserbase.py (revision 1b4ac88ce72515bcf36684b942e3998900f13cea)
@@ -326,5 +326,5 @@
# Write pid file before chuid
if options.pidfile:
- with open(options.pidfile, 'wb') as _file:
+ with open(options.pidfile, 'w') as _file:
_file.write('%d\n' % os.getpid())

View File

@ -0,0 +1,16 @@
Vendor fix for https://dev.deluge-torrent.org/ticket/3279
===================================================================
--- deluge/core/torrent.py (revision 8b62e50eb8bf81a177c4d62484a44b766c6f54a6)
+++ deluge/core/torrent.py (revision 4b29436cd5eabf9af271f3fa6250cd7c91cdbc9d)
@@ -811,5 +811,9 @@
continue
- client = decode_bytes(peer.client)
+ try:
+ client = decode_bytes(peer.client)
+ except UnicodeDecodeError:
+ # libtorrent on Py3 can raise UnicodeDecodeError for peer_info.client
+ client = 'unknown'
try:

View File

@ -0,0 +1,22 @@
Vendor fix for https://dev.deluge-torrent.org/ticket/3298
===================================================================
--- deluge/core/torrentmanager.py (revision 8b62e50eb8bf81a177c4d62484a44b766c6f54a6)
+++ deluge/core/torrentmanager.py (revision 23b3f144fce3424ae874d54a659cb7b8dd624ade)
@@ -26,5 +26,5 @@
import deluge.component as component
from deluge._libtorrent import lt
-from deluge.common import archive_files, decode_bytes, get_magnet_info, is_magnet
+from deluge.common import PY2, archive_files, decode_bytes, get_magnet_info, is_magnet
from deluge.configmanager import ConfigManager, get_config_dir
from deluge.core.authmanager import AUTH_LEVEL_ADMIN
@@ -810,5 +810,8 @@
try:
with open(filepath, 'rb') as _file:
- state = pickle.load(_file)
+ if PY2:
+ state = pickle.load(_file)
+ else:
+ state = pickle.load(_file, encoding='utf8')
except (IOError, EOFError, pickle.UnpicklingError) as ex:
message = 'Unable to load {}: {}'.format(filepath, ex)

View File

@ -1,18 +1,19 @@
--- setup.py.orig 2016-07-20 14:23:28 UTC
--- setup.py.orig 2019-06-08 20:57:25 UTC
+++ setup.py
@@ -215,6 +215,7 @@ except ImportError:
build_libtorrent = True
else:
build_libtorrent = False
+build_libtorrent = False
if build_libtorrent:
got_libtorrent = False
@@ -515,6 +516,7 @@ if not windows_check() and not osx_check
if os.path.exists(desktop_data):
_data_files.append(('share/applications', [desktop_data]))
+ _data_files = []
entry_points = {
"console_scripts": [
@@ -466,16 +466,6 @@ if not windows_check() and not osx_check():
['deluge/ui/data/icons/hicolor/scalable/apps/deluge.svg'],
),
('share/pixmaps', ['deluge/ui/data/pixmaps/deluge.png']),
- (
- 'share/man/man1',
- [
- 'docs/man/deluge.1',
- 'docs/man/deluged.1',
- 'docs/man/deluge-gtk.1',
- 'docs/man/deluge-web.1',
- 'docs/man/deluge-console.1',
- ],
- ),
]
)
if os.path.isfile(desktop_data):

View File

@ -1,4 +1,3 @@
%%PYTHON_SITELIBDIR%%/deluge/i18n/af/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ar/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ast/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/be/LC_MESSAGES/deluge.mo
@ -20,10 +19,8 @@
%%PYTHON_SITELIBDIR%%/deluge/i18n/eu/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/fa/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/fi/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/fo/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/fr/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/fy/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ga/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/gl/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/he/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/hi/LC_MESSAGES/deluge.mo
@ -36,24 +33,17 @@
%%PYTHON_SITELIBDIR%%/deluge/i18n/ja/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ka/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/kk/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/km/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/kn/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ko/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ku/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ky/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/la/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/lb/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/lt/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/lv/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/mk/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ml/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ms/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/nap/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/nb/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/nds/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/nl/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/nn/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/oc/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/pl/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/pms/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/pt/LC_MESSAGES/deluge.mo
@ -66,35 +56,17 @@
%%PYTHON_SITELIBDIR%%/deluge/i18n/sr/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/sv/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ta/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/te/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/th/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/tl/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/tlh/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/tr/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/uk/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/ur/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/vi/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/zh_CN/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/zh_HK/LC_MESSAGES/deluge.mo
%%PYTHON_SITELIBDIR%%/deluge/i18n/zh_TW/LC_MESSAGES/deluge.mo
man/man1/deluge.1.gz
man/man1/deluge-console.1.gz
man/man1/deluge-gtk.1.gz
man/man1/deluge-web.1.gz
man/man1/deluge.1.gz
man/man1/deluged.1.gz
share/applications/deluge.desktop
share/icons/hicolor/128x128/apps/deluge.png
share/icons/hicolor/16x16/apps/deluge.png
share/icons/hicolor/192x192/apps/deluge.png
share/icons/hicolor/22x22/apps/deluge.png
share/icons/hicolor/24x24/apps/deluge.png
share/icons/hicolor/256x256/apps/deluge.png
share/icons/hicolor/32x32/apps/deluge.png
share/icons/hicolor/36x36/apps/deluge.png
share/icons/hicolor/48x48/apps/deluge.png
share/icons/hicolor/64x64/apps/deluge.png
share/icons/hicolor/72x72/apps/deluge.png
share/icons/hicolor/96x96/apps/deluge.png
share/icons/hicolor/scalable/apps/deluge.svg
share/pixmaps/deluge.png
share/pixmaps/deluge.xpm

View File

@ -1,25 +1,21 @@
# $FreeBSD$
PORTNAME= deluge
PORTVERSION= 1.3.15
PORTVERSION= 2.0.3
PORTEPOCH= 2
CATEGORIES= net-p2p python
MAINTAINER= rm@FreeBSD.org
COMMENT= Bittorrent client using Python, GTK2, and libtorrent-rasterbar
COMMENT= Bittorrent client using Python, GTK3, and libtorrent-rasterbar
LICENSE= GPLv3
DEPRECATED= Old, uses EOLed python27
EXPIRATION_DATE= 2020-03-01
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dbus>=0.83:devel/py-dbus@${PY_FLAVOR} \
${PYGAME} \
${PYTHON_PKGNAMEPREFIX}notify>=0.1.1:devel/py-notify@${PY_FLAVOR} \
xdg-utils>=1.0.2:devel/xdg-utils \
deluge:net-p2p/deluge-cli
USES= gnome metaport python:2.7
USE_GNOME= librsvg2 pygtk2
USES= gnome metaport python:3.5+
USE_GNOME= gtk30 librsvg2 pygobject3
.include <bsd.port.mk>