/[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.14 - (show annotations) (download)
Sat Aug 1 17:17:15 2009 UTC (6 years ago) by ssuominen
Branch: MAIN
Changes since 1.13: +5 -7 lines
Fix repoman warnings.
(Portage version: 2.2_rc33/cvs/Linux x86_64)

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.13 2009/07/13 10:53:18 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=( "${FILESDIR}/1.4-ia64.patch"
248 "${FILESDIR}/1.3.0.0-use-proc-instead-of-sys.patch"
249 "${FILESDIR}/1.4-fpic-libxf86config.patch"
250 "${FILESDIR}/1.4-fix-kdrive-automake.patch" )
251
252 pkg_setup() {
253 use minimal || ensure_a_server_is_building
254
255 # SDL only available in kdrive build
256 if use kdrive && use sdl; then
257 conf_opts="${conf_opts} --enable-xsdl"
258 else
259 conf_opts="${conf_opts} --disable-xsdl"
260 fi
261
262 # Only Xorg and Xgl support this, and we won't build Xgl
263 # until it merges to trunk
264 if use xorg; then
265 conf_opts="${conf_opts} --with-mesa-source=${WORKDIR}/${MESA_P}"
266 fi
267
268 # localstatedir is used for the log location; we need to override the default
269 # from ebuild.sh
270 # sysconfdir is used for the xorg.conf location; same applies
271 # --enable-install-setuid needed because sparcs default off
272 CONFIGURE_OPTIONS="
273 $(use_enable ipv6)
274 $(use_enable dmx)
275 $(use_enable kdrive)
276 $(use_enable tslib)
277 $(use_enable !minimal xvfb)
278 $(use_enable !minimal xnest)
279 $(use_enable !minimal install-libxf86config)
280 $(use_enable dri)
281 $(use_enable xorg)
282 --disable-xprint
283 $(use_enable nptl glx-tls)
284 $(use_enable !minimal xorgcfg)
285 $(use_enable hal config-dbus)
286 $(use_enable hal config-hal)
287 --sysconfdir=/etc/X11
288 --localstatedir=/var
289 --enable-install-setuid
290 --with-fontdir=/usr/share/fonts
291 --with-xkb-output=/var/lib/xkb
292 --without-dtrace
293 ${conf_opts}"
294
295 local diemsg="You must build xorg-server and mesa with the same nptl USE setting."
296 if built_with_use media-libs/mesa nptl; then
297 use nptl || die "${diemsg}"
298 else
299 use nptl && die "${diemsg}"
300 fi
301
302 # (#121394) Causes window corruption
303 filter-flags -fweb
304
305 # Incompatible with GCC 3.x SSP on x86, bug #244352
306 if use x86 ; then
307 if [[ $(gcc-major-version) -lt 4 ]]; then
308 filter-flags -fstack-protector
309 fi
310 fi
311
312 # Workaround
313 append-flags -D_GNU_SOURCE
314
315 # Nothing else provides new enough glxtokens.h
316 ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
317 OLD_IMPLEM="$(eselect opengl show)"
318 eselect opengl set --impl-headers ${OPENGL_DIR}
319 }
320
321 src_unpack() {
322 x-modular_specs_check
323 x-modular_dri_check
324 x-modular_unpack_source
325 x-modular_patch_source
326
327 # Clean up for ${PV}-clean-generated-files.patch
328 pushd hw/xprint >/dev/null
329 rm -f *-wrapper.c || die
330 popd >/dev/null
331
332 # Set up kdrive servers to build
333 if use kdrive; then
334 kdrive_setup
335 fi
336
337 # Make sure eautoreconf gets run if we need the autoconf/make
338 # changes.
339 if [[ ${SNAPSHOT} != "yes" ]]; then
340 if use kdrive || use dmx ; then
341 SNAPSHOT="yes"
342 fi
343 fi
344
345 if use hal; then
346 sed -i \
347 -e "s:^\(dbusconfigdir = \).*\(dbus-1.*\):\1/etc/\2:g" \
348 "${S}"/config/Makefile.am \
349 || die "failed to fix DBUS config directory"
350 SNAPSHOT="yes"
351 fi
352
353 x-modular_reconf_source
354 }
355
356 src_install() {
357 x-modular_src_install
358
359 dynamic_libgl_install
360
361 server_based_install
362
363 # Install video mode files for system-config-display
364 insinto /usr/share/xorg
365 doins hw/xfree86/common/{extra,vesa}modes \
366 || die "couldn't install extra modes"
367
368 # Bug #151421 - this file is not built with USE="minimal"
369 # Bug #151670 - this file is also not build if USE="-xorg"
370 if ! use minimal && use xorg; then
371 # Install xorg.conf.example
372 insinto /etc/X11
373 doins hw/xfree86/xorg.conf.example \
374 || die "couldn't install xorg.conf.example"
375 fi
376 }
377
378 pkg_postinst() {
379 switch_opengl_implem
380
381 # Bug #135544
382 ewarn "Users of reduced blanking now need:"
383 ewarn " Option \"ReducedBlanking\""
384 ewarn "In the relevant Monitor section(s)."
385 ewarn "Make sure your reduced blanking modelines are safe!"
386
387 echo
388 ewarn "You must rebuild all drivers if upgrading from xorg-server 1.3"
389 ewarn "or earlier, because the ABI changed. If you cannot start X because"
390 ewarn "of module version mismatch errors, this is your problem."
391
392 echo
393 ewarn "You can generate a list of all installed packages in the x11-drivers"
394 ewarn "category using this command:"
395 ewarn "emerge portage-utils; qlist -I -C x11-drivers/"
396
397 ebeep 5
398 epause 10
399 }
400
401 pkg_postrm() {
402 # Get rid of module dir to ensure opengl-update works properly
403 if ! has_version x11-base/xorg-server; then
404 if [[ -e ${ROOT}/usr/$(get_libdir)/xorg/modules ]]; then
405 rm -rf "${ROOT}"/usr/$(get_libdir)/xorg/modules
406 fi
407 fi
408 }
409
410 kdrive_setup() {
411 local card real_card disable_card kdrive_fbdev kdrive_vesa
412
413 einfo "Removing unused kdrive drivers ..."
414
415 # Some kdrive servers require fbdev and vesa
416 kdrive_fbdev="radeon neomagic sis siliconmotion"
417 # Some kdrive servers require just vesa
418 kdrive_vesa="chips mach64 mga nv glint r128 via"
419
420 for card in ${IUSE_VIDEO_CARDS}; do
421 real_card=${card#video_cards_}
422
423 # Differences between VIDEO_CARDS name and kdrive server name
424 real_card=${real_card/glint/pm2}
425 real_card=${real_card/radeon/ati}
426 real_card=${real_card/%nv/nvidia}
427 real_card=${real_card/siliconmotion/smi}
428 real_card=${real_card/%sis/sis300}
429
430 disable_card=0
431
432 # Check whether it's a valid kdrive server before we waste time
433 # on the rest of this
434 if ! grep -q -o "\b${real_card}\b" "${S}"/hw/kdrive/Makefile.am; then
435 continue
436 fi
437
438 if ! use ${card}; then
439 if use x86; then
440 # Some kdrive servers require fbdev and vesa
441 for i in ${kdrive_fbdev}; do
442 if use video_cards_${i}; then
443 if [[ ${real_card} = fbdev ]] \
444 || [[ ${real_card} = vesa ]]; then
445 continue 2 # Don't disable
446 fi
447 fi
448 done
449
450 # Some kdrive servers require just vesa
451 for i in ${kdrive_vesa}; do
452 if use video_cards_${i}; then
453 if [[ ${real_card} = vesa ]]; then
454 continue 2 # Don't disable
455 fi
456 fi
457 done
458 fi
459 disable_card=1
460 # Bug #150052
461 # fbdev is the only VIDEO_CARDS setting that works on non-x86
462 elif ! use x86 \
463 && [[ ${real_card} != fbdev ]]; then
464 ewarn " $real_card does not work on your architecture; disabling."
465 disable_card=1
466 fi
467
468 if [[ $disable_card = 1 ]]; then
469 ebegin " ${real_card}"
470 sed -i \
471 -e "s:\b${real_card}\b::g" \
472 "${S}"/hw/kdrive/Makefile.am \
473 || die "sed of ${real_card} failed"
474 eend
475 fi
476
477 done
478 }
479
480 dynamic_libgl_install() {
481 # next section is to setup the dynamic libGL stuff
482 ebegin "Moving GL files for dynamic switching"
483 dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
484 local x=""
485 for x in "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libglx*; do
486 if [ -f ${x} -o -L ${x} ]; then
487 mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
488 fi
489 done
490 eend 0
491 }
492
493 server_based_install() {
494 if ! use xorg; then
495 rm "${D}"/usr/share/man/man1/Xserver.1x \
496 "${D}"/usr/$(get_libdir)/xserver/SecurityPolicy \
497 "${D}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
498 "${D}"/usr/share/man/man1/Xserver.1x
499 fi
500 }
501
502 switch_opengl_implem() {
503 # Switch to the xorg implementation.
504 # Use new opengl-update that will not reset user selected
505 # OpenGL interface ...
506 echo
507 # eselect opengl set --use-old ${OPENGL_DIR}
508 eselect opengl set ${OLD_IMPLEM}
509 }
510
511 ensure_a_server_is_building() {
512 for server in ${IUSE_SERVERS}; do
513 use ${server} && return;
514 done
515 eerror "You need to specify at least one server to build."
516 eerror "Valid servers are: ${IUSE_SERVERS}."
517 die "No servers were specified to build."
518 }

  ViewVC Help
Powered by ViewVC 1.1.20