1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-04 22:33:27 +00:00
freebsd-ports/x11-servers/XFree86-4-Server/scripts/configure
Satoshi Asami e9c8b285ce Both of the below are
Submitted by:	maintainer

(1) Respect CFLAGS when compiling shared libraries and servers.
    (imake-4, XFree86-4-libraries)
Reported by:	asami

(2) Do not redefine list of supported cards, and support architectures
    other than i386 better.
    (imake-4, XFree86-4-Server)
2000-09-07 00:03:49 +00:00

116 lines
3.5 KiB
Bash

#!/bin/sh
# This scripts work as following:
# (1) cp current xf86site.def (it may be created by imake-4 ports)
# to ${WRKDIR}/xc/config/cf.
# this means this ports use imake-4's config defaultly.
# (2) Generate temporal config for compiling.
# Some configs, such as `ForceNormalLib', `FreeBSDBuildXprog', are
# used for compiling this ports localy. so these configs will be generated
# this scripts. these configs will be stored to `host.def' file.
# but this host.def will never install. use local only.
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
if [ X$ExtendedInputDevices = "X" ]; then
ExtendedInputDevices=YES
fi
# It's good for FreeBSD ports/packages system.
echo "#define NothingOutsideProjectRoot YES" >> $LOCALDEF
# I want to set this line.
# but the probrem is too deep. not yet done.
# echo "#define InstallXserverSetUID NO" >> $LOCALDEF
# disable some configs: there are not used this ports
for i in \
BuildFonts \
Build75DpiFonts \
Build100DpiFonts \
BuildSpeedoFonts \
BuildType1Fonts \
BuildCIDFonts \
BuildCyrillicFonts \
BuildLatin2Fonts \
XnestServer \
BuildFontServer \
XVirtualFramebufferServer \
XprtServer \
LibHeaders \
LibInstall \
ForceNormalLib \
XTrueTypeInstallCConvHeaders
do \
echo "#define $i NO" >> $LOCALDEF
done
echo "#define BuildServer YES" >> $LOCALDEF
echo "#define LibInstallBuild YES" >> $LOCALDEF
echo "#define XF86Server YES" >> $LOCALDEF
echo "#define BuildServersOnly YES" >> $LOCALDEF
cat >> $LOCALDEF <<END
#ifdef i386Architecture
#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
neomagic i740 tdfx \
cirrus tseng trident chips apm \
GlideDriver fbdev \
ati r128 AgpGartDrivers cyrix \
vga XF86OSCardDrivers XF86ExtraCardDrivers
#else
#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
neomagic i740 tdfx \
cirrus tseng trident chips apm \
GlideDriver fbdev \
ati r128 cyrix \
vga XF86OSCardDrivers XF86ExtraCardDrivers
#endif
END
if [ $ExtendedInputDevices != "YES" ]; then
echo "#define XInputDrivers mouse" >> $LOCALDEF
else
echo "#define XInputDrivers mouse dynapro elo2300 elographics \
magellan microtouch \
mutouch spaceorb wacom" >> $LOCALDEF
fi
echo "#define FreeBSDBuildXxserv YES" >> $LOCALDEF
# Check Wraphelp.c
WH=$WRKDIR/xc/lib/Xdmcp/Wraphelp.c
cpwh=NO
if [ -f $WH ] ; then
cpwh=SOURCE
elif [ -f $DISTDIR/xc/Wraphelp.c ] ; then
cpwh=$DISTDIR/xc/Wraphelp.c
else
echo "==> Warnning: Wraphelp.c not found, DES support NOT enabled."
fi
if [ X$cpwh != XNO -a X$cpwh != XSOURCE ]; then
tr -d '\r' < $cpwh > $WH
fi
# Copy ORIGDEF to DESTDEF
rm -f $DESTDEF
if [ $cpwh = NO ] ; then
grep -v '#define.*HasXdmAuth' $ORIGDEF >> $DESTDEF
echo "#define HasXdmAuth NO" >> $DESTDEF
else
cp -f $ORIGDEF $DESTDEF
fi
# copy generated config to host.def
cp -f $LOCALDEF $HOSTDEF
}
configure
exit 0