# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/x11-base/xfree-drm/xfree-drm-4.3.0-r1.ebuild,v 1.2 2003/03/15 20:12:05 gerk Exp $ # PPC is using a drm only tarball here now. The fixes we need (read hacks) don't exist # in xfree trees (yet), and likely may not for a while due to the hackish nature of some # of the requirements - Gerk - Feb 07 2003 # this build is meant for PPC only, portage eats digests otherwise IUSE="" inherit eutils # Make sure Portage does _NOT_ strip symbols. We will do it later and make sure # that only we only strip stuff that are safe to strip ... DEBUG="yes" RESTRICT="nostrip" DESCRIPTION="Xfree86 Kernel DRM modules" HOMEPAGE="http://www.xfree.org" LICENSE="X11" SLOT="${KV}" KEYWORDS="ppc -x86 -sparc -alpha -mips" DEPEND=">=x11-base/xfree-${PV}" PROVIDE="virtual/drm" S="${WORKDIR}" SRC_URI="http://cvs.gentoo.org/~gerk/distfiles/drm-trunk.tar.gz" MY_S="modules/drm-trunk" pkg_setup() { check_KV } src_unpack() { unpack drm-trunk.tar.gz epatch ${FILESDIR}/${P}-gentoo-ppc-Makefile-fixup.patch epatch ${FILESDIR}/${P}-dristat-fixup.patch # Allow the user to select which modules to compile, but also # prevent failure in automatic build cd ${MY_S} if test -z "${DRI_MODULES}" then DRI_MODULES=$(sed -ne s/.*MODS.*=//p Makefile.linux) ewarn "Environment variable DRI_MODULES not set." ewarn "Choosing to compile all modules." fi DRI_MODULES=$(for mod in ${DRI_MODULES}; do echo $mod; done |\ sort -u | tr '\n' ' ' | sed -e 's/ / /g' -e 's/ *$//g') } src_compile() { check_KV cd ${MY_S} einfo "Building DRM" einfo "Kernel modules: ${DRI_MODULES}" # removed TREE variable, it uses the proper stuff from # /lib/modules/*/include for running kernel by default make -f Makefile.linux ${DRI_MODULES} dristat KV="${KV}" || die } src_install() { einfo "Installing DRM..." cd ${MY_S} make -f Makefile.linux MODS=${DRI_MODULES} KV="${KV}" \ DESTDIR="${D}" install || die insinto /usr/bin doins dristat } pkg_postinst() { if [ "${ROOT}" = "/" ] then /sbin/modules-update fi }