freebsd-ports/graphics/py3-cairo/Makefile
Dmitry Sivachenko 3a18883882 Switch default python3 version from 3.3 to 3.4.
Bump PORTREVISIONs for the affected ports.

Exp-run by:	antoine
2015-01-10 23:15:27 +00:00

54 lines
1.8 KiB
Makefile

# Created by: Michael Johnson <ahze@FreeBSD.org>
# $FreeBSD$
# $MCom: ports/graphics/py-cairo/Makefile,v 1.28 2010/11/15 14:12:13 kwm Exp $
PORTNAME= cairo
PORTVERSION= 1.10.0
PORTREVISION= 3
CATEGORIES= graphics python
MASTER_SITES= http://cairographics.org/releases/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= py${PORTNAME}-${PORTVERSION}
MAINTAINER= gnome@FreeBSD.org
COMMENT= Python 3 bindings for Cairo
USES= pkgconfig python:3 shebangfix tar:bzip2
USE_GNOME= cairo
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
python_OLD_CMD?= /usr/bin/env python
python_CMD?= ${LOCALBASE}/bin/python${PYTHON_VER}
SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py
PLIST_SUB+= PYTVER=${PYTHON_VER:S/.//}
post-patch:
@${REINPLACE_CMD} -e 's|python %s|${PYTHON_CMD} %s|g' \
${WRKSRC}/test/examples_test.py
do-configure:
# Run waf configure twice, once to extract waflib and patch and then actual configure
@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \
./waf configure || :
@cd ${WRKSRC}/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/ && \
${PATCH} -p1 < ${FILESDIR}/pycairo-1.10.0-waf-py3_4.patch
@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \
./waf configure
do-build:
@cd ${WRKSRC} && ${PYTHON_CMD} ./waf
do-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 <bsd.port.mk>