summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-07-15 09:54:12 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2009-07-15 09:54:12 +0000
commit94c1419aa76f14bdf193d29a0ec6d3a0feadbb4e (patch)
tree962ee130192813b4eca1dbb8f42976ec2ecdcf54 /x11-drivers/ati-drivers
parentdisabling avc plugin, bug 276514 (diff)
downloadhistorical-94c1419aa76f14bdf193d29a0ec6d3a0feadbb4e.tar.gz
historical-94c1419aa76f14bdf193d29a0ec6d3a0feadbb4e.tar.bz2
historical-94c1419aa76f14bdf193d29a0ec6d3a0feadbb4e.zip
Make modules build optional, per bug #276893. Add die where mandatory. Cleanup deps.
Package-Manager: portage-2.2_rc33/cvs/Linux i686
Diffstat (limited to 'x11-drivers/ati-drivers')
-rw-r--r--x11-drivers/ati-drivers/ChangeLog7
-rw-r--r--x11-drivers/ati-drivers/Manifest12
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-9.6.ebuild196
-rw-r--r--x11-drivers/ati-drivers/metadata.xml3
4 files changed, 116 insertions, 102 deletions
diff --git a/x11-drivers/ati-drivers/ChangeLog b/x11-drivers/ati-drivers/ChangeLog
index a4f133b3ebe4..b74b661ac0bb 100644
--- a/x11-drivers/ati-drivers/ChangeLog
+++ b/x11-drivers/ati-drivers/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for x11-drivers/ati-drivers
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.165 2009/07/06 11:12:47 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.166 2009/07/15 09:54:12 scarabeus Exp $
+
+ 15 Jul 2009; Tomáš Chvátal <scarabeus@gentoo.org>
+ ati-drivers-9.6.ebuild, metadata.xml:
+ Make modules build optional, per bug #276893. Add die where mandatory.
+ Cleanup deps.
06 Jul 2009; Tomáš Chvátal <scarabeus@gentoo.org>
ati-drivers-9.6.ebuild:
diff --git a/x11-drivers/ati-drivers/Manifest b/x11-drivers/ati-drivers/Manifest
index e91d1f53619d..5b378807f327 100644
--- a/x11-drivers/ati-drivers/Manifest
+++ b/x11-drivers/ati-drivers/Manifest
@@ -57,13 +57,13 @@ EBUILD ati-drivers-8.552-r3.ebuild 15151 RMD160 bedec196ddfefdb77722cc2c2f76dba0
EBUILD ati-drivers-8.573-r1.ebuild 14902 RMD160 3681f04c1c1f7a521fc23e97113eaef3e6483aea SHA1 819581553980ebebb8ad92c43b40852ef13670ee SHA256 e58a5710aab5b014834fe32b5f82fceec8c18b66dc6cd05efe74f9d0e4b0aeb6
EBUILD ati-drivers-8.582.ebuild 14899 RMD160 89a2898119df824686f89e117f8dbd458877eb48 SHA1 efff07c4fda6b04c2cab622a0b5228bde300665d SHA256 9272dbd2dd98e621af559df6f388d8ad0e0db2ecbe6d6554f6c5936ed5007381
EBUILD ati-drivers-8.593.ebuild 15025 RMD160 920ec6d2623fa6a82350c3a218733c54931c3922 SHA1 ee02b762371bef8dc40dd524089987fc36c08693 SHA256 fcbd917e71a9cc0a5069ab19d92ffb50183aa3dc8fd08336d6f8f8ed73fbb8a5
-EBUILD ati-drivers-9.6.ebuild 16107 RMD160 a4e357f8705e8eb17641bccd975823b039ca3506 SHA1 91621f0222f7fb27fc4f8d5d603df58efb6357b8 SHA256 00962457cc0770c6741e70069d7508b84112ee00ef39ca045c6aca623e978ef5
-MISC ChangeLog 54744 RMD160 b3692830abdbe8ce35c29497577a800d988b2185 SHA1 e80ee6295bd7d6359badc08c591bdf8c50c7e309 SHA256 3b9412982af253c138ab166df47c2fd6f55b2f6813e95b0db8a38113dc357332
-MISC metadata.xml 297 RMD160 ce87e3a79d7ce7fbd09f87910a3d911241edf46f SHA1 4efff4b401e8c9e3c19a6ab1dafd136741f92b5a SHA256 55ba93d4ebba425f8eb0d9f56ac3464d08252da01ccf953da1c59ca11a20fe87
+EBUILD ati-drivers-9.6.ebuild 16730 RMD160 678de2713cf781e8abe5fbfa41696f9a66ccc523 SHA1 5a6fee62c3e6da347dc7b69500dd5b7c6db39f0e SHA256 f7b765697c43f9c801a20e04891eb1ce55d6049917f05921b82f132e27f7aede
+MISC ChangeLog 54929 RMD160 b0dbe93ba329c956ade021eb1b538d152dabb712 SHA1 61310155e477fdb2c2d922e601f32fe72b72fe87 SHA256 83e4b0399fc6cbb8e4a565a2a459377e8a7446435b434bd5123f4fb2e2288ed5
+MISC metadata.xml 367 RMD160 d86cdb308e95bc03ece1f94ca4e392cdf9b7c7fd SHA1 cc35e6b09dba2abc4d6053e19c467f390937477f SHA256 516742437fb03c9d32011f34443256ca561ff66c784abd37389605b18f2a43e3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
-iEYEARECAAYFAkpR3DYACgkQHB6c3gNBRYeBEgCgtc+9ajeWnDjYpCGUYqoN2zdl
-4BQAoJFf87POacORFhLI35lR27SeXzTi
-=tTwZ
+iEYEARECAAYFAkpdp1oACgkQHB6c3gNBRYdJAwCfcjS0cYkY72/MEkcI1CDqrhLk
+l5YAoM01e2nVeDPd+8xeu4it9rmLsfcr
+=0bJS
-----END PGP SIGNATURE-----
diff --git a/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild b/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild
index af5a6250c2eb..4033d279e038 100644
--- a/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild
@@ -1,10 +1,8 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild,v 1.9 2009/07/06 11:12:47 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild,v 1.10 2009/07/15 09:54:12 scarabeus Exp $
-EAPI="1"
-
-IUSE="acpi debug"
+EAPI="2"
inherit eutils multilib linux-mod toolchain-funcs versionator
@@ -12,6 +10,8 @@ DESCRIPTION="Ati precompiled drivers for r600 (HD Series) and newer chipsets"
HOMEPAGE="http://www.ati.com"
ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run"
+IUSE="acpi debug +modules"
+
LICENSE="AMD GPL-2 QPL-1.0 as-is"
KEYWORDS="~amd64 ~x86"
@@ -21,11 +21,9 @@ RDEPEND="
!x11-drivers/ati-drivers:0
!x11-apps/ati-drivers-extra
>=app-admin/eselect-opengl-1.0.7
- sys-libs/libstdc++-v3
>=x11-base/xorg-server-1.5.3-r7
x11-libs/libXinerama
x11-libs/libXrandr
- amd64? ( app-emulation/emul-linux-x86-xlibs )
acpi? (
sys-power/acpid
x11-apps/xauth
@@ -43,30 +41,7 @@ EMULTILIB_PKG="true"
S="${WORKDIR}"
-pkg_setup() {
- # Define module dir.
- MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod"
-
- # check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- # xorg folder
- BASE_DIR="${S}/x740"
-
- # amd64/x86
- if use amd64 ; then
- MY_BASE_DIR="${BASE_DIR}_64a"
- PKG_LIBDIR=lib64
- ARCH_DIR="${S}/arch/x86_64"
- else
- MY_BASE_DIR="${BASE_DIR}"
- PKG_LIBDIR=lib
- ARCH_DIR="${S}/arch/x86"
- fi
-
+_check_kernel_config() {
if ! kernel_is 2 6; then
eerror "You need a 2.6 linux kernel to compile against!"
die "No 2.6 Kernel found"
@@ -137,8 +112,15 @@ pkg_setup() {
eerror "in the kernel config."
die "CONFIG_PCI_MSI disabled"
fi
+}
+
+pkg_setup() {
+ # Define module dir.
+ MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod"
+ # xorg folder
+ BASE_DIR="${S}/x740"
- # This is used like $(get_libdir) for paths in ati's package.
+ # amd64/x86
if use amd64 ; then
MY_BASE_DIR="${BASE_DIR}_64a"
PKG_LIBDIR=lib64
@@ -149,6 +131,14 @@ pkg_setup() {
ARCH_DIR="${S}/arch/x86"
fi
+ if use modules; then
+ MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
+ BUILD_TARGETS="kmod_build"
+ BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
+ linux-mod_pkg_setup
+ _check_kernel_config
+ fi
+
elog
elog "Please note that this driver supports only graphic cards based on"
elog "r600 chipset and newer."
@@ -157,22 +147,34 @@ pkg_setup() {
elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati"
elog "as replacement is highly recommended. Rather than staying with"
elog "old versions of this driver."
+ elog "For migration informations please reffer to:"
+ elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
einfo
}
src_unpack() {
- #Switching to a standard way to extract the files since otherwise no signature file
- #would be created
+ # Switching to a standard way to extract the files since otherwise no signature file
+ # would be created
local src="${DISTDIR}/${A}"
sh "${src}" --extract "${S}" 2&>1 /dev/null
- cd "${S}"
- epatch "${FILESDIR}"/ati-drivers-xen.patch || die "epatch failed"
+}
- if kernel_is ge 2 6 29; then
- epatch "${FILESDIR}"/kernel/2.6.29*.patch
- fi
- if kernel_is ge 2 6 30; then
- epatch "${FILESDIR}"/kernel/2.6.30*.patch
+src_prepare() {
+ epatch "${FILESDIR}"/ati-drivers-xen.patch
+
+ # All kernel options for prepare are ment to be in here
+ if use modules; then
+ if kernel_is ge 2 6 29; then
+ epatch "${FILESDIR}"/kernel/2.6.29*.patch
+ fi
+ if kernel_is ge 2 6 30; then
+ epatch "${FILESDIR}"/kernel/2.6.30*.patch
+ fi
+ if use debug; then
+ sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
+ "${MODULE_DIR}/firegl_public.c" \
+ || die "Failed to enable debug output."
+ fi
fi
# These are the userspace utilities that we also have source for.
@@ -182,13 +184,6 @@ src_unpack() {
"${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
|| die "bin rm failed"
- if use debug; then
- # Enable debug mode in the Source Code.
- sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
- "${MODULE_DIR}/firegl_public.c" \
- || die "Failed to enable debug output."
- fi
-
if use acpi; then
sed -i \
-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
@@ -205,7 +200,7 @@ src_unpack() {
epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch"
fi
- pushd ${MODULE_DIR} >/dev/null
+ cd "${MODULE_DIR}"
ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
|| die "symlinking precompiled core failed"
@@ -219,7 +214,7 @@ src_unpack() {
sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
|| die "MODVERSIONS sed failed"
- popd >/dev/null
+ cd "${S}"
mkdir extra || die "mkdir failed"
cd extra
@@ -231,9 +226,9 @@ src_unpack() {
}
src_compile() {
- linux-mod_src_compile
+ use modules && linux-mod_src_compile
- einfo "Building fgl_glxgears"
+ ebegin "Building fgl_glxgears"
cd "${S}"/extra/fgl_glxgears
# These extra libs/utils either have an Imakefile that does not
# work very well without tweaking or a Makefile ignoring CFLAGS
@@ -244,26 +239,29 @@ src_compile() {
"$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
-I"${S}"/common/usr/include fgl_glxgears.c \
-lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
+ eend $?
- einfo "Building fglrx_gamma lib"
+ ebegin "Building fglrx_gamma lib"
cd "${S}"/extra/lib/fglrx_gamma
"$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
-DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
-lXext || die "fglrx_gamma lib build failed"
ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
+ eend $?
- einfo "Building fglrx_gamma util"
+ ebegin "Building fglrx_gamma util"
cd "${S}"/extra/programs/fglrx_gamma
"$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
-I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
|| die "fglrx_gamma util build failed"
+ eend $?
}
src_install() {
- linux-mod_src_install
+ use modules && linux-mod_src_install
# We can do two things here, and neither of them is very nice.
@@ -290,7 +288,7 @@ src_install() {
# below.
echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
- doenvd "${T}/03ati-colon-sep"
+ doenvd "${T}/03ati-colon-sep" || die
# All libraries that we have a 32 bit and 64 bit version of on
# amd64 are installed in src_install-libs. Everything else
@@ -316,20 +314,20 @@ src_install() {
# X modules.
exeinto /usr/$(get_libdir)/xorg/modules/drivers
- doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
+ doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so || die
exeinto /usr/$(get_libdir)/xorg/modules/linux
- doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
+ doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so || die
exeinto /usr/$(get_libdir)/xorg/modules
- doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so,amdxmm.so}
+ doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so,amdxmm.so} || die
# Arch-specific files.
# (s)bin.
into /opt
if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
+ dosbin "${ARCH_DIR}"/usr/sbin/atieventsd || die
fi
# We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
+ dobin "${ARCH_DIR}"/usr/X11R6/bin/* || die
# lib.
exeinto /usr/$(get_libdir)
@@ -347,60 +345,60 @@ src_install() {
doins common/etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
if use acpi; then
insopts -m0755
- doins common/etc/ati/authatieventsd.sh
+ doins common/etc/ati/authatieventsd.sh || die
fi
# include.
insinto /usr
- doins -r common/usr/include
+ doins -r common/usr/include || die
insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
+ doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h || die
# Just the atigetsysteminfo.sh script.
into /usr
- dosbin common/usr/sbin/*
+ dosbin common/usr/sbin/* || die
# data files for the control panel.
insinto /usr/share
- doins -r common/usr/share/ati
+ doins -r common/usr/share/ati || die
insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
+ doins common/usr/share/icons/ccc_{large,small}.xpm || die
make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
ccc_large System
# doc.
- dohtml -r common/usr/share/doc/fglrx
+ dohtml -r common/usr/share/doc/fglrx || die
if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
+ doman common/usr/share/man/man8/atieventsd.8 || die
- pushd common/usr/share/doc/fglrx/examples/etc/acpi >/dev/null
+ pushd common/usr/share/doc/fglrx/examples/etc/acpi > /dev/null
exeinto /etc/acpi
- doexe ati-powermode.sh
+ doexe ati-powermode.sh || die
insinto /etc/acpi/events
- doins events/*
+ doins events/* || die
- popd >/dev/null
+ popd > /dev/null
fi
# Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_glxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
+ dobin extra/fgl_glxgears/fgl_glxgears || die
+ newdoc extra/fgl_glxgears/README README.fgl_glxgears || die
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
+ dolib extra/lib/fglrx_gamma/*so* || die
+ newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma || die
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
+ dobin extra/programs/fglrx_gamma/fglrx_xgamma || die
+ doman extra/programs/fglrx_gamma/fglrx_xgamma.1 || die
+ newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma || die
# Gentoo-specific stuff:
if use acpi; then
newinitd "${FILESDIR}"/atieventsd.init atieventsd \
|| die "Failed to install atieventsd.init.d"
echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
+ newconfd "${T}"/atieventsd.conf atieventsd || die
fi
}
@@ -424,21 +422,30 @@ src_install-libs() {
# The GLX libraries
# (yes, this really is "lib" even on amd64/multilib --marienz)
exeinto ${ATI_ROOT}/lib
- doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
+ doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver} || die
+ dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} || die
+ dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so || die
exeinto ${ATI_ROOT}/extensions
- doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/*
+ doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/* || die
# DRI modules, installed into the path used by recent versions of mesa.
exeinto /usr/$(get_libdir)/dri
- doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
+ doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so || die
# AMD Cal libraries
exeinto /usr/$(get_libdir)
- doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/*.so
-
+ doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/*.so || die
+
+ # warn about removal of .la file
+ # WILL BE NEEDED IN FUTURE
+ #if [[ -e ${ATI_ROOT}/lib/libGL.la ]]; then
+ # ewarn "Since this version the libGL.la is not installed"
+ # ewarn "For fixing this issues please take look on:"
+ # ewarn " dev-util/lafilefixer"
+ # ewarn "This step is needed because the libGL.la is going"
+ # ewarn "to be removed by newer versions of the media-libs/mesa"
+ #fi
# Make up a libGL.la. Ati does not provide one, but mesa does. If
# a (libtool-based) libfoo is built with libGL.la present a
# reference to it is put into libfoo.la, and compiling
@@ -458,12 +465,10 @@ src_install-libs() {
envname="${envname}-${ABI}"
fi
echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
- doenvd "${envname}"
+ doenvd "${envname}" || die
}
pkg_postinst() {
- /usr/bin/eselect opengl set --use-old ati
-
elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
elog "To change your xorg.conf you can use the bundled \"aticonfig\""
elog
@@ -479,15 +484,16 @@ pkg_postinst() {
ewarn ' Option "XAANoOffscreenPixmaps" "true"'
ewarn "in the Device Section of /etc/X11/xorg.conf."
- linux-mod_pkg_postinst
+ use modules && linux-mod_pkg_postinst
+ "${ROOT}"/usr/bin/eselect opengl set --use-old ati
}
pkg_prerm() {
- linux-mod_pkg_prerm
- /usr/bin/eselect opengl set --use-old xorg-x11
+ use modules && linux-mod_pkg_prerm
+ "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
}
pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
+ use modules && linux-mod_pkg_postrm
+ "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
}
diff --git a/x11-drivers/ati-drivers/metadata.xml b/x11-drivers/ati-drivers/metadata.xml
index 3e5d05fc10d7..81883df349ce 100644
--- a/x11-drivers/ati-drivers/metadata.xml
+++ b/x11-drivers/ati-drivers/metadata.xml
@@ -8,4 +8,7 @@
<maintainer>
<email>scarabeus@gentoo.org</email>
</maintainer>
+ <use>
+ <flag name='modules'>Build the kernel modules</flag>
+ </use>
</pkgmetadata>