aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-04-08 23:05:48 +0800
committerbapt <bapt@FreeBSD.org>2015-04-08 23:05:48 +0800
commit11557d3b1ca381824ecc50f020623ed56d4ce36a (patch)
tree81627af7b0f0c701d807cb8a4046a4740517b9f9 /graphics
parent1ed12c409b16770d2cb109c7a67bf65ef1a3f27b (diff)
downloadfreebsd-ports-gnome-11557d3b1ca381824ecc50f020623ed56d4ce36a.tar.gz
freebsd-ports-gnome-11557d3b1ca381824ecc50f020623ed56d4ce36a.tar.zst
freebsd-ports-gnome-11557d3b1ca381824ecc50f020623ed56d4ce36a.zip
Add a new USES=waf to handle the waf building system, allowing to factorise code
Plug waf into MAKE_CMD and CONFIGURE_CMD so the regular defined targets can be reused Always define _MAKE_JOBS so that when bsd.port.mk will stop overwritting _MAKE_JOBS when parallel jobs are disabled we can enforce -j1 (which is needed to really disable parallelisation with waf WAF_CMD has been created to allow one to override the location of the waf script relatively to WRKSRC CONFIGURE_TARGET is by default defined to "configure" ALL_TARGET is by default defined to "build" INSTALL_TARGET is by default defined to "install" USES=waf is by default stagedir safe
Diffstat (limited to 'graphics')
-rw-r--r--graphics/electrix/Makefile12
-rw-r--r--graphics/py-cairo/Makefile12
-rw-r--r--graphics/py3-cairo/Makefile15
3 files changed, 6 insertions, 33 deletions
diff --git a/graphics/electrix/Makefile b/graphics/electrix/Makefile
index b95d3a87112a..e8edf7c0e7d8 100644
--- a/graphics/electrix/Makefile
+++ b/graphics/electrix/Makefile
@@ -11,7 +11,7 @@ COMMENT= Application to view PDF files
LICENSE= GPLv2
-USES= desktop-file-utils pkgconfig python:2 tar:bzip2
+USES= desktop-file-utils pkgconfig python:2 tar:bzip2 waf
USE_GNOME= gtk20 glib20 intltool intlhack
MAKE_ENV= DESTDIR="${STAGEDIR}" \
@@ -34,15 +34,7 @@ PDF_CONFIGURE_OFF= --disable-pdf
PS_LIB_DEPENDS= libspectre.so:${PORTSDIR}/print/libspectre
PS_CONFIGURE_OFF= --disable-ps
-do-configure:
- @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} waf configure \
- ${CONFIGURE_ARGS} && ${TRUE})
-
-do-build:
- @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} waf build && ${TRUE})
-
-do-install:
- @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} waf install && ${TRUE})
+post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/electrix
.include <bsd.port.mk>
diff --git a/graphics/py-cairo/Makefile b/graphics/py-cairo/Makefile
index fe10cd4d6a17..73f3c8e3fab6 100644
--- a/graphics/py-cairo/Makefile
+++ b/graphics/py-cairo/Makefile
@@ -13,7 +13,7 @@ DISTNAME= py2${PORTNAME}-${PORTVERSION}
MAINTAINER= gnome@FreeBSD.org
COMMENT= Python 2 bindings for Cairo
-USES= pkgconfig python:2 shebangfix tar:bzip2
+USES= pkgconfig python:2 shebangfix tar:bzip2 waf
USE_GNOME= cairo
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
@@ -24,16 +24,6 @@ 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}/;;}
diff --git a/graphics/py3-cairo/Makefile b/graphics/py3-cairo/Makefile
index 56abce221f5a..28c1e83c430b 100644
--- a/graphics/py3-cairo/Makefile
+++ b/graphics/py3-cairo/Makefile
@@ -13,7 +13,7 @@ DISTNAME= py${PORTNAME}-${PORTVERSION}
MAINTAINER= gnome@FreeBSD.org
COMMENT= Python 3 bindings for Cairo
-USES= pkgconfig python:3 shebangfix tar:bzip2
+USES= pkgconfig python:3 shebangfix tar:bzip2 waf
USE_GNOME= cairo
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
@@ -28,20 +28,11 @@ post-patch:
@${REINPLACE_CMD} -e 's|python %s|${PYTHON_CMD} %s|g' \
${WRKSRC}/test/examples_test.py
-do-configure:
+pre-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} && ${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_CMD} || :
@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]