diff options
author | brooks <brooks@FreeBSD.org> | 2011-01-12 09:21:43 +0800 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2011-01-12 09:21:43 +0800 |
commit | caf38ca6954ad43c4f31fffcf349752f0c3e6f57 (patch) | |
tree | e2bcfff6d75c996b6a882b513145dc183e93544a /www/trac-math | |
parent | 86583203b95a41de1d64db95fbb439670ea50f7b (diff) | |
download | freebsd-ports-gnome-caf38ca6954ad43c4f31fffcf349752f0c3e6f57.tar.gz freebsd-ports-gnome-caf38ca6954ad43c4f31fffcf349752f0c3e6f57.tar.zst freebsd-ports-gnome-caf38ca6954ad43c4f31fffcf349752f0c3e6f57.zip |
Use hashlib rather than the deprecated sha module. Require a python
version of 2.5 or greater.
Feature safe: yes
Diffstat (limited to 'www/trac-math')
-rw-r--r-- | www/trac-math/Makefile | 4 | ||||
-rw-r--r-- | www/trac-math/files/patch-tracmath_tracmath.py | 24 |
2 files changed, 26 insertions, 2 deletions
diff --git a/www/trac-math/Makefile b/www/trac-math/Makefile index de05638a93be..56b02541316c 100644 --- a/www/trac-math/Makefile +++ b/www/trac-math/Makefile @@ -7,7 +7,7 @@ PORTNAME= ${PYDISTUTILS_PKGNAME:S;^Trac;;S;Plugin$;;:L} PORTVERSION= 0.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= www math python MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= brooks @@ -23,7 +23,7 @@ BUILD_DEPENDS+= easy_install:${PORTSDIR}/devel/py-setuptools SUB_FILES= pkg-message PKGMESSAGE= ${WRKDIR}/pkg-message -USE_PYTHON= yes +USE_PYTHON= 2.5+ USE_PYDISTUTILS=easy_install PYDISTUTILS_PKGNAME= TracMath diff --git a/www/trac-math/files/patch-tracmath_tracmath.py b/www/trac-math/files/patch-tracmath_tracmath.py new file mode 100644 index 000000000000..ba08bfcaf32f --- /dev/null +++ b/www/trac-math/files/patch-tracmath_tracmath.py @@ -0,0 +1,24 @@ + +$FreeBSD$ + +--- tracmath/tracmath.py.orig ++++ tracmath/tracmath.py +@@ -4,8 +4,8 @@ + """ + + import codecs ++import hashlib + import re +-import sha + from cStringIO import StringIO + import os + import sys +@@ -142,7 +142,7 @@ + if m: + label = m.group(1) + +- key = sha.new(content.encode('utf-8')).hexdigest() ++ key = hashlib.sha1(content.encode('utf-8')).hexdigest() + + imgname = key + '.png' + imgpath = os.path.join(self.cacheDirectory, imgname) |