aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/portbuild
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1999-09-22 08:57:02 +0800
committerasami <asami@FreeBSD.org>1999-09-22 08:57:02 +0800
commitb6a65ceadbb69435895d164961684e464a0b85db (patch)
treeac9a6d3c12f8035bdaa77eba700862af22feb615 /Tools/portbuild
parent8d1b3bc13acca0a35e0993b40c14424c60970a9f (diff)
downloadfreebsd-ports-gnome-b6a65ceadbb69435895d164961684e464a0b85db.tar.gz
freebsd-ports-gnome-b6a65ceadbb69435895d164961684e464a0b85db.tar.zst
freebsd-ports-gnome-b6a65ceadbb69435895d164961684e464a0b85db.zip
Run Xvfb if it exists and set DISPLAY accordingly. This helps ports
that require xrdb and other inane stuff during build.
Diffstat (limited to 'Tools/portbuild')
-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