# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.16.20-r1.ebuild,v 1.3 2006/06/03 05:29:33 joshuabaergen Exp $ IUSE="opengl" inherit eutils rpm multilib linux-info linux-mod toolchain-funcs DESCRIPTION="Ati precompiled drivers for r350, r300, r250 and r200 chipsets" HOMEPAGE="http://www.ati.com" SRC_URI="x86? ( http://www2.ati.com/drivers/linux/fglrx_6_8_0-${PV}-1.i386.rpm ) amd64? ( http://www2.ati.com/drivers/linux/64bit/fglrx64_6_8_0-${PV}-1.x86_64.rpm )" LICENSE="ATI" KEYWORDS="-*" #~amd64 ~x86" RDEPEND=">=x11-base/xorg-x11-6.8.0 /dev/null #apps exeinto /opt/ati/bin doexe usr/X11R6/bin/* #ati custom stuff insinto /usr doins -r ${WORKDIR}/usr/include #env.d entry cp ${FILESDIR}/09ati ${T}/ #Work around hardcoded path in 32bit libGL.so on amd64, bug 101539 if has_multilib_profile && [ $(get_abi_LIBDIR x86) = "lib32" ] ; then cat >>${T}/09ati < ${inslibdir}" local ATI_ROOT="/usr/${inslibdir}/opengl/ati" # The GLX libraries exeinto ${ATI_ROOT}/lib doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/libGL.so.1.2 dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1 dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so # Don't do this... see bug #47598 #dosym libGL.so.1.2 ${ATI_ROOT}/lib/libMesaGL.so # same as the xorg implementation dosym ../${X11_IMPLEM}/extensions ${ATI_ROOT}/extensions #Workaround if use opengl ; then sed -e "s:libdir=.*:libdir=${ATI_ROOT}/lib:" \ /usr/${inslibdir}/opengl/${X11_IMPLEM}/lib/libGL.la \ > $D/${ATI_ROOT}/lib/libGL.la dosym ../${X11_IMPLEM}/include ${ATI_ROOT}/include fi # X and DRI driver if has_version ">=x11-base/xorg-x11-6.8.0-r4" then local X11_DIR="/usr/" else local X11_DIR="/usr/X11R6/" fi local X11_LIB_DIR="${X11_DIR}${inslibdir}" exeinto ${X11_LIB_DIR}/modules/drivers doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/modules/drivers/fglrx_drv.o exeinto ${X11_LIB_DIR}/modules/dri doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/modules/dri/atiogl_a_dri.so exeinto ${X11_LIB_DIR}/modules/linux doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.a cp -pPR ${WORKDIR}/usr/X11R6/${pkglibdir}/libfglrx_gamma.* \ ${D}/${X11_LIB_DIR} #Not the best place insinto ${X11_DIR}/include/X11/extensions doins ${WORKDIR}/usr/X11R6/include/X11/extensions/fglrx_gamma.h } pkg_postinst() { /usr/bin/eselect opengl set --use-old ati echo einfo "To switch to ATI OpenGL, run \"opengl-update ati\"" einfo "To change your XF86Config you can use the bundled \"fglrxconfig\"" if use !opengl ; then ewarn "You don't have the opengl useflag enabled, you won't be able to build" ewarn "opengl applications nor use opengl driver features, if that isn't" ewarn "the intended behaviour please add opengl to your useflag and issue" ewarn "# emerge -Nu ati-drivers" fi # DRM module linux-mod_pkg_postinst } pkg_postrm() { linux-mod_pkg_postrm /usr/bin/eselect opengl set --use-old xorg-x11 }