From owner-svn-ports-all@freebsd.org Sat Aug 6 14:41:36 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DD0FBAF1D4; Sat, 6 Aug 2016 14:41:36 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5DFC119A; Sat, 6 Aug 2016 14:41:35 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u76EfZv0040950; Sat, 6 Aug 2016 14:41:35 GMT (envelope-from koobs@FreeBSD.org) Received: (from koobs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u76EfZLw040948; Sat, 6 Aug 2016 14:41:35 GMT (envelope-from koobs@FreeBSD.org) Message-Id: <201608061441.u76EfZLw040948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: koobs set sender to koobs@FreeBSD.org using -f From: Kubilay Kocak Date: Sat, 6 Aug 2016 14:41:35 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r419747 - head/devel/py-cffi X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2016 14:41:36 -0000 Author: koobs Date: Sat Aug 6 14:41:34 2016 New Revision: 419747 URL: https://svnweb.freebsd.org/changeset/ports/419747 Log: devel/py-cffi: Fix build warnings and test failures CFLAGS contains -Wl,-rpath,${LOCALBASE}/lib, which causes the following warnings: warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused It also causes many tests to fail due to the same warning: E VerificationError: CompileError: command 'cc' failed with exit status 1 cffi/ffiplatform.py:62: VerificationError ----------- Captured stderr call ---------- error: -Wl,-rpath,/usr/local/lib: 'linker' input unused Remove these (CFLAGS, LDFLAGS) unnecessary flags as cffi grabs compiler details from Python and links correctly to libffi/libpython without them. * Fix cffi0/test_ownlib to use ${CC} not a hardcoded gcc, unecessarily causing test failures. Conditionally add -Wno-shift-negative-value to CFLAGS to squash several more failures on FreeBSD 11+ [1] While I'm here: * Strip shared library * Report skipped tests during test runs Note: leftover test_array_type test failure is known [2] [1] https://bitbucket.org/cffi/cffi/issues/271 [2] https://bitbucket.org/cffi/cffi/issues/178 Reviewed by: wg (maintainer) Approved by: wg (maintainer) MFH: 2016Q3 Differential Revision: D7300 Modified: head/devel/py-cffi/Makefile head/devel/py-cffi/distinfo Modified: head/devel/py-cffi/Makefile ============================================================================== --- head/devel/py-cffi/Makefile Sat Aug 6 14:16:55 2016 (r419746) +++ head/devel/py-cffi/Makefile Sat Aug 6 14:41:34 2016 (r419747) @@ -17,15 +17,27 @@ LIB_DEPENDS= libffi.so:devel/libffi RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycparser>=2.10:devel/py-pycparser TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest -CFLAGS+= -I${LOCALBASE}/include -Wl,-rpath,${LOCALBASE}/lib -LDFLAGS+= -L${LOCALBASE}/lib - +# Actually 2.6-2.7,3.2-3.5 USES= python USE_PYTHON= autoplist distutils +.include + +.if ${OSVERSION} >= 1100000 +CFLAGS+= -Wno-shift-negative-value +.endif + +# Tests assume gcc, and fail on pure clang systems +# Fixed in https://bitbucket.org/cffi/cffi/issues/271 +post-patch: + ${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/testing/cffi0/test_ownlib.py + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_cffi_backend.so + do-test: @(cd ${TEST_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \ ${PYDISTUTILS_SETUP} build_ext -i) - @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest) + @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -rs) -.include +.include Modified: head/devel/py-cffi/distinfo ============================================================================== --- head/devel/py-cffi/distinfo Sat Aug 6 14:16:55 2016 (r419746) +++ head/devel/py-cffi/distinfo Sat Aug 6 14:41:34 2016 (r419747) @@ -1,3 +1,3 @@ -TIMESTAMP = 1463831192 +TIMESTAMP = 1469194464 SHA256 (cffi-1.6.0.tar.gz) = a7f75c4ef2362c0a0e54657add0a6c509fecbfa3b3807bc0925f5cb1c9f927db SIZE (cffi-1.6.0.tar.gz) = 397024