blob: c6a337bedb1e8deaa93761d691fb748ecdbf6e30 (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
#!/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
# Now, we can use this configuration.
# Thanks, Trevor Johnson <trevor@jpj.net>
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$ExtendedInputDevices = XDEFAULT -o X$ExtendedInputDevices = XYES ]; then
echo "#define XInputDrivers mouse digitaledge dynapro elo2300 \
elographics magellan \
microtouch mutouch spaceorb summa \
wacom void citron" >> $LOCALDEF
echo "#define JoystickSupport YES" >> $LOCALDEF
else
echo "#define XInputDrivers mouse" >> $LOCALDEF
fi
echo "#define BuildXF86DRI ${BuildXF86DRI}" >> $LOCALDEF
echo "#define BuildXF86DRM NO" >> $LOCALDEF
echo "#define HasGlide3 ${HasGlide3}" >> $LOCALDEF
echo "#define Glide3IncDir glide3" >> $LOCALDEF
# Matrox driver support
echo "#define HaveMatroxHal $HaveMatroxHal" >> $LOCALDEF
# disable some configs: there are not used this ports
for i in \
BuildFonts \
Build75DpiFonts \
Build100DpiFonts \
BuildSpeedoFonts \
BuildType1Fonts \
BuildCIDFonts \
BuildCyrillicFonts \
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 ModInstall YES" >> $LOCALDEF
echo "#define XF86Server YES" >> $LOCALDEF
echo "#define BuildServersOnly YES" >> $LOCALDEF
echo "#define BuildXFree86ConfigTools 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
# More of the i386 drivers could probably move to XF86CardDrivers.
# Is fbdev driver useful to us?
# GlideDriver was left out because we have no Glide2 package.
cat >> $LOCALDEF <<END
#ifndef XF86CardDrivers
#ifdef i386Architecture
#define ArchSpecificDrivers apm ark chips cirrus cyrix fbdev i740 \
i128 i810 neomagic sis trident tseng \
vesa vmware
#define DriDrivers gamma tdfx mga i810 i830 r128 radeon sis
#elif defined(AlphaArchitecture)
#define ArchSpecificDrivers
#define DriDrivers gamma tdfx mga r128 radeon
#endif
#define XF86CardDrivers ati glint mga nv rendition s3 s3virge \
savage siliconmotion tdfx tga vga \
ArchSpecificDrivers DevelDrivers \
XF86OSCardDrivers XF86ExtraCardDrivers
#endif
END
echo "#define FreeBSDBuildXxserv 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
|