Index: Mk/bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.665 diff -u -r1.665 bsd.port.mk --- Mk/bsd.port.mk 22 Dec 2010 20:05:40 -0000 1.665 +++ Mk/bsd.port.mk 28 Dec 2010 11:32:50 -0000 @@ -2170,6 +2170,10 @@ .include "${PORTSDIR}/Mk/bsd.cmake.mk" .endif +.if defined(USE_WAF) +.include "${PORTSDIR}/Mk/bsd.waf.mk" +.endif + .if exists(${PORTSDIR}/../Makefile.inc) .include "${PORTSDIR}/../Makefile.inc" USE_SUBMAKE= yes Index: Mk/bsd.waf.mk =================================================================== RCS file: Mk/bsd.waf.mk diff -N Mk/bsd.waf.mk --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Mk/bsd.waf.mk 28 Dec 2010 11:30:23 -0000 @@ -0,0 +1,65 @@ +# ex:ts=8 +# +# USE_WAF - If set, this port uses waf +# WAF_SCRIPT - Waf script to use +# WAF_ENV - Environment passed to waf during configure stage +# WAF_ARGS - Arguments passed to waf during configure stage +# +# +# $FreeBSD$ + +WAF_MAINTAINER= python@FreeBSD.org + +# +# WAF_BIN is the location where the waf port installs the waf executable +# +WAF_BIN= ${LOCALBASE}/bin/waf + +# +# WAF_PORT is where the waf port is located in the ports tree +# +WAF_PORT= ${PORTSDIR}/devel/py-waf + +# +# WAF_SCRIPT is the executable to be used to build the port +# +WAF_SCRIPT?= ${WAF_BIN} + +# +# Depend on {WAF_PORT} +# +BUILD_DEPENDS+= ${WAF_BIN}:${WAF_PORT} + +# +# Environment to configure phase +# +WAF_ENV?= ${CONFIGURE_ENV} PREFIX=${PREFIX} \ + CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + CPPFLAGS="${CPPFLAGS}" LINKFLAGS="${LDFLAGS}" + +# +# Redefine do-configure target +# +.if !target(do-configure) +do-configure: +.if ${WAF_SCRIPT} != ${WRKSRC}/waf + ${CP} ${WAF_SCRIPT} ${WRKSRC} +.endif + cd ${WRKSRC} && ${SETENV} ${WAF_ENV} ./waf configure ${WAF_ARGS} +.endif + +# +# Redefine do-build target +# +.if !target(do-build) +do-build: + cd ${WRKSRC} && ./waf ${_MAKE_JOBS} +.endif + +# +# Redefine do-install target +# +.if !target(do-install) +do-install: + cd ${WRKSRC} && ./waf install +.endif