summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authormrauch <mrauch>2002-04-08 13:25:00 +0000
committermrauch <mrauch>2002-04-08 13:25:00 +0000
commit286afc7a080621618d03969bab992b5255faff81 (patch)
treeb430d46a202140576702dbe4216f7bae4985a9c9 /misc
parent5b0e115388b6c90bfc826453a48b2c09f0def295 (diff)
downloadpkgsrc-286afc7a080621618d03969bab992b5255faff81.tar.gz
Add an additional check whether the display as set in the DISPLAY
environment variable is usable. Suggested and implemented by David Brownlee <abs@netbsd.org>.
Diffstat (limited to 'misc')
-rw-r--r--misc/openoffice/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/misc/openoffice/Makefile b/misc/openoffice/Makefile
index 33372ebdc87..d4966434f0b 100644
--- a/misc/openoffice/Makefile
+++ b/misc/openoffice/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2002/03/05 20:16:53 mrauch Exp $
+# $NetBSD: Makefile,v 1.9 2002/04/08 13:25:00 mrauch Exp $
DISTNAME= openoffice-0.0.0.641
PKGREVISION= 1
@@ -54,8 +54,11 @@ post-extract:
${WRKSRC}/../sablot/Sablot-0.52.patch
DISPLAY?= #empty, if unset
+.if ${DISPLAY}!=""
+DISPLAY_OK!=${X11BASE}/bin/xdpyinfo >/dev/null 2>&1 && echo YES || echo NO
+.endif
checkforx:
-.if ${DISPLAY}==""
+.if ${DISPLAY}=="" || ${DISPLAY_OK} == "NO"
.if exists(${X11BASE}/bin/Xvfb)
-${X11BASE}/bin/Xvfb :2 &
DISPLAY= ':2'