Index: head/devel/py-cffi/files/patch-cffi_verifier.py =================================================================== --- head/devel/py-cffi/files/patch-cffi_verifier.py (revision 390426) +++ head/devel/py-cffi/files/patch-cffi_verifier.py (nonexistent) @@ -1,68 +0,0 @@ -# Backport: PR #56: Actually check if the file exists rather than assume it doesn't -# https://bitbucket.org/cffi/cffi/pull-request/56/ - ---- cffi/verifier.py.orig 2015-02-11 08:57:05 UTC -+++ cffi/verifier.py -@@ -1,7 +1,16 @@ --import sys, os, binascii, imp, shutil -+import sys, os, binascii, imp, shutil, io - from . import __version__ - from . import ffiplatform - -+if sys.version_info >= (3,): -+ NativeIO = io.StringIO -+else: -+ class NativeIO(io.BytesIO): -+ def write(self, s): -+ if isinstance(s, unicode): -+ s = s.encode('ascii') -+ super(NativeIO, self).write(s) -+ - - class Verifier(object): - -@@ -118,19 +127,36 @@ class Verifier(object): - self._vengine.collect_types() - self._has_module = True - -- def _write_source(self, file=None): -- must_close = (file is None) -- if must_close: -- _ensure_dir(self.sourcefilename) -- file = open(self.sourcefilename, 'w') -+ def _write_source_to(self, file): - self._vengine._f = file - try: - self._vengine.write_source_to_f() - finally: - del self._vengine._f -- if must_close: -- file.close() -- if must_close: -+ -+ def _write_source(self, file=None): -+ if file is not None: -+ self._write_source_to(file) -+ else: -+ # Write our source file to an in memory file. -+ f = NativeIO() -+ self._write_source_to(f) -+ source_data = f.getvalue() -+ -+ # Determine if this matches the current file -+ if os.path.exists(self.sourcefilename): -+ with open(self.sourcefilename, "r") as fp: -+ needs_written = not (fp.read() == source_data) -+ else: -+ needs_written = True -+ -+ # Actually write the file out if it doesn't match -+ if needs_written: -+ _ensure_dir(self.sourcefilename) -+ with open(self.sourcefilename, "w") as fp: -+ fp.write(source_data) -+ -+ # Set this flag - self._has_source = True - - def _compile_module(self): Property changes on: head/devel/py-cffi/files/patch-cffi_verifier.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/py-cffi/Makefile =================================================================== --- head/devel/py-cffi/Makefile (revision 390426) +++ head/devel/py-cffi/Makefile (revision 390427) @@ -1,31 +1,30 @@ # Created by: William Grzybowski # $FreeBSD$ PORTNAME= cffi -PORTVERSION= 0.8.6 -PORTREVISION= 3 +PORTVERSION= 1.1.1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= wg@FreeBSD.org COMMENT= Foreign Function Interface for Python calling C code LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycparser>=2.10:${PORTSDIR}/devel/py-pycparser TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest CFLAGS+= -I${LOCALBASE}/include -Wl,-rpath,${LOCALBASE}/lib LDFLAGS+= -L${LOCALBASE}/lib USES= python USE_PYTHON= autoplist distutils regression-test: patch cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} build_ext -i && ${LOCALBASE}/bin/py.test .include Index: head/devel/py-cffi/distinfo =================================================================== --- head/devel/py-cffi/distinfo (revision 390426) +++ head/devel/py-cffi/distinfo (revision 390427) @@ -1,2 +1,2 @@ -SHA256 (cffi-0.8.6.tar.gz) = 2532d9e3af9e3c6d0f710fc98b0295b563c7f39cfd97dd2242bd36fbf4900610 -SIZE (cffi-0.8.6.tar.gz) = 196835 +SHA256 (cffi-1.1.1.tar.gz) = 81fbaf121a67a0c4d390cc0ce7a69661f987f5cf34997575131e8a1bbe1ee1c6 +SIZE (cffi-1.1.1.tar.gz) = 326663