Index: Makefile =================================================================== RCS file: /home/pcvs/ports/devel/aap/Makefile,v retrieving revision 1.22 diff -u -r1.22 Makefile --- Makefile 20 Aug 2007 14:48:07 -0000 1.22 +++ Makefile 27 May 2009 12:32:13 -0000 @@ -29,6 +29,12 @@ FULLDOCS=no .endif +.include + +.if ${PYTHON_VER} >= 2.5 +EXTRA_PATCHES= ${FILESDIR}/extra-Sign.py +.endif + do-install: @cd ${WRKSRC} && \ ${PYTHON_CMD} ./aap PREFIX="${PREFIX}" FULLDOCS=${FULLDOCS} \ @@ -41,4 +47,4 @@ x-generate-plist: (${PORTSDIR}/Tools/scripts/plist -d -m ${MTREE_FILE} ${PREFIX}|${SED} -E 's,.*share/nls/.+$$,,g;s,${PORTVERSION},%%PORTVERSION%%,g;s,^(lib/aap/Exec-%%PORTVERSION%%/doc/),%%PORTDOCS%%\1,g;s,^share/doc/aap/.*,,g'|${TR} -s '\n') > temp-pkg-plist -.include +.include Index: files/extra-Sign.py =================================================================== RCS file: files/extra-Sign.py diff -N files/extra-Sign.py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/extra-Sign.py 27 May 2009 12:13:38 -0000 @@ -0,0 +1,40 @@ +--- Sign.py.orig 2009-05-27 14:09:55.000000000 +0200 ++++ Sign.py 2009-05-27 14:13:27.000000000 +0200 +@@ -11,7 +11,7 @@ + import os + import os.path + import string +-import md5 ++import hashlib + import time + + from Util import * +@@ -272,7 +272,7 @@ + + try: + f = open(fname, "rb") +- m = md5.new() ++ m = hashlib.md5() + while 1: + # Read big blocks at a time for speed, but don't read the whole + # file at once to reduce memory usage. +@@ -301,7 +301,7 @@ + % fname) + str(e)) + return "unknown" + +- m = md5.new() ++ m = hashlib.md5() + + inquote = 0 + incomment = 0 +@@ -404,7 +404,9 @@ + + def buildcheckstr2sign(str): + """Compute a signature from a string for the buildcheck.""" +- return hexdigest(md5.new(str)) ++ m = hashlib.md5() ++ m.update(str) ++ return hexdigest(m) + + + def _sign_lookup(signatures, name, key): Index: files/patch-Filetype.py =================================================================== RCS file: files/patch-Filetype.py diff -N files/patch-Filetype.py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-Filetype.py 27 May 2009 11:47:43 -0000 @@ -0,0 +1,35 @@ +--- Filetype.py.orig 2009-05-14 15:19:42.000000000 +0200 ++++ Filetype.py 2009-05-14 15:20:50.000000000 +0200 +@@ -1414,12 +1414,12 @@ + rline = items[1] + rline_len = len(rline) + # isolate first argument, which may be in quotes +- as = 0 +- if as < rline_len: +- if rline[as] == '"' or rline[as] == "'": +- quote = rline[as] +- as = as + 1 +- ae = as ++ vas = 0 ++ if vas < rline_len: ++ if rline[vas] == '"' or rline[vas] == "'": ++ quote = rline[vas] ++ vas = vas + 1 ++ ae = vas + while ae < rline_len and rline[ae] != quote: + ae = ae + 1 + if ae == rline_len: +@@ -1427,11 +1427,11 @@ + % (line_idx + recipe_line_nr, line)) + n = ae + 1 + else: +- ae = as ++ ae = vas + while ae < rline_len and rline[ae] != ' ' and rline[ae] != '\t': + ae = ae + 1 + n = ae +- arg1 = rline[as:ae] ++ arg1 = rline[vas:ae] + else: + arg1 = '' + n = rline_len