1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

Deluge is a Bittorrent client written in Python and GTK+. Deluge is intended

to bring a native, full-featured client to Linux, BSD, and other *NIX GTK
desktop environments such as Gnome and XFCE.

Deluge uses Rasterbar's version of libtorrent as the main ingredient in its
bittorrent protocol backend.

WWW: http://deluge-torrent.org/

--

deluge-0.4.90.3 as in Deluge 0.5 Beta 3, I have added two patches from its SVN
to fix the memory leaks.
This commit is contained in:
Jeremy Messenger 2007-03-03 21:05:21 +00:00
parent 2f4d5d8fac
commit 8c09acb3f5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=186457
15 changed files with 379 additions and 0 deletions

View File

@ -23,6 +23,7 @@
SUBDIR += edonkey-gui-gtk
SUBDIR += edonkey-gui-gtk-urlslave
SUBDIR += edonkey-tool-hash
SUBDIR += deluge
SUBDIR += ed2k
SUBDIR += fcptools
SUBDIR += fidelio

38
net-p2p/deluge/Makefile Normal file
View File

@ -0,0 +1,38 @@
# New ports collection makefile for: deluge
# Date created: 03 December 2006
# Whom: Mezz <mezz@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= deluge
PORTVERSION= 0.4.90.3
CATEGORIES= net-p2p python
MASTER_SITES= http://deluge-torrent.org/downloads/
MAINTAINER= mezz@FreeBSD.org
COMMENT= A Bittorrent client, using Python, GTK+2 and Rasterbar libtorrent
LIB_DEPENDS= boost_thread.3:${PORTSDIR}/devel/boost
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/xdg/__init__.py:${PORTSDIR}/devel/py-xdg \
${PYTHON_SITELIBDIR}/dbus/__init__.py:${PORTSDIR}/devel/py-dbus
USE_GNOME= pygtk2
USE_PYTHON= yes
USE_PYDISTUTILS=yes
DOCS= LICENSE README
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g ; \
s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' ${WRKSRC}/setup.py
.ifndef (NOPORTDOCS)
post-install:
@${MKDIR} ${DOCSDIR}
.for i in ${DOCS}
@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.mk>

3
net-p2p/deluge/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (deluge-0.4.90.3.tar.gz) = eecdbae003a9240d93ec023d7a81cd97
SHA256 (deluge-0.4.90.3.tar.gz) = ab20445917020c05984e252be46f188155cbf928dcd93ae6dff2b5ec727ad8fc
SIZE (deluge-0.4.90.3.tar.gz) = 470203

View File

@ -0,0 +1,28 @@
--- setup.py.orig Thu Mar 1 18:27:45 2007
+++ setup.py Fri Mar 2 18:38:43 2007
@@ -44,7 +44,7 @@
#
removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
-additions = ['-DNDEBUG', '-O2']
+additions = ['-DNDEBUG']
if pythonVersion == '2.5':
cv_opt = sysconfig.get_config_vars()["CFLAGS"]
@@ -78,12 +78,14 @@
deluge_core = Extension('deluge_core',
include_dirs = ['./libtorrent', './libtorrent/include',
'./libtorrent/include/libtorrent',
- '/usr/include/python' + pythonVersion],
+ '%%LOCALBASE%%/include'],
+ library_dirs = ['%%LOCALBASE%%/lib'],
libraries = ['boost_filesystem', 'boost_date_time',
'boost_program_options', 'boost_regex',
'boost_serialization', 'boost_thread',
- 'z', 'pthread'],
+ 'z'],
extra_compile_args = ["-Wno-missing-braces"],
+ extra_link_args = ['%%PTHREAD_LIBS%%'],
sources = ['src/deluge_core.cpp',
'libtorrent/src/alert.cpp',
'libtorrent/src/allocate_resources.cpp',

View File

@ -0,0 +1,12 @@
Index: /trunk/src/deluge_core.cpp
===================================================================
--- src/deluge_core.cpp (revision 205)
+++ src/deluge_core.cpp (revision 292)
@@ -861,4 +861,7 @@
"pieces", py_pieces
);
+
+ Py_DECREF(py_pieces); // Assuming the previous line does NOT steal the ref, then this is
+ // needed!
PyTuple_SetItem(ret, i, peer_info);

View File

@ -0,0 +1,35 @@
Index: /trunk/src/delugegtk.py
===================================================================
--- src/delugegtk.py (revision 288)
+++ src/delugegtk.py (revision 289)
@@ -695,6 +695,5 @@
self.wtree.get_widget("toolbutton_pause").set_stock_id(gtk.STOCK_MEDIA_PAUSE)
except KeyError:
- pass
- self.saved_peer_info = None
+ pass
@@ -744,8 +743,5 @@
unique_id = self.get_selected_torrent()
- self.saved_peer_info = self.manager.get_torrent_peer_info(unique_id)
-
-
- new_peer_info = self.saved_peer_info
+ new_peer_info = self.manager.get_torrent_peer_info(unique_id)
new_ips = {}
@@ -782,4 +778,12 @@
dcommon.frate(peer["download_speed"]),
dcommon.frate(peer["upload_speed"])])
+ #print new_ips
+ #print curr_ips
+ #print new_peer_info
+ del new_peer_info
+ del new_ips
+ del curr_ips
+
+
elif tab == 2: #File List

8
net-p2p/deluge/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
Deluge is a Bittorrent client written in Python and GTK+. Deluge is intended
to bring a native, full-featured client to Linux, BSD, and other *NIX GTK
desktop environments such as Gnome and XFCE.
Deluge uses Rasterbar's version of libtorrent as the main ingredient in its
bittorrent protocol backend.
WWW: http://deluge-torrent.org/

65
net-p2p/deluge/pkg-plist Normal file
View File

@ -0,0 +1,65 @@
bin/deluge
%%PYTHON_SITELIBDIR%%/deluge/__init__.py
%%PYTHON_SITELIBDIR%%/deluge/__init__.pyc
%%PYTHON_SITELIBDIR%%/deluge/__init__.pyo
%%PYTHON_SITELIBDIR%%/deluge/dcommon.py
%%PYTHON_SITELIBDIR%%/deluge/dcommon.pyc
%%PYTHON_SITELIBDIR%%/deluge/dcommon.pyo
%%PYTHON_SITELIBDIR%%/deluge/deluge.py
%%PYTHON_SITELIBDIR%%/deluge/deluge.pyc
%%PYTHON_SITELIBDIR%%/deluge/deluge.pyo
%%PYTHON_SITELIBDIR%%/deluge/deluge_core.so
%%PYTHON_SITELIBDIR%%/deluge/deluge_stats.py
%%PYTHON_SITELIBDIR%%/deluge/deluge_stats.pyc
%%PYTHON_SITELIBDIR%%/deluge/deluge_stats.pyo
%%PYTHON_SITELIBDIR%%/deluge/delugegtk.py
%%PYTHON_SITELIBDIR%%/deluge/delugegtk.pyc
%%PYTHON_SITELIBDIR%%/deluge/delugegtk.pyo
%%PYTHON_SITELIBDIR%%/deluge/delugeplugins.py
%%PYTHON_SITELIBDIR%%/deluge/delugeplugins.pyc
%%PYTHON_SITELIBDIR%%/deluge/delugeplugins.pyo
%%PYTHON_SITELIBDIR%%/deluge/dgtk.py
%%PYTHON_SITELIBDIR%%/deluge/dgtk.pyc
%%PYTHON_SITELIBDIR%%/deluge/dgtk.pyo
%%PYTHON_SITELIBDIR%%/deluge/ipc_manager.py
%%PYTHON_SITELIBDIR%%/deluge/ipc_manager.pyc
%%PYTHON_SITELIBDIR%%/deluge/ipc_manager.pyo
%%PYTHON_SITELIBDIR%%/deluge/pref.py
%%PYTHON_SITELIBDIR%%/deluge/pref.pyc
%%PYTHON_SITELIBDIR%%/deluge/pref.pyo
share/applications/deluge.desktop
%%DATADIR%%/glade/aboutdialog.glade
%%DATADIR%%/glade/delugegtk.glade
%%DATADIR%%/glade/dgtkpopups.glade
%%DATADIR%%/glade/dgtkpref.glade
%%DATADIR%%/glade/torrent_menu.glade
%%DATADIR%%/pixmaps/deluge-about.png
%%DATADIR%%/pixmaps/deluge128.png
%%DATADIR%%/pixmaps/deluge192.png
%%DATADIR%%/pixmaps/deluge22.png
%%DATADIR%%/pixmaps/deluge256.png
%%DATADIR%%/pixmaps/deluge32.png
%%DATADIR%%/plugins/ExamplePlugin/example-plugin.png
%%DATADIR%%/plugins/ExamplePlugin/example.glade
%%DATADIR%%/plugins/ExamplePlugin/plugin.py
%%DATADIR%%/plugins/HelloWorld/plugin.py
%%DATADIR%%/plugins/NetworkGraph/plugin.py
%%DATADIR%%/plugins/NetworkHealth/plugin.py
%%DATADIR%%/plugins/TorrentSearch/plugin.py
%%DATADIR%%/plugins/TorrentSearch/searchdlg.glade
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
%%PORTDOCS%%%%DOCSDIR%%/README
share/pixmaps/deluge.xpm
@dirrmtry share/pixmaps
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%DATADIR%%/plugins/TorrentSearch
@dirrm %%DATADIR%%/plugins/NetworkHealth
@dirrm %%DATADIR%%/plugins/NetworkGraph
@dirrm %%DATADIR%%/plugins/HelloWorld
@dirrm %%DATADIR%%/plugins/ExamplePlugin
@dirrmtry %%DATADIR%%/plugins
@dirrm %%DATADIR%%/pixmaps
@dirrm %%DATADIR%%/glade
@dirrm %%DATADIR%%
@dirrmtry share/applications
@dirrm %%PYTHON_SITELIBDIR%%/deluge

38
net-p2p/deluge05/Makefile Normal file
View File

@ -0,0 +1,38 @@
# New ports collection makefile for: deluge
# Date created: 03 December 2006
# Whom: Mezz <mezz@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= deluge
PORTVERSION= 0.4.90.3
CATEGORIES= net-p2p python
MASTER_SITES= http://deluge-torrent.org/downloads/
MAINTAINER= mezz@FreeBSD.org
COMMENT= A Bittorrent client, using Python, GTK+2 and Rasterbar libtorrent
LIB_DEPENDS= boost_thread.3:${PORTSDIR}/devel/boost
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/xdg/__init__.py:${PORTSDIR}/devel/py-xdg \
${PYTHON_SITELIBDIR}/dbus/__init__.py:${PORTSDIR}/devel/py-dbus
USE_GNOME= pygtk2
USE_PYTHON= yes
USE_PYDISTUTILS=yes
DOCS= LICENSE README
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g ; \
s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' ${WRKSRC}/setup.py
.ifndef (NOPORTDOCS)
post-install:
@${MKDIR} ${DOCSDIR}
.for i in ${DOCS}
@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (deluge-0.4.90.3.tar.gz) = eecdbae003a9240d93ec023d7a81cd97
SHA256 (deluge-0.4.90.3.tar.gz) = ab20445917020c05984e252be46f188155cbf928dcd93ae6dff2b5ec727ad8fc
SIZE (deluge-0.4.90.3.tar.gz) = 470203

View File

@ -0,0 +1,28 @@
--- setup.py.orig Thu Mar 1 18:27:45 2007
+++ setup.py Fri Mar 2 18:38:43 2007
@@ -44,7 +44,7 @@
#
removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
-additions = ['-DNDEBUG', '-O2']
+additions = ['-DNDEBUG']
if pythonVersion == '2.5':
cv_opt = sysconfig.get_config_vars()["CFLAGS"]
@@ -78,12 +78,14 @@
deluge_core = Extension('deluge_core',
include_dirs = ['./libtorrent', './libtorrent/include',
'./libtorrent/include/libtorrent',
- '/usr/include/python' + pythonVersion],
+ '%%LOCALBASE%%/include'],
+ library_dirs = ['%%LOCALBASE%%/lib'],
libraries = ['boost_filesystem', 'boost_date_time',
'boost_program_options', 'boost_regex',
'boost_serialization', 'boost_thread',
- 'z', 'pthread'],
+ 'z'],
extra_compile_args = ["-Wno-missing-braces"],
+ extra_link_args = ['%%PTHREAD_LIBS%%'],
sources = ['src/deluge_core.cpp',
'libtorrent/src/alert.cpp',
'libtorrent/src/allocate_resources.cpp',

View File

@ -0,0 +1,12 @@
Index: /trunk/src/deluge_core.cpp
===================================================================
--- src/deluge_core.cpp (revision 205)
+++ src/deluge_core.cpp (revision 292)
@@ -861,4 +861,7 @@
"pieces", py_pieces
);
+
+ Py_DECREF(py_pieces); // Assuming the previous line does NOT steal the ref, then this is
+ // needed!
PyTuple_SetItem(ret, i, peer_info);

View File

@ -0,0 +1,35 @@
Index: /trunk/src/delugegtk.py
===================================================================
--- src/delugegtk.py (revision 288)
+++ src/delugegtk.py (revision 289)
@@ -695,6 +695,5 @@
self.wtree.get_widget("toolbutton_pause").set_stock_id(gtk.STOCK_MEDIA_PAUSE)
except KeyError:
- pass
- self.saved_peer_info = None
+ pass
@@ -744,8 +743,5 @@
unique_id = self.get_selected_torrent()
- self.saved_peer_info = self.manager.get_torrent_peer_info(unique_id)
-
-
- new_peer_info = self.saved_peer_info
+ new_peer_info = self.manager.get_torrent_peer_info(unique_id)
new_ips = {}
@@ -782,4 +778,12 @@
dcommon.frate(peer["download_speed"]),
dcommon.frate(peer["upload_speed"])])
+ #print new_ips
+ #print curr_ips
+ #print new_peer_info
+ del new_peer_info
+ del new_ips
+ del curr_ips
+
+
elif tab == 2: #File List

View File

@ -0,0 +1,8 @@
Deluge is a Bittorrent client written in Python and GTK+. Deluge is intended
to bring a native, full-featured client to Linux, BSD, and other *NIX GTK
desktop environments such as Gnome and XFCE.
Deluge uses Rasterbar's version of libtorrent as the main ingredient in its
bittorrent protocol backend.
WWW: http://deluge-torrent.org/

View File

@ -0,0 +1,65 @@
bin/deluge
%%PYTHON_SITELIBDIR%%/deluge/__init__.py
%%PYTHON_SITELIBDIR%%/deluge/__init__.pyc
%%PYTHON_SITELIBDIR%%/deluge/__init__.pyo
%%PYTHON_SITELIBDIR%%/deluge/dcommon.py
%%PYTHON_SITELIBDIR%%/deluge/dcommon.pyc
%%PYTHON_SITELIBDIR%%/deluge/dcommon.pyo
%%PYTHON_SITELIBDIR%%/deluge/deluge.py
%%PYTHON_SITELIBDIR%%/deluge/deluge.pyc
%%PYTHON_SITELIBDIR%%/deluge/deluge.pyo
%%PYTHON_SITELIBDIR%%/deluge/deluge_core.so
%%PYTHON_SITELIBDIR%%/deluge/deluge_stats.py
%%PYTHON_SITELIBDIR%%/deluge/deluge_stats.pyc
%%PYTHON_SITELIBDIR%%/deluge/deluge_stats.pyo
%%PYTHON_SITELIBDIR%%/deluge/delugegtk.py
%%PYTHON_SITELIBDIR%%/deluge/delugegtk.pyc
%%PYTHON_SITELIBDIR%%/deluge/delugegtk.pyo
%%PYTHON_SITELIBDIR%%/deluge/delugeplugins.py
%%PYTHON_SITELIBDIR%%/deluge/delugeplugins.pyc
%%PYTHON_SITELIBDIR%%/deluge/delugeplugins.pyo
%%PYTHON_SITELIBDIR%%/deluge/dgtk.py
%%PYTHON_SITELIBDIR%%/deluge/dgtk.pyc
%%PYTHON_SITELIBDIR%%/deluge/dgtk.pyo
%%PYTHON_SITELIBDIR%%/deluge/ipc_manager.py
%%PYTHON_SITELIBDIR%%/deluge/ipc_manager.pyc
%%PYTHON_SITELIBDIR%%/deluge/ipc_manager.pyo
%%PYTHON_SITELIBDIR%%/deluge/pref.py
%%PYTHON_SITELIBDIR%%/deluge/pref.pyc
%%PYTHON_SITELIBDIR%%/deluge/pref.pyo
share/applications/deluge.desktop
%%DATADIR%%/glade/aboutdialog.glade
%%DATADIR%%/glade/delugegtk.glade
%%DATADIR%%/glade/dgtkpopups.glade
%%DATADIR%%/glade/dgtkpref.glade
%%DATADIR%%/glade/torrent_menu.glade
%%DATADIR%%/pixmaps/deluge-about.png
%%DATADIR%%/pixmaps/deluge128.png
%%DATADIR%%/pixmaps/deluge192.png
%%DATADIR%%/pixmaps/deluge22.png
%%DATADIR%%/pixmaps/deluge256.png
%%DATADIR%%/pixmaps/deluge32.png
%%DATADIR%%/plugins/ExamplePlugin/example-plugin.png
%%DATADIR%%/plugins/ExamplePlugin/example.glade
%%DATADIR%%/plugins/ExamplePlugin/plugin.py
%%DATADIR%%/plugins/HelloWorld/plugin.py
%%DATADIR%%/plugins/NetworkGraph/plugin.py
%%DATADIR%%/plugins/NetworkHealth/plugin.py
%%DATADIR%%/plugins/TorrentSearch/plugin.py
%%DATADIR%%/plugins/TorrentSearch/searchdlg.glade
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
%%PORTDOCS%%%%DOCSDIR%%/README
share/pixmaps/deluge.xpm
@dirrmtry share/pixmaps
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%DATADIR%%/plugins/TorrentSearch
@dirrm %%DATADIR%%/plugins/NetworkHealth
@dirrm %%DATADIR%%/plugins/NetworkGraph
@dirrm %%DATADIR%%/plugins/HelloWorld
@dirrm %%DATADIR%%/plugins/ExamplePlugin
@dirrmtry %%DATADIR%%/plugins
@dirrm %%DATADIR%%/pixmaps
@dirrm %%DATADIR%%/glade
@dirrm %%DATADIR%%
@dirrmtry share/applications
@dirrm %%PYTHON_SITELIBDIR%%/deluge