diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2009-06-08 22:30:55 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2009-06-08 22:30:55 +0000 |
commit | 81100672d4de2795c4284cf568383d48955cbdcb (patch) | |
tree | 47e3d403298c2fd50b0ec056f62df5c31925decb /devel/aap | |
parent | 6d138c2d46f8ea88c939a76298099dbcf07491af (diff) | |
download | ports-81100672d4de2795c4284cf568383d48955cbdcb.tar.gz ports-81100672d4de2795c4284cf568383d48955cbdcb.zip |
Notes
Diffstat (limited to 'devel/aap')
-rw-r--r-- | devel/aap/Makefile | 9 | ||||
-rw-r--r-- | devel/aap/files/extra-Sign.py | 40 | ||||
-rw-r--r-- | devel/aap/files/patch-Filetype.py | 35 |
3 files changed, 83 insertions, 1 deletions
diff --git a/devel/aap/Makefile b/devel/aap/Makefile index 651029e5e41d..4028e654c3e7 100644 --- a/devel/aap/Makefile +++ b/devel/aap/Makefile @@ -7,6 +7,7 @@ PORTNAME= aap PORTVERSION= 1.090 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= a-a-p @@ -29,6 +30,12 @@ FULLDOCS=yes FULLDOCS=no .endif +.include <bsd.port.pre.mk> + +.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 +48,4 @@ test: install 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 <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/devel/aap/files/extra-Sign.py b/devel/aap/files/extra-Sign.py new file mode 100644 index 000000000000..18c12c39725a --- /dev/null +++ b/devel/aap/files/extra-Sign.py @@ -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): diff --git a/devel/aap/files/patch-Filetype.py b/devel/aap/files/patch-Filetype.py new file mode 100644 index 000000000000..4fa4f1f71f23 --- /dev/null +++ b/devel/aap/files/patch-Filetype.py @@ -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 |