blob: 7065ae6b3640e40ece64191c5729732c966dec23 (
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
67
|
#!/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
if [ X$InstallFSConfig = "X" ]; then
InstallFSConfig=YES
fi
# disable some configs: there are not used this ports
for i in BuildFonts \
Build75DpiFonts \
Build100DpiFonts \
BuildSpeedoFonts \
BuildType1Fonts \
BuildCIDFonts \
BuildCyrillicFonts \
BuildLatin2Fonts \
XF86Server \
BuildFontServer \
XnestServer \
XprtServer \
LibHeaders \
ForceNormalLib \
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
}
cp ${X11BASE}/lib/X11/config/version.def ${WRKSRC}/config/cf
configure
exit 0
|