Contents of /smage/trunk/core/xorg-server/xorg-server-1.16.4-r1.smage2
Parent Directory | Revision Log
Revision 7643 -
(show annotations)
(download)
Wed Sep 23 08:31:40 2015 UTC (8 years, 7 months ago) by niro
File size: 7838 byte(s)
Wed Sep 23 08:31:40 2015 UTC (8 years, 7 months ago) by niro
File size: 7838 byte(s)
-fix ftbfs with gcc-5
1 | # $Id$ |
2 | |
3 | PNAME="xorg-server" |
4 | PVER="1.16.4" |
5 | PBUILD="r1" |
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-18 virtual/X-ABI-XINPUT-21 virtual/X-ABI-EXTENSION-8" |
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)/xorg/protocol.txt |
91 | var/lib/xkb/README.compiled" |
92 | |
93 | # generic modules |
94 | ALX_PKG_KEEP+=" usr/$(mlibdir)/xorg/modules/libvgahw.so |
95 | usr/$(mlibdir)/xorg/modules/libvbe.so |
96 | usr/$(mlibdir)/xorg/modules/libshadow.so |
97 | usr/$(mlibdir)/xorg/modules/libexa.so |
98 | usr/$(mlibdir)/xorg/modules/libxaa.so |
99 | usr/$(mlibdir)/xorg/modules/libint10.so |
100 | usr/$(mlibdir)/xorg/modules/libfb.so |
101 | usr/$(mlibdir)/xorg/modules/libshadowfb.so" |
102 | |
103 | # generic extensions |
104 | ALX_PKG_KEEP+=" usr/$(mlibdir)/xorg/modules/extensions/libextmod.so |
105 | usr/$(mlibdir)/xorg/modules/extensions/libdbe.so |
106 | usr/$(mlibdir)/xorg/modules/extensions/libglx.so |
107 | usr/$(mlibdir)/xorg/modules/extensions/libdri.so |
108 | usr/$(mlibdir)/xorg/modules/extensions/libdri2.so |
109 | usr/$(mlibdir)/xorg/modules/extensions/librecord.so" |
110 | |
111 | # opengl |
112 | ALX_PKG_KEEP+=" usr/$(mlibdir)/opengl/xorg/extensions" |
113 | |
114 | # other drivers |
115 | ALX_PKG_KEEP+=" usr/$(mlibdir)/xorg/modules/drivers |
116 | usr/$(mlibdir)/xorg/modules/drivers/extensions |
117 | usr/$(mlibdir)/xorg/modules/drivers/input |
118 | usr/$(mlibdir)/xorg/modules/drivers/linux |
119 | usr/$(mlibdir)/xorg/modules/drivers/multimedia" |
120 | |
121 | # libwfb module is needed by the proprietary nvidia-drivers |
122 | ALX_PKG_KEEP+=" usr/$(mlibdir)/xorg/modules/libwfb.so" |
123 | |
124 | # keep cvt and gtf for modline calculating |
125 | ALX_PKG_KEEP+=" usr/bin/cvt usr/bin/gtf" |
126 | |
127 | UP2SUBDIR="xserver" |
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}/xvfb-run |
136 | mirror://${PNAME}/${PNAME}-1.12.3-die-ugly-pattern-die-die-die.patch |
137 | mirror://${PNAME}/${PNAME}-1.12.3-kdrive-default-mode.patch |
138 | mirror://${PNAME}/${PNAME}-1.12.3-kdrive-evdev-with-valid-mouse-devices.patch |
139 | mirror://${PNAME}/${PNAME}-${PVER}-gcc5.patch |
140 | ) |
141 | |
142 | pkg_setup() |
143 | { |
144 | # must use mesa as opengl-headers! |
145 | if [[ $(opengl-update --get-implementation) != xorg ]] |
146 | then |
147 | die "please change to xorg opengl-headers: opengl-update xorg" |
148 | fi |
149 | } |
150 | |
151 | src_prepare() |
152 | { |
153 | munpack ${SRCFILE} || die |
154 | munpack ${MESA_SRCFILE} || die |
155 | cd ${SRCDIR} |
156 | |
157 | # fix ftbfs with gcc-5 |
158 | mpatch ${PNAME}-${PVER}-gcc5.patch || die |
159 | |
160 | # adopted from redhat; use a black background |
161 | mpatch ${PNAME}-1.12.3-die-ugly-pattern-die-die-die.patch || die |
162 | |
163 | # fix kdrive default mode -> use 640x480@60hz instead of 800x600@75hz |
164 | mpatch ${PNAME}-1.12.3-kdrive-default-mode.patch || die |
165 | |
166 | # fix new evdev event devices (event4 and event5) |
167 | mpatch ${PNAME}-1.12.3-kdrive-evdev-with-valid-mouse-devices.patch || die |
168 | |
169 | # fix build issues, some wrapper files which should be generated |
170 | # at build time exist and the makefile doesn't whipe them. we patch |
171 | # the makefile to clean them and whipe these wrapper files |
172 | rm -f ${SRCDIR}/hw/xprint/*-wrapper.c || die |
173 | |
174 | # fix xorg.conf.d location |
175 | sed -i 's:^\(@CONFIG_UDEV_TRUE@xorgconfddir =\).*:\1 $(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.in || die |
176 | sed -i 's:^\(xorgconfddir =\).*: \1$(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.am || die |
177 | |
178 | mautoreconf || die |
179 | } |
180 | |
181 | src_compile() |
182 | { |
183 | cd ${SRCDIR} |
184 | |
185 | xorg_src_configure \ |
186 | --with-mesa-source=${MESA_SRCDIR} \ |
187 | --sysconfdir=/etc \ |
188 | --localstatedir=/var \ |
189 | --libexecdir=/usr/bin \ |
190 | --with-xkb-output=/var/lib/xkb \ |
191 | --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \ |
192 | --disable-install-setuid \ |
193 | --enable-suid-wrapper \ |
194 | --enable-ipv6 \ |
195 | --enable-xorg \ |
196 | --disable-dmx \ |
197 | --enable-xvfb \ |
198 | --disable-xnest \ |
199 | --enable-dri \ |
200 | --enable-dri2 \ |
201 | --enable-dri3 \ |
202 | --enable-glamor \ |
203 | --enable-xtrap \ |
204 | --enable-xevie \ |
205 | --enable-xcsecurity \ |
206 | --enable-libunwind \ |
207 | --disable-xprint \ |
208 | --enable-glx-tls \ |
209 | --enable-glx \ |
210 | --disable-static \ |
211 | --disable-config-dbus \ |
212 | --disable-config-hal \ |
213 | --enable-config-udev \ |
214 | --enable-composite \ |
215 | --enable-xinerama \ |
216 | --enable-systemd-logind \ |
217 | || die |
218 | |
219 | mmake || die |
220 | } |
221 | |
222 | alx_generic_src_install() |
223 | { |
224 | xorg_src_install || die |
225 | |
226 | # needed directories |
227 | minstalldir /usr/bin || die |
228 | minstalldir /usr/$(mlibdir)/opengl/xorg/extensions || die |
229 | |
230 | # dynamic opengl setup |
231 | local i |
232 | for i in ${BINDIR}/usr/$(mlibdir)/xorg/modules/libglx* \ |
233 | ${BINDIR}/usr/$(mlibdir)/xorg/modules/libdri* |
234 | do |
235 | if [ -f ${i} -o -L ${i} ] |
236 | then |
237 | mv -f ${i} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/extensions || die "${i}" |
238 | fi |
239 | done |
240 | |
241 | # missing symlink |
242 | mlink Xorg /usr/bin/X || die |
243 | |
244 | # xvfb-run script to ease things |
245 | minstallexec -s xvfb-run || die |
246 | } |
247 | |
248 | preinstall() |
249 | { |
250 | # fix some deprecated symlinks from ancient xorg-1.5 servers |
251 | if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so ] |
252 | then |
253 | rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so |
254 | fi |
255 | |
256 | if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so ] |
257 | then |
258 | rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so |
259 | fi |
260 | |
261 | if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so ] |
262 | then |
263 | rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so |
264 | fi |
265 | |
266 | if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so ] |
267 | then |
268 | rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so |
269 | fi |
270 | } |
271 | |
272 | postinstall() |
273 | { |
274 | # opengl setup |
275 | ${MROOT}/usr/sbin/opengl-update --use-old xorg |
276 | } |
277 | |
278 | postremove_xorg-server() |
279 | { |
280 | # get rid of module dir to ensure opengl-update works properly |
281 | if [ -e ${MROOT}/usr/$(mlibdir)/xorg/modules ] |
282 | then |
283 | if [[ -z $(magequery -n xorg-server) ]] |
284 | then |
285 | rm -rf ${MROOT}/usr/$(mlibdir)/xorg/modules |
286 | fi |
287 | fi |
288 | } |