Contents of /smage/trunk/core/xorg-server/xorg-server-1.12.4-r2.smage2
Parent Directory | Revision Log
Revision 4352 -
(show annotations)
(download)
Thu Nov 15 14:36:09 2012 UTC (11 years, 6 months ago) by niro
File size: 7407 byte(s)
Thu Nov 15 14:36:09 2012 UTC (11 years, 6 months ago) by niro
File size: 7407 byte(s)
-rebuild against mesa-9.0 and using new opengl-update
1 | # $Id$ |
2 | |
3 | PNAME="xorg-server" |
4 | PVER="1.12.4" |
5 | PBUILD="r2" |
6 | |
7 | PCAT="x11-base" |
8 | |
9 | DESCRIPTION="Modular X.Org X Server." |
10 | HOMEPAGE="http://xorg.freedesktop.org" |
11 | |
12 | # mesa sources are needed to compile opengl extensions |
13 | MESA_PVER="9.0" |
14 | MESA_SRCFILE="MesaLib-${MESA_PVER/_/-}.tar.bz2" |
15 | MESA_SRCDIR="${BUILDDIR}/MesaLib-${MESA_PVER/_/-}" |
16 | |
17 | PROVIDE="virtual/x11" |
18 | |
19 | DEPEND=">= x11-libs/libXfont-1.4.5 |
20 | >= x11-libs/libXau-1.0.7 |
21 | >= x11-libs/libXext-1.3 |
22 | >= x11-libs/libX11-1.4 |
23 | >= x11-libs/libxkbfile-1.0.8 |
24 | >= x11-libs/libXdmcp-1.1 |
25 | >= x11-libs/libXmu-1.1 |
26 | >= x11-libs/libXrender-0.9.7 |
27 | >= x11-libs/libXi-1.4 |
28 | >= x11-libs/libXcomposite-0.4 |
29 | >= media-libs/freetype-2.4 |
30 | >= media-fonts/font-misc-misc-1 |
31 | >= x11-libs/libXpm-3.5.10 |
32 | >= x11-libs/libXinerama-1.1.2 |
33 | >= x11-libs/pixman-0.26 |
34 | >= x11-base/opengl-update-2.3 |
35 | >= x11-libs/libpciaccess-0.13 |
36 | >= dev-libs/libsha1-0.3 |
37 | == media-libs/mesa-${MESA_PVER} |
38 | >= x11-libs/libXxf86misc-1.0.3 |
39 | >= x11-libs/libXxf86vm-1.1.2 |
40 | >= x11-misc/xkeyboard-config-2.5 |
41 | >= x11-apps/xauth-1.0.7 |
42 | >= sys-fs/udev-185" |
43 | # >= media-fonts/font-cursor-misc-1 |
44 | # >= x11-misc/xbitmaps-1.1.0 |
45 | # >= x11-apps/iceauth-1.0.3 |
46 | # >= x11-apps/rgb-1.0.3 |
47 | # >= x11-apps/xinit-1.1.1 |
48 | # >= x11-libs/libXaw-1.0.7 |
49 | # >= x11-libs/libdmx-1.1.0 |
50 | # >= x11-libs/libXtst-1.1.0 |
51 | # >= x11-libs/libXres-1.0.4 |
52 | # >= x11-libs/libxkbui-1.0.2 |
53 | |
54 | SDEPEND=">= x11-libs/xtrans-1.2.7 |
55 | >= x11-proto/randrproto-1.3.2 |
56 | >= x11-proto/renderproto-0.11.1 |
57 | >= x11-proto/fixesproto-5 |
58 | >= x11-proto/damageproto-1.2.1 |
59 | >= x11-proto/xextproto-7.2 |
60 | >= x11-proto/xproto-7.0.23 |
61 | >= x11-proto/xf86dgaproto-2.1 |
62 | >= x11-proto/xf86miscproto-0.9.3 |
63 | >= x11-proto/xf86vidmodeproto-2.3 |
64 | >= x11-proto/xf86bigfontproto-1.2.0 |
65 | >= x11-proto/recordproto-1.14.2 |
66 | >= x11-proto/resourceproto-1.2 |
67 | >= x11-proto/videoproto-2.3.1 |
68 | >= x11-proto/scrnsaverproto-1.2.2 |
69 | >= x11-proto/evieext-1.1.1 |
70 | >= x11-proto/fontsproto-2.1.2 |
71 | >= x11-proto/kbproto-1.0.6 |
72 | >= x11-proto/inputproto-2.0.2 |
73 | >= x11-proto/bigreqsproto-1.1.2 |
74 | >= x11-proto/xcmiscproto-1.2.2 |
75 | >= x11-apps/mkfontdir-1.0.7 |
76 | >= x11-apps/mkfontscale-1.1 |
77 | >= x11-misc/xbitmaps-1.1.1 |
78 | >= x11-proto/compositeproto-0.4.2 |
79 | >= x11-proto/xineramaproto-1.2 |
80 | >= x11-proto/glproto-1.4.16 |
81 | >= x11-proto/xf86driproto-2.1.1 |
82 | >= x11-proto/dri2proto-2.6 |
83 | >= x11-libs/libdrm-2.4.37" |
84 | |
85 | #??? >= x11-libs/libXv-1.0.5" |
86 | # >= x11-proto/dmxproto-2.3 |
87 | |
88 | # base files |
89 | ALX_PKG_KEEP="etc/X11 |
90 | usr/bin/Xorg |
91 | usr/$(mlibdir)/xorg/protocol.txt |
92 | var/lib/xkb/README.compiled" |
93 | |
94 | # generic modules |
95 | ALX_PKG_KEEP+=" usr/$(mlibdir)/xorg/modules/libvgahw.so |
96 | usr/$(mlibdir)/xorg/modules/libvbe.so |
97 | usr/$(mlibdir)/xorg/modules/libshadow.so |
98 | usr/$(mlibdir)/xorg/modules/libexa.so |
99 | usr/$(mlibdir)/xorg/modules/libxaa.so |
100 | usr/$(mlibdir)/xorg/modules/libint10.so |
101 | usr/$(mlibdir)/xorg/modules/libfb.so |
102 | usr/$(mlibdir)/xorg/modules/libshadowfb.so" |
103 | |
104 | # generic extensions |
105 | ALX_PKG_KEEP+=" usr/$(mlibdir)/xorg/modules/extensions/libextmod.so |
106 | usr/$(mlibdir)/xorg/modules/extensions/libdbe.so |
107 | usr/$(mlibdir)/xorg/modules/extensions/libglx.so |
108 | usr/$(mlibdir)/xorg/modules/extensions/libdri.so |
109 | usr/$(mlibdir)/xorg/modules/extensions/libdri2.so |
110 | usr/$(mlibdir)/xorg/modules/extensions/librecord.so" |
111 | |
112 | # opengl |
113 | ALX_PKG_KEEP+=" /usr/$(mlibdir)/opengl/xorg/extensions" |
114 | |
115 | # other drivers |
116 | ALX_PKG_KEEP+=" usr/$(mlibdir)/xorg/modules/drivers |
117 | usr/$(mlibdir)/xorg/modules/drivers/extensions |
118 | usr/$(mlibdir)/xorg/modules/drivers/input |
119 | usr/$(mlibdir)/xorg/modules/drivers/linux |
120 | usr/$(mlibdir)/xorg/modules/drivers/multimedia" |
121 | |
122 | # libwfb module is needed by the proprietary nvidia-drivers |
123 | ALX_PKG_KEEP+=" usr/$(mlibdir)/xorg/modules/libwfb.so" |
124 | |
125 | # keep cvt and gtf for modline calculating |
126 | ALX_PKG_KEEP+=" usr/bin/cvt usr/bin/gtf" |
127 | |
128 | sminclude xorg mtools alx-split |
129 | |
130 | SRC_URI=( ${SRC_URI[*]} |
131 | mirror://${PNAME}/${SRCFILE} |
132 | ftp://ftp.freedesktop.org/pub/mesa/${MESA_PVER}/${MESA_SRCFILE} |
133 | sourceforge://mesa3d/${MESA_SRCFILE} |
134 | mirror://mesa/${MESA_SRCFILE} |
135 | mirror://${PNAME}/${PNAME}-1.12.3-die-ugly-pattern-die-die-die.patch |
136 | mirror://${PNAME}/${PNAME}-1.12.3-kdrive-default-mode.patch |
137 | mirror://${PNAME}/${PNAME}-1.12.3-kdrive-evdev-with-valid-mouse-devices.patch |
138 | ) |
139 | |
140 | UP2SUBDIR="xserver" |
141 | UP2DATE="updatecmd_xorg ${PNAME}" |
142 | |
143 | src_prepare() |
144 | { |
145 | munpack ${SRCFILE} || die |
146 | munpack ${MESA_SRCFILE} || die |
147 | cd ${SRCDIR} |
148 | |
149 | # adopted from redhat; use a black background |
150 | mpatch ${PNAME}-1.12.3-die-ugly-pattern-die-die-die.patch || die |
151 | |
152 | # fix kdrive default mode -> use 640x480@60hz instead of 800x600@75hz |
153 | mpatch ${PNAME}-1.12.3-kdrive-default-mode.patch || die |
154 | |
155 | # fix new evdev event devices (event4 and event5) |
156 | mpatch ${PNAME}-1.12.3-kdrive-evdev-with-valid-mouse-devices.patch || die |
157 | |
158 | # fix build issues, some wrapper files which should be generated |
159 | # at build time exist and the makefile doesn't whipe them. we patch |
160 | # the makefile to clean them and whipe these wrapper files |
161 | rm -f ${SRCDIR}/hw/xprint/*-wrapper.c || die |
162 | |
163 | # fix xorg.conf.d location |
164 | sed -i 's:^\(@CONFIG_UDEV_TRUE@xorgconfddir =\).*:\1 $(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.in || die |
165 | sed -i 's:^\(xorgconfddir =\).*: \1$(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.am || die |
166 | |
167 | mautoreconf || die |
168 | } |
169 | |
170 | src_compile() |
171 | { |
172 | cd ${SRCDIR} |
173 | |
174 | xorg_src_configure \ |
175 | --with-mesa-source=${MESA_SRCDIR} \ |
176 | --sysconfdir=/etc \ |
177 | --localstatedir=/var \ |
178 | --with-xkb-output=/var/lib/xkb \ |
179 | --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \ |
180 | --enable-install-setuid \ |
181 | --enable-ipv6 \ |
182 | --disable-dmx \ |
183 | --disable-xvfb \ |
184 | --disable-xnest \ |
185 | --enable-dri \ |
186 | --enable-dri2 \ |
187 | --enable-xorg \ |
188 | --enable-xtrap \ |
189 | --enable-xevie \ |
190 | --disable-xprint \ |
191 | --enable-glx-tls \ |
192 | --enable-glx \ |
193 | --disable-static \ |
194 | --disable-config-dbus \ |
195 | --disable-config-hal \ |
196 | --enable-config-udev \ |
197 | --enable-composite \ |
198 | --enable-xinerama \ |
199 | --with-sha1=libsha1 \ |
200 | || die |
201 | |
202 | mmake || die |
203 | } |
204 | |
205 | alx_generic_src_install() |
206 | { |
207 | xorg_src_install || die |
208 | |
209 | # needed directories |
210 | minstalldir /usr/$(mlibdir)/opengl/xorg/extensions || die |
211 | |
212 | # dynamic opengl setup |
213 | local i |
214 | for i in ${BINDIR}/usr/$(mlibdir)/xorg/modules/libglx* \ |
215 | ${BINDIR}/usr/$(mlibdir)/xorg/modules/libdri* |
216 | do |
217 | if [ -f ${i} -o -L ${i} ] |
218 | then |
219 | mv -f ${i} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/extensions || die "${i}" |
220 | fi |
221 | done |
222 | |
223 | # needed directories |
224 | minstalldir /usr/bin || die |
225 | |
226 | # missing symlink |
227 | mlink Xorg /usr/bin/X || die |
228 | } |
229 | |
230 | preinstall() |
231 | { |
232 | # fix some deprecated symlinks from ancient xorg-1.5 servers |
233 | if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so ] |
234 | then |
235 | rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so |
236 | fi |
237 | |
238 | if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so ] |
239 | then |
240 | rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so |
241 | fi |
242 | |
243 | if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so ] |
244 | then |
245 | rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so |
246 | fi |
247 | |
248 | if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so ] |
249 | then |
250 | rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so |
251 | fi |
252 | } |
253 | |
254 | postinstall() |
255 | { |
256 | # symlink to Xorg |
257 | ln -snf Xorg ${MROOT}/usr/bin/X || die |
258 | |
259 | # opengl setup |
260 | ${MROOT}/usr/sbin/opengl-update --use-old xorg |
261 | } |
262 | |
263 | postremove_xorg-server() |
264 | { |
265 | # get rid of module dir to ensure opengl-update works properly |
266 | if [ -e ${MROOT}/usr/$(mlibdir)/xorg/modules ] |
267 | then |
268 | if [[ -z $(magequery -n xorg-server) ]] |
269 | then |
270 | rm -rf ${MROOT}/usr/$(mlibdir)/xorg/modules |
271 | fi |
272 | fi |
273 | } |