Magellan Linux

Contents of /smage/trunk/core/xorg-server/xorg-server-1.15.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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