aboutsummaryrefslogtreecommitdiff
path: root/x11-servers/XFree86-4-FontServer/scripts/configure
blob: fb6e7475f12535f086b76c28751eed5616b16faf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/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 \
	XnestServer \
	XVirtualFramebufferServer \
	XprtServer \
	LibHeaders \
	ForceNormalLib \
	XTrueTypeInstallCConvHeaders
do \
	echo "#define $i NO"			>> $LOCALDEF
done

echo "#define BuildServer YES"			>> $LOCALDEF
echo "#define BuildFontServer YES"		>> $LOCALDEF
echo "#define BuildServersOnly YES"		>> $LOCALDEF
if [ X$InstallFSConfig = "X" ]; then
	InstallFSConfig=YES
fi
echo "#define InstallFSConfig $InstallFSConfig" >> $LOCALDEF
echo "#define FreeBSDBuildXfs YES"		>> $LOCALDEF
echo "#define UseInstalledPrograms YES"		>> $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