/[gentoo-x86]/x11-base/xorg-server/xorg-server-1.4.2.ebuild
Gentoo

Contents of /x11-base/xorg-server/xorg-server-1.4.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Mon Jul 13 10:53:18 2009 UTC (5 years, 5 months ago) by remi
Branch: MAIN
Changes since 1.12: +1 -27 lines
x11-base/xorg-server: drop unsupported drivers from INPUT_DEVICES (see bug #277521)
(Portage version: 2.2_rc33/cvs/Linux i686)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/xorg-server-1.4.2.ebuild,v 1.12 2009/05/13 08:53:59 remi Exp $
4
5 # Must be before x-modular eclass is inherited
6 SNAPSHOT="yes"
7
8 inherit x-modular multilib
9
10 OPENGL_DIR="xorg-x11"
11
12 MESA_PN="Mesa"
13 MESA_PV="7.0.2"
14 MESA_P="${MESA_PN}-${MESA_PV}"
15 MESA_SRC_P="${MESA_PN}Lib-${MESA_PV}"
16
17 SRC_URI="${SRC_URI}
18 mirror://sourceforge/mesa3d/${MESA_SRC_P}.tar.bz2
19 http://xorg.freedesktop.org/releases/individual/xserver/${P}.tar.bz2"
20 DESCRIPTION="X.Org X servers"
21 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
22 IUSE_INPUT_DEVICES="
23 input_devices_acecad
24 input_devices_aiptek
25 input_devices_citron
26 input_devices_elographics
27 input_devices_evdev
28 input_devices_fpit
29 input_devices_hyperpen
30 input_devices_joystick
31 input_devices_keyboard
32 input_devices_mouse
33 input_devices_mutouch
34 input_devices_penmount
35 input_devices_tslib
36 input_devices_vmmouse
37 input_devices_void
38
39 input_devices_synaptics
40 input_devices_wacom"
41 IUSE_VIDEO_CARDS="
42 video_cards_apm
43 video_cards_ark
44 video_cards_chips
45 video_cards_cirrus
46 video_cards_cyrix
47 video_cards_dummy
48 video_cards_epson
49 video_cards_fbdev
50 video_cards_geode
51 video_cards_glint
52 video_cards_i128
53 video_cards_i740
54 video_cards_intel
55 video_cards_impact
56 video_cards_imstt
57 video_cards_mach64
58 video_cards_mga
59 video_cards_neomagic
60 video_cards_newport
61 video_cards_nsc
62 video_cards_nv
63 video_cards_r128
64 video_cards_radeon
65 video_cards_rendition
66 video_cards_s3
67 video_cards_s3virge
68 video_cards_savage
69 video_cards_siliconmotion
70 video_cards_sis
71 video_cards_sisusb
72 video_cards_sunbw2
73 video_cards_suncg14
74 video_cards_suncg3
75 video_cards_suncg6
76 video_cards_sunffb
77 video_cards_sunleo
78 video_cards_suntcx
79 video_cards_tdfx
80 video_cards_tga
81 video_cards_trident
82 video_cards_tseng
83 video_cards_v4l
84 video_cards_vermilion
85 video_cards_vesa
86 video_cards_vga
87 video_cards_via
88 video_cards_vmware
89 video_cards_voodoo
90 video_cards_xgi
91 video_cards_fglrx
92 video_cards_nvidia"
93 IUSE_SERVERS="dmx kdrive xorg"
94 IUSE="${IUSE_VIDEO_CARDS}
95 ${IUSE_INPUT_DEVICES}
96 ${IUSE_SERVERS}
97 3dfx tslib
98 dri hal ipv6 minimal nptl sdl"
99 RDEPEND="hal? ( sys-apps/hal )
100 tslib? ( x11-libs/tslib )
101 >=x11-libs/libXfont-1.3.1
102 >=x11-libs/xtrans-1.0.4
103 >=x11-libs/libXau-1.0.3
104 >=x11-libs/libXext-1.0.2
105 >=x11-libs/libX11-1.1.3
106 >=x11-libs/libxkbfile-1.0.4
107 >=x11-libs/libXdmcp-1.0.2
108 >=x11-libs/libXmu-1.0.3
109 >=x11-libs/libXrender-0.9.4
110 >=x11-libs/libXi-1.1.3
111 >=x11-libs/pixman-0.9.5
112 media-libs/freetype
113 >=media-libs/mesa-7.0.1
114 media-fonts/font-adobe-75dpi
115 media-fonts/font-misc-misc
116 media-fonts/font-cursor-misc
117 >=x11-misc/xbitmaps-1.0.1
118 >=x11-misc/xkeyboard-config-0.9
119 >=x11-apps/iceauth-1.0.2
120 >=x11-apps/rgb-1.0.1
121 >=x11-apps/xauth-1.0.2
122 >=x11-apps/xinit-1.0.5
123 app-admin/eselect-opengl
124 >=x11-libs/libXaw-1.0.4
125 >=x11-libs/libXpm-3.5.7
126 >=x11-libs/libXxf86misc-1.0.1
127 >=x11-libs/libXxf86vm-1.0.1
128 dmx? ( >=x11-libs/libdmx-1.0.2
129 >=x11-libs/libXfixes-4.0.3 )
130 !minimal? ( >=x11-libs/libXtst-1.0.3
131 >=x11-libs/libXres-1.0.3 )
132 >=x11-libs/libxkbui-1.0.2
133 >=x11-libs/liblbxutil-1.0.1
134 kdrive? ( sdl? ( media-libs/libsdl ) )"
135 # Xres is dmx-dependent, xkbui is xorgcfg-dependent
136 # Xaw is dmx- and xorgcfg-dependent
137 # Xpm is dmx- and xorgcfg-dependent, pulls in Xt
138 # Xxf86misc and Xxf86vm are xorgcfg-dependent
139 # liblbxutil is lbx- dependent
140 DEPEND="${RDEPEND}
141 !net-dialup/dtrace
142 >=x11-proto/randrproto-1.2.1
143 >=x11-proto/renderproto-0.9.3
144 >=x11-proto/fixesproto-4
145 >=x11-proto/damageproto-1.1
146 >=x11-proto/xextproto-7.0.2
147 >=x11-proto/xproto-7.0.10
148 >=x11-proto/xf86dgaproto-2.0.3
149 >=x11-proto/xf86miscproto-0.9.2
150 >=x11-proto/xf86rushproto-1.1.2
151 >=x11-proto/xf86vidmodeproto-2.2.2
152 >=x11-proto/xf86bigfontproto-1.1.2
153 >=x11-proto/compositeproto-0.4
154 >=x11-proto/recordproto-1.13.2
155 >=x11-proto/resourceproto-1.0.2
156 >=x11-proto/videoproto-2.2.2
157 >=x11-proto/scrnsaverproto-1.1.0
158 >=x11-proto/evieext-1.0.2
159 >=x11-proto/trapproto-3.4.3
160 >=x11-proto/xineramaproto-1.1-r1
161 >=x11-proto/fontsproto-2.0.2
162 >=x11-proto/kbproto-1.0.3
163 >=x11-proto/inputproto-1.4.2.1
164 >=x11-proto/bigreqsproto-1.0.2
165 >=x11-proto/xcmiscproto-1.1.2
166 >=x11-proto/glproto-1.4.8
167 dmx? ( >=x11-proto/dmxproto-2.2.2 )
168 dri? ( >=x11-proto/xf86driproto-2.0.3
169 >=x11-libs/libdrm-2.3 )"
170
171 # Drivers
172 PDEPEND="
173 xorg? (
174 input_devices_acecad? ( >=x11-drivers/xf86-input-acecad-1.1.0 )
175 input_devices_aiptek? ( >=x11-drivers/xf86-input-aiptek-1.0.1 )
176 input_devices_citron? ( >=x11-drivers/xf86-input-citron-2.2.1 )
177 input_devices_elographics? ( >=x11-drivers/xf86-input-elographics-1.1.0 )
178 input_devices_evdev? ( >=x11-drivers/xf86-input-evdev-1.1.1 )
179 input_devices_fpit? ( >=x11-drivers/xf86-input-fpit-1.1.0 )
180 input_devices_hyperpen? ( >=x11-drivers/xf86-input-hyperpen-1.1.0 )
181 input_devices_joystick? ( >=x11-drivers/xf86-input-joystick-1.1.0 )
182 input_devices_keyboard? ( >=x11-drivers/xf86-input-keyboard-1.2.0 )
183 input_devices_mouse? ( >=x11-drivers/xf86-input-mouse-1.1.0 )
184 input_devices_mutouch? ( >=x11-drivers/xf86-input-mutouch-1.1.0 )
185 input_devices_penmount? ( >=x11-drivers/xf86-input-penmount-1.2.1 )
186 input_devices_tslib? ( x11-drivers/xf86-input-tslib )
187 input_devices_vmmouse? ( >=x11-drivers/xf86-input-vmmouse-12.4.2 )
188 input_devices_void? ( >=x11-drivers/xf86-input-void-1.1.1 )
189
190 input_devices_synaptics? ( x11-drivers/synaptics )
191 input_devices_wacom? ( x11-drivers/linuxwacom )
192
193 video_cards_apm? ( >=x11-drivers/xf86-video-apm-1.1.1 )
194 video_cards_ark? ( >=x11-drivers/xf86-video-ark-0.6.0 )
195 video_cards_chips? ( >=x11-drivers/xf86-video-chips-1.1.1 )
196 video_cards_cirrus? ( >=x11-drivers/xf86-video-cirrus-1.1.0 )
197 video_cards_cyrix? ( >=x11-drivers/xf86-video-cyrix-1.1.0 )
198 video_cards_dummy? ( >=x11-drivers/xf86-video-dummy-0.2.0 )
199 video_cards_fbdev? ( >=x11-drivers/xf86-video-fbdev-0.2.0 )
200 video_cards_geode? ( >=x11-drivers/xf86-video-geode-2.7.7.0 )
201 video_cards_glint? ( >=x11-drivers/xf86-video-glint-1.1.1 )
202 video_cards_i128? ( >=x11-drivers/xf86-video-i128-1.2.0 )
203 video_cards_i740? ( >=x11-drivers/xf86-video-i740-1.1.0 )
204 video_cards_intel? ( >=x11-drivers/xf86-video-intel-1.6.0 )
205 video_cards_impact? ( >=x11-drivers/xf86-video-impact-0.2.0 )
206 video_cards_imstt? ( >=x11-drivers/xf86-video-imstt-1.1.0 )
207 video_cards_mach64? ( >=x11-drivers/xf86-video-mach64-6.8.0 )
208 video_cards_mga? ( >=x11-drivers/xf86-video-mga-1.4.1 )
209 video_cards_neomagic? ( >=x11-drivers/xf86-video-neomagic-1.1.1 )
210 video_cards_newport? ( >=x11-drivers/xf86-video-newport-0.2.0 )
211 video_cards_nsc? ( >=x11-drivers/xf86-video-nsc-2.8.1 )
212 video_cards_nv? ( >=x11-drivers/xf86-video-nv-1.1.1 )
213 video_cards_r128? ( >=x11-drivers/xf86-video-r128-6.8.0 )
214 video_cards_radeon? ( >=x11-drivers/xf86-video-ati-6.9.0 )
215 video_cards_rendition? ( >=x11-drivers/xf86-video-rendition-4.1.0 )
216 video_cards_s3? ( >=x11-drivers/xf86-video-s3-0.4.1 )
217 video_cards_s3virge? ( >=x11-drivers/xf86-video-s3virge-1.9.1 )
218 video_cards_savage? ( >=x11-drivers/xf86-video-savage-2.1.1 )
219 video_cards_siliconmotion? ( >=x11-drivers/xf86-video-siliconmotion-1.4.1 )
220 video_cards_sis? ( >=x11-drivers/xf86-video-sis-0.9.1 )
221 video_cards_sisusb? ( >=x11-drivers/xf86-video-sisusb-0.8.1 )
222 video_cards_sunbw2? ( >=x11-drivers/xf86-video-sunbw2-1.1.0 )
223 video_cards_suncg14? ( >=x11-drivers/xf86-video-suncg14-1.1.0 )
224 video_cards_suncg3? ( >=x11-drivers/xf86-video-suncg3-1.1.0 )
225 video_cards_suncg6? ( >=x11-drivers/xf86-video-suncg6-1.1.0 )
226 video_cards_sunffb? ( >=x11-drivers/xf86-video-sunffb-1.1.0 )
227 video_cards_sunleo? ( >=x11-drivers/xf86-video-sunleo-1.1.0 )
228 video_cards_suntcx? ( >=x11-drivers/xf86-video-suntcx-1.1.0 )
229 video_cards_tdfx? ( >=x11-drivers/xf86-video-tdfx-1.2.1 )
230 video_cards_tga? ( >=x11-drivers/xf86-video-tga-1.1.0 )
231 video_cards_trident? ( >=x11-drivers/xf86-video-trident-1.2.1 )
232 video_cards_tseng? ( >=x11-drivers/xf86-video-tseng-1.1.0 )
233 video_cards_v4l? ( >=x11-drivers/xf86-video-v4l-0.1.1 )
234 video_cards_vermilion? ( >=x11-drivers/xf86-video-vermilion-1.0.0 )
235 video_cards_vesa? ( >=x11-drivers/xf86-video-vesa-1.1.0 )
236 video_cards_vga? ( >=x11-drivers/xf86-video-vga-4.1.0 )
237 video_cards_via? ( >=x11-drivers/xf86-video-openchrome-0.2.901 )
238 video_cards_vmware? ( >=x11-drivers/xf86-video-vmware-10.13.0 )
239 video_cards_voodoo? ( >=x11-drivers/xf86-video-voodoo-1.1.0 )
240 video_cards_xgi? ( >=x11-drivers/xf86-video-xgi-1.5.0 )
241 video_cards_tdfx? ( 3dfx? ( >=media-libs/glide-v3-3.10 ) )
242 video_cards_fglrx? ( >=x11-drivers/ati-drivers-8.433 )
243 video_cards_nvidia? ( x11-drivers/nvidia-drivers )
244 )"
245 LICENSE="${LICENSE} MIT"
246
247 PATCHES="
248 ${FILESDIR}/1.4-ia64.patch
249 ${FILESDIR}/1.3.0.0-use-proc-instead-of-sys.patch
250 ${FILESDIR}/1.4-fpic-libxf86config.patch
251 ${FILESDIR}/1.4-fix-kdrive-automake.patch
252 "
253
254 pkg_setup() {
255 use minimal || ensure_a_server_is_building
256
257 # SDL only available in kdrive build
258 if use kdrive && use sdl; then
259 conf_opts="${conf_opts} --enable-xsdl"
260 else
261 conf_opts="${conf_opts} --disable-xsdl"
262 fi
263
264 # Only Xorg and Xgl support this, and we won't build Xgl
265 # until it merges to trunk
266 if use xorg; then
267 conf_opts="${conf_opts} --with-mesa-source=${WORKDIR}/${MESA_P}"
268 fi
269
270 # localstatedir is used for the log location; we need to override the default
271 # from ebuild.sh
272 # sysconfdir is used for the xorg.conf location; same applies
273 # --enable-install-setuid needed because sparcs default off
274 CONFIGURE_OPTIONS="
275 $(use_enable ipv6)
276 $(use_enable dmx)
277 $(use_enable kdrive)
278 $(use_enable tslib)
279 $(use_enable !minimal xvfb)
280 $(use_enable !minimal xnest)
281 $(use_enable !minimal install-libxf86config)
282 $(use_enable dri)
283 $(use_enable xorg)
284 --disable-xprint
285 $(use_enable nptl glx-tls)
286 $(use_enable !minimal xorgcfg)
287 $(use_enable hal config-dbus)
288 $(use_enable hal config-hal)
289 --sysconfdir=/etc/X11
290 --localstatedir=/var
291 --enable-install-setuid
292 --with-fontdir=/usr/share/fonts
293 --with-xkb-output=/var/lib/xkb
294 --without-dtrace
295 ${conf_opts}"
296
297 local diemsg="You must build xorg-server and mesa with the same nptl USE setting."
298 if built_with_use media-libs/mesa nptl; then
299 use nptl || die "${diemsg}"
300 else
301 use nptl && die "${diemsg}"
302 fi
303
304 # (#121394) Causes window corruption
305 filter-flags -fweb
306
307 # Incompatible with GCC 3.x SSP on x86, bug #244352
308 if use x86 ; then
309 if [[ $(gcc-major-version) -lt 4 ]]; then
310 filter-flags -fstack-protector
311 fi
312 fi
313
314 # Workaround
315 append-flags -D_GNU_SOURCE
316
317 # Nothing else provides new enough glxtokens.h
318 ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
319 OLD_IMPLEM="$(eselect opengl show)"
320 eselect opengl set --impl-headers ${OPENGL_DIR}
321 }
322
323 src_unpack() {
324 x-modular_specs_check
325 x-modular_dri_check
326 x-modular_unpack_source
327 x-modular_patch_source
328
329 # Clean up for ${PV}-clean-generated-files.patch
330 pushd hw/xprint >/dev/null
331 rm -f *-wrapper.c || die
332 popd >/dev/null
333
334 # Set up kdrive servers to build
335 if use kdrive; then
336 kdrive_setup
337 fi
338
339 # Make sure eautoreconf gets run if we need the autoconf/make
340 # changes.
341 if [[ ${SNAPSHOT} != "yes" ]]; then
342 if use kdrive || use dmx ; then
343 SNAPSHOT="yes"
344 fi
345 fi
346
347 if use hal; then
348 sed -i \
349 -e "s:^\(dbusconfigdir = \).*\(dbus-1.*\):\1/etc/\2:g" \
350 "${S}"/config/Makefile.am \
351 || die "failed to fix DBUS config directory"
352 SNAPSHOT="yes"
353 fi
354
355 x-modular_reconf_source
356 }
357
358 src_install() {
359 x-modular_src_install
360
361 dynamic_libgl_install
362
363 server_based_install
364
365 # Install video mode files for system-config-display
366 insinto /usr/share/xorg
367 doins hw/xfree86/common/{extra,vesa}modes \
368 || die "couldn't install extra modes"
369
370 # Bug #151421 - this file is not built with USE="minimal"
371 # Bug #151670 - this file is also not build if USE="-xorg"
372 if ! use minimal && use xorg; then
373 # Install xorg.conf.example
374 insinto /etc/X11
375 doins hw/xfree86/xorg.conf.example \
376 || die "couldn't install xorg.conf.example"
377 fi
378 }
379
380 pkg_postinst() {
381 switch_opengl_implem
382
383 # Bug #135544
384 ewarn "Users of reduced blanking now need:"
385 ewarn " Option \"ReducedBlanking\""
386 ewarn "In the relevant Monitor section(s)."
387 ewarn "Make sure your reduced blanking modelines are safe!"
388
389 echo
390 ewarn "You must rebuild all drivers if upgrading from xorg-server 1.3"
391 ewarn "or earlier, because the ABI changed. If you cannot start X because"
392 ewarn "of module version mismatch errors, this is your problem."
393
394 echo
395 ewarn "You can generate a list of all installed packages in the x11-drivers"
396 ewarn "category using this command:"
397 ewarn "emerge portage-utils; qlist -I -C x11-drivers/"
398
399 ebeep 5
400 epause 10
401 }
402
403 pkg_postrm() {
404 # Get rid of module dir to ensure opengl-update works properly
405 if ! has_version x11-base/xorg-server; then
406 if [[ -e ${ROOT}/usr/$(get_libdir)/xorg/modules ]]; then
407 rm -rf "${ROOT}"/usr/$(get_libdir)/xorg/modules
408 fi
409 fi
410 }
411
412 kdrive_setup() {
413 local card real_card disable_card kdrive_fbdev kdrive_vesa
414
415 einfo "Removing unused kdrive drivers ..."
416
417 # Some kdrive servers require fbdev and vesa
418 kdrive_fbdev="radeon neomagic sis siliconmotion"
419 # Some kdrive servers require just vesa
420 kdrive_vesa="chips mach64 mga nv glint r128 via"
421
422 for card in ${IUSE_VIDEO_CARDS}; do
423 real_card=${card#video_cards_}
424
425 # Differences between VIDEO_CARDS name and kdrive server name
426 real_card=${real_card/glint/pm2}
427 real_card=${real_card/radeon/ati}
428 real_card=${real_card/%nv/nvidia}
429 real_card=${real_card/siliconmotion/smi}
430 real_card=${real_card/%sis/sis300}
431
432 disable_card=0
433
434 # Check whether it's a valid kdrive server before we waste time
435 # on the rest of this
436 if ! grep -q -o "\b${real_card}\b" "${S}"/hw/kdrive/Makefile.am; then
437 continue
438 fi
439
440 if ! use ${card}; then
441 if use x86; then
442 # Some kdrive servers require fbdev and vesa
443 for i in ${kdrive_fbdev}; do
444 if use video_cards_${i}; then
445 if [[ ${real_card} = fbdev ]] \
446 || [[ ${real_card} = vesa ]]; then
447 continue 2 # Don't disable
448 fi
449 fi
450 done
451
452 # Some kdrive servers require just vesa
453 for i in ${kdrive_vesa}; do
454 if use video_cards_${i}; then
455 if [[ ${real_card} = vesa ]]; then
456 continue 2 # Don't disable
457 fi
458 fi
459 done
460 fi
461 disable_card=1
462 # Bug #150052
463 # fbdev is the only VIDEO_CARDS setting that works on non-x86
464 elif ! use x86 \
465 && [[ ${real_card} != fbdev ]]; then
466 ewarn " $real_card does not work on your architecture; disabling."
467 disable_card=1
468 fi
469
470 if [[ $disable_card = 1 ]]; then
471 ebegin " ${real_card}"
472 sed -i \
473 -e "s:\b${real_card}\b::g" \
474 "${S}"/hw/kdrive/Makefile.am \
475 || die "sed of ${real_card} failed"
476 eend
477 fi
478
479 done
480 }
481
482 dynamic_libgl_install() {
483 # next section is to setup the dynamic libGL stuff
484 ebegin "Moving GL files for dynamic switching"
485 dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
486 local x=""
487 for x in "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libglx*; do
488 if [ -f ${x} -o -L ${x} ]; then
489 mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
490 fi
491 done
492 eend 0
493 }
494
495 server_based_install() {
496 if ! use xorg; then
497 rm "${D}"/usr/share/man/man1/Xserver.1x \
498 "${D}"/usr/$(get_libdir)/xserver/SecurityPolicy \
499 "${D}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
500 "${D}"/usr/share/man/man1/Xserver.1x
501 fi
502 }
503
504 switch_opengl_implem() {
505 # Switch to the xorg implementation.
506 # Use new opengl-update that will not reset user selected
507 # OpenGL interface ...
508 echo
509 # eselect opengl set --use-old ${OPENGL_DIR}
510 eselect opengl set ${OLD_IMPLEM}
511 }
512
513 ensure_a_server_is_building() {
514 for server in ${IUSE_SERVERS}; do
515 use ${server} && return;
516 done
517 eerror "You need to specify at least one server to build."
518 eerror "Valid servers are: ${IUSE_SERVERS}."
519 die "No servers were specified to build."
520 }

  ViewVC Help
Powered by ViewVC 1.1.20