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