-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/xorg-server-1.9.0.ebuild,v 1.1 2010/09/12 18:41:36 chithanh Exp $
EAPI=3
inherit xorg-2 multilib versionator
KEYWORDS=""
IUSE_SERVERS="dmx kdrive xorg"
-IUSE="${IUSE_SERVERS} doc tslib ipv6 minimal nptl +udev"
+IUSE="${IUSE_SERVERS} doc ipv6 minimal nptl tslib +udev"
RDEPEND=">=app-admin/eselect-opengl-1.0.8
dev-libs/openssl
media-libs/freetype
>=x11-libs/libpciaccess-0.10.3
>=x11-libs/libXau-1.0.4
>=x11-libs/libXdmcp-1.0.2
- >=x11-libs/libXfont-1.3.3
+ >=x11-libs/libXfont-1.4.2
>=x11-libs/libxkbfile-1.0.4
>=x11-libs/pixman-0.15.20
>=x11-libs/xtrans-1.2.2
)
kdrive? (
>=x11-libs/libXext-1.0.5
+ x11-libs/libXv
)
!minimal? (
>=x11-libs/libX11-1.1.5
>=media-libs/mesa-7.8_rc[nptl=]
)
tslib? ( >=x11-libs/tslib-1.0 x11-proto/xcalibrateproto )
- udev? ( sys-fs/udev )"
+ udev? ( >=sys-fs/udev-150 )"
DEPEND="${RDEPEND}
sys-devel/flex
)
!minimal? (
>=x11-proto/xf86driproto-2.1.0
- >=x11-proto/dri2proto-2.1
- >=x11-libs/libdrm-2.3.0
+ >=x11-proto/dri2proto-2.3
+ >=x11-libs/libdrm-2.4.20
)"
PDEPEND="
PATCHES=(
"${UPSTREAMED_PATCHES[@]}"
"${FILESDIR}"/${PN}-disable-acpi.patch
+ "${FILESDIR}"/${PN}-1.9-nouveau-default.patch
+ "${FILESDIR}"/1.7.5.902-fix-tslib-1.0-check.patch
)
pkg_setup() {
use minimal || ensure_a_server_is_building
# localstatedir is used for the log location; we need to override the default
- # from ebuild.sh
+ # from ebuild.sh
# sysconfdir is used for the xorg.conf location; same applies
- # --enable-install-setuid needed because sparcs default off
+ # --enable-install-setuid needed because sparcs default off
# NOTE: fop is used for doc generating ; and i have no idea if gentoo
- # package it somewhere
+ # package it somewhere
CONFIGURE_OPTIONS="
$(use_enable ipv6)
$(use_enable dmx)
$(use_enable kdrive)
+ $(use_enable kdrive kdrive-kbd)
+ $(use_enable kdrive kdrive-mouse)
+ $(use_enable kdrive kdrive-evdev)
$(use_enable tslib)
$(use_enable tslib xcalibrate)
$(use_enable !minimal xvfb)
--with-os-vendor=Gentoo
${conf_opts}"
+ # Xorg-server requires includes from OS mesa which are not visible for
+ # users of binary drivers.
+ # Due to the limitations of CONFIGURE_OPTIONS, we have to export this
+ mkdir -p "${T}/mesa-symlinks/GL"
+ for i in gl glx glxmd glxproto glxtokens; do
+ ln -s "${EROOT}usr/$(get_libdir)/opengl/xorg-x11/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
+ done
+ for i in glext glxext; do
+ ln -s "${EROOT}usr/$(get_libdir)/opengl/global/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
+ done
+ append-cppflags "-I${T}/mesa-symlinks"
+
# (#121394) Causes window corruption
filter-flags -fweb
fi
}
-src_configure() {
- # this is required only for configure and build time
- # we need to ensure having enough glxtokens
- # the subshell is needed so the addwrite is not shared in rest of that phase
- OLD_IMPLEM="$(eselect opengl show)"
- [[ ${OLD_IMPLEM} != ${OPENGL_DIR} ]] && ( addwrite "${ROOT}"; eselect opengl set ${OPENGL_DIR}; )
- xorg-2_src_configure
-}
-
-src_compile() {
- emake # no die here intentional
- if [[ $? != 0 ]]; then
- [[ ${OLD_IMPLEM} != ${OPENGL_DIR} ]] && ( addwrite "${ROOT}"; eselect opengl set ${OLD_IMPLEM}; )
- die "Compilation failed"
- fi
- [[ ${OLD_IMPLEM} != ${OPENGL_DIR} ]] && ( addwrite "${ROOT}"; eselect opengl set ${OLD_IMPLEM}; )
-}
-
src_install() {
xorg-2_src_install
|| die "couldn't install xorg.conf.example"
fi
- # install the xdm.init
- cp "${FILESDIR}"/xdm.initd "${T}"
- sed -i \
- -e "/@HALD_DEPEND@/ d" \
- "${T}"/xdm.initd \
- || die "sed failed"
- newinitd "${T}"/xdm.initd xdm || die "initd file install failed"
newinitd "${FILESDIR}"/xdm-setup.initd-1 xdm-setup || die
+ newinitd "${FILESDIR}"/xdm.initd-3 xdm || die
newconfd "${FILESDIR}"/xdm.confd-3 xdm || die
# install the @x11-module-rebuild set for Portage
}
pkg_postinst() {
+ # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install)
+ eselect opengl set --use-old xorg-x11
+
if [[ ${INFO} = yes ]]; then
einfo "You should consider reading upgrade guide for this release:"
einfo " http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-$(get_version_component_range 1-2)-upgrade-guide.xml"