From owner-svn-ports-all@FreeBSD.ORG Tue Apr 15 20:53:05 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 819E8D57; Tue, 15 Apr 2014 20:53:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 6138D1B65; Tue, 15 Apr 2014 20:53:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FKr5CS030002; Tue, 15 Apr 2014 20:53:05 GMT (envelope-from kwm@svn.freebsd.org) Received: (from kwm@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FKr45F029999; Tue, 15 Apr 2014 20:53:04 GMT (envelope-from kwm@svn.freebsd.org) Message-Id: <201404152053.s3FKr45F029999@svn.freebsd.org> From: Koop Mast Date: Tue, 15 Apr 2014 20:53:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r351366 - in head/graphics: py-cairo py3-cairo py3-cairo/files 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.17 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: Tue, 15 Apr 2014 20:53:05 -0000 Author: kwm Date: Tue Apr 15 20:53:04 2014 New Revision: 351366 URL: http://svnweb.freebsd.org/changeset/ports/351366 QAT: https://qat.redports.org/buildarchive/r351366/ Log: Rework python module compile so it doesn't code the stagedir in it [1] While here switch to USES=tar:bzip2 Remove waf from SHEBANG_FILES. it contains binary so running sed on it not guaranteed to work as intended. [2] Prefix waf commands with PYTHON_CMD so it run with the correct python version. Use the waf --destdir command for destdir Remove configure_ENV because they are already set. Use post-patch to dynamicly fix the python version in test/examples_test.py instead of a patch. Reported by: swills@ [1], mva [2] Deleted: head/graphics/py3-cairo/files/patch-test_examples-test.py Modified: head/graphics/py-cairo/Makefile head/graphics/py3-cairo/Makefile head/graphics/py3-cairo/pkg-plist Modified: head/graphics/py-cairo/Makefile ============================================================================== --- head/graphics/py-cairo/Makefile Tue Apr 15 20:28:06 2014 (r351365) +++ head/graphics/py-cairo/Makefile Tue Apr 15 20:53:04 2014 (r351366) @@ -4,7 +4,7 @@ PORTNAME= cairo PORTVERSION= 1.10.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics python MASTER_SITES= http://cairographics.org/releases/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -13,26 +13,33 @@ DISTNAME= py2${PORTNAME}-${PORTVERSION} MAINTAINER= gnome@FreeBSD.org COMMENT= Python 2 bindings for Cairo -USE_BZIP2= yes USE_PYTHON= 2 -USES= pkgconfig shebangfix +USES= pkgconfig shebangfix tar:bzip2 USE_GNOME= cairo CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -CONFIGURE_ENV= PYTHON=${LOCALBASE}/bin/python2 \ +CONFIGURE_ENV= PYTHON=${LOCALBASE}/bin/${PYTHON_CMD} \ PREFIX=${PREFIX} python_OLD_CMD?= /usr/bin/env python python_CMD?= ${LOCALBASE}/bin/python2 -SHEBANG_FILES= examples/*.py examples/*/*.py waf test/*.py +SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py do-configure: - @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./waf configure + @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ + ./waf configure do-build: - @cd ${WRKSRC} && ./waf + @cd ${WRKSRC} && ${PYTHON_CMD} ./waf do-install: - cd ${WRKSRC} && ${SETENV} DESTDIR=${STAGEDIR} ./waf install + cd ${WRKSRC} && ${PYTHON_CMD} ./waf install --destdir=${STAGEDIR} + +post-install: + @cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ + -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} + @cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \ + -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cairo/_cairo.so .include Modified: head/graphics/py3-cairo/Makefile ============================================================================== --- head/graphics/py3-cairo/Makefile Tue Apr 15 20:28:06 2014 (r351365) +++ head/graphics/py3-cairo/Makefile Tue Apr 15 20:53:04 2014 (r351366) @@ -4,7 +4,7 @@ PORTNAME= cairo PORTVERSION= 1.10.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics python MASTER_SITES= http://cairographics.org/releases/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -13,27 +13,36 @@ DISTNAME= py${PORTNAME}-${PORTVERSION} MAINTAINER= gnome@FreeBSD.org COMMENT= Python 3 bindings for Cairo -USE_BZIP2= yes USE_PYTHON= 3 -USES= pkgconfig shebangfix +USES= pkgconfig shebangfix tar:bzip2 USE_GNOME= cairo CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -CONFIGURE_ENV= PYTHON=${LOCALBASE}/bin/python3 \ - PREFIX=${PREFIX} -NO_STAGE= yes python_OLD_CMD?= /usr/bin/env python -python_CMD?= ${LOCALBASE}/bin/python3 -SHEBANG_FILES= examples/*.py examples/*/*.py waf test/*.py +python_CMD?= ${LOCALBASE}/bin/python${PYTHON_VER} +SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py + +post-patch: + @${REINPLACE_CMD} -e 's|python %s|${PYTHON_CMD} %s|g' \ + ${WRKSRC}/test/examples_test.py do-configure: - @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./waf configure + @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ + ./waf configure do-build: - @cd ${WRKSRC} && ./waf + @cd ${WRKSRC} && ${PYTHON_CMD} ./waf do-install: - @cd ${WRKSRC} && ./waf install + @cd ${WRKSRC} && ${PYTHON_CMD} ./waf install --destdir=${STAGEDIR} + +post-install: + @${RM} ${STAGEDIR}${PYTHON_SITELIBDIR}/cairo/__init__.py[co] + @cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ + -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} + @cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \ + -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cairo/_cairo.so .include Modified: head/graphics/py3-cairo/pkg-plist ============================================================================== --- head/graphics/py3-cairo/pkg-plist Tue Apr 15 20:28:06 2014 (r351365) +++ head/graphics/py3-cairo/pkg-plist Tue Apr 15 20:53:04 2014 (r351366) @@ -1,8 +1,9 @@ include/pycairo/py3cairo.h +%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-33.pyc +%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-33.pyo %%PYTHON_SITELIBDIR%%/cairo/__init__.py -%%PYTHON_SITELIBDIR%%/cairo/__init__.pyc -%%PYTHON_SITELIBDIR%%/cairo/__init__.pyo %%PYTHON_SITELIBDIR%%/cairo/_cairo.so libdata/pkgconfig/py3cairo.pc +@dirrm %%PYTHON_SITELIBDIR%%/cairo/__pycache__ @dirrm %%PYTHON_SITELIBDIR%%/cairo @dirrmtry include/pycairo