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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
#!/bin/sh
answset () {
if [ -n "$NO_INPUT" ]; then
echo "$2 [$1]"
answ=$1
else
answ=X
fi
}
yesno () {
answset $1 "$2"
while [ $answ = X ]; do
echo -n "$2 [$1] "
read answ
if [ X$answ = X ]; then answ=$1; fi
case $answ in
y|yes|Y|YES) answ=YES;;
n|no|N|NO) answ=NO;;
*) echo invalid answer
answ=X
;;
esac
done
}
F=$WRKDIR/.config
configure () {
rm -f $F
# set ProjectRoot to be ${PREFIX}
echo "#define ProjectRoot ${PREFIX}" >>$F
cat >> $F <<END
#ifdef i386Architecture
#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
neomagic i740 tdfx savage \
cirrus tseng trident chips apm \
GlideDriver fbdev i128 \
ati AgpGartDrivers ark cyrix \
siliconmotion \
vesa vga XF86OSCardDrivers XF86ExtraCardDrivers
#else
#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
neomagic i740 tdfx savage \
cirrus tseng trident chips apm \
GlideDriver fbdev i128 \
ati ark cyrix \
siliconmotion \
vesa vga XF86OSCardDrivers XF86ExtraCardDrivers
#endif
END
cat <<EOF
app-default files, startup configuration files, keyboard definitions
are normally installed in /etc/X11 (so that X binaries can be mounted
from a read-only volume like a CD-ROM). Otherwise default files will
be installed under /usr/X11R6.
EOF
yesno YES "Install config files in /etc/X11?"
if [ $answ = NO ]; then
echo '#define UseSeparateConfDir NO' >> $F
ETC=${PREFIX}/lib
else
ETC=/etc
fi
cat <<END
Do you want to install the default system config files? This will overwrite
and files that you may be currently using. This would only be required
on a first time build.
END
if [ -e $ETC/X11/xdm/xdm-config ]; then
XDMDEFAULT=NO
else
XDMDEFAULT=YES
fi
if [ -e $ETC/X11/xinit/xinitrc ]; then
XINITDEFAULT=NO
else
XINITDEFAULT=YES
fi
if [ -e ${PREFIX}/lib/X11/fs/config ]; then
XFSDEFAULT=NO
else
XFSDEFAULT=YES
fi
yesno $XDMDEFAULT "Install xdm config?"
echo "#define InstallXdmConfig $answ" >> $F
yesno $XINITDEFAULT "Install xinit config?"
echo "#define InstallXinitConfig $answ" >> $F
yesno YES "Do you want to include support for the FontServer?"
echo "#define BuildFontServer $answ" >>$F
if [ $answ = YES ]; then
yesno $XFSDEFAULT "Install xfs config?"
echo "#define InstallFSConfig $answ" >> $F
else
echo "#define InstallFSConfig NO" >> $F
fi
yesno YES "Do you want support for TrueType fonts?"
if [ $answ = NO ]; then
echo "#define BuildFreeType NO" >> $F
echo "#define BuildXTrueType NO" >> $F
fi
cat <<'END'
Do you want to Build Fonts (Usually you only want to build and install
fonts once, if this is a first time install you will want to build the
fonts)
END
yesno YES "Build fonts?"
echo "#define BuildFonts $answ" >> $F
if [ $answ = YES ]; then
yesno YES "Build/install the 75dpi fonts?"
echo "#define Build75DpiFonts $answ" >> $F
yesno YES "Build/install the 100dpi fonts?"
echo "#define Build100DpiFonts $answ" >> $F
yesno YES "Build/install the Speedo fonts?"
echo "#define BuildSpeedoFonts $answ" >> $F
yesno YES "Build/install the Type1 fonts?"
echo "#define BuildType1Fonts $answ" >> $F
yesno YES "Build/install the CID fonts?"
echo "#define BuildCIDFonts $answ" >> $F
yesno YES "Build/install the Cyrillic fonts?"
echo "#define BuildCyrillicFonts $answ" >> $F
yesno YES "Build/install the Latin2 fonts?"
echo "#define BuildLatin2Fonts $answ" >> $F
fi
yesno YES "Build the servers with Extended input devices?"
if [ $answ = NO ]; then
echo "#define XInputDrivers mouse" >> $F
else
echo "#define XInputDrivers mouse dynapro elo2300 elographics magellan microtouch \
mutouch spaceorb wacom void" >> $F
# XXX broken in 3.9.18
# if [ X${MACHINE} != X"alpha" ]; then
# echo "#define JoystickSupport YES" >> $F
# fi
fi
yesno YES "Build PEX?"
echo "#define BuildPexExt $answ" >> $F
yesno YES "Build Xinerama?"
echo "#define BuildXinerama $answ" >> $F
yesno YES "Build XIE?"
echo "#define BuildXIE $answ" >> $F
echo
# XXX We may not want to default this to 'YES' if there are any app-default
# files installed
yesno YES "Install application defaults files?"
echo "#define InstallAppDefFiles $answ" >> $F
yesno YES "Build static libraries in addition to shared libraries?"
echo "#define ForceNormalLib $answ" >> $F
if [ ${OSVERSION} -ge 300000 ]; then
cat <<'END'
FreeBSD-3.x has support for Secure RPC.
While this scheme is not used for general purpose encryption,
some countries restrict the use of strong cryptography.
END
yesno YES "Build with Secure RPC?"
echo "#define HasSecureRPC $answ" >> $F
fi
cat <<'END'
MIT supplies an authentication mechanism that relies upon DES, this is
called XDM-AUTHORIZATION-1.
Source code for this authentication mechanism may not be exported from
the United States, however, there are compatible replacements for this
mechanism available elsewhere. Also, while this scheme is not used for
general purpose encryption, some countries restrict the use of strong
cryptography.
If you have aquired a copy of "Wraphelp.c" and it currently resides in
the same location as the XFree86 source or in the ports "files"
subdirectory, it will be copied into the right place in the X11 source
distribution and support for this feature will be enabled if you answer
YES to the following question.
If you do not have a copy of this file, even if you answer YES to this
question, support will not be enabled. If you wish to change this later,
the option controling this is contained the file xc/config/cf/xf86site.def.
END
yesno YES "Do you want to enable XDM-AUTHORIZATION-1 support?"
cpwh=NO
if [ $answ = YES ]; then
WH=$WRKDIR/xc/lib/Xdmcp/Wraphelp.c
if [ -f $WH ] ; then
echo "==> $WH found in source distribution."
elif [ -f $DISTDIR/xc/Wraphelp.c ] ; then
echo "==> Wraphelp.c found in DISTDIR directory, copying to source tree."
cpwh=$DISTDIR/xc/Wraphelp.c
elif [ -f $FILESDIR/Wraphelp.c ] ; then
echo "==> Wraphelp.c found in files directory, copying to source tree."
cpwh=$FILESDIR/Wraphelp.c
else
echo "==> Wraphelp.c not found, DES support NOT enabled."
cpwh=NO
fi
fi
if [ $cpwh != NO ]; then
echo "#define HasXdmAuth $answ" >> $F
fi
echo
yesno YES "Do you want to compile with PAM support?"
echo "#define HasPam $answ" >> $F
echo "#define InstallXserverSetUID NO " >> $F
echo "#define BuildXF86DRI YES" >> $F
echo "#define BuildXF86DRM YES" >> $F
}
configure
if [ X$cpwh != XNO ]; then
tr -d '\r' < $cpwh > $WH
fi
cat $F >> $WRKDIR/xc/config/cf/xf86site.def
exit 0
|