/[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.2 - (show annotations) (download)
Sun Apr 23 22:32:14 2006 UTC (8 years, 7 months ago) by spyderous
Branch: MAIN
Changes since 1.1: +7 -4 lines
(#128448) Fix xprint (Ed Catmur). Still needs a dep added on xplsprinters when xprint is in USE, but arches haven't keyworded it yet.
(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 CONFIGURE_OPTIONS="
133 $(use_enable ipv6)
134 $(use_enable dmx)
135 $(use_enable kdrive)
136 $(use_enable !minimal xvfb)
137 $(use_enable !minimal xnest)
138 $(use_enable dri)
139 $(use_enable xorg)
140 $(use_with xorg mesa-source=${WORKDIR}/${MESA_P})
141 $(use_enable xprint)
142 $(use_enable nptl glx-tls)
143 --sysconfdir=/etc/X11
144 --localstatedir=/var
145 --enable-install-setuid
146 --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1
147 ${conf_opts}"
148
149 if built_with_use media-libs/mesa nptl; then
150 local diemsg="You must build xorg-server and mesa with the same nptl USE setting."
151 use nptl || die "${diemsg}"
152 else
153 use nptl && die "${diemsg}"
154 fi
155
156 # (#121394) Causes window corruption
157 filter-flags -fweb
158
159 # Nothing else provides new enough glxtokens.h
160 ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
161 OLD_IMPLEM="$(eselect opengl show)"
162 eselect opengl set --impl-headers ${OPENGL_DIR}
163 }
164
165 src_unpack() {
166 x-modular_specs_check
167 x-modular_dri_check
168 x-modular_unpack_source
169 x-modular_patch_source
170
171 # Set up kdrive servers to build
172 if use kdrive; then
173 einfo "Removing unused kdrive drivers ..."
174 for card in ${IUSE_VIDEO_CARDS}; do
175 real_card=${card#video_cards_}
176
177 # Differences between VIDEO_CARDS name and kdrive server name
178 real_card=${real_card/glint/pm2}
179 real_card=${real_card/radeon/ati}
180 real_card=${real_card/nv/nvidia}
181 real_card=${real_card/siliconmotion/smi}
182 if ! use ${card}; then
183 ebegin " ${real_card}"
184 sed -i \
185 -e "s:${real_card}::g" \
186 ${S}/hw/kdrive/Makefile.am \
187 || die "sed of ${real_card} failed"
188 eend
189 fi
190
191 done
192
193 # smi and via are the only things on line 2. If line 2 ends up blank,
194 # we need to get rid of the backslash at the end of line 1.
195 if ! use video_cards_siliconmotion && ! use video_cards_via; then
196 sed -i \
197 -e "s:^\(VESA_SUBDIRS.*\)\\\:\1:g" \
198 ${S}/hw/kdrive/Makefile.am
199 fi
200
201 # Only need to reconf if we're modifying kdrive's Makefile.am
202 x-modular_reconf_source
203 fi
204 }
205
206 src_install() {
207 x-modular_src_install
208
209 dynamic_libgl_install
210
211 server_based_install
212 }
213
214 pkg_postinst() {
215 switch_opengl_implem
216 }
217
218 pkg_postrm() {
219 # Get rid of module dir to ensure opengl-update works properly
220 if ! has_version x11-base/xorg-server; then
221 if [ -e ${ROOT}/usr/$(get_libdir)/xorg/modules ]; then
222 rm -rf ${ROOT}/usr/$(get_libdir)/xorg/modules
223 fi
224 fi
225 }
226
227 dynamic_libgl_install() {
228 # next section is to setup the dynamic libGL stuff
229 ebegin "Moving GL files for dynamic switching"
230 dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
231 local x=""
232 for x in ${D}/usr/$(get_libdir)/xorg/modules/extensions/libglx*; do
233 if [ -f ${x} -o -L ${x} ]; then
234 mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions
235 fi
236 done
237 eend 0
238 }
239
240 server_based_install() {
241 use xprint && xprint_src_install
242
243 if ! use xorg; then
244 rm ${D}/usr/share/man/man1/Xserver.1x \
245 ${D}/usr/$(get_libdir)/xserver/SecurityPolicy \
246 ${D}/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
247 ${D}/usr/share/man/man1/Xserver.1x
248 fi
249 }
250
251 switch_opengl_implem() {
252 # Switch to the xorg implementation.
253 # Use new opengl-update that will not reset user selected
254 # OpenGL interface ...
255 echo
256 # eselect opengl set --use-old ${OPENGL_DIR}
257 eselect opengl set ${OLD_IMPLEM}
258 }
259
260 xprint_src_install() {
261 # RH-style init script, we provide a wrapper
262 exeinto /usr/$(get_libdir)/misc
263 doexe ${S}/Xprint/etc/init.d/xprint
264 # Patch init script for fonts location
265 sed -e 's:/lib/X11/fonts/:/share/fonts/:g' \
266 -i ${D}/usr/$(get_libdir)/misc/xprint
267 # Install the wrapper
268 newinitd ${FILESDIR}/xprint.init xprint
269 # Install profile scripts
270 insinto /etc/profile.d
271 doins ${S}/Xprint/etc/profile.d/xprint*
272 insinto /etc/X11/xinit/xinitrc.d
273 newins ${S}/Xprint/etc/Xsession.d/cde_xsessiond_xprint.sh \
274 92xprint-xpserverlist.sh
275 # Patch profile scripts
276 sed -e "s:/bin/sh.*get_xpserverlist:/usr/$(get_libdir)/misc/xprint \
277 get_xpserverlist:g" -i ${D}/etc/profile.d/xprint* \
278 ${D}/etc/X11/xinit/xinitrc.d/92xprint-xpserverlist.sh
279 # Move profile scripts, we can't touch /etc/profile.d/ in Gentoo
280 dodoc ${D}/etc/profile.d/xprint*
281 rm -f ${D}/etc/profile.d/xprint*
282 }

  ViewVC Help
Powered by ViewVC 1.1.20