# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-glx/nvidia-glx-1.0.6106.ebuild,v 1.1 2004/07/02 06:17:00 cyfred Exp $ inherit eutils X86_PKG_V="pkg1" AMD64_PKG_V="pkg2" NV_V="${PV/1.0./1.0-}" X86_NV_PACKAGE="NVIDIA-Linux-x86-${NV_V}" AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${NV_V}" DESCRIPTION="NVIDIA X11 driver and GLX libraries" HOMEPAGE="http://www.nvidia.com/" SRC_URI="x86? (ftp://download.nvidia.com/XFree86/Linux-x86/${NV_V}/${X86_NV_PACKAGE}-${X86_PKG_V}.run) amd64? (http://download.nvidia.com/XFree86/Linux-x86_64/${NV_V}/${AMD64_NV_PACKAGE}-${AMD64_PKG_V}.run)" if use x86; then PKG_V="${X86_PKG_V}" NV_PACKAGE="${X86_NV_PACKAGE}" elif use amd64; then PKG_V="${AMD64_PKG_V}" NV_PACKAGE="${AMD64_NV_PACKAGE}" fi S="${WORKDIR}/${NV_PACKAGE}-${PKG_V}" LICENSE="NVIDIA" SLOT="0" KEYWORDS="-* ~x86 ~amd64" RESTRICT="nostrip" IUSE="" DEPEND="virtual/libc virtual/x11 >=x11-base/opengl-update-1.3 ~media-video/nvidia-kernel-${PV}" PDEPEND="amd64? ( multilib? ( app-emulation/emul-linux-x86-nvidia ) )" PROVIDE="virtual/opengl" export _POSIX2_VERSION="199209" pkg_setup() { # We need xfree-4.2.0-r9 to support the dynamic libGL* stuff if has_version "x11-base/xfree" then if has_version " ${D}/${NV_ROOT}/lib/libGL.la # Should we install the .la for the 32bit libs on amd64? I think not. } pkg_preinst() { #clean the dinamic libGL stuff's home to ensure #we dont have stale libs floating around if [ -d ${ROOT}/usr/lib/opengl/nvidia ] then rm -rf ${ROOT}/usr/lib/opengl/nvidia/* fi #make sure we nuke the old nvidia-glx's env.d file if [ -e ${ROOT}/etc/env.d/09nvidia ] then rm -f ${ROOT}/etc/env.d/09nvidia fi } pkg_postinst() { #switch to the nvidia implementation if [ "${ROOT}" = "/" ] then /usr/sbin/opengl-update nvidia fi echo einfo "To use the Nvidia GLX, run \"opengl-update nvidia\"" echo einfo "You may also be interested in media-video/nvidia-settings" echo einfo "nVidia have requested that any bug reports submitted have the" einfo "output of /usr/bin/nvidia-bug-report.sh included." }