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