summaryrefslogtreecommitdiff
path: root/net/bittorrent
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2009-11-21 19:28:34 +0000
committertron <tron@pkgsrc.org>2009-11-21 19:28:34 +0000
commit4c2d2171c86d8880f7cbdb4bb089450f0bad6767 (patch)
tree3e4c201c4d95525eff5430ae9e1e56150f0ffa5e /net/bittorrent
parentad0026e6b9ceef5c9f524a7842f0d35604ab480c (diff)
downloadpkgsrc-4c2d2171c86d8880f7cbdb4bb089450f0bad6767.tar.gz
The "hashlib" module instead of the deprecated "sha1" module under
Python 2.5 or newer. Tested with Python 2.6 under NetBSD/amd64 5.0_STABLE. Bump package revision because of this fix.
Diffstat (limited to 'net/bittorrent')
-rw-r--r--net/bittorrent/Makefile23
1 files changed, 21 insertions, 2 deletions
diff --git a/net/bittorrent/Makefile b/net/bittorrent/Makefile
index 1181d921bb0..3dd09fa89f7 100644
--- a/net/bittorrent/Makefile
+++ b/net/bittorrent/Makefile
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.37 2009/02/09 22:56:26 joerg Exp $
+# $NetBSD: Makefile,v 1.38 2009/11/21 19:28:34 tron Exp $
PKG_DESTDIR_SUPPORT= user-destdir
.include "Makefile.common"
PKGNAME= ${DISTNAME:S/BitT/bitt/}
-PKGREVISION= 1
+PKGREVISION= 2
PYDISTUTILSPKG= yes
@@ -16,5 +16,24 @@ CONFLICTS+= BitTornado-[0-9]*
.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
+
+.if ${PYVERSSUFFIX} != "2.4"
+SUBST_CLASSES+= sha
+SUBST_MESSAGE.sha= Fixing references to deprecated sha module.
+SUBST_STAGE.sha= pre-configure
+SUBST_FILES.sha= BitTorrent/ConvertedMetainfo.py
+SUBST_FILES.sha+= BitTorrent/NewVersion.py
+SUBST_FILES.sha+= BitTorrent/PeerID.py
+SUBST_FILES.sha+= BitTorrent/StorageWrapper.py
+SUBST_FILES.sha+= BitTorrent/download.py
+SUBST_FILES.sha+= BitTorrent/makemetafile.py
+SUBST_FILES.sha+= BitTorrent/parsedir.py
+SUBST_FILES.sha+= khashmir/khash.py
+SUBST_FILES.sha+= khashmir/khashmir.py
+SUBST_FILES.sha+= khashmir/utkhashmir.py
+SUBST_FILES.sha+= torrentinfo-console.py
+SUBST_SED.sha= -e "s/^from sha import .*/from hashlib import sha1 as sha/"
+.endif
+
.include "../../devel/py-cursespanel/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"