aboutsummaryrefslogtreecommitdiff
path: root/net/py-kenosis-bittorrent
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2004-12-24 09:29:37 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2004-12-24 09:29:37 +0000
commite7fca6a53f75e40d0f4659c216363c56bc498f6b (patch)
treedfa441f9512be0111873f40380073a58e3dd7588 /net/py-kenosis-bittorrent
parentb908acd9c8358674fcaf72061f3d4653bd37a231 (diff)
downloadports-e7fca6a53f75e40d0f4659c216363c56bc498f6b.tar.gz
ports-e7fca6a53f75e40d0f4659c216363c56bc498f6b.zip
Notes
Diffstat (limited to 'net/py-kenosis-bittorrent')
-rw-r--r--net/py-kenosis-bittorrent/Makefile39
-rw-r--r--net/py-kenosis-bittorrent/files/extra-psyco-patch-btcompletedir.py18
-rw-r--r--net/py-kenosis-bittorrent/files/extra-psyco-patch-btcompletedirgui.py18
-rw-r--r--net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadcurses.py18
-rw-r--r--net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadgui.py18
-rw-r--r--net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadheadless.py18
-rw-r--r--net/py-kenosis-bittorrent/files/extra-psyco-patch-btlaunchmany.py18
-rw-r--r--net/py-kenosis-bittorrent/files/extra-psyco-patch-btlaunchmanycurses.py18
-rw-r--r--net/py-kenosis-bittorrent/files/extra-psyco-patch-btmakemetafile.py18
-rw-r--r--net/py-kenosis-bittorrent/files/extra-psyco-patch-bttrack.py18
10 files changed, 195 insertions, 6 deletions
diff --git a/net/py-kenosis-bittorrent/Makefile b/net/py-kenosis-bittorrent/Makefile
index 22549d3887e8..3ada585314a8 100644
--- a/net/py-kenosis-bittorrent/Makefile
+++ b/net/py-kenosis-bittorrent/Makefile
@@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 3.4.2
-PORTREVISION= 3
+PORTREVISION= 4
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
@@ -31,22 +31,40 @@ PORTDOCS= BUILD.windows.txt INSTALL.unix.txt LICENSE.txt \
.ifndef(WITHOUT_GUI)
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/wxPython/__init__.py:${PORTSDIR}/x11-toolkits/py-wxPython
-PLIST_SUB+= GUI=''
PLIST_FILES+= \
bin/btcompletedirgui.py \
bin/btdownloadgui.py
.else
EXTRA_PATCHES+= ${FILESDIR}/extra-nogui-patch-setup.py
.endif
+# required for PSYCO
+.ifndef(WITHOUT_PSYCO)
+RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/psyco/_psyco.so:${PORTSDIR}/devel/py-psyco
+
+EXTRA_PATCHES+= \
+ ${FILESDIR}/extra-psyco-patch-btcompletedir.py \
+ ${FILESDIR}/extra-psyco-patch-btcompletedirgui.py \
+ ${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-btmakemetafile.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
-
-#post-extract:
-# patch to work with python 2.4
-# @${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
+.ifndef(WITHOUT_PSYCO)
+ @${ECHO_MSG} '===> Define WITHOUT_PSYCO to disable devel/py-psyco optimization'
+.endif
post-patch:
@${FIND} ${WRKSRC} -type f | \
@@ -58,6 +76,10 @@ post-patch:
-e 's|btdownloadgui.py|btdownloadcurses.py|' \
${WRKSRC}/INSTALL.unix.txt
.endif
+.ifndef(WITHOUT_PSYCO)
+# activate psyco optimization
+ @${ECHO_CMD} 'psyco = 1' > ${WRKSRC}/BitTorrent/PSYCO.py
+.endif
post-install:
.ifndef(NOPORTDOCS)
@@ -66,5 +88,10 @@ post-install:
@${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
.include <bsd.port.mk>
diff --git a/net/py-kenosis-bittorrent/files/extra-psyco-patch-btcompletedir.py b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btcompletedir.py
new file mode 100644
index 000000000000..7313c0b3b815
--- /dev/null
+++ b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btcompletedir.py
@@ -0,0 +1,18 @@
+--- btcompletedir.py Thu Dec 16 11:03:11 2004
++++ btcompletedir.py Thu Dec 16 11:12:55 2004
+@@ -3,6 +3,15 @@
+ # Written by Bram Cohen
+ # see LICENSE.txt for license information
+
++from BitTorrent import PSYCO
++if PSYCO.psyco:
++ try:
++ import psyco
++ assert psyco.__version__ >= 0x010300f0
++ psyco.full()
++ except:
++ pass
++
+ from os.path import join, split
+ from threading import Event
+ from traceback import print_exc
diff --git a/net/py-kenosis-bittorrent/files/extra-psyco-patch-btcompletedirgui.py b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btcompletedirgui.py
new file mode 100644
index 000000000000..750f7f3b4ff6
--- /dev/null
+++ b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btcompletedirgui.py
@@ -0,0 +1,18 @@
+--- btcompletedirgui.py Thu Dec 16 11:03:11 2004
++++ btcompletedirgui.py Thu Dec 16 11:13:34 2004
+@@ -3,6 +3,15 @@
+ # Written by Bram Cohen
+ # see LICENSE.txt for license information
+
++from BitTorrent import PSYCO
++if PSYCO.psyco:
++ try:
++ import psyco
++ assert psyco.__version__ >= 0x010300f0
++ psyco.full()
++ except:
++ pass
++
+ from sys import argv, version
+
+ from btcompletedir import completedir
diff --git a/net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadcurses.py b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadcurses.py
new file mode 100644
index 000000000000..f9914687c61b
--- /dev/null
+++ b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadcurses.py
@@ -0,0 +1,18 @@
+--- btdownloadcurses.py Thu Dec 16 11:03:11 2004
++++ btdownloadcurses.py Thu Dec 16 11:13:54 2004
+@@ -3,6 +3,15 @@
+ # Written by Henry 'Pi' James
+ # see LICENSE.txt for license information
+
++from BitTorrent import PSYCO
++if PSYCO.psyco:
++ try:
++ import psyco
++ assert psyco.__version__ >= 0x010300f0
++ psyco.full()
++ except:
++ pass
++
+ from BitTorrent.download import download
+ from threading import Event
+ from os.path import abspath
diff --git a/net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadgui.py b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadgui.py
new file mode 100644
index 000000000000..d9f8aa0300da
--- /dev/null
+++ b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadgui.py
@@ -0,0 +1,18 @@
+--- btdownloadgui.py Thu Dec 16 11:03:11 2004
++++ btdownloadgui.py Thu Dec 16 11:14:07 2004
+@@ -3,6 +3,15 @@
+ # Written by Bram Cohen and Myers Carpenter
+ # see LICENSE.txt for license information
+
++from BitTorrent import PSYCO
++if PSYCO.psyco:
++ try:
++ import psyco
++ assert psyco.__version__ >= 0x010300f0
++ psyco.full()
++ except:
++ pass
++
+ from sys import argv
+ from BitTorrent import version
+ from BitTorrent.download import download
diff --git a/net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadheadless.py b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadheadless.py
new file mode 100644
index 000000000000..ba6038187d07
--- /dev/null
+++ b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btdownloadheadless.py
@@ -0,0 +1,18 @@
+--- btdownloadheadless.py Thu Dec 16 11:03:11 2004
++++ btdownloadheadless.py Thu Dec 16 11:14:16 2004
+@@ -3,6 +3,15 @@
+ # Written by Bram Cohen
+ # see LICENSE.txt for license information
+
++from BitTorrent import PSYCO
++if PSYCO.psyco:
++ try:
++ import psyco
++ assert psyco.__version__ >= 0x010300f0
++ psyco.full()
++ except:
++ pass
++
+ from BitTorrent.download import download
+ from threading import Event
+ from os.path import abspath
diff --git a/net/py-kenosis-bittorrent/files/extra-psyco-patch-btlaunchmany.py b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btlaunchmany.py
new file mode 100644
index 000000000000..b52ef8d96737
--- /dev/null
+++ b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btlaunchmany.py
@@ -0,0 +1,18 @@
+--- btlaunchmany.py Thu Dec 16 11:03:11 2004
++++ btlaunchmany.py Thu Dec 16 11:14:54 2004
+@@ -7,6 +7,15 @@
+ # fmttime and fmtsize stolen from btdownloadcurses.
+ # see LICENSE.txt for license information
+
++from BitTorrent import PSYCO
++if PSYCO.psyco:
++ try:
++ import psyco
++ assert psyco.__version__ >= 0x010300f0
++ psyco.full()
++ except:
++ pass
++
+ from BitTorrent.download import download
+ from threading import Thread, Event, Lock
+ from os import listdir
diff --git a/net/py-kenosis-bittorrent/files/extra-psyco-patch-btlaunchmanycurses.py b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btlaunchmanycurses.py
new file mode 100644
index 000000000000..7cf9c34eefdb
--- /dev/null
+++ b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btlaunchmanycurses.py
@@ -0,0 +1,18 @@
+--- btlaunchmanycurses.py Thu Dec 16 11:03:11 2004
++++ btlaunchmanycurses.py Thu Dec 16 11:14:47 2004
+@@ -7,6 +7,15 @@
+ # fmttime and fmtsize stolen from btdownloadcurses.
+ # see LICENSE.txt for license information
+
++from BitTorrent import PSYCO
++if PSYCO.psyco:
++ try:
++ import psyco
++ assert psyco.__version__ >= 0x010300f0
++ psyco.full()
++ except:
++ pass
++
+ from BitTorrent.download import download
+ from threading import Thread, Event, Lock
+ from os import listdir
diff --git a/net/py-kenosis-bittorrent/files/extra-psyco-patch-btmakemetafile.py b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btmakemetafile.py
new file mode 100644
index 000000000000..27caf5b03793
--- /dev/null
+++ b/net/py-kenosis-bittorrent/files/extra-psyco-patch-btmakemetafile.py
@@ -0,0 +1,18 @@
+--- btmakemetafile.py Thu Dec 16 11:03:11 2004
++++ btmakemetafile.py Thu Dec 16 11:15:10 2004
+@@ -3,6 +3,15 @@
+ # Written by Bram Cohen
+ # see LICENSE.txt for license information
+
++from BitTorrent import PSYCO
++if PSYCO.psyco:
++ try:
++ import psyco
++ assert psyco.__version__ >= 0x010300f0
++ psyco.full()
++ except:
++ pass
++
+ from sys import argv
+ from os.path import getsize, split, join, abspath, isdir
+ from os import listdir
diff --git a/net/py-kenosis-bittorrent/files/extra-psyco-patch-bttrack.py b/net/py-kenosis-bittorrent/files/extra-psyco-patch-bttrack.py
new file mode 100644
index 000000000000..eee72f22c626
--- /dev/null
+++ b/net/py-kenosis-bittorrent/files/extra-psyco-patch-bttrack.py
@@ -0,0 +1,18 @@
+--- bttrack.py Thu Dec 16 11:03:11 2004
++++ bttrack.py Thu Dec 16 11:15:33 2004
+@@ -3,6 +3,15 @@
+ # Written by Bram Cohen
+ # see LICENSE.txt for license information
+
++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
+