diff options
author | lioux <lioux@FreeBSD.org> | 2005-05-30 11:17:30 +0800 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2005-05-30 11:17:30 +0800 |
commit | 7f0dace1c09d0f441793215253d18858b8d4067b (patch) | |
tree | 2d302ecc1d45ce1bde28899f9314cbe2dbc98f30 /net-p2p/py-bittorrent-devel | |
parent | 7d1e53ddbcd7c19789208a4ca5a657c94a5875be (diff) | |
download | freebsd-ports-gnome-7f0dace1c09d0f441793215253d18858b8d4067b.tar.gz freebsd-ports-gnome-7f0dace1c09d0f441793215253d18858b8d4067b.tar.zst freebsd-ports-gnome-7f0dace1c09d0f441793215253d18858b8d4067b.zip |
o Update to 4.1.1 development version which brings many new features
[1] such as trackerless [2] support
1) http://www.bittorrent.com/bittorrent_versions.html
2) http://www.bittorrent.com/trackerless.html
Diffstat (limited to 'net-p2p/py-bittorrent-devel')
20 files changed, 391 insertions, 190 deletions
diff --git a/net-p2p/py-bittorrent-devel/Makefile b/net-p2p/py-bittorrent-devel/Makefile index cfefcf71e5f1..19d05b4f2608 100644 --- a/net-p2p/py-bittorrent-devel/Makefile +++ b/net-p2p/py-bittorrent-devel/Makefile @@ -6,24 +6,19 @@ # PORTNAME= BitTorrent -PORTVERSION= 3.9.1 -PORTREVISION= 1 +PORTVERSION= 4.1.1 PORTEPOCH= 1 CATEGORIES?= net python -MASTER_SITES= http://www.bittorrent.com/ -#MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} -#MASTER_SITE_SUBDIR= ${PORTNAME:L} +MASTER_SITES= http://www.bittorrent.com/dl/ \ + ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME:L} PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -PKGNAMESUFFIX?= -devel -#DISTNAME= ${PORTNAME}-${PORTVERSION:C/\.(.)$/\1/} MAINTAINER= lioux@FreeBSD.org COMMENT?= A peer-to-peer tool for distributing files written in Python RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/dns/__init__.py:${PORTSDIR}/dns/py-dnspython -BROKEN= Unfetchable - USE_PYTHON= yes USE_PYDISTUTILS= yes USE_REINPLACE= yes @@ -32,13 +27,22 @@ CONFLICTS= py??-*[Bb]it[Tt]orrent* py??-*[Bb]it[Tt]ornado* btqueue* NO_LATEST_LINK= yes +.ifndef(NOPORTDOCS) PORTDOCS= \ LICENSE.txt \ README.txt \ + TRACKERLESS.txt \ credits.txt \ redirdonate.html +.else +EXTRA_PATCHES+= ${FILESDIR}/extra-noportdocs-setup.py +.endif + +.include <bsd.port.pre.mk> -PLIST_SUB+= PORTVERSION=${PORTVERSION} +.if ${ARCH} != "i386" +WITHOUT_PSYCO= yes +.endif # required for GUI .ifndef(WITHOUT_GUI) @@ -46,33 +50,86 @@ RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/pygtk.py:${PORTSDIR}/x11-toolkits/py-gtk2 PLIST_FILES+= \ bin/btmaketorrentgui.py \ - bin/btdownloadgui.py + bin/btdownloadgui.py \ + share/pixmaps/BitTorrent/bittorrent.ico \ + share/pixmaps/BitTorrent/broken.png \ + share/pixmaps/BitTorrent/finished.png \ + share/pixmaps/BitTorrent/info.png \ + share/pixmaps/BitTorrent/logo/bittorrent_32.png \ + share/pixmaps/BitTorrent/logo/bittorrent_96.png \ + share/pixmaps/BitTorrent/pause.png \ + share/pixmaps/BitTorrent/paused.png \ + share/pixmaps/BitTorrent/play.png \ + share/pixmaps/BitTorrent/queued.png \ + share/pixmaps/BitTorrent/remove.png \ + share/pixmaps/BitTorrent/running.png + +PLIST_SUB+= GUI="" .else EXTRA_PATCHES+= ${FILESDIR}/extra-nogui-patch-setup.py + +PLIST_SUB+= GUI="@comment " +.endif +# required for PSYCO +.ifndef(WITHOUT_PSYCO) +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/psyco/_psyco.so:${PORTSDIR}/devel/py-psyco + +EXTRA_PATCHES+= \ + ${FILESDIR}/extra-psyco-patch-btdownloadcurses.py \ + ${FILESDIR}/extra-psyco-patch-btdownloadgui.py \ + ${FILESDIR}/extra-psyco-patch-btdownloadheadless.py \ + ${FILESDIR}/extra-psyco-patch-btlaunchmany.py \ + ${FILESDIR}/extra-psyco-patch-btlaunchmanycurses.py \ + ${FILESDIR}/extra-psyco-patch-btmaketorrent.py \ + ${FILESDIR}/extra-psyco-patch-btmaketorrentgui.py \ + ${FILESDIR}/extra-psyco-patch-btreannouce.py \ + ${FILESDIR}/extra-psyco-patch-btrename.py \ + ${FILESDIR}/extra-psyco-patch-btshowmetainfo.py \ + ${FILESDIR}/extra-psyco-patch-bttrack.py + +PLIST_FILES+= \ + ${PYTHON_SITELIBDIR:S|^${PYTHONBASE}/||}/BitTorrent/PSYCO.py \ + ${PYTHON_SITELIBDIR:S|^${PYTHONBASE}/||}/BitTorrent/PSYCO.pyc \ + ${PYTHON_SITELIBDIR:S|^${PYTHONBASE}/||}/BitTorrent/PSYCO.pyo .endif pre-everything:: .ifndef(WITHOUT_GUI) @${ECHO_MSG} '===> Define WITHOUT_GUI to disable GUI installation' .endif +.ifndef(WITHOUT_PSYCO) + @${ECHO_MSG} '===> Define WITHOUT_PSYCO to disable devel/py-psyco optimization' +.endif post-patch: +# whrandom is deprecated: whrandom -> random @${FIND} ${WRKSRC} -type f | \ ${XARGS} -x -n 10 \ ${REINPLACE_CMD} -E \ - -e 's|/usr/bin/env python|${LOCALBASE}/bin/python|' + -e 's|whrandom|random|' \ + -e 's|/usr/bin/env python.*|${LOCALBASE}/bin/python|' +.ifndef(WITHOUT_PSYCO) +# activate psyco optimization + @${ECHO_CMD} 'psyco = 1' > ${WRKSRC}/BitTorrent/PSYCO.py +.endif post-install: -.ifndef(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} -.for file in ${PORTDOCS} - @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} -.endfor -.endif # set proper permissions @${CHMOD} -R ${SHAREMODE} \ ${PREFIX}/${PYTHON_SITELIBDIR:S|^${PYTHONBASE}/||}/BitTorrent @${CHMOD} ${SHAREMODE} ${PREFIX}/${PYTHON_SITELIBDIR:S|^${PYTHONBASE}/||}/BitTorrent @${CHMOD} a+x ${PREFIX}/${PYTHON_SITELIBDIR:S|^${PYTHONBASE}/||}/BitTorrent +.ifndef(WITHOUT_GUI) +# pixmaps + @${CHMOD} -R ${SHAREMODE} \ + ${PREFIX}/share/pixmaps/${PORTNAME}/* + @${CHMOD} a+x \ + ${PREFIX}/share/pixmaps/${PORTNAME}/logo +.endif +.ifndef(NOPORTDOCS) +# docs + @${CHMOD} -R ${SHAREMODE} \ + ${DOCSDIR}/* +.endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/net-p2p/py-bittorrent-devel/distinfo b/net-p2p/py-bittorrent-devel/distinfo index ff0d3b85e94b..c264d1e03034 100644 --- a/net-p2p/py-bittorrent-devel/distinfo +++ b/net-p2p/py-bittorrent-devel/distinfo @@ -1,2 +1,2 @@ -MD5 (BitTorrent-3.9.1.tar.gz) = 806ad575397ec55b12b65fdd66e4fb3b -SIZE (BitTorrent-3.9.1.tar.gz) = 145808 +MD5 (BitTorrent-4.1.1.tar.gz) = 57381176882184ad8f539c473ad9bce5 +SIZE (BitTorrent-4.1.1.tar.gz) = 237743 diff --git a/net-p2p/py-bittorrent-devel/files/extra-nogui-patch-setup.py b/net-p2p/py-bittorrent-devel/files/extra-nogui-patch-setup.py index fd64315237f6..bdfd37a28162 100644 --- a/net-p2p/py-bittorrent-devel/files/extra-nogui-patch-setup.py +++ b/net-p2p/py-bittorrent-devel/files/extra-nogui-patch-setup.py @@ -1,13 +1,18 @@ ---- setup.py.orig Fri Dec 24 06:56:00 2004 -+++ setup.py Fri Dec 24 06:56:10 2004 -@@ -19,8 +19,8 @@ +--- setup.py.orig Sat Mar 12 10:01:45 2005 ++++ setup.py Sat Mar 12 10:14:21 2005 +@@ -19,7 +19,7 @@ import glob --scripts = ["btdownloadgui.py", "btdownloadcurses.py", "btdownloadheadless.py", +-scripts = ["btdownloadgui.py", "btdownloadcurses.py", "btdownloadheadless.py", - "btmaketorrentgui.py", "btmaketorrent.py", -+scripts = ["btdownloadcurses.py", "btdownloadheadless.py", ++scripts = ["btdownloadcurses.py", "btdownloadheadless.py", + "btmaketorrent.py", "btlaunchmany.py", "btlaunchmanycurses.py", - "bttrack.py", "btreannounce.py", "btrename.py", "btshowmetainfo.py", - "bttest.py"] + "bttrack.py", "btreannounce.py", "btrename.py", "btshowmetainfo.py"] +@@ -27,4 +27,3 @@ + img_root, doc_root = BitTorrent.calc_unix_dirs() + +-data_files = [ (img_root , glob.glob('images/*png')+['images/bittorrent.ico',]), +- (img_root+'/logo', glob.glob('images/logo/bittorrent_[0-9]*.png') ), ++data_files = [ diff --git a/net-p2p/py-bittorrent-devel/files/extra-noportdocs-setup.py b/net-p2p/py-bittorrent-devel/files/extra-noportdocs-setup.py new file mode 100644 index 000000000000..8fa08b284059 --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-noportdocs-setup.py @@ -0,0 +1,7 @@ +--- setup.py.orig Sun May 29 23:44:29 2005 ++++ setup.py Sun May 29 23:47:33 2005 +@@ -40,4 +40,0 @@ +- (doc_root , ['credits.txt', 'LICENSE.txt', +- 'README.txt', 'redirdonate.html', +- 'TRACKERLESS.txt', +- ] ), diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btdownloadcurses.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btdownloadcurses.py new file mode 100644 index 000000000000..10624b9917da --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btdownloadcurses.py @@ -0,0 +1,18 @@ +--- btdownloadcurses.py.orig Sun May 29 23:28:15 2005 ++++ btdownloadcurses.py Sun May 29 23:30:23 2005 +@@ -15,6 +15,15 @@ + + from __future__ import division + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + import gettext + gettext.install('bittorrent', 'locale') + diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btdownloadgui.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btdownloadgui.py new file mode 100644 index 000000000000..84bba06deca5 --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btdownloadgui.py @@ -0,0 +1,18 @@ +--- btdownloadgui.py.orig Sun May 29 23:28:15 2005 ++++ btdownloadgui.py Sun May 29 23:31:03 2005 +@@ -14,6 +14,15 @@ + + from __future__ import division + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + import gettext + gettext.install('bittorrent', 'locale') + diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btdownloadheadless.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btdownloadheadless.py new file mode 100644 index 000000000000..93d08d1edb6a --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btdownloadheadless.py @@ -0,0 +1,18 @@ +--- btdownloadheadless.py.orig Fri Mar 11 23:14:21 2005 ++++ btdownloadheadless.py Fri Mar 11 23:14:28 2005 +@@ -14,6 +14,15 @@ + + from __future__ import division + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + import sys + import os + import threading diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btlaunchmany.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btlaunchmany.py new file mode 100644 index 000000000000..d1d47a7615f6 --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btlaunchmany.py @@ -0,0 +1,18 @@ +--- btlaunchmany.py.orig Fri Mar 11 23:14:47 2005 ++++ btlaunchmany.py Fri Mar 11 23:14:54 2005 +@@ -12,6 +12,15 @@ + + # Written by John Hoffman + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + import sys + import os + diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btlaunchmanycurses.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btlaunchmanycurses.py new file mode 100644 index 000000000000..a6fc2f146a14 --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btlaunchmanycurses.py @@ -0,0 +1,18 @@ +--- btlaunchmanycurses.py.orig Fri Mar 11 23:15:15 2005 ++++ btlaunchmanycurses.py Fri Mar 11 23:15:22 2005 +@@ -14,6 +14,15 @@ + + from __future__ import division + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + DOWNLOAD_SCROLL_RATE = 1 + + import sys, os diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btmaketorrent.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btmaketorrent.py new file mode 100644 index 000000000000..89e4cb15cf3d --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btmaketorrent.py @@ -0,0 +1,18 @@ +--- btmaketorrent.py.orig Fri Mar 11 23:15:38 2005 ++++ btmaketorrent.py Fri Mar 11 23:15:43 2005 +@@ -12,6 +12,15 @@ + + # Written by Bram Cohen + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + import sys + from BitTorrent.makemetafile import make_meta_files + from BitTorrent.parseargs import parseargs, printHelp diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btmaketorrentgui.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btmaketorrentgui.py new file mode 100644 index 000000000000..25d9dbbfe99f --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btmaketorrentgui.py @@ -0,0 +1,18 @@ +--- btmaketorrentgui.py.orig Sun May 29 23:28:15 2005 ++++ btmaketorrentgui.py Sun May 29 23:31:51 2005 +@@ -14,6 +14,15 @@ + + from __future__ import division + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + import gettext + gettext.install('bittorrent', 'locale') + diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btreannouce.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btreannouce.py new file mode 100644 index 000000000000..41e423ed3dce --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btreannouce.py @@ -0,0 +1,18 @@ +--- btreannounce.py.orig Tue May 24 03:01:08 2005 ++++ btreannounce.py Sun May 29 22:46:38 2005 +@@ -12,6 +12,15 @@ + + # Written by Henry 'Pi' James and Bram Cohen + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + import gettext + gettext.install('bittorrent', 'locale') + diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btrename.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btrename.py new file mode 100644 index 000000000000..41f849e3fcaa --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btrename.py @@ -0,0 +1,18 @@ +--- btrename.py.orig Tue May 24 03:01:08 2005 ++++ btrename.py Sun May 29 22:47:32 2005 +@@ -12,6 +12,15 @@ + + # Written by Henry 'Pi' James + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + import gettext + gettext.install('bittorrent', 'locale') + diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btshowmetainfo.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btshowmetainfo.py new file mode 100644 index 000000000000..a9f1be8c736e --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-btshowmetainfo.py @@ -0,0 +1,18 @@ +--- btshowmetainfo.py.orig Fri Mar 11 23:16:39 2005 ++++ btshowmetainfo.py Fri Mar 11 23:16:48 2005 +@@ -12,6 +12,15 @@ + + # Written by Henry 'Pi' James and Loring Holden + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + from sys import * + from os.path import * + from sha import * diff --git a/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-bttrack.py b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-bttrack.py new file mode 100644 index 000000000000..2102a91d8f75 --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/extra-psyco-patch-bttrack.py @@ -0,0 +1,18 @@ +--- bttrack.py.orig Fri Mar 11 23:17:26 2005 ++++ bttrack.py Fri Mar 11 23:17:31 2005 +@@ -12,6 +12,15 @@ + + # Written by Bram Cohen + ++from BitTorrent import PSYCO ++if PSYCO.psyco: ++ try: ++ import psyco ++ assert psyco.__version__ >= 0x010300f0 ++ psyco.full() ++ except: ++ pass ++ + from sys import argv + from BitTorrent.track import track + diff --git a/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::__init__.py b/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::__init__.py new file mode 100644 index 000000000000..5c341417b175 --- /dev/null +++ b/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::__init__.py @@ -0,0 +1,11 @@ +--- BitTorrent/__init__.py.orig Fri Mar 11 22:53:12 2005 ++++ BitTorrent/__init__.py Fri Mar 11 22:53:27 2005 +@@ -21,7 +21,7 @@ + import os + + def calc_unix_dirs(): +- appdir = '%s-%s'%(app_name, version) ++ appdir = '%s'%(app_name) + ip = os.path.join('share', 'pixmaps', appdir) + dp = os.path.join('share', 'doc' , appdir) + return ip, dp diff --git a/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::defaultargs.py b/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::defaultargs.py index d0fa6f8e8052..f25af4145ccc 100644 --- a/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::defaultargs.py +++ b/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::defaultargs.py @@ -1,11 +1,11 @@ ---- BitTorrent/defaultargs.py.orig Sun Dec 26 08:41:09 2004 -+++ BitTorrent/defaultargs.py Sun Dec 26 08:41:16 2004 -@@ -83,7 +83,7 @@ - 'if nonzero, set the TOS option for peer connections to this value'), - ('filesystem_encoding', '', - "character encoding used on the local filesystem. If left empty, autodetected. Autodetection doesn't work under python versions older than 2.3"), -- ('enable_bad_libc_workaround', 0, -+ ('enable_bad_libc_workaround', 1, - 'enable workaround for a bug in BSD libc that makes file reads very slow.'), - ] - +--- BitTorrent/defaultargs.py.orig Tue May 24 03:01:06 2005 ++++ BitTorrent/defaultargs.py Sun May 29 22:48:48 2005 +@@ -110,7 +110,7 @@ + _("do not connect to several peers that have the same IP address")), + ('peer_socket_tos', 8, + _("if nonzero, set the TOS option for peer connections to this value")), +- ('bad_libc_workaround', MYFALSE, ++ ('bad_libc_workaround', MYTRUE, + _("enable workaround for a bug in BSD libc that makes file reads very slow.")), + ('tracker_proxy', '', + _("address of HTTP proxy to use for tracker connections")), diff --git a/net-p2p/py-bittorrent-devel/files/patch-btdownloadgui.py b/net-p2p/py-bittorrent-devel/files/patch-btdownloadgui.py deleted file mode 100644 index 870a630e2a21..000000000000 --- a/net-p2p/py-bittorrent-devel/files/patch-btdownloadgui.py +++ /dev/null @@ -1,122 +0,0 @@ ---- btdownloadgui.py.orig Mon Dec 20 20:39:15 2004 -+++ btdownloadgui.py Sat Jan 8 15:16:14 2005 -@@ -1507,33 +1507,44 @@ - - if advanced_ui: - self.extrabox = gtk.VBox(homogeneous=False) -- -- self.table = gtk.Table(2, 7, False) -- self.labels = [] -- lnames = ('peers','seeds','distr','up curr.','down curr.','up prev.','down prev.') -+ #self.extrabox = self.vbox -+ -+ self.up_curr = FancyLabel('Current up: %s' , 0) -+ self.down_curr = FancyLabel('Current down: %s', 0) -+ self.curr_box = gtk.HBox(homogeneous=True) -+ self.curr_box.pack_start(lalign(self.up_curr ), expand=True, fill=True) -+ self.curr_box.pack_start(lalign(self.down_curr), expand=True, fill=True) -+ self.extrabox.pack_start(self.curr_box) - -- for i, name in enumerate(lnames): -- label = gtk.Label(name) -- self.table.attach(label, i, i+1, 0, 1, xpadding = SPACING) -- label = gtk.Label('-') -- self.labels.append(label) -- self.table.attach(label, i, i+1, 1, 2, xpadding = SPACING) -- self.extrabox.pack_start(self.table) -+ self.up_prev = FancyLabel('Previous up: %s' , 0) -+ self.down_prev = FancyLabel('Previous down: %s' , 0) -+ self.prev_box = gtk.HBox(homogeneous=True) -+ self.prev_box.pack_start(lalign(self.up_prev ), expand=True, fill=True) -+ self.prev_box.pack_start(lalign(self.down_prev), expand=True, fill=True) -+ self.extrabox.pack_start(self.prev_box) -+ -+ self.share_ratio = FancyLabel('Share ratio: %0.02f%%', 0) -+ self.extrabox.pack_start(lalign(self.share_ratio)) -+ -+ self.peer_info = FancyLabel('%s peers, %s seeds',0,0) -+ self.extrabox.pack_start(lalign(self.peer_info)) - -- # extra info -- self.elabels = [] -- for i in range(4): -- label = gtk.Label('-') -- self.extrabox.pack_start(lalign(label)) -- self.elabels.append(label) -+ self.dist_copies = FancyLabel('Distributed copies: %d; Next: %s', 0, '') -+ self.extrabox.pack_start(lalign(self.dist_copies)) -+ -+ self.piece_info = FancyLabel('Pieces: %d total, %d complete, %d partial, %d active (%d empty)', *(0,)*5) -+ self.extrabox.pack_start(lalign(self.piece_info)) -+ -+ self.bad_info = FancyLabel('%d bad pieces + %s in discarded requests', 0, 0) -+ self.extrabox.pack_start(lalign(self.bad_info)) - -+ # extra info -+ - pl = self.metainfo.piece_length - tl = self.metainfo.total_bytes - count, lastlen = divmod(tl, pl) - self.piece_count = count + (lastlen > 0) - -- self.elabels[0].set_text("Share ratio: -") -- - self.infobox.pack_end(self.extrabox, expand=False, fill=False) - - -@@ -1649,31 +1660,34 @@ - Rate(statistics['upRate'])) - - if advanced_ui: -- self.labels[0].set_text(str(statistics['numPeers'])) -+ if self.up_down_ratio is not None: -+ self.share_ratio.set_value(self.up_down_ratio*100) -+ -+ num_seeds = statistics['numSeeds'] - if self.seed: -- statistics['numOldSeeds'] = 0 # !@# XXX -- self.labels[1].set_text('(%d)' % statistics['numOldSeeds']) -- else: -- self.labels[1].set_text(str(statistics['numSeeds'])) -- self.labels[2].set_text(str(statistics['numCopies'])) -- self.labels[3].set_text(str(Size(statistics['upTotal']))) -- self.labels[4].set_text(str(Size(statistics['downTotal']))) -- self.labels[5].set_text(str(Size(self.uptotal))) -- self.labels[6].set_text(str(Size(self.downtotal))) -+ num_seeds = statistics['numOldSeeds'] = 0 # !@# XXX -+ -+ self.peer_info.set_value(statistics['numPeers' ], -+ num_seeds) -+ #statistics['numCopies'], ) -+ -+ self.up_curr.set_value(str(Size(statistics['upTotal']))) -+ self.down_curr.set_value(str(Size(statistics['downTotal']))) -+ -+ self.up_prev.set_value(str(Size(self.uptotal))) -+ self.down_prev.set_value(str(Size(self.downtotal))) - -- if advanced_ui: - # refresh extra info -- if self.up_down_ratio is not None: -- self.elabels[0].set_text('Share ratio: %.2f%%' % (self.up_down_ratio*100)) -- self.elabels[1].set_text('Pieces: %d total, %d complete, %d partial, %d active (%d empty)' -- % (self.piece_count , -- statistics['storage_numcomplete'], -- statistics['storage_dirty'], -- statistics['storage_active'], -- statistics['storage_new'])) -- self.elabels[2].set_text('Next distributed copies: ' + ', '.join(["%d:%.1f%%" % (a, int(b*1000)/10) for a, b in zip(itertools.count(int(statistics['numCopies']+1)), statistics['numCopyList'])])) -- self.elabels[3].set_text('%d bad pieces + %s in discarded requests' % (statistics['storage_numflunked'], Size(statistics['discarded']))) -+ self.piece_info.set_value(self.piece_count, -+ statistics['storage_numcomplete'], -+ statistics['storage_dirty'], -+ statistics['storage_active'], -+ statistics['storage_new'] ) - -+ self.dist_copies.set_value( statistics['numCopies'], ', '.join(["%d:%.1f%%" % (a, int(b*1000)/10) for a, b in zip(itertools.count(int(statistics['numCopies']+1)), statistics['numCopyList'])])) -+ -+ self.bad_info.set_value(statistics['storage_numflunked'], Size(statistics['discarded'])) -+ - if self.peerlistwindow is not None: - spew = statistics.get('spew') - if spew is not None: diff --git a/net-p2p/py-bittorrent-devel/files/patch-setup.py b/net-p2p/py-bittorrent-devel/files/patch-setup.py deleted file mode 100644 index db3b47238e7c..000000000000 --- a/net-p2p/py-bittorrent-devel/files/patch-setup.py +++ /dev/null @@ -1,11 +0,0 @@ ---- setup.py.orig Fri Dec 24 06:59:35 2004 -+++ setup.py Fri Dec 24 06:59:44 2004 -@@ -29,8 +29,6 @@ - - data_files = [ (img_root , glob.glob('images/*png')+['images/bittorrent.ico',]), - (img_root+'/logo', glob.glob('images/logo/bittorrent_[0-9]*.png') ), -- (doc_root , ['credits.txt', 'LICENSE.txt', -- 'README.txt', 'redirdonate.html'] ), - ] - - setup( diff --git a/net-p2p/py-bittorrent-devel/pkg-plist b/net-p2p/py-bittorrent-devel/pkg-plist index 4e631f50fce7..45cf6fe37a63 100644 --- a/net-p2p/py-bittorrent-devel/pkg-plist +++ b/net-p2p/py-bittorrent-devel/pkg-plist @@ -6,7 +6,6 @@ bin/btmaketorrent.py bin/btreannounce.py bin/btrename.py bin/btshowmetainfo.py -bin/bttest.py bin/bttrack.py %%PYTHON_SITELIBDIR%%/BitTorrent/Choker.py %%PYTHON_SITELIBDIR%%/BitTorrent/Choker.pyc @@ -113,32 +112,89 @@ bin/bttrack.py %%PYTHON_SITELIBDIR%%/BitTorrent/parsedir.py %%PYTHON_SITELIBDIR%%/BitTorrent/parsedir.pyc %%PYTHON_SITELIBDIR%%/BitTorrent/parsedir.pyo +%%PYTHON_SITELIBDIR%%/BitTorrent/platform.py +%%PYTHON_SITELIBDIR%%/BitTorrent/platform.pyc +%%PYTHON_SITELIBDIR%%/BitTorrent/platform.pyo %%PYTHON_SITELIBDIR%%/BitTorrent/selectpoll.py %%PYTHON_SITELIBDIR%%/BitTorrent/selectpoll.pyc %%PYTHON_SITELIBDIR%%/BitTorrent/selectpoll.pyo -%%PYTHON_SITELIBDIR%%/BitTorrent/testtest.py -%%PYTHON_SITELIBDIR%%/BitTorrent/testtest.pyc -%%PYTHON_SITELIBDIR%%/BitTorrent/testtest.pyo %%PYTHON_SITELIBDIR%%/BitTorrent/track.py %%PYTHON_SITELIBDIR%%/BitTorrent/track.pyc %%PYTHON_SITELIBDIR%%/BitTorrent/track.pyo %%PYTHON_SITELIBDIR%%/BitTorrent/zurllib.py %%PYTHON_SITELIBDIR%%/BitTorrent/zurllib.pyc %%PYTHON_SITELIBDIR%%/BitTorrent/zurllib.pyo -share/pixmaps/BitTorrent-%%PORTVERSION%%/bittorrent.ico -share/pixmaps/BitTorrent-%%PORTVERSION%%/broken.png -share/pixmaps/BitTorrent-%%PORTVERSION%%/finished.png -share/pixmaps/BitTorrent-%%PORTVERSION%%/info.png -share/pixmaps/BitTorrent-%%PORTVERSION%%/logo/bittorrent_32.png -share/pixmaps/BitTorrent-%%PORTVERSION%%/logo/bittorrent_96.png -share/pixmaps/BitTorrent-%%PORTVERSION%%/pause.png -share/pixmaps/BitTorrent-%%PORTVERSION%%/play.png -share/pixmaps/BitTorrent-%%PORTVERSION%%/queued.png -share/pixmaps/BitTorrent-%%PORTVERSION%%/remove.png -share/pixmaps/BitTorrent-%%PORTVERSION%%/running.png -@dirrm share/pixmaps/BitTorrent-%%PORTVERSION%%/logo -@dirrm share/pixmaps/BitTorrent-%%PORTVERSION%% -@unexec rmdir %D/share/pixmaps 2>/dev/null || true +%%PYTHON_SITELIBDIR%%/khashmir/__init__.py +%%PYTHON_SITELIBDIR%%/khashmir/__init__.pyc +%%PYTHON_SITELIBDIR%%/khashmir/__init__.pyo +%%PYTHON_SITELIBDIR%%/khashmir/actions.py +%%PYTHON_SITELIBDIR%%/khashmir/actions.pyc +%%PYTHON_SITELIBDIR%%/khashmir/actions.pyo +%%PYTHON_SITELIBDIR%%/khashmir/cache.py +%%PYTHON_SITELIBDIR%%/khashmir/cache.pyc +%%PYTHON_SITELIBDIR%%/khashmir/cache.pyo +%%PYTHON_SITELIBDIR%%/khashmir/const.py +%%PYTHON_SITELIBDIR%%/khashmir/const.pyc +%%PYTHON_SITELIBDIR%%/khashmir/const.pyo +%%PYTHON_SITELIBDIR%%/khashmir/defer.py +%%PYTHON_SITELIBDIR%%/khashmir/defer.pyc +%%PYTHON_SITELIBDIR%%/khashmir/defer.pyo +%%PYTHON_SITELIBDIR%%/khashmir/inserter.py +%%PYTHON_SITELIBDIR%%/khashmir/inserter.pyc +%%PYTHON_SITELIBDIR%%/khashmir/inserter.pyo +%%PYTHON_SITELIBDIR%%/khashmir/khash.py +%%PYTHON_SITELIBDIR%%/khashmir/khash.pyc +%%PYTHON_SITELIBDIR%%/khashmir/khash.pyo +%%PYTHON_SITELIBDIR%%/khashmir/khashmir.py +%%PYTHON_SITELIBDIR%%/khashmir/khashmir.pyc +%%PYTHON_SITELIBDIR%%/khashmir/khashmir.pyo +%%PYTHON_SITELIBDIR%%/khashmir/knet.py +%%PYTHON_SITELIBDIR%%/khashmir/knet.pyc +%%PYTHON_SITELIBDIR%%/khashmir/knet.pyo +%%PYTHON_SITELIBDIR%%/khashmir/knode.py +%%PYTHON_SITELIBDIR%%/khashmir/knode.pyc +%%PYTHON_SITELIBDIR%%/khashmir/knode.pyo +%%PYTHON_SITELIBDIR%%/khashmir/krpc.py +%%PYTHON_SITELIBDIR%%/khashmir/krpc.pyc +%%PYTHON_SITELIBDIR%%/khashmir/krpc.pyo +%%PYTHON_SITELIBDIR%%/khashmir/kstore.py +%%PYTHON_SITELIBDIR%%/khashmir/kstore.pyc +%%PYTHON_SITELIBDIR%%/khashmir/kstore.pyo +%%PYTHON_SITELIBDIR%%/khashmir/ktable.py +%%PYTHON_SITELIBDIR%%/khashmir/ktable.pyc +%%PYTHON_SITELIBDIR%%/khashmir/ktable.pyo +%%PYTHON_SITELIBDIR%%/khashmir/node.py +%%PYTHON_SITELIBDIR%%/khashmir/node.pyc +%%PYTHON_SITELIBDIR%%/khashmir/node.pyo +%%PYTHON_SITELIBDIR%%/khashmir/setup.py +%%PYTHON_SITELIBDIR%%/khashmir/setup.pyc +%%PYTHON_SITELIBDIR%%/khashmir/setup.pyo +%%PYTHON_SITELIBDIR%%/khashmir/test.py +%%PYTHON_SITELIBDIR%%/khashmir/test.pyc +%%PYTHON_SITELIBDIR%%/khashmir/test.pyo +%%PYTHON_SITELIBDIR%%/khashmir/test_khashmir.py +%%PYTHON_SITELIBDIR%%/khashmir/test_khashmir.pyc +%%PYTHON_SITELIBDIR%%/khashmir/test_khashmir.pyo +%%PYTHON_SITELIBDIR%%/khashmir/test_krpc.py +%%PYTHON_SITELIBDIR%%/khashmir/test_krpc.pyc +%%PYTHON_SITELIBDIR%%/khashmir/test_krpc.pyo +%%PYTHON_SITELIBDIR%%/khashmir/test_kstore.py +%%PYTHON_SITELIBDIR%%/khashmir/test_kstore.pyc +%%PYTHON_SITELIBDIR%%/khashmir/test_kstore.pyo +%%PYTHON_SITELIBDIR%%/khashmir/unet.py +%%PYTHON_SITELIBDIR%%/khashmir/unet.pyc +%%PYTHON_SITELIBDIR%%/khashmir/unet.pyo +%%PYTHON_SITELIBDIR%%/khashmir/util.py +%%PYTHON_SITELIBDIR%%/khashmir/util.pyc +%%PYTHON_SITELIBDIR%%/khashmir/util.pyo +%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.py +%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.pyc +%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.pyo +share/locale/fr/LC_MESSAGES/bittorrent.mo +%%GUI%%@dirrm share/pixmaps/BitTorrent/logo +%%GUI%%@dirrm share/pixmaps/BitTorrent +%%GUI%%@unexec rmdir %D/share/pixmaps 2>/dev/null || true +@dirrm %%PYTHON_SITELIBDIR%%/khashmir @dirrm %%PYTHON_SITELIBDIR%%/BitTorrent @unexec rmdir %D/%%PYTHON_SITELIBDIR%% 2>/dev/null || true @unexec rmdir %D/%%PYTHON_LIBDIR%% 2>/dev/null || true |