/[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.15 - (show annotations) (download)
Fri Aug 14 09:11:25 2009 UTC (4 years, 10 months ago) by remi
Branch: MAIN
Changes since 1.14: +1 -3 lines
x11-base/xorg-server: drop the old synaptics driver from IUSE and PDEPEND
(Portage version: 2.2_rc36/cvs/Linux i686, RepoMan options: --force)

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

  ViewVC Help
Powered by ViewVC 1.1.20