1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00
freebsd-ports/graphics/py-cairo/Makefile
Koop Mast 2701760345 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]
2014-04-15 20:53:04 +00:00

46 lines
1.4 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= 2
CATEGORIES= graphics python
MASTER_SITES= http://cairographics.org/releases/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= py2${PORTNAME}-${PORTVERSION}
MAINTAINER= gnome@FreeBSD.org
COMMENT= Python 2 bindings for Cairo
USE_PYTHON= 2
USES= pkgconfig shebangfix tar:bzip2
USE_GNOME= cairo
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
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 test/*.py
do-configure:
@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:
@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>