aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2005-11-21 10:29:09 +0800
committerlioux <lioux@FreeBSD.org>2005-11-21 10:29:09 +0800
commit358395a63332c110adb3b9a0de5e6fd18ddb5543 (patch)
treed592f0970507fbf43e14662468405c9e9733fc3d /net
parente44f9df3276441d8c3e89793d17eec8b9ea264c7 (diff)
downloadfreebsd-ports-gnome-358395a63332c110adb3b9a0de5e6fd18ddb5543.tar.gz
freebsd-ports-gnome-358395a63332c110adb3b9a0de5e6fd18ddb5543.tar.zst
freebsd-ports-gnome-358395a63332c110adb3b9a0de5e6fd18ddb5543.zip
o Remove unnecessary post-patch entry, forcing socket reuse do not
seem to be required anymore o Install public.key file under ${DATADIR} instead of ${DOCSDIR} o Bump PORTREVISION
Diffstat (limited to 'net')
-rw-r--r--net/py-bittorrent-devel/Makefile31
-rw-r--r--net/py-bittorrent-devel/files/extra-noportdocs-setup.py10
-rw-r--r--net/py-bittorrent-devel/files/patch-BitTorrent__NewVersion.py11
-rw-r--r--net/py-bittorrent-devel/pkg-plist4
4 files changed, 36 insertions, 20 deletions
diff --git a/net/py-bittorrent-devel/Makefile b/net/py-bittorrent-devel/Makefile
index 9bbcc412bff6..7103aa084124 100644
--- a/net/py-bittorrent-devel/Makefile
+++ b/net/py-bittorrent-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 4.1.8
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= http://www.bittorrent.com/dl/ \
@@ -44,9 +44,6 @@ PORTDOCS= \
EXTRA_PATCHES+= ${FILESDIR}/extra-noportdocs-setup.py
.endif
-# always install the public key
-PORTDOCS+= public.key
-
.include <bsd.port.pre.mk>
.if ${ARCH} != "i386"
@@ -107,14 +104,17 @@ pre-everything::
@${ECHO_MSG} '===> Define WITHOUT_PSYCO to disable devel/py-psyco optimization'
.endif
+pre-patch:
+# do not install public.key, we will do it ourselves
+ @${REINPLACE_CMD} -E \
+ -e "s|^.*'public.key'.*$$||" \
+ ${WRKSRC}/setup.py
+
post-patch:
-# whrandom is deprecated: whrandom -> random
- @${FIND} ${WRKSRC} -type f | \
- ${XARGS} -x -n 10 \
- ${REINPLACE_CMD} -E \
- -e 's|whrandom|random|' \
- -e 's|reuse=False|reuse=True|' \
- -e 's|/usr/bin/env python.*|${LOCALBASE}/bin/python|'
+# public.key will be located under ${DATADIR} not ${DOCSDIR}
+ @${REINPLACE_CMD} -E \
+ -e "s|%%DATADIR%%|'${DATADIR}/'|" \
+ ${WRKSRC}/BitTorrent/NewVersion.py
post-install:
# set proper permissions
@@ -126,13 +126,16 @@ post-install:
# pixmaps
@${CHMOD} -R ${SHAREMODE} \
${PREFIX}/share/pixmaps/${PORTNAME}/*
- @${CHMOD} a+x \
+ @${CHMOD} a+X \
${PREFIX}/share/pixmaps/${PORTNAME}/logo
.endif
-#.ifndef(NOPORTDOCS)
+.ifndef(NOPORTDOCS)
# docs
@${CHMOD} -R ${SHAREMODE} \
${DOCSDIR}/*
-#.endif
+.endif
+# public.key
+ @${MKDIR} ${DATADIR}
+ @${INSTALL_DATA} ${WRKSRC}/public.key ${DATADIR}
.include <bsd.port.post.mk>
diff --git a/net/py-bittorrent-devel/files/extra-noportdocs-setup.py b/net/py-bittorrent-devel/files/extra-noportdocs-setup.py
index 922882766b9c..64e39642de55 100644
--- a/net/py-bittorrent-devel/files/extra-noportdocs-setup.py
+++ b/net/py-bittorrent-devel/files/extra-noportdocs-setup.py
@@ -1,8 +1,8 @@
---- setup.py.orig Tue Aug 23 23:09:42 2005
-+++ setup.py Tue Aug 23 23:24:44 2005
-@@ -58,4 +58,1 @@
+--- setup.py.orig Mon Nov 21 00:10:24 2005
++++ setup.py Mon Nov 21 00:10:33 2005
+@@ -72,5 +72,0 @@
- (doc_root , ['credits.txt', 'credits-l10n.txt',
- 'LICENSE.txt', 'README.txt',
- 'TRACKERLESS.txt', 'redirdonate.html',
-- 'public.key',
-+ (doc_root , ['public.key',
+-
+- ] ),
diff --git a/net/py-bittorrent-devel/files/patch-BitTorrent__NewVersion.py b/net/py-bittorrent-devel/files/patch-BitTorrent__NewVersion.py
new file mode 100644
index 000000000000..fcb590ce108a
--- /dev/null
+++ b/net/py-bittorrent-devel/files/patch-BitTorrent__NewVersion.py
@@ -0,0 +1,11 @@
+--- BitTorrent/NewVersion.py.orig Sun Nov 20 23:10:09 2005
++++ BitTorrent/NewVersion.py Sun Nov 20 23:10:37 2005
+@@ -127,7 +127,7 @@
+ self.threadwrap(self.errorfunc, WARNING, '\n'.join(terrors))
+
+ if torrentfile and signature:
+- public_key_file = open(os.path.join(doc_root, 'public.key'), 'rb')
++ public_key_file = open(os.path.join(%%DATADIR%%, 'public.key'), 'rb')
+ public_key = pickle.load(public_key_file)
+ h = sha(torrentfile).digest()
+ if public_key.verify(h, signature):
diff --git a/net/py-bittorrent-devel/pkg-plist b/net/py-bittorrent-devel/pkg-plist
index 07a6a4e9fe32..d42dbc0da3ae 100644
--- a/net/py-bittorrent-devel/pkg-plist
+++ b/net/py-bittorrent-devel/pkg-plist
@@ -210,6 +210,7 @@ bin/torrentinfo-console
%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.py
%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.pyc
%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.pyo
+%%DATADIR%%/public.key
share/locale/af/LC_MESSAGES/bittorrent.mo
share/locale/bg/LC_MESSAGES/bittorrent.mo
share/locale/ca/LC_MESSAGES/bittorrent.mo
@@ -237,7 +238,7 @@ share/locale/vi/LC_MESSAGES/bittorrent.mo
share/locale/zh_CN/LC_MESSAGES/bittorrent.mo
share/locale/zh_TW/LC_MESSAGES/bittorrent.mo
%%GUI%%@dirrm share/pixmaps/BitTorrent/logo
-%%GUI%%@dirrm share/pixmaps/BitTorrent
+%%GUI%%@dirrm share/pixmaps/BitTorrent
%%GUI%%@unexec rmdir %D/share/pixmaps 2>/dev/null || true
@unexec rmdir %D/share/locale/zh_TW/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/zh_TW 2>/dev/null || true
@@ -261,6 +262,7 @@ share/locale/zh_TW/LC_MESSAGES/bittorrent.mo
@unexec rmdir %D/share/locale/cs 2>/dev/null || true
@unexec rmdir %D/share/locale/ca/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/ca 2>/dev/null || true
+@dirrm %%DATADIR%%
@dirrm %%PYTHON_SITELIBDIR%%/khashmir
@dirrm %%PYTHON_SITELIBDIR%%/BitTorrent
@unexec rmdir %D/%%PYTHON_SITELIBDIR%% 2>/dev/null || true