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

Contents of /x11-base/xorg-server/xorg-server-1.1.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Thu Oct 12 02:53:25 2006 UTC (7 years, 6 months ago) by joshuabaergen
Branch: MAIN
Changes since 1.8: +26 -10 lines
Install xorg.conf.example like 6.x did. (Bug #138623, requested by
Christopher Covington; patch written by Donnie and I) Don't build kdrive
servers that use vm86.h on non-x86 systems. (Bug #150052, Shvetsov Alex)
(Portage version: 2.1.2_pre2-r8)

1 # Copyright 1999-2006 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.1.1-r1.ebuild,v 1.8 2006/10/06 21:57:29 wolf31o2 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="6.5.1"
14 MESA_P="${MESA_PN}-${MESA_PV}"
15 MESA_SRC_P="${MESA_PN}Lib-${MESA_PV}"
16
17 PATCHES="${FILESDIR}/01-no-move-damage.patch
18 ${FILESDIR}/02-dont-backfill-bg-none.patch
19 ${FILESDIR}/03-tfp-damage.patch
20 ${FILESDIR}/04-mesa-copy-sub-buffer.patch
21 ${FILESDIR}/05-offscreen-pixmaps.patch
22 ${FILESDIR}/06-aiglx-happy-vt-switch.patch
23 ${FILESDIR}/xorg-x11-server-1.1.1-mesa-6.5.1.patch
24 ${FILESDIR}/${P}-install-libxf86config-headers.patch
25 ${FILESDIR}/${PV}-fix-xrandr-zoom-keys.patch
26 ${FILESDIR}/${PV}-sparc64-ati-lockups.patch
27 ${FILESDIR}/xorg-conf-example.patch"
28
29
30 SRC_URI="${SRC_URI}
31 mirror://sourceforge/mesa3d/${MESA_SRC_P}.tar.bz2
32 http://xorg.freedesktop.org/releases/individual/xserver/${P}.tar.bz2"
33 DESCRIPTION="X.Org X servers"
34 # It's suid and has lazy bindings, so FEATURES="stricter" doesn't work
35 RESTRICT="stricter"
36 KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 mips ppc ppc64 sh sparc ~x86 ~x86-fbsd"
37 IUSE_INPUT_DEVICES="
38 input_devices_acecad
39 input_devices_aiptek
40 input_devices_calcomp
41 input_devices_citron
42 input_devices_digitaledge
43 input_devices_dmc
44 input_devices_dynapro
45 input_devices_elo2300
46 input_devices_elographics
47 input_devices_evdev
48 input_devices_fpit
49 input_devices_hyperpen
50 input_devices_jamstudio
51 input_devices_joystick
52 input_devices_keyboard
53 input_devices_magellan
54 input_devices_microtouch
55 input_devices_mouse
56 input_devices_mutouch
57 input_devices_palmax
58 input_devices_penmount
59 input_devices_spaceorb
60 input_devices_summa
61 input_devices_tek4957
62 input_devices_ur98
63 input_devices_vmmouse
64 input_devices_void
65
66 input_devices_synaptics
67 input_devices_wacom"
68 IUSE_VIDEO_CARDS="
69 video_cards_apm
70 video_cards_ark
71 video_cards_chips
72 video_cards_cirrus
73 video_cards_cyrix
74 video_cards_dummy
75 video_cards_epson
76 video_cards_fbdev
77 video_cards_glint
78 video_cards_i128
79 video_cards_i740
80 video_cards_i810
81 video_cards_impact
82 video_cards_imstt
83 video_cards_mach64
84 video_cards_mga
85 video_cards_neomagic
86 video_cards_newport
87 video_cards_nsc
88 video_cards_nv
89 video_cards_r128
90 video_cards_radeon
91 video_cards_rendition
92 video_cards_s3
93 video_cards_s3virge
94 video_cards_savage
95 video_cards_siliconmotion
96 video_cards_sis
97 video_cards_sisusb
98 video_cards_sunbw2
99 video_cards_suncg14
100 video_cards_suncg3
101 video_cards_suncg6
102 video_cards_sunffb
103 video_cards_sunleo
104 video_cards_suntcx
105 video_cards_tdfx
106 video_cards_tga
107 video_cards_trident
108 video_cards_tseng
109 video_cards_v4l
110 video_cards_vesa
111 video_cards_vga
112 video_cards_via
113 video_cards_vmware
114 video_cards_voodoo
115
116 video_cards_fglrx
117 video_cards_nvidia"
118 IUSE_SERVERS="dmx kdrive xorg"
119 IUSE="${IUSE_VIDEO_CARDS}
120 ${IUSE_INPUT_DEVICES}
121 ${IUSE_SERVERS}
122 3dfx
123 dri ipv6 minimal nptl sdl xprint"
124 RDEPEND="x11-libs/libXfont
125 x11-libs/xtrans
126 x11-libs/libXau
127 x11-libs/libXext
128 x11-libs/libX11
129 x11-libs/libxkbfile
130 x11-libs/libXdmcp
131 x11-libs/libXmu
132 x11-libs/libXrender
133 x11-libs/libXi
134 media-libs/freetype
135 >=media-libs/mesa-6.5-r2
136 media-fonts/font-adobe-75dpi
137 media-fonts/font-misc-misc
138 media-fonts/font-cursor-misc
139 x11-misc/xbitmaps
140 || ( x11-misc/xkeyboard-config x11-misc/xkbdata )
141 x11-apps/iceauth
142 x11-apps/rgb
143 x11-apps/xauth
144 x11-apps/xinit
145 app-admin/eselect-opengl
146 x11-libs/libXaw
147 x11-libs/libXpm
148 x11-libs/libXxf86misc
149 x11-libs/libXxf86vm
150 dmx? ( x11-libs/libdmx )
151 !minimal? ( x11-libs/libXtst
152 x11-libs/libXres )
153 >=x11-libs/libxkbui-1.0.2
154 x11-libs/liblbxutil
155 kdrive? ( sdl? ( media-libs/libsdl ) )"
156 # Xres is dmx-dependent, xkbui is xorgcfg-dependent
157 # Xaw is dmx- and xorgcfg-dependent
158 # Xpm is dmx- and xorgcfg-dependent, pulls in Xt
159 # Xxf86misc and Xxf86vm are xorgcfg-dependent
160 # liblbxutil is lbx- dependent
161 DEPEND="${RDEPEND}
162 x11-proto/randrproto
163 x11-proto/renderproto
164 >=x11-proto/fixesproto-4
165 x11-proto/damageproto
166 x11-proto/xextproto
167 x11-proto/xproto
168 x11-proto/xf86dgaproto
169 x11-proto/xf86miscproto
170 x11-proto/xf86rushproto
171 x11-proto/xf86vidmodeproto
172 x11-proto/xf86bigfontproto
173 >=x11-proto/compositeproto-0.3
174 x11-proto/recordproto
175 x11-proto/resourceproto
176 x11-proto/videoproto
177 >=x11-proto/scrnsaverproto-1.1.0
178 x11-proto/evieext
179 x11-proto/trapproto
180 >=x11-proto/xineramaproto-1.1-r1
181 x11-proto/fontsproto
182 >=x11-proto/kbproto-1.0-r1
183 x11-proto/inputproto
184 x11-proto/bigreqsproto
185 x11-proto/xcmiscproto
186 >=x11-proto/glproto-1.4.8
187 dmx? ( x11-proto/dmxproto )
188 dri? ( x11-proto/xf86driproto
189 >=x11-libs/libdrm-2 )
190 xprint? ( x11-proto/printproto
191 x11-apps/mkfontdir
192 x11-apps/mkfontscale
193 x11-apps/xplsprinters )"
194
195 # Drivers
196 PDEPEND="
197 xorg? (
198 input_devices_acecad? ( >=x11-drivers/xf86-input-acecad-1.1.0 )
199 input_devices_aiptek? ( >=x11-drivers/xf86-input-aiptek-1.0.1 )
200 input_devices_calcomp? ( >=x11-drivers/xf86-input-calcomp-1.1.0 )
201 input_devices_citron? ( >=x11-drivers/xf86-input-citron-2.2.0 )
202 input_devices_digitaledge? ( >=x11-drivers/xf86-input-digitaledge-1.1.0 )
203 input_devices_dmc? ( >=x11-drivers/xf86-input-dmc-1.1.0 )
204 input_devices_dynapro? ( >=x11-drivers/xf86-input-dynapro-1.1.0 )
205 input_devices_elo2300? ( >=x11-drivers/xf86-input-elo2300-1.1.0 )
206 input_devices_elographics? ( >=x11-drivers/xf86-input-elographics-1.1.0 )
207 input_devices_evdev? ( >=x11-drivers/xf86-input-evdev-1.1.1 )
208 input_devices_fpit? ( >=x11-drivers/xf86-input-fpit-1.1.0 )
209 input_devices_hyperpen? ( >=x11-drivers/xf86-input-hyperpen-1.1.0 )
210 input_devices_jamstudio? ( >=x11-drivers/xf86-input-jamstudio-1.1.0 )
211 input_devices_joystick? ( >=x11-drivers/xf86-input-joystick-1.1.0 )
212 input_devices_keyboard? ( >=x11-drivers/xf86-input-keyboard-1.1.0 )
213 input_devices_magellan? ( >=x11-drivers/xf86-input-magellan-1.1.0 )
214 input_devices_microtouch? ( >=x11-drivers/xf86-input-microtouch-1.1.0 )
215 input_devices_mouse? ( >=x11-drivers/xf86-input-mouse-1.1.0 )
216 input_devices_mutouch? ( >=x11-drivers/xf86-input-mutouch-1.1.0 )
217 input_devices_palmax? ( >=x11-drivers/xf86-input-palmax-1.1.0 )
218 input_devices_penmount? ( >=x11-drivers/xf86-input-penmount-1.1.0 )
219 input_devices_spaceorb? ( >=x11-drivers/xf86-input-spaceorb-1.1.0 )
220 input_devices_summa? ( >=x11-drivers/xf86-input-summa-1.1.0 )
221 input_devices_tek4957? ( >=x11-drivers/xf86-input-tek4957-1.1.0 )
222 input_devices_ur98? ( >=x11-drivers/xf86-input-ur98-1.1.0 )
223 input_devices_vmmouse? ( >=x11-drivers/xf86-input-vmmouse-12.4.0 )
224 input_devices_void? ( >=x11-drivers/xf86-input-void-1.1.0 )
225
226 input_devices_synaptics? ( x11-drivers/synaptics )
227 input_devices_wacom? ( x11-drivers/linuxwacom )
228
229 video_cards_apm? ( >=x11-drivers/xf86-video-apm-1.1.1 )
230 video_cards_ark? ( >=x11-drivers/xf86-video-ark-0.6.0 )
231 video_cards_chips? ( >=x11-drivers/xf86-video-chips-1.1.1 )
232 video_cards_cirrus? ( >=x11-drivers/xf86-video-cirrus-1.1.0 )
233 video_cards_cyrix? ( >=x11-drivers/xf86-video-cyrix-1.1.0 )
234 video_cards_dummy? ( >=x11-drivers/xf86-video-dummy-0.2.0 )
235 video_cards_fbdev? ( >=x11-drivers/xf86-video-fbdev-0.2.0 )
236 video_cards_glint? ( >=x11-drivers/xf86-video-glint-1.1.1 )
237 video_cards_i128? ( >=x11-drivers/xf86-video-i128-1.2.0 )
238 video_cards_i740? ( >=x11-drivers/xf86-video-i740-1.1.0 )
239 video_cards_i810? ( >=x11-drivers/xf86-video-i810-1.6.0 )
240 video_cards_impact? ( >=x11-drivers/xf86-video-impact-0.2.0 )
241 video_cards_imstt? ( >=x11-drivers/xf86-video-imstt-1.1.0 )
242 video_cards_mach64? ( >=x11-drivers/xf86-video-ati-6.6.0 )
243 video_cards_mga? ( >=x11-drivers/xf86-video-mga-1.4.1 )
244 video_cards_neomagic? ( >=x11-drivers/xf86-video-neomagic-1.1.1 )
245 video_cards_newport? ( >=x11-drivers/xf86-video-newport-0.2.0 )
246 video_cards_nsc? ( >=x11-drivers/xf86-video-nsc-2.8.1 )
247 video_cards_nv? ( >=x11-drivers/xf86-video-nv-1.1.1 )
248 video_cards_r128? ( >=x11-drivers/xf86-video-ati-6.6.0 )
249 video_cards_radeon? ( >=x11-drivers/xf86-video-ati-6.6.0 )
250 video_cards_rendition? ( >=x11-drivers/xf86-video-rendition-4.1.0 )
251 video_cards_s3? ( >=x11-drivers/xf86-video-s3-0.4.1 )
252 video_cards_s3virge? ( >=x11-drivers/xf86-video-s3virge-1.9.1 )
253 video_cards_savage? ( >=x11-drivers/xf86-video-savage-2.1.1 )
254 video_cards_siliconmotion? ( >=x11-drivers/xf86-video-siliconmotion-1.4.1 )
255 video_cards_sis? ( >=x11-drivers/xf86-video-sis-0.9.1 )
256 video_cards_sisusb? ( >=x11-drivers/xf86-video-sisusb-0.8.1 )
257 video_cards_sunbw2? ( >=x11-drivers/xf86-video-sunbw2-1.1.0 )
258 video_cards_suncg14? ( >=x11-drivers/xf86-video-suncg14-1.1.0 )
259 video_cards_suncg3? ( >=x11-drivers/xf86-video-suncg3-1.1.0 )
260 video_cards_suncg6? ( >=x11-drivers/xf86-video-suncg6-1.1.0 )
261 video_cards_sunffb? ( >=x11-drivers/xf86-video-sunffb-1.1.0 )
262 video_cards_sunleo? ( >=x11-drivers/xf86-video-sunleo-1.1.0 )
263 video_cards_suntcx? ( >=x11-drivers/xf86-video-suntcx-1.1.0 )
264 video_cards_tdfx? ( >=x11-drivers/xf86-video-tdfx-1.2.1 )
265 video_cards_tga? ( >=x11-drivers/xf86-video-tga-1.1.0 )
266 video_cards_trident? ( >=x11-drivers/xf86-video-trident-1.2.1 )
267 video_cards_tseng? ( >=x11-drivers/xf86-video-tseng-1.1.0 )
268 video_cards_v4l? ( >=x11-drivers/xf86-video-v4l-0.1.1 )
269 video_cards_vesa? ( >=x11-drivers/xf86-video-vesa-1.1.0 )
270 video_cards_vga? ( >=x11-drivers/xf86-video-vga-4.1.0 )
271 video_cards_via? ( >=x11-drivers/xf86-video-via-0.2.1 )
272 video_cards_vmware? ( >=x11-drivers/xf86-video-vmware-10.13.0 )
273 video_cards_voodoo? ( >=x11-drivers/xf86-video-voodoo-1.1.0 )
274
275 video_cards_tdfx? ( 3dfx? ( >=media-libs/glide-v3-3.10 ) )
276 video_cards_fglrx? ( >=x11-drivers/ati-drivers-8.27.10 )
277 video_cards_nvidia? ( || (
278 >=x11-drivers/nvidia-drivers-1.0.8774
279 >=x11-drivers/nvidia-legacy-drivers-1.0.7184
280 )
281 )
282 )"
283 LICENSE="${LICENSE} MIT"
284
285 pkg_setup() {
286 use minimal || ensure_a_server_is_building
287
288 # SDL only available in kdrive build
289 if use kdrive && use sdl; then
290 conf_opts="${conf_opts} --enable-xsdl"
291 else
292 conf_opts="${conf_opts} --disable-xsdl"
293 fi
294
295 # Only Xorg and Xgl support this, and we won't build Xgl
296 # until it merges to trunk
297 if use xorg; then
298 conf_opts="${conf_opts} --with-mesa-source=${WORKDIR}/${MESA_P}"
299 fi
300
301 # localstatedir is used for the log location; we need to override the default
302 # from ebuild.sh
303 # sysconfdir is used for the xorg.conf location; same applies
304 # --enable-install-setuid needed because sparcs default off
305 CONFIGURE_OPTIONS="
306 $(use_enable ipv6)
307 $(use_enable dmx)
308 $(use_enable kdrive)
309 $(use_enable !minimal xvfb)
310 $(use_enable !minimal xnest)
311 $(use_enable !minimal xorgcfg)
312 $(use_enable !minimal install-libxf86config)
313 $(use_enable dri)
314 $(use_enable xorg)
315 $(use_enable xprint)
316 $(use_enable nptl glx-tls)
317 --sysconfdir=/etc/X11
318 --localstatedir=/var
319 --enable-install-setuid
320 --with-fontdir=/usr/share/fonts
321 ${conf_opts}"
322
323 local diemsg="You must build xorg-server and mesa with the same nptl USE setting."
324 if built_with_use media-libs/mesa nptl; then
325 use nptl || die "${diemsg}"
326 else
327 use nptl && die "${diemsg}"
328 fi
329
330 # (#121394) Causes window corruption
331 filter-flags -fweb
332
333 # Nothing else provides new enough glxtokens.h
334 ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
335 OLD_IMPLEM="$(eselect opengl show)"
336 eselect opengl set --impl-headers ${OPENGL_DIR}
337 }
338
339 src_unpack() {
340 x-modular_specs_check
341 x-modular_dri_check
342 x-modular_unpack_source
343 x-modular_patch_source
344
345 # Set up kdrive servers to build
346 # Bug #150052 - anything that uses vm86.h is broken on non-x86 arches.
347 # That translates into the following set:
348 vm86_devices="chips epson glint i810 mach64 mga neomagic
349 nv r128 radeon siliconmotion vesa via"
350
351 if use kdrive; then
352 einfo "Removing unused kdrive drivers ..."
353 for card in ${IUSE_VIDEO_CARDS}; do
354 # (bug #136370) Radeon needs fbdev and vesa
355 if use video_cards_radeon; then
356 if [[ ${card} = video_cards_fbdev ]] \
357 || [[ ${card} = video_cards_vesa ]]; then
358 continue
359 fi
360 fi
361
362 real_card=${card#video_cards_}
363
364 # Differences between VIDEO_CARDS name and kdrive server name
365 real_card=${real_card/glint/pm2}
366 real_card=${real_card/radeon/ati}
367 real_card=${real_card/%nv/nvidia}
368 real_card=${real_card/siliconmotion/smi}
369 real_card=${real_card/%sis/sis300}
370
371 disable_card=0
372 if ! use ${card}; then
373 disable_card=1
374 elif ! use x86; then
375 # Bug #150052
376 if [[ ${vm86_devices/${card#video_cards_}/} != ${vm86_devices} ]]; then
377 ewarn " $real_card does not work on your architecture; disabling."
378 disable_card=1
379 fi
380 fi
381
382 if [[ $disable_card = 1 ]]; then
383 ebegin " ${real_card}"
384 sed -i \
385 -e "s:\b${real_card}\b::g" \
386 ${S}/hw/kdrive/Makefile.am \
387 || die "sed of ${real_card} failed"
388 eend
389 fi
390
391 done
392
393 # smi and via are the only things on line 2. If line 2 ends up blank,
394 # we need to get rid of the backslash at the end of line 1.
395 if ! use video_cards_siliconmotion && ! use video_cards_via; then
396 sed -i \
397 -e "s:^\(VESA_SUBDIRS.*\)\\\:\1:g" \
398 ${S}/hw/kdrive/Makefile.am
399 fi
400 fi
401
402 # Make sure eautoreconf gets run if we need the autoconf/make
403 # changes.
404 if [[ ${SNAPSHOT} != "yes" ]]; then
405 if use kdrive || use xprint; then
406 eautoreconf
407 fi
408 fi
409 x-modular_reconf_source
410 }
411
412 src_install() {
413 x-modular_src_install
414
415 dynamic_libgl_install
416
417 server_based_install
418
419 # Install video mode files for system-config-display
420 insinto /usr/share/xorg
421 doins hw/xfree86/common/{extra,vesa}modes \
422 || die "couldn't install extra modes"
423
424 # Install xorg.conf.example
425 insinto /etc/X11
426 doins hw/xfree86/xorg.conf.example \
427 || die "couldn't install xorg.conf.example"
428 }
429
430 pkg_postinst() {
431 switch_opengl_implem
432
433 # Bug #135544
434 ewarn "Users of reduced blanking now need:"
435 ewarn " Option \"ReducedBlanking\""
436 ewarn "In the relevant Monitor section(s)."
437 ewarn "Make sure your reduced blanking modelines are safe!"
438 }
439
440 pkg_postrm() {
441 # Get rid of module dir to ensure opengl-update works properly
442 if ! has_version x11-base/xorg-server; then
443 if [ -e ${ROOT}/usr/$(get_libdir)/xorg/modules ]; then
444 rm -rf ${ROOT}/usr/$(get_libdir)/xorg/modules
445 fi
446 fi
447 }
448
449 dynamic_libgl_install() {
450 # next section is to setup the dynamic libGL stuff
451 ebegin "Moving GL files for dynamic switching"
452 dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
453 local x=""
454 for x in ${D}/usr/$(get_libdir)/xorg/modules/extensions/libglx*; do
455 if [ -f ${x} -o -L ${x} ]; then
456 mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
457 fi
458 done
459 eend 0
460 }
461
462 server_based_install() {
463 use xprint && xprint_src_install
464
465 if ! use xorg; then
466 rm ${D}/usr/share/man/man1/Xserver.1x \
467 ${D}/usr/$(get_libdir)/xserver/SecurityPolicy \
468 ${D}/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
469 ${D}/usr/share/man/man1/Xserver.1x
470 fi
471 }
472
473 switch_opengl_implem() {
474 # Switch to the xorg implementation.
475 # Use new opengl-update that will not reset user selected
476 # OpenGL interface ...
477 echo
478 # eselect opengl set --use-old ${OPENGL_DIR}
479 eselect opengl set ${OLD_IMPLEM}
480 }
481
482 xprint_src_install() {
483 # RH-style init script, we provide a wrapper
484 exeinto /usr/$(get_libdir)/misc
485 doexe ${S}/Xprint/etc/init.d/xprint
486 # Patch init script for fonts location
487 sed -e 's:/lib/X11/fonts/:/share/fonts/:g' \
488 -i ${D}/usr/$(get_libdir)/misc/xprint
489 # Install the wrapper
490 newinitd ${FILESDIR}/xprint.init xprint
491 # Install profile scripts
492 insinto /etc/profile.d
493 doins ${S}/Xprint/etc/profile.d/xprint*
494 insinto /etc/X11/xinit/xinitrc.d
495 newins ${S}/Xprint/etc/Xsession.d/cde_xsessiond_xprint.sh \
496 92xprint-xpserverlist.sh
497 # Patch profile scripts
498 sed -e "s:/bin/sh.*get_xpserverlist:/usr/$(get_libdir)/misc/xprint \
499 get_xpserverlist:g" -i ${D}/etc/profile.d/xprint* \
500 ${D}/etc/X11/xinit/xinitrc.d/92xprint-xpserverlist.sh
501 # Move profile scripts, we can't touch /etc/profile.d/ in Gentoo
502 dodoc ${D}/etc/profile.d/xprint*
503 rm -f ${D}/etc/profile.d/xprint*
504 }
505
506 ensure_a_server_is_building() {
507 for server in ${IUSE_SERVERS}; do
508 use ${server} && return;
509 done
510 eerror "You need to specify at least one server to build."
511 eerror "Valid servers are: ${IUSE_SERVERS}."
512 die "No servers were specified to build."
513 }

  ViewVC Help
Powered by ViewVC 1.1.20