diff options
author | Koop Mast <kwm@FreeBSD.org> | 2014-04-15 20:53:04 +0000 |
---|---|---|
committer | Koop Mast <kwm@FreeBSD.org> | 2014-04-15 20:53:04 +0000 |
commit | 2701760345f5957441aef9848a2a162fdf640b9f (patch) | |
tree | f0ebbac2a6bb4ccda53d1de44b47b1ff7e09d4ba /graphics/py-cairo | |
parent | 62d2daacbb4865c620dc8442805f5f2ebae78ce6 (diff) | |
download | ports-2701760345f5957441aef9848a2a162fdf640b9f.tar.gz ports-2701760345f5957441aef9848a2a162fdf640b9f.zip |
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]
Notes
Notes:
svn path=/head/; revision=351366
Diffstat (limited to 'graphics/py-cairo')
-rw-r--r-- | graphics/py-cairo/Makefile | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/graphics/py-cairo/Makefile b/graphics/py-cairo/Makefile index febf6d1e34d1..15e26439edb0 100644 --- a/graphics/py-cairo/Makefile +++ b/graphics/py-cairo/Makefile @@ -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 <bsd.port.mk> |