Annotation of /smage/trunk/core/xorg-server/xorg-server-1.17.2-r7.smage2
Parent Directory | Revision Log
Revision 7592 -
(hide annotations)
(download)
Tue Sep 22 09:33:48 2015 UTC (8 years, 7 months ago) by niro
File size: 8227 byte(s)
Tue Sep 22 09:33:48 2015 UTC (8 years, 7 months ago) by niro
File size: 8227 byte(s)
-rebuild against mesa-10.6.7 and llvm-3.6.2
1 | niro | 7592 | # $Id$ |
2 | |||
3 | PNAME="xorg-server" | ||
4 | PVER="1.17.2" | ||
5 | PBUILD="r7" | ||
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.7" | ||
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}/xvfb-run | ||
139 | mirror://${PNAME}/${PNAME}-1.12.3-die-ugly-pattern-die-die-die.patch | ||
140 | mirror://${PNAME}/${PNAME}-1.12.3-kdrive-default-mode.patch | ||
141 | mirror://${PNAME}/${PNAME}-1.12.3-kdrive-evdev-with-valid-mouse-devices.patch | ||
142 | mirror://${PNAME}/${PNAME}-1.17.1-dix-add-unaccelerated-valuators-to-the-valuatormask.patch | ||
143 | mirror://${PNAME}/${PNAME}-1.17.1-dix-hook-up-the-unaccelerated-valuator-masks.patch | ||
144 | ) | ||
145 | |||
146 | pkg_setup() | ||
147 | { | ||
148 | # must use mesa as opengl-headers! | ||
149 | if [[ $(opengl-update --get-implementation) != xorg ]] | ||
150 | then | ||
151 | die "please change to xorg opengl-headers: opengl-update xorg" | ||
152 | fi | ||
153 | } | ||
154 | |||
155 | src_prepare() | ||
156 | { | ||
157 | munpack ${SRCFILE} || die | ||
158 | munpack ${MESA_SRCFILE} || die | ||
159 | cd ${SRCDIR} | ||
160 | |||
161 | # upstream patches | ||
162 | mpatch ${PNAME}-1.17.1-dix-add-unaccelerated-valuators-to-the-valuatormask.patch || die | ||
163 | mpatch ${PNAME}-1.17.1-dix-hook-up-the-unaccelerated-valuator-masks.patch || die | ||
164 | |||
165 | # adopted from redhat; use a black background | ||
166 | mpatch ${PNAME}-1.12.3-die-ugly-pattern-die-die-die.patch || die | ||
167 | |||
168 | # fix kdrive default mode -> use 640x480@60hz instead of 800x600@75hz | ||
169 | mpatch ${PNAME}-1.12.3-kdrive-default-mode.patch || die | ||
170 | |||
171 | # fix new evdev event devices (event4 and event5) | ||
172 | mpatch ${PNAME}-1.12.3-kdrive-evdev-with-valid-mouse-devices.patch || die | ||
173 | |||
174 | # fix build issues, some wrapper files which should be generated | ||
175 | # at build time exist and the makefile doesn't whipe them. we patch | ||
176 | # the makefile to clean them and whipe these wrapper files | ||
177 | rm -f ${SRCDIR}/hw/xprint/*-wrapper.c || die | ||
178 | |||
179 | # fix xorg.conf.d location | ||
180 | sed -i 's:^\(@CONFIG_UDEV_TRUE@xorgconfddir =\).*:\1 $(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.in || die | ||
181 | sed -i 's:^\(xorgconfddir =\).*: \1$(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.am || die | ||
182 | |||
183 | mautoreconf || die | ||
184 | } | ||
185 | |||
186 | src_compile() | ||
187 | { | ||
188 | cd ${SRCDIR} | ||
189 | |||
190 | xorg_src_configure \ | ||
191 | --with-mesa-source=${MESA_SRCDIR} \ | ||
192 | --sysconfdir=/etc \ | ||
193 | --localstatedir=/var \ | ||
194 | --libexecdir=/usr/$(mlibdir)/${PNAME} \ | ||
195 | --with-xkb-output=/var/lib/xkb \ | ||
196 | --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \ | ||
197 | --disable-install-setuid \ | ||
198 | --enable-suid-wrapper \ | ||
199 | --enable-ipv6 \ | ||
200 | --enable-xorg \ | ||
201 | --disable-dmx \ | ||
202 | --enable-xvfb \ | ||
203 | --disable-xnest \ | ||
204 | --enable-dri \ | ||
205 | --enable-dri2 \ | ||
206 | --enable-dri3 \ | ||
207 | --enable-glamor \ | ||
208 | --enable-xtrap \ | ||
209 | --enable-xevie \ | ||
210 | --enable-xcsecurity \ | ||
211 | --enable-libunwind \ | ||
212 | --disable-xprint \ | ||
213 | --enable-glx-tls \ | ||
214 | --enable-glx \ | ||
215 | --disable-static \ | ||
216 | --disable-config-dbus \ | ||
217 | --disable-config-hal \ | ||
218 | --enable-config-udev \ | ||
219 | --enable-composite \ | ||
220 | --enable-xinerama \ | ||
221 | --enable-systemd-logind \ | ||
222 | || die | ||
223 | |||
224 | mmake || die | ||
225 | } | ||
226 | |||
227 | alx_generic_src_install() | ||
228 | { | ||
229 | xorg_src_install || die | ||
230 | |||
231 | # needed directories | ||
232 | minstalldir /usr/bin || die | ||
233 | minstalldir /usr/$(mlibdir)/opengl/xorg/extensions || die | ||
234 | |||
235 | # dynamic opengl setup | ||
236 | local i | ||
237 | for i in ${BINDIR}/usr/$(mlibdir)/xorg/modules/libglx* \ | ||
238 | ${BINDIR}/usr/$(mlibdir)/xorg/modules/libdri* | ||
239 | do | ||
240 | if [ -f ${i} -o -L ${i} ] | ||
241 | then | ||
242 | mv -f ${i} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/extensions || die "${i}" | ||
243 | fi | ||
244 | done | ||
245 | |||
246 | # missing symlink | ||
247 | mlink Xorg /usr/bin/X || die | ||
248 | |||
249 | # xvfb-run script to ease things | ||
250 | minstallexec -s xvfb-run || die | ||
251 | } | ||
252 | |||
253 | preinstall() | ||
254 | { | ||
255 | # fix some deprecated symlinks from ancient xorg-1.5 servers | ||
256 | if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so ] | ||
257 | then | ||
258 | rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so | ||
259 | fi | ||
260 | |||
261 | if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so ] | ||
262 | then | ||
263 | rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so | ||
264 | fi | ||
265 | |||
266 | if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so ] | ||
267 | then | ||
268 | rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so | ||
269 | fi | ||
270 | |||
271 | if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so ] | ||
272 | then | ||
273 | rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so | ||
274 | fi | ||
275 | } | ||
276 | |||
277 | postinstall() | ||
278 | { | ||
279 | # opengl setup | ||
280 | ${MROOT}/usr/sbin/opengl-update --use-old xorg | ||
281 | } | ||
282 | |||
283 | postremove_xorg-server() | ||
284 | { | ||
285 | # get rid of module dir to ensure opengl-update works properly | ||
286 | if [ -e ${MROOT}/usr/$(mlibdir)/xorg/modules ] | ||
287 | then | ||
288 | if [[ -z $(magequery -n xorg-server) ]] | ||
289 | then | ||
290 | rm -rf ${MROOT}/usr/$(mlibdir)/xorg/modules | ||
291 | fi | ||
292 | fi | ||
293 | } |