| OLD | NEW |
| (Empty) |
| 1 # Copyright 1999-2010 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.7.6.ebuild
,v 1.1 2010/03/17 15:35:54 scarabeus Exp $ | |
| 4 | |
| 5 EAPI="2" | |
| 6 | |
| 7 # Must be before x-modular eclass is inherited | |
| 8 SNAPSHOT="yes" | |
| 9 | |
| 10 inherit x-modular multilib versionator | |
| 11 | |
| 12 EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/xserver" | |
| 13 | |
| 14 OPENGL_DIR="xorg-x11" | |
| 15 | |
| 16 DESCRIPTION="X.Org X servers" | |
| 17 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86 ~x86-f
bsd" | |
| 18 | |
| 19 IUSE_SERVERS="dmx kdrive xorg" | |
| 20 IUSE="${IUSE_SERVERS} tslib hal ipv6 minimal nptl sdl" | |
| 21 RDEPEND="hal? ( sys-apps/hal ) | |
| 22 tslib? ( >=x11-libs/tslib-1.0 x11-proto/xcalibrateproto ) | |
| 23 dev-libs/openssl | |
| 24 >=x11-libs/libXfont-1.3.3 | |
| 25 >=x11-libs/xtrans-1.2.2 | |
| 26 >=x11-libs/libXau-1.0.4 | |
| 27 >=x11-libs/libxkbfile-1.0.4 | |
| 28 >=x11-libs/libXdmcp-1.0.2 | |
| 29 >=x11-libs/libpciaccess-0.10.3 | |
| 30 >=x11-libs/pixman-0.15.20 | |
| 31 media-libs/freetype | |
| 32 >=x11-misc/xbitmaps-1.0.1 | |
| 33 >=x11-misc/xkeyboard-config-1.4 | |
| 34 x11-apps/xkbcomp | |
| 35 >=x11-apps/iceauth-1.0.2 | |
| 36 >=x11-apps/rgb-1.0.3 | |
| 37 >=x11-apps/xauth-1.0.3 | |
| 38 >=x11-apps/xinit-1.0.8-r3 | |
| 39 >=app-admin/eselect-opengl-1.0.8 | |
| 40 dmx? ( | |
| 41 x11-libs/libXt | |
| 42 >=x11-libs/libdmx-1.0.99.1 | |
| 43 >=x11-libs/libX11-1.1.5 | |
| 44 >=x11-libs/libXaw-1.0.4 | |
| 45 >=x11-libs/libXext-1.0.5 | |
| 46 >=x11-libs/libXfixes-4.0.3 | |
| 47 >=x11-libs/libXi-1.2.99.1 | |
| 48 >=x11-libs/libXmu-1.0.3 | |
| 49 >=x11-libs/libXtst-1.0.3 | |
| 50 ) | |
| 51 !minimal? ( | |
| 52 >=x11-libs/libX11-1.1.5 | |
| 53 >=x11-libs/libXext-1.0.5 | |
| 54 >=x11-libs/libXres-1.0.3 | |
| 55 >=media-libs/mesa-7.4[nptl=] | |
| 56 ) | |
| 57 >=x11-libs/libxkbui-1.0.2 | |
| 58 kdrive? ( | |
| 59 >=x11-libs/libXext-1.0.5 | |
| 60 sdl? ( media-libs/libsdl ) )" | |
| 61 # Xres is dmx-dependent | |
| 62 # Xaw is dmx-dependent | |
| 63 # Xpm is dmx-dependent, pulls in Xt | |
| 64 # xkbcomp is launched at startup but not checked by ./configure | |
| 65 | |
| 66 ## Deps that don't have a version in configure.ac but do here: | |
| 67 # x11-proto/resourceproto | |
| 68 # x11-proto/fontsproto | |
| 69 # x11-libs/libXau | |
| 70 # x11-libs/libXfont | |
| 71 # x11-libs/libXdmcp | |
| 72 # x11-libs/libXext | |
| 73 # x11-libs/libX11 | |
| 74 # x11-libs/libXrender | |
| 75 # x11-libs/libXmu | |
| 76 # x11-libs/libXfixes | |
| 77 # x11-libs/libXtst | |
| 78 # x11-proto/xineramaproto | |
| 79 # x11-proto/dmxproto | |
| 80 ## Deps that are larger here than in configure.ac | |
| 81 # x11-libs/libpciaccess-0.8.0 | |
| 82 # | |
| 83 | |
| 84 DEPEND="${RDEPEND} | |
| 85 !!net-dialup/dtrace | |
| 86 sys-devel/flex | |
| 87 >=x11-proto/randrproto-1.2.99.3 | |
| 88 >=x11-proto/renderproto-0.11 | |
| 89 >=x11-proto/fixesproto-4.1 | |
| 90 >=x11-proto/damageproto-1.1 | |
| 91 >=x11-proto/xextproto-7.0.99.3 | |
| 92 >=x11-proto/xproto-7.0.13 | |
| 93 >=x11-proto/xf86dgaproto-2.0.99.1 | |
| 94 >=x11-proto/xf86rushproto-1.1.2 | |
| 95 >=x11-proto/xf86vidmodeproto-2.2.99.1 | |
| 96 >=x11-proto/compositeproto-0.4 | |
| 97 >=x11-proto/recordproto-1.13.99.1 | |
| 98 >=x11-proto/resourceproto-1.0.2 | |
| 99 >=x11-proto/videoproto-2.2.2 | |
| 100 >=x11-proto/scrnsaverproto-1.1 | |
| 101 >=x11-proto/trapproto-3.4.3 | |
| 102 >=x11-proto/xineramaproto-1.1.3 | |
| 103 >=x11-proto/fontsproto-2.0.2 | |
| 104 >=x11-proto/kbproto-1.0.3 | |
| 105 >=x11-proto/inputproto-1.9.99.902 | |
| 106 >=x11-proto/bigreqsproto-1.1.0 | |
| 107 >=x11-proto/xcmiscproto-1.2.0 | |
| 108 >=x11-proto/glproto-1.4.9 | |
| 109 dmx? ( >=x11-proto/dmxproto-2.2.99.1 ) | |
| 110 !minimal? ( | |
| 111 >=x11-proto/xf86driproto-2.1.0 | |
| 112 >=x11-proto/dri2proto-2.1 | |
| 113 >=x11-libs/libdrm-2.3.0 | |
| 114 )" | |
| 115 | |
| 116 PDEPEND="xorg? ( >=x11-base/xorg-drivers-$(get_version_component_range 1-2) )" | |
| 117 | |
| 118 EPATCH_FORCE="yes" | |
| 119 EPATCH_SUFFIX="patch" | |
| 120 | |
| 121 # These have been sent upstream | |
| 122 UPSTREAMED_PATCHES=( | |
| 123 #"${WORKDIR}/patches/" | |
| 124 | |
| 125 # Fix from bug http://bugs.freedesktop.org/show_bug.cgi?id=25400 | |
| 126 "${FILESDIR}/1.7.3.901-0001-dix-if-owner-events-is-true-for-passive-grab
s-add-th.patch" | |
| 127 # Fix for bug #304067 | |
| 128 "${FILESDIR}/1.7.5.902-fix-tslib-1.0-check.patch" | |
| 129 # coming from 1.8 branch | |
| 130 "${FILESDIR}/1.7.6-glx-1.4.patch" | |
| 131 # merged upstream; see | |
| 132 # http://www.mail-archive.com/xorg-devel@lists.x.org/msg11717.html | |
| 133 "${FILESDIR}/1.7.6-fix-xkb-redirect-key.patch" | |
| 134 ) | |
| 135 | |
| 136 PATCHES=( | |
| 137 "${UPSTREAMED_PATCHES[@]}" | |
| 138 # Fix for bug http://bugs.freedesktop.org/show_bug.cgi?id=27023 | |
| 139 "${FILESDIR}/1.7.6-fix-wrong-bracket-values.patch" | |
| 140 # Allow usage of monotonic clock while cross-compiling | |
| 141 "${FILESDIR}/monotonic-clock-fix.patch" | |
| 142 "${FILESDIR}/1.7.6-cache-xkbcomp-for-fast-start-up.patch" | |
| 143 # Make the root window get created without a background so we can get | |
| 144 # seamless transitions when X starts. This looks like it may be upstrea
med | |
| 145 # soon (as a -nr flag; we just enable it by default so we can use the sa
me | |
| 146 # command line for older X servers): | |
| 147 # http://www.mail-archive.com/xorg-devel@lists.x.org/msg09360.html | |
| 148 "${FILESDIR}/1.7.6-xserver-bg-none-root.patch" | |
| 149 "${FILESDIR}/1.7.6-skip-vendor-and-device-names.patch" | |
| 150 "${FILESDIR}/1.7.6-export-Xi-to-core.patch" | |
| 151 # These patches were used by the window manager's | |
| 152 # --unredirect_fullscreen_window flag, which enables an optimization whe
re | |
| 153 # we stop compositing when there's a single window covering the whole | |
| 154 # screen. That flag is currently disabled, since it can cause tough-to-
fix | |
| 155 # problems where the screen flickers or redraws (even with these patches
). | |
| 156 #"${FILESDIR}/1.7.6-composite-redirect-events.patch" | |
| 157 #"${FILESDIR}/1.7.6-no-exposure-for-redirect.patch" | |
| 158 #"${FILESDIR}/1.7.6-always-send-visibility.patch" | |
| 159 "${FILESDIR}/1.7.6-fix-xkb-autorepeat.patch" | |
| 160 "${FILESDIR}/1.7.6-disable-vt-switching-for-verified-boot.patch" | |
| 161 # Match the behaviour of monitor_reconfigure at X.Org startup time. | |
| 162 "${FILESDIR}/1.7.6-chromeos-mode.patch" | |
| 163 ) | |
| 164 | |
| 165 pkg_setup() { | |
| 166 use minimal || ensure_a_server_is_building | |
| 167 | |
| 168 # SDL only available in kdrive build | |
| 169 if use kdrive && use sdl; then | |
| 170 conf_opts="${conf_opts} --enable-xsdl" | |
| 171 else | |
| 172 conf_opts="${conf_opts} --disable-xsdl" | |
| 173 fi | |
| 174 | |
| 175 # localstatedir is used for the log location; we need to override the de
fault | |
| 176 # from ebuild.sh | |
| 177 # sysconfdir is used for the xorg.conf location; same applies | |
| 178 # --enable-install-setuid needed because sparcs default off | |
| 179 CONFIGURE_OPTIONS=" | |
| 180 $(use_enable ipv6) | |
| 181 $(use_enable dmx) | |
| 182 $(use_enable kdrive) | |
| 183 $(use_enable tslib) | |
| 184 $(use_enable tslib xcalibrate) | |
| 185 $(use_enable !minimal xvfb) | |
| 186 $(use_enable !minimal xnest) | |
| 187 $(use_enable !minimal record) | |
| 188 $(use_enable !minimal xfree86-utils) | |
| 189 $(use_enable !minimal install-libxf86config) | |
| 190 $(use_enable !minimal dri) | |
| 191 $(use_enable !minimal dri2) | |
| 192 $(use_enable !minimal glx) | |
| 193 $(use_enable xorg) | |
| 194 $(use_enable nptl glx-tls) | |
| 195 $(use_enable hal config-hal) | |
| 196 --sysconfdir=/etc/X11 | |
| 197 --localstatedir=/var | |
| 198 --enable-install-setuid | |
| 199 --enable-null-root-cursor | |
| 200 --with-fontdir=/usr/share/fonts | |
| 201 --with-xkb-output=/var/lib/xkb | |
| 202 --without-dtrace | |
| 203 ${conf_opts}" | |
| 204 | |
| 205 # (#121394) Causes window corruption | |
| 206 filter-flags -fweb | |
| 207 | |
| 208 # Incompatible with GCC 3.x SSP on x86, bug #244352 | |
| 209 if use x86 ; then | |
| 210 if [[ $(gcc-major-version) -lt 4 ]]; then | |
| 211 filter-flags -fstack-protector | |
| 212 fi | |
| 213 fi | |
| 214 | |
| 215 OLD_IMPLEM="$(eselect opengl show)" | |
| 216 eselect opengl set ${OPENGL_DIR} | |
| 217 } | |
| 218 | |
| 219 src_install() { | |
| 220 x-modular_src_install | |
| 221 | |
| 222 dynamic_libgl_install | |
| 223 | |
| 224 server_based_install | |
| 225 | |
| 226 if ! use minimal && use xorg; then | |
| 227 # Install xorg.conf.example (see bugs #151421 and #151670) | |
| 228 insinto /etc/X11 | |
| 229 doins hw/xfree86/xorg.conf.example \ | |
| 230 || die "couldn't install xorg.conf.example" | |
| 231 fi | |
| 232 # crosbug.com/11553 | |
| 233 dosym /usr/bin/Xorg /usr/bin/X11/X || die | |
| 234 } | |
| 235 | |
| 236 pkg_postinst() { | |
| 237 switch_opengl_implem | |
| 238 | |
| 239 echo | |
| 240 ewarn "You must rebuild all drivers if upgrading from xorg-server 1.6" | |
| 241 ewarn "or earlier, because the ABI changed. If you cannot start X becaus
e" | |
| 242 ewarn "of module version mismatch errors, this is your problem." | |
| 243 | |
| 244 echo | |
| 245 ewarn "You can generate a list of all installed packages in the x11-driv
ers" | |
| 246 ewarn "category using this command:" | |
| 247 ewarn "emerge portage-utils; qlist -I -C x11-drivers/" | |
| 248 | |
| 249 ebeep 5 | |
| 250 epause 10 | |
| 251 } | |
| 252 | |
| 253 pkg_postrm() { | |
| 254 # Get rid of module dir to ensure opengl-update works properly | |
| 255 if ! has_version x11-base/xorg-server; then | |
| 256 if [[ -e ${ROOT}/usr/$(get_libdir)/xorg/modules ]]; then | |
| 257 rm -rf "${ROOT}"/usr/$(get_libdir)/xorg/modules | |
| 258 fi | |
| 259 fi | |
| 260 } | |
| 261 | |
| 262 dynamic_libgl_install() { | |
| 263 # next section is to setup the dynamic libGL stuff | |
| 264 ebegin "Moving GL files for dynamic switching" | |
| 265 dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/extensions | |
| 266 local x="" | |
| 267 for x in "${D}"/usr/$(get_libdir)/xorg/modules/extensions/lib{gl
x,dri,dri2}*; do | |
| 268 if [ -f ${x} -o -L ${x} ]; then | |
| 269 mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/${OPE
NGL_DIR}/extensions | |
| 270 fi | |
| 271 done | |
| 272 eend 0 | |
| 273 } | |
| 274 | |
| 275 server_based_install() { | |
| 276 if ! use xorg; then | |
| 277 rm "${D}"/usr/share/man/man1/Xserver.1x \ | |
| 278 "${D}"/usr/$(get_libdir)/xserver/SecurityPolicy \ | |
| 279 "${D}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \ | |
| 280 "${D}"/usr/share/man/man1/Xserver.1x | |
| 281 fi | |
| 282 } | |
| 283 | |
| 284 switch_opengl_implem() { | |
| 285 # Switch to the xorg implementation. | |
| 286 # Use new opengl-update that will not reset user selected | |
| 287 # OpenGL interface ... | |
| 288 echo | |
| 289 eselect opengl set ${OLD_IMPLEM} | |
| 290 } | |
| 291 | |
| 292 ensure_a_server_is_building() { | |
| 293 for server in ${IUSE_SERVERS}; do | |
| 294 use ${server} && return; | |
| 295 done | |
| 296 eerror "You need to specify at least one server to build." | |
| 297 eerror "Valid servers are: ${IUSE_SERVERS}." | |
| 298 die "No servers were specified to build." | |
| 299 } | |
| OLD | NEW |