Magellan Linux

Contents of /smage/trunk/core/xorg-server/xorg-server-1.19.6-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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