Index: Uses/display.mk =================================================================== diff --git a/head/Mk/Uses/display.mk b/head/Mk/Uses/display.mk new file mode 10644 --- /dev/null (revision 0) +++ b/head/Mk/Uses/display.mk (working copy) @@ -0,0 +1,40 @@ +# $FreeBSD$ +# +# MAINTAINER: portmgr@FreeBSD.org +# +# Feature: display +# Usage: USES=display +# Valid ARGS: none build install +# +# +.if !defined(_INCLUDE_USES_DISPLAY_MK) +_INCLUDE_USES_DISPLAY_MK= yes + +display_ARGS?= install +.if ${display_ARGS} != build && ${display_ARGS} != install +IGNORE= USES=display can only take 'build', 'install' and none +.endif + +.if !defined(DISPLAY) +BUILD_DEPENDS+= Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver \ + ${LOCALBASE}/lib/X11/fonts/misc/8x13O.pcf.gz:${X_FONTS_MISC_PORT} \ + ${LOCALBASE}/lib/X11/fonts/misc/fonts.alias:${X_FONTS_ALIAS_PORT} \ + ${LOCALBASE}/share/X11/xkb/rules/base:${PORTSDIR}/x11/xkeyboard-config \ + xkbcomp:${PORTSDIR}/x11/xkbcomp + +pre-${display_ARGS}: pre-display + +post-${display_ARGS}: post-display + +pre-display: +XVFBPORT!= port=0; while test -S /tmp/.X11-unix/X$${port} ; do port=$$(( port + 1 )) ; done ; ${ECHO_CMD} $$a +XVFBPID!= Xvfb :${XFVBPORT} & ${ECHO_CMD} $$! +MAKE_ENV+= DISPLAY=":${XVFBPORT}" + +post-display: +.if !empty(XVFBPID) + @kill -15 ${XFVBPID} +.endif + +.endif +.endif Index: bsd.port.mk =================================================================== diff --git a/head/Mk/bsd.port.mk b/head/Mk/bsd.port.mk --- a/head/Mk/bsd.port.mk (revision 320843) +++ b/head/Mk/bsd.port.mk (working copy) @@ -1896,7 +1896,6 @@ X_IMAKE_PORT= ${PORTSDIR}/devel/imake X_FONTSERVER_PORT= ${PORTSDIR}/x11-fonts/xfs -X_VFBSERVER_PORT= ${PORTSDIR}/x11-servers/xorg-vfbserver X_NESTSERVER_PORT= ${PORTSDIR}/x11-servers/xorg-nestserver X_FONTS_ENCODINGS_PORT= ${PORTSDIR}/x11-fonts/encodings X_FONTS_MISC_PORT= ${PORTSDIR}/x11-fonts/xorg-fonts-miscbitmaps @@ -1920,18 +1919,6 @@ BUILD_DEPENDS+= imake:${X_IMAKE_PORT} .endif -.if defined(USE_DISPLAY) && !defined(DISPLAY) -BUILD_DEPENDS+= Xvfb:${X_VFBSERVER_PORT} \ - ${LOCALBASE}/lib/X11/fonts/misc/8x13O.pcf.gz:${X_FONTS_MISC_PORT} \ - ${LOCALBASE}/lib/X11/fonts/misc/fonts.alias:${X_FONTS_ALIAS_PORT} \ - ${LOCALBASE}/share/X11/xkb/rules/base:${PORTSDIR}/x11/xkeyboard-config \ - xkbcomp:${PORTSDIR}/x11/xkbcomp -.if !defined(PACKAGE_BUILDING) -CONFIGURE_ENV+= DISPLAY="localhost:1001" -MAKE_ENV+= DISPLAY="localhost:1001" -.endif -.endif - PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist' _GL_gl_LIB_DEPENDS= GL.1:${PORTSDIR}/graphics/libGL