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