Magellan Linux

Contents of /smage/trunk/core/xorg-server/xorg-server-1.14.1-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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