aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1999-09-22 00:57:02 +0000
committerSatoshi Asami <asami@FreeBSD.org>1999-09-22 00:57:02 +0000
commit1ba68ec84ec1f0cc7dc53f971e6dc650c89c5238 (patch)
treeec9cadfe85ab9db16b5d859b788855765f2ca0bb /Tools
parent9db5045e1b9ec831a221819b338af4b03b6d61f9 (diff)
downloadports-1ba68ec84ec1f0cc7dc53f971e6dc650c89c5238.tar.gz
ports-1ba68ec84ec1f0cc7dc53f971e6dc650c89c5238.zip
Run Xvfb if it exists and set DISPLAY accordingly. This helps ports
that require xrdb and other inane stuff during build.
Notes
Notes: svn path=/head/; revision=21868
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/buildscript21
1 files changed, 17 insertions, 4 deletions
diff --git a/Tools/portbuild/scripts/buildscript b/Tools/portbuild/scripts/buildscript
index a5d3a269875c..9b62d7ddc6df 100755
--- a/Tools/portbuild/scripts/buildscript
+++ b/Tools/portbuild/scripts/buildscript
@@ -12,17 +12,30 @@ if [ "$(echo $(/bin/ls | wc -c))" != 0 ]; then
fi
cd $dir || exit 1
-echo -n "maintained by: "
-make maintainer
-echo -n "build started at "
-date
+echo "maintained by: $(make maintainer)"
+echo "build started at $(date)"
echo "================================================================"
+
+xvfb=0
+if which -s Xvfb; then
+ xvfb=1
+ pid=$$
+ X11BASE=$(which Xvfb | sed -e 's./bin/Xvfb..')
+ Xvfb :${pid} -fp ${X11BASE}/lib/X11/fonts/misc &
+ DISPLAY=:${pid}
+ export DISPLAY
+fi
+
if make package; then
echo "0" > /tmp/status
else
echo "1" > /tmp/status
fi
+if [ ${xvfb} = 1 ]; then
+ kill $(jobid %1)
+fi
+
echo "================================================================"
echo -n "build ended at "
date