Magellan Linux

Annotation of /smage/branches/alx07x-unstable/core/xorg-server/xorg-server-1.20.5-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13283 - (hide annotations) (download)
Thu Jul 11 10:40:10 2019 UTC (4 years, 10 months ago) by niro
File size: 8134 byte(s)
-release branches/alx07x-unstable
1 niro 13169 # $Id$
2    
3     PNAME="xorg-server"
4     PVER="1.20.5"
5     PBUILD="r1"
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="19.0.7"
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-24.0 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.9
27     >= x11-libs/libXdmcp-1.1
28     >= x11-libs/pixman-0.38
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.36
33     >= sys-libs/libsystemd-242
34     >= sys-fs/udev-242
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.3
43     >= x11-misc/xkeyboard-config-2.27
44     >= x11-apps/iceauth-1.0.8
45     >= x11-apps/rgb-1.0.6
46     >= x11-apps/xauth-1.0.10
47     >= x11-base/opengl-update-2.3.12
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.38
56     >= x11-libs/libpciaccess-dev-0.14
57     >= x11-libs/libdrm-dev-2.4.98
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.98
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-242
79     >= sys-fs/udev-dev-242
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.3
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     )
148    
149     split_info_xvfb()
150     {
151     DESCRIPTION="A virtual framebuffer X11 server."
152     DEPEND="${XVFB_DEPEND}"
153     }
154    
155     pkg_setup()
156     {
157     # must use mesa as opengl-headers!
158     if [[ $(opengl-update --get-implementation) != xorg ]]
159     then
160     die "please change to xorg opengl-headers: opengl-update xorg"
161     fi
162     }
163    
164     src_prepare()
165     {
166     munpack ${SRCFILE} || die
167     munpack ${MESA_SRCFILE} || die
168     cd ${SRCDIR}
169    
170     # adopted from redhat; use a black background
171     mpatch ${PNAME}-1.12.3-die-ugly-pattern-die-die-die.patch || die
172    
173     # fix build issues, some wrapper files which should be generated
174     # at build time exist and the makefile doesn't whipe them. we patch
175     # the makefile to clean them and whipe these wrapper files
176     rm -f ${SRCDIR}/hw/xprint/*-wrapper.c || die
177    
178     # fix xorg.conf.d location
179     sed -i 's:^\(@CONFIG_UDEV_TRUE@xorgconfddir =\).*:\1 $(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.in || die
180     sed -i 's:^\(xorgconfddir =\).*: \1$(sysconfdir)/X11/$(XF86CONFIGDIR):' config/Makefile.am || die
181    
182     mautoreconf || die
183     }
184    
185     src_compile()
186     {
187     cd ${SRCDIR}
188    
189     xorg_src_configure \
190     --with-mesa-source=${MESA_SRCDIR} \
191     --sysconfdir=/etc \
192     --localstatedir=/var \
193     --libexecdir=/usr/$(mlibdir)/${PNAME} \
194     --with-xkb-output=/var/lib/xkb \
195     --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \
196     --disable-install-setuid \
197     --enable-suid-wrapper \
198     --enable-ipv6 \
199     --enable-xorg \
200     --disable-dmx \
201     --enable-xvfb \
202     --disable-xnest \
203     --enable-dri \
204     --enable-dri2 \
205     --enable-dri3 \
206     --enable-glamor \
207     --enable-xtrap \
208     --enable-xevie \
209     --enable-xcsecurity \
210     --enable-libunwind \
211     --disable-xprint \
212     --enable-glx-tls \
213     --enable-glx \
214     --disable-static \
215     --disable-config-dbus \
216     --disable-config-hal \
217     --enable-config-udev \
218     --enable-composite \
219     --enable-xinerama \
220     --enable-systemd-logind \
221     --with-sha1=libgcrypt \
222     || die
223    
224     mmake || die
225     }
226    
227     alx_generic_src_install()
228     {
229     xorg_src_install || die
230    
231     # needed directories
232     minstalldir /usr/bin || die
233     minstalldir /usr/$(mlibdir)/opengl/xorg/extensions || die
234    
235     # dynamic opengl setup
236     local i
237     for i in ${BINDIR}/usr/$(mlibdir)/xorg/modules/libglx* \
238     ${BINDIR}/usr/$(mlibdir)/xorg/modules/libdri*
239     do
240     if [ -f ${i} -o -L ${i} ]
241     then
242     mv -f ${i} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/extensions || die "${i}"
243     fi
244     done
245    
246     # missing symlink
247     mlink Xorg /usr/bin/X || die
248    
249     # xvfb
250     mdelete /usr/bin/Xvfb || die
251     }
252    
253     src_install_xvfb()
254     {
255     cd ${SRCDIR}
256    
257     minstallexec hw/vfb/Xvfb || die
258    
259     # xvfb-run script to ease things
260     minstallexec -s xvfb-run || die
261    
262     # needed directory
263     mkeepdir /usr/share/X11/xkb/compiled || die
264     }
265    
266     preinstall_xorg-server()
267     {
268     # fix some deprecated symlinks from ancient xorg-1.5 servers
269     if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so ]
270     then
271     rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libdri.so
272     fi
273    
274     if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so ]
275     then
276     rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libdri.so
277     fi
278    
279     if [ -L ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so ]
280     then
281     rm ${MROOT}/usr/$(mlibdir)/xorg/modules/extensions/libglx.so
282     fi
283    
284     if [ -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so ]
285     then
286     rm ${MROOT}/usr/$(mlibdir)/opengl/xorg/extensions/libglx.so
287     fi
288     }
289    
290     postinstall_xorg-server()
291     {
292     # provided by xf86-input-evdev now
293     if [ -f ${MROOT}/etc/X11/xorg.conf.d/10-evdev.conf ]
294     then
295     rm ${MROOT}/etc/X11/xorg.conf.d/10-evdev.conf
296     fi
297    
298     # opengl setup
299     ${MROOT}/usr/sbin/opengl-update --use-old xorg
300     }
301    
302     postremove_xorg-server()
303     {
304     # get rid of module dir to ensure opengl-update works properly
305     if [ -e ${MROOT}/usr/$(mlibdir)/xorg/modules ]
306     then
307     if [[ -z $(magequery -n xorg-server) ]]
308     then
309     rm -rf ${MROOT}/usr/$(mlibdir)/xorg/modules
310     fi
311     fi
312     }