summaryrefslogtreecommitdiffstats
path: root/x11-servers/XFree86-4-VirtualFramebufferServer/scripts/configure
diff options
context:
space:
mode:
Diffstat (limited to 'x11-servers/XFree86-4-VirtualFramebufferServer/scripts/configure')
-rwxr-xr-xx11-servers/XFree86-4-VirtualFramebufferServer/scripts/configure65
1 files changed, 65 insertions, 0 deletions
diff --git a/x11-servers/XFree86-4-VirtualFramebufferServer/scripts/configure b/x11-servers/XFree86-4-VirtualFramebufferServer/scripts/configure
new file mode 100755
index 000000000..1882084a1
--- /dev/null
+++ b/x11-servers/XFree86-4-VirtualFramebufferServer/scripts/configure
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# This script does the following:
+# (1) cp xf86site.def, installed by imake-4 port,
+# to ${WRKDIR}/xc/config/cf.
+# this provides settings for the ports system.
+# (2) Create a host.def for this specific port, using
+# host.def as a base.
+
+ORIGDEF=$PREFIX/lib/X11/config/xf86site.def
+DESTDEF=$WRKDIR/xc/config/cf/xf86site.def
+ORIGHOSTDEF=$PREFIX/lib/X11/config/host.def
+LOCALDEF=$WRKDIR/.config
+HOSTDEF=$WRKDIR/xc/config/cf/host.def
+
+
+# Use original host.def as initial config file
+rm -f $LOCALDEF
+grep -v '#define.*ProjectRoot' $ORIGHOSTDEF >> $LOCALDEF
+echo "#define ProjectRoot $PREFIX" >> $LOCALDEF
+
+# This is also defined in xf86site.def, but doesn't get
+# picked up for some reason.
+echo "#define NothingOutsideProjectRoot YES" >> $LOCALDEF
+
+# disable some options
+for i in BuildFonts \
+ Build75DpiFonts \
+ Build100DpiFonts \
+ BuildSpeedoFonts \
+ BuildType1Fonts \
+ BuildCIDFonts \
+ BuildCyrillicFonts \
+ BuildLatin2Fonts \
+ BuildHtmlManPages \
+ XF86Server \
+ BuildFontServer \
+ XnestServer \
+ XprtServer \
+ XdmxServer \
+ LibHeaders \
+ ForceNormalLib \
+ InstallSecurityConfig \
+ XTrueTypeInstallCConvHeaders
+do \
+ echo "#define $i NO" >> $LOCALDEF
+done
+
+echo "#define BuildServer YES" >> $LOCALDEF
+echo "#define XVirtualFramebufferServer YES" >> $LOCALDEF
+echo "#define BuildServersOnly YES" >> $LOCALDEF
+echo "#define UseInstalledPrograms YES" >> $LOCALDEF
+echo "#define StandardIncludes -I${PREFIX}/include" >> $LOCALDEF
+echo "#define FreeBSDCC ${CC}" >> $LOCALDEF
+echo "#define FreeBSDCXX ${CXX}" >> $LOCALDEF
+echo "#define FreeBSDCFLAGS ${CFLAGS}" >> $LOCALDEF
+
+# Copy ORIGDEF to DESTDEF
+rm -f $DESTDEF
+cp -f $ORIGDEF $DESTDEF
+
+# copy generated config to host.def
+cp -f $LOCALDEF $HOSTDEF
+
+exit 0