Magellan Linux

Contents of /smage/trunk/core/xorg-server/xorg-server-1.17.2-r5.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7128 - (show annotations) (download)
Mon Sep 14 09:08:15 2015 UTC (8 years, 8 months ago) by niro
File size: 8131 byte(s)
-rebuild with xvfb enabled
1 # $Id$
2
3 PNAME="xorg-server"
4 PVER="1.17.2"
5 PBUILD="r5"
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="10.6.2"
14 MESA_SRCFILE="mesa-${MESA_PVER/_/-}.tar.xz"
15 MESA_SRCDIR="${BUILDDIR}/mesa-${MESA_PVER/_/-}"
16
17 PROVIDE="virtual/x11"
18
19 # see hw/xfree86/common/xf86Module.h for ABI versions
20 # or installed pkg-config file
21 PROVIDE+=" virtual/X-ABI-VIDEODRV-19 virtual/X-ABI-XINPUT-21.1 virtual/X-ABI-EXTENSION-9.0"
22
23 DEPEND=">= x11-libs/libXfont-1.5
24 >= x11-libs/libXau-1.0.8
25 >= x11-libs/libXdmcp-1.1
26 >= x11-libs/pixman-0.32
27 >= media-libs/freetype-2.6
28 >= media-fonts/font-misc-misc-1
29 >= dev-libs/openssl-1.0.2
30 >= sys-libs/libsystemd-220
31 >= sys-fs/udev-220
32 >= sys-apps/dbus-x11-1.8
33 >= x11-libs/libXext-1.3
34 >= x11-libs/libX11-1.6
35 >= x11-libs/libXi-1.7
36 == media-libs/mesa-${MESA_PVER}
37 >= media-libs/libepoxy-1.2
38 >= sys-libs/libunwind-1.1
39 >= x11-libs/libxshmfence-1.2
40 >= x11-misc/xkeyboard-config-2.15
41 >= x11-apps/iceauth-1.0.7
42 >= x11-apps/rgb-1.0.6
43 >= x11-apps/xauth-1.0.9
44 >= x11-base/opengl-update-2.3.11
45 >= x11-libs/libpciaccess-0.13.2"
46 #>= media-fonts/font-cursor-misc-1
47 # >= x11-apps/xinit-1.3
48
49 ALX_DEV_DEPEND="== x11-proto/xorg-protos-7.7.${PVER}
50 >= x11-libs/pixman-dev-0.32
51 >= x11-libs/libpciaccess-dev-0.13.2
52 >= x11-libs/libdrm-dev-2.4.61
53 == media-libs/mesa-dev-${MESA_PVER}
54 >= x11-libs/libxkbfile-dev-1
55 >= x11-libs/libXfont-dev-1.5
56 >= sys-libs/libunwind-dev-1.1
57 >= dev-libs/openssl-dev-1.0.2
58 >= x11-apps/rgb-dev-1.0.6"
59
60 SDEPEND=">= media-fonts/font-util-1.3
61 >= x11-libs/libdrm-2.4.61
62 >= x11-libs/libXtst-1.2
63 >= x11-libs/libXres-1.0.7
64 >= x11-libs/xcb-util-image-0.4
65 >= x11-libs/xcb-util-keysyms-0.4
66 >= x11-libs/xcb-util-wm-0.3.9
67 >= x11-libs/libxkbfile-1
68 ${ALX_DEV_DEPEND}
69 >= x11-libs/libXau-dev-1.0.8
70 >= x11-libs/libXdmcp-dev-1.1
71 >= media-libs/freetype-dev-2.6
72 >= sys-apps/systemd-dev-220
73 >= sys-fs/udev-dev-220
74 >= sys-apps/dbus-dev-1.8
75 >= x11-libs/libXext-dev-1.3
76 >= x11-libs/libX11-dev-1.6
77 >= x11-libs/libXi-dev-1.7
78 >= media-libs/libepoxy-dev-1.2
79 >= x11-libs/libxshmfence-dev-1.2
80 >= x11-libs/libXtst-dev-1.2
81 >= x11-libs/libXres-dev-1.0.7
82 >= x11-libs/xcb-util-image-dev-0.4
83 >= x11-libs/xcb-util-keysyms-dev-0.4
84 >= x11-libs/xcb-util-wm-dev-0.3.9"
85
86 # base files
87 ALX_PKG_KEEP="etc/X11
88 usr/bin/X
89 usr/bin/Xorg*
90 usr/$(mlibdir)/${PNAME}
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 usr/$(mlibdir)/xorg/modules/libglamoregl.so
104 usr/$(mlibdir)/xorg/modules/libfbdevhw.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 UP2SUBDIR="xserver"
131 sminclude xorg mtools alx-split
132
133 SRC_URI=( ${SRC_URI[*]}
134 mirror://${PNAME}/${SRCFILE}
135 ftp://ftp.freedesktop.org/pub/mesa/${MESA_PVER}/${MESA_SRCFILE}
136 #sourceforge://mesa3d/${MESA_SRCFILE}
137 mirror://mesa/${MESA_SRCFILE}
138 mirror://${PNAME}/${PNAME}-1.12.3-die-ugly-pattern-die-die-die.patch
139 mirror://${PNAME}/${PNAME}-1.12.3-kdrive-default-mode.patch
140 mirror://${PNAME}/${PNAME}-1.12.3-kdrive-evdev-with-valid-mouse-devices.patch
141 mirror://${PNAME}/${PNAME}-1.17.1-dix-add-unaccelerated-valuators-to-the-valuatormask.patch
142 mirror://${PNAME}/${PNAME}-1.17.1-dix-hook-up-the-unaccelerated-valuator-masks.patch
143 )
144
145 pkg_setup()
146 {
147 # must use mesa as opengl-headers!
148 if [[ $(opengl-update --get-implementation) != xorg ]]
149 then
150 die "please change to xorg opengl-headers: opengl-update xorg"
151 fi
152 }
153
154 src_prepare()
155 {
156 munpack ${SRCFILE} || die
157 munpack ${MESA_SRCFILE} || die
158 cd ${SRCDIR}
159
160 # upstream patches
161 mpatch ${PNAME}-1.17.1-dix-add-unaccelerated-valuators-to-the-valuatormask.patch || die
162 mpatch ${PNAME}-1.17.1-dix-hook-up-the-unaccelerated-valuator-masks.patch || die
163
164 # adopted from redhat; use a black background
165 mpatch ${PNAME}-1.12.3-die-ugly-pattern-die-die-die.patch || die
166
167 # fix kdrive default mode -> use 640x480@60hz instead of 800x600@75hz
168 mpatch ${PNAME}-1.12.3-kdrive-default-mode.patch || die
169
170 # fix new evdev event devices (event4 and event5)
171 mpatch ${PNAME}-1.12.3-kdrive-evdev-with-valid-mouse-devices.patch || die
172
173 # fix build issues, some wrapper files which should be generated
174 # at build time exist and the makefile doesn't whipe them. we patch
175 # the makefile to clean them and whipe these wrapper files
176 rm -f ${SRCDIR}/hw/xprint/*-wrapper.c || die
177
178 # fix xorg.conf.d location
179 sed -i 's:^\(@CONFIG_UDEV_TRUE@xorgconfddir =\).*:\1 $(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.in || die
180 sed -i 's:^\(xorgconfddir =\).*: \1$(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.am || die
181
182 mautoreconf || die
183 }
184
185 src_compile()
186 {
187 cd ${SRCDIR}
188
189 xorg_src_configure \
190 --with-mesa-source=${MESA_SRCDIR} \
191 --sysconfdir=/etc \
192 --localstatedir=/var \
193 --libexecdir=/usr/$(mlibdir)/${PNAME} \
194 --with-xkb-output=/var/lib/xkb \
195 --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \
196 --disable-install-setuid \
197 --enable-suid-wrapper \
198 --enable-ipv6 \
199 --enable-xorg \
200 --disable-dmx \
201 --enable-xvfb \
202 --disable-xnest \
203 --enable-dri \
204 --enable-dri2 \
205 --enable-dri3 \
206 --enable-glamor \
207 --enable-xtrap \
208 --enable-xevie \
209 --enable-xcsecurity \
210 --enable-libunwind \
211 --disable-xprint \
212 --enable-glx-tls \
213 --enable-glx \
214 --disable-static \
215 --disable-config-dbus \
216 --disable-config-hal \
217 --enable-config-udev \
218 --enable-composite \
219 --enable-xinerama \
220 --enable-systemd-logind \
221 || die
222
223 mmake || die
224 }
225
226 alx_generic_src_install()
227 {
228 xorg_src_install || die
229
230 # needed directories
231 minstalldir /usr/bin || die
232 minstalldir /usr/$(mlibdir)/opengl/xorg/extensions || die
233
234 # dynamic opengl setup
235 local i
236 for i in ${BINDIR}/usr/$(mlibdir)/xorg/modules/libglx* \
237 ${BINDIR}/usr/$(mlibdir)/xorg/modules/libdri*
238 do
239 if [ -f ${i} -o -L ${i} ]
240 then
241 mv -f ${i} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/extensions || die "${i}"
242 fi
243 done
244
245 # missing symlink
246 mlink Xorg /usr/bin/X || die
247 }
248
249 preinstall()
250 {
251 # fix some deprecated symlinks from ancient xorg-1.5 servers
252 if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so ]
253 then
254 rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so
255 fi
256
257 if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so ]
258 then
259 rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so
260 fi
261
262 if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so ]
263 then
264 rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so
265 fi
266
267 if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so ]
268 then
269 rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so
270 fi
271 }
272
273 postinstall()
274 {
275 # opengl setup
276 ${MROOT}/usr/sbin/opengl-update --use-old xorg
277 }
278
279 postremove_xorg-server()
280 {
281 # get rid of module dir to ensure opengl-update works properly
282 if [ -e ${MROOT}/usr/$(mlibdir)/xorg/modules ]
283 then
284 if [[ -z $(magequery -n xorg-server) ]]
285 then
286 rm -rf ${MROOT}/usr/$(mlibdir)/xorg/modules
287 fi
288 fi
289 }