freebsd-ports/x11/XFree86-4-clients/scripts/configure
Eric Anholt a5596482c6 Make XFree86-4 miniports use imake-4's HasXdmAuth setting (default is YES).
Clean up Wraphelp.c inclusion in the ports that need it.
Add USE_PERL5 to imake-4.

Approved by:	des
2002-07-18 20:30:22 +00:00

84 lines
2.7 KiB
Bash

#!/bin/sh
# This script does the following:
# (1) cp current xf86site.def (it is created by the imake-4 port)
# to ${WRKDIR}/xc/config/cf.
# this means this port uses imake-4's config for defaults.
# (2) Generate temporal config for compiling.
# Some configs, such as `ForceNormalLib', `FreeBSDBuildXprog', are
# used locally for compiling this port, so these configs will be generated
# by this script. These configs will be stored to the `host.def' file,
# but this host.def will never be installed.
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
configure () {
# Use original host.def as initial config file
rm -f $LOCALDEF
grep -v '#define.*ProjectRoot' $ORIGHOSTDEF >> $LOCALDEF
echo "#define ProjectRoot $PREFIX" >> $LOCALDEF
# It's good for FreeBSD ports/packages system.
echo "#define NothingOutsideProjectRoot YES" >> $LOCALDEF
echo "#define InstallXserverSetUID NO" >> $LOCALDEF
# User Config.
if [ X$HasSecureRPC != XDEFAULT -a X$HasSecureRPC != X ]; then
echo "#define HasSecureRPC $HasSecureRPC" >> $LOCALDEF
fi
if [ X$HasPam != XDEFAULT -a X$HasPam != X ]; then
echo "#define HasPam $HasPam" >> $LOCALDEF
fi
if [ X$InstallXdmConfig != XDEFAULT -a X$InstallXdmConfig != X ]; then
echo "#define InstallXdmConfig $InstallXdmConfig" >> $LOCALDEF
fi
if [ X$InstallXinitConfig != XDEFAULT -a X$InstallXinitConfig != X ]; then
echo "#define InstallXinitConfig $InstallXinitConfig" >> $LOCALDEF
fi
if [ X$InstallAppDefFiles != XDEFAULT -a X$InstallAppDefFiles != X ]; then
echo "#define InstallAppDefFiles $InstallAppDefFiles" >> $LOCALDEF
fi
if [ ! -d /sys -a ! -d /usr/src/sys ]; then
echo "#define BuildXF86DRI NO" >> $LOCALDEF
fi
# disable some configs: there are not used this ports
for i in \
InstallFSConfig \
BuildServer \
BuildFontServer \
BuildFonts \
Build75DpiFonts \
Build100DpiFonts \
BuildSpeedoFonts \
BuildType1Fonts \
BuildCIDFonts \
BuildCyrillicFonts \
BuildLatin2Fonts \
LibHeaders \
LibInstall \
ForceNormalLib \
ModInstall \
XTrueTypeInstallCConvHeaders
do \
echo "#define $i NO" >> $LOCALDEF
done
echo "#define LibInstallBuild YES" >> $LOCALDEF
echo "#define FreeBSDBuildXlib NO" >> $LOCALDEF
echo "#define FreeBSDBuildXbin YES" >> $LOCALDEF
# Copy ORIGDEF to DESTDEF
rm -f $DESTDEF
cp -f $ORIGDEF $DESTDEF
# copy generated config to host.def
cp -f $LOCALDEF $HOSTDEF
}
cp ${X11BASE}/lib/X11/config/version.def ${WRKSRC}/config/cf
configure
exit 0