/[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.3 - (show annotations) (download)
Sun Apr 23 22:57:01 2006 UTC (8 years, 3 months ago) by spyderous
Branch: MAIN
Changes since 1.2: +6 -1 lines
Fix the USE=-xorg build, can't do use_with() on mesa-source because it won't accept the --without option.
(Portage version: 2.1_pre9-r3)

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

  ViewVC Help
Powered by ViewVC 1.1.20