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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Apr 21 09:12:50 2006 UTC (8 years, 5 months ago) by spyderous
Branch: MAIN
Add option to build kdrive, tiny X servers; also add VIDEO_CARDS settings to select kdrive servers to build. Add option to build AIGLX with TLS support (USE=nptl) -- mesa and xorg-server must be in sync on this. Update some deps: glproto, scrnsaverproto. Don't need to inherit flag-o-matic, x-modular eclass does this for us. Make Xdmx build its own USE flag, instead of part of minimal. Force xorg-x11 OpenGL to build, because it needs a newer glxtokens.h than some binary drivers provide. Add a server_based_install() function for any actions dependent on which servers get built. Add USE=xorg to build the Xorg X server, which will be on by default.
(Portage version: 2.1_pre7-r5)

1 spyderous 1.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.0.99.901.ebuild,v 1.2 2006/04/17 05:28:13 spyderous Exp $
4    
5     # Must be before x-modular eclass is inherited
6     # Hack to make sure autoreconf gets run
7     SNAPSHOT="yes"
8    
9     inherit x-modular multilib
10    
11     OPENGL_DIR="xorg-x11"
12    
13     MESA_PN="Mesa"
14     MESA_PV="6.5"
15     MESA_P="${MESA_PN}-${MESA_PV}"
16     MESA_SRC_P="${MESA_PN}Lib-${MESA_PV}"
17    
18     PATCHES="${FILESDIR}/${PN}-1.0.2-Sbus.patch
19     ${FILESDIR}/1.0.2-try-to-fix-xorgcfg.patch
20     ${FILESDIR}/1.0.2-fix-xorgconfig-rgbpath-and-mouse.patch
21     ${FILESDIR}/${PV}-fix-kdrive-build.patch
22     ${FILESDIR}/${PV}-wrap-sdk-headers.patch"
23    
24     SRC_URI="${SRC_URI}
25     mirror://sourceforge/mesa3d/${MESA_SRC_P}.tar.bz2
26     http://xorg.freedesktop.org/snapshots/individual/xserver/${P}.tar.bz2"
27     DESCRIPTION="X.Org X servers"
28     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
29     IUSE_VIDEO_CARDS="
30     video_cards_chips
31     video_cards_epson
32     video_cards_glint
33     video_cards_i810
34     video_cards_mach64
35     video_cards_mga
36     video_cards_neomagic
37     video_cards_nv
38     video_cards_r128
39     video_cards_radeon
40     video_cards_siliconmotion
41     video_cards_via"
42     IUSE="${IUSE_VIDEO_CARDS}
43     dmx dri ipv6 kdrive minimal nptl sdl xorg xprint"
44     RDEPEND="x11-libs/libXfont
45     x11-libs/xtrans
46     x11-libs/libXau
47     x11-libs/libXext
48     x11-libs/libX11
49     x11-libs/libxkbfile
50     x11-libs/libXdmcp
51     x11-libs/libXmu
52     x11-libs/libXrender
53     x11-libs/libXi
54     media-libs/freetype
55     >=media-libs/mesa-6.5-r2
56     media-fonts/font-adobe-75dpi
57     media-fonts/font-misc-misc
58     media-fonts/font-cursor-misc
59     x11-misc/xbitmaps
60     || ( x11-misc/xkeyboard-config x11-misc/xkbdata )
61     x11-apps/iceauth
62     x11-apps/rgb
63     x11-apps/xauth
64     x11-apps/xinit
65     app-admin/eselect-opengl
66     x11-libs/libXaw
67     x11-libs/libXpm
68     x11-libs/libXxf86misc
69     x11-libs/libXxf86vm
70     !minimal? ( x11-libs/libdmx
71     x11-libs/libXtst
72     x11-libs/libXres )
73     x11-libs/libxkbui
74     x11-libs/liblbxutil
75     kdrive? ( sdl? ( media-libs/libsdl ) )"
76     # Xres is dmx-dependent, xkbui is xorgcfg-dependent
77     # Xaw is dmx- and xorgcfg-dependent
78     # Xpm is dmx- and xorgcfg-dependent, pulls in Xt
79     # Xxf86misc and Xxf86vm are xorgcfg-dependent
80     # liblbxutil is lbx- dependent
81     DEPEND="${RDEPEND}
82     x11-proto/randrproto
83     x11-proto/renderproto
84     >=x11-proto/fixesproto-4
85     x11-proto/damageproto
86     x11-proto/xextproto
87     x11-proto/xproto
88     x11-proto/xf86dgaproto
89     x11-proto/xf86miscproto
90     x11-proto/xf86rushproto
91     x11-proto/xf86vidmodeproto
92     x11-proto/xf86bigfontproto
93     >=x11-proto/compositeproto-0.3
94     x11-proto/recordproto
95     x11-proto/resourceproto
96     x11-proto/videoproto
97     >=x11-proto/scrnsaverproto-1.1.0
98     x11-proto/evieext
99     x11-proto/trapproto
100     >=x11-proto/xineramaproto-1.1-r1
101     x11-proto/fontsproto
102     >=x11-proto/kbproto-1.0-r1
103     x11-proto/inputproto
104     x11-proto/bigreqsproto
105     x11-proto/xcmiscproto
106     >=x11-proto/glproto-1.4.6
107     !minimal? ( x11-proto/dmxproto )
108     dri? ( x11-proto/xf86driproto
109     >=x11-libs/libdrm-2 )
110     xprint? ( x11-proto/printproto
111     x11-apps/mkfontdir
112     x11-apps/mkfontscale )"
113     LICENSE="${LICENSE} MIT"
114    
115     pkg_setup() {
116     # localstatedir is used for the log location; we need to override the default
117     # from ebuild.sh
118     # sysconfdir is used for the xorg.conf location; same applies
119    
120     # --enable-xorg needed because darwin defaults off
121     # --enable-install-setuid needed because sparcs default off
122    
123     # SDL only available in kdrive build
124     if use kdrive && use sdl; then
125     conf_opts="${conf_opts} --enable-xsdl"
126     else
127     conf_opts="${conf_opts} --disable-xsdl"
128     fi
129    
130     CONFIGURE_OPTIONS="
131     $(use_enable ipv6)
132     $(use_enable dmx)
133     $(use_enable kdrive)
134     $(use_enable !minimal xvfb)
135     $(use_enable !minimal xnest)
136     $(use_enable dri)
137     $(use_enable xorg)
138     $(use_with xorg mesa-source=${WORKDIR}/${MESA_P})
139     $(use_enable xprint)
140     $(use_enable nptl glx-tls)
141     --sysconfdir=/etc/X11
142     --localstatedir=/var
143     --enable-install-setuid
144     --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1
145     ${conf_opts}"
146    
147     if built_with_use media-libs/mesa nptl; then
148     local diemsg="You must build xorg-server and mesa with the same nptl USE setting."
149     use nptl || die "${diemsg}"
150     else
151     use nptl && die "${diemsg}"
152     fi
153    
154     # (#121394) Causes window corruption
155     filter-flags -fweb
156    
157     # Nothing else provides new enough glxtokens.h
158     ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
159     OLD_IMPLEM="$(eselect opengl show)"
160     eselect opengl set --impl-headers ${OPENGL_DIR}
161     }
162    
163     src_unpack() {
164     x-modular_specs_check
165     x-modular_dri_check
166     x-modular_unpack_source
167     x-modular_patch_source
168    
169     # Set up kdrive servers to build
170     if use kdrive; then
171     einfo "Removing unused kdrive drivers ..."
172     for card in ${IUSE_VIDEO_CARDS}; do
173     real_card=${card#video_cards_}
174    
175     # Differences between VIDEO_CARDS name and kdrive server name
176     real_card=${real_card/glint/pm2}
177     real_card=${real_card/radeon/ati}
178     real_card=${real_card/nv/nvidia}
179     real_card=${real_card/siliconmotion/smi}
180     if ! use ${card}; then
181     ebegin " ${real_card}"
182     sed -i \
183     -e "s:${real_card}::g" \
184     ${S}/hw/kdrive/Makefile.am \
185     || die "sed of ${real_card} failed"
186     eend
187     fi
188    
189     done
190    
191     # smi and via are the only things on line 2. If line 2 ends up blank,
192     # we need to get rid of the backslash at the end of line 1.
193     if ! use video_cards_siliconmotion && ! use video_cards_via; then
194     sed -i \
195     -e "s:^\(VESA_SUBDIRS.*\)\\\:\1:g" \
196     ${S}/hw/kdrive/Makefile.am
197     fi
198    
199     # Only need to reconf if we're modifying kdrive's Makefile.am
200     x-modular_reconf_source
201     fi
202     }
203    
204     src_install() {
205     x-modular_src_install
206    
207     dynamic_libgl_install
208    
209     server_based_install
210     }
211    
212     pkg_postinst() {
213     switch_opengl_implem
214     }
215    
216     pkg_postrm() {
217     # Get rid of module dir to ensure opengl-update works properly
218     if ! has_version x11-base/xorg-server; then
219     if [ -e ${ROOT}/usr/$(get_libdir)/xorg/modules ]; then
220     rm -rf ${ROOT}/usr/$(get_libdir)/xorg/modules
221     fi
222     fi
223     }
224    
225     dynamic_libgl_install() {
226     # next section is to setup the dynamic libGL stuff
227     ebegin "Moving GL files for dynamic switching"
228     dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
229     local x=""
230     for x in ${D}/usr/$(get_libdir)/xorg/modules/extensions/libglx*; do
231     if [ -f ${x} -o -L ${x} ]; then
232     mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
233     fi
234     done
235     eend 0
236     }
237    
238     server_based_install() {
239     use xprint && xprint_src_install
240    
241     if ! use xorg; then
242     rm ${D}/usr/share/man/man1/Xserver.1x \
243     ${D}/usr/$(get_libdir)/xserver/SecurityPolicy \
244     ${D}/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
245     ${D}/usr/share/man/man1/Xserver.1x
246     fi
247     }
248    
249     switch_opengl_implem() {
250     # Switch to the xorg implementation.
251     # Use new opengl-update that will not reset user selected
252     # OpenGL interface ...
253     echo
254     # eselect opengl set --use-old ${OPENGL_DIR}
255     eselect opengl set ${OLD_IMPLEM}
256     }
257    
258     xprint_src_install() {
259     # RH-style init script, we provide a wrapper
260     exeinto /usr/$(get_libdir)/misc
261     # Actually a shell script, someone messed up
262     newexe ${S}/Xprint/etc/init.d/xprint.cpp xprint
263     sed -e 's/XCOMM/#/' -i ${D}/usr/$(get_libdir)/misc/xprint
264     # Install the wrapper
265     newinitd ${FILESDIR}/xprint.init xprint
266     # Install profile scripts
267     insinto /etc/profile.d
268     doins ${S}/Xprint/etc/profile.d/xprint*
269     insinto /etc/X11/xinit/xinitrc.d
270     newins ${S}/Xprint/etc/Xsession.d/cde_xsessiond_xprint.sh \
271     92xprint-xpserverlist.sh
272     # Patch profile scripts
273     sed -e "s:/bin/sh.*get_xpserverlist:/usr/$(get_libdir)/misc/xprint \
274     get_xpserverlist:g" -i ${D}/etc/profile.d/xprint* \
275     ${D}/etc/X11/xinit/xinitrc.d/92xprint-xpserverlist.sh
276     # Move profile scripts, we can't touch /etc/profile.d/ in Gentoo
277     dodoc ${D}/etc/profile.d/xprint*
278     rm -f ${D}/etc/profile.d/xprint*
279     }

  ViewVC Help
Powered by ViewVC 1.1.20