diff options
author | V3n3RiX <venerix@rogentos.ro> | 2015-10-04 19:09:51 +0100 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2015-10-04 19:09:51 +0100 |
commit | 836dcf91c181df6afb0f658bf31d34744f8ff052 (patch) | |
tree | 17d553cc348a5cdf287a55c96021971340cd5b1d /x11-drivers/ati-userspace | |
parent | 1df4d224a758ee39311dbff64893a509ef78ede2 (diff) |
drop splitted x11 drivers, we go gentoo way
Diffstat (limited to 'x11-drivers/ati-userspace')
56 files changed, 0 insertions, 10612 deletions
diff --git a/x11-drivers/ati-userspace/Manifest b/x11-drivers/ati-userspace/Manifest deleted file mode 100644 index 515df79a..00000000 --- a/x11-drivers/ati-userspace/Manifest +++ /dev/null @@ -1,22 +0,0 @@ -DIST amd-catalyst-13.12-linux-x86.x86_64.zip 160571830 SHA256 024033f4847d1c2a182fc44e0b3df29b2d133e24aeaba390f4504a8f3361a0ca SHA512 bf02aea47dc0588e8fe6590ff5665b25b34b3e10499348e2eb786ba89b32703897753852e6ee8ed52c3d0f8eef46f2026d130329d7af75191e605975379d0109 WHIRLPOOL bcdac0f9641cfdc6d89cd5544fe22dda91f64ae8d34dcd25b55930702108b1bee1db0cdc85d8a68a78fddc34f7f30ab88c9813d3a6ba38b3abf37a24d6210707 -DIST amd-catalyst-13.4-linux-x86.x86_64.zip 122588023 SHA256 ebec78c7f78db3601d1c97116a6823076a7765318e16d88b619ebc80d4c6d1d5 SHA512 ce012f46527ee0073f658e97dd793954930b934b96be9e1c6cd1d344e7734ef81949b484701d5e7e1ebb221f46b5a617f4efb4445e42c06ac0a8b4eca76463fc WHIRLPOOL cb0f7af6d0474c3d521c5785bab49d76da7e09e1ddd02dc0e72b70b5afdb2bd1e07d4a4115a755f213718e7c32c816697d993b73706d58be68fa043aef1ad551 -DIST amd-catalyst-13.9-linux-x86.x86_64.zip 120482826 SHA256 ebade5062713c69d2b703b0a3f62defc409d58e98ceab3bfac7a71643c0c4cd3 SHA512 887c1146920ba7e5b31efd63b1a1b7d9cab586e8c6d705706e0b176b3527e542f452d919cd015c3a04d6f42c884f27d983b2a9229b70716129a94674dd7f62b4 WHIRLPOOL d8b6c7ed772898914c256674ae08a8b3d3054eb5bdfc2f00dc4c796a36b4654c3101410786adb54eaae44ff35386db2aa8d8db12d70805f8732d0709412bdbcc -DIST amd-catalyst-14-4-linux-x86-x86-64.zip 122867159 SHA256 03cc022a49f47888b04f12343ace82bc1eff3aac524e6b4433848c20dc77fec0 SHA512 b359e6c9c349e7a3bee2bd95d3e39f0c596b9a9066893ade3eefcc89ee792094d26a04b2f6bdc31431b368a90ae5870ef07f848a4cbcca723ca1c7c3fcf79d98 WHIRLPOOL bd81574e1fc3be3f82ff51392a3044694e2834ce57395f9d4fe1a89dfa4bebd4b9fe24bc739a45173305bd267d1752226f0648145d5982c9dbe2a0ed23cf37f6 -DIST amd-catalyst-omega-14.12-linux-run-installers.zip 155616187 SHA256 68669836f20ad4351e08b13c5766c6b2ffc6b8cd2a37e9baf55779da32d3a249 SHA512 f87be6a56c03ca4aae3782668af8700d83c85872387753cf002ba4a0e0816fae9af29841a4390db972bfe2f7fb853571b32f8434c2008983461b80699347ac21 WHIRLPOOL 2675a387abd372b34c51f4e8ebfd6547300a8c3ffcc0562633838bc0cdaec3675ca3f4cfa2ab7481c8fa1238a46059f5f848611780638ef6d2301a527d900326 -DIST amd-driver-installer-12-1-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST amd-driver-installer-12-2-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST amd-driver-installer-12-3-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST amd-driver-installer-12-4-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST amd-driver-installer-12-6-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST amd-driver-installer-12-8-x86.x86_64.zip 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST amd-driver-installer-12.6-legacy-x86.x86_64.zip 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST amd-driver-installer-15.20.1046-x86.x86_64.zip 51988 SHA256 7a967062bfed30c50f757e649f01d558393d0e2cd9e5fc71e93ece97ff7f877a SHA512 97fdceba59d5914b464fcb1c33242307c3d939552f7de93882d0b4701673609974d790380e0a33890f736393d6d2999bbd1d8118ec3e87145eb6d091b1e7b0c1 WHIRLPOOL 1cbb3f7934f5f9dabdddbfff2241f3bf1d39c33bcb3bc80d0a99dcf030d376c996aeb559f7ec5a84dd782b389c0c70f0a74f2f08fa2e6906f0515a74168730d9 -DIST amd-driver-installer-catalyst-12.10-x86.x86_64.zip 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST amd-driver-installer-catalyst-13.1-linux-x86.x86_64.zip 114850263 SHA256 67898a922b6b58f25a276a144f16b19014f79c39e4d44d8d2883a467d31e34ad SHA512 30763ab7f47ac22c5b5055495e2d8ae6cc2c8e5ce711fa389f1145a48da2799020c2b8cbf082759d93628017860c39d69337f42ce21b78e1d60c9eda32096df9 WHIRLPOOL ee5dc85a89bc56858ef1c2bcdc6cbfde7e2f9e5675d209c1f6db877e0104cc536f1e18139f0b991a064b14b231a982770eef47368ea281067d62647b4c5365a5 -DIST ati-driver-installer-11-10-x86.x86_64.run 50201 SHA256 a8136110a0117cdfb29f1ce7f4a9ffe42fb2132ef2388baffe0d9922f4d50bfb SHA512 0cdde584ed578d5da11335c1d2e4189b1f3f54f8e8ac4b49e07e66014b79a06c146686519dc6615a83bdccff627d9a940a5d55eb73afff2c5ca710267d8f52aa WHIRLPOOL 088d5d4a8a1851e4da879d8d39188271ef7f302d2cd0615b4c54def147f5e8ec1bd026beb8f36abd0941a57e7d57fb9865bae93d09ebd987825df11ce66fda9a -DIST ati-driver-installer-11-11-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST ati-driver-installer-11-12-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST ati-driver-installer-11-6-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST ati-driver-installer-11-8-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST ati-driver-installer-11-9-x86.x86_64.run 50201 SHA256 e3d63bfaeefff0a23f5af6df2592b7876e63a0a360e62adbf6fafdaa9b681c77 SHA512 6a69af5a00fa28bfaf36aff45723abd78072753ebb29808456494237daad79a78d7d6ad1701ee1fac235a0166446a9683198372314980c05746e4198861c8d76 WHIRLPOOL f5a30b24869ff77c8be180e372482b6b1d979618fd93dd20adb2cfc7610020e0068a48e3d96f7905d673af6f1a17ae0eb2d54e84b23d46a35a1c8472a0bfbe6b -DIST xvba-sdk-0.74-404001.tar.gz 583847 SHA256 731a2c489f2fb5d7318c1976061b26c1057a696f46d09dcf55fbada97fed17eb SHA512 aa1dd52b59eeeabd026d8b76e3b75eaf02587ef286438ba28884afeef5a5efaf50283b5ee4f5b81b12cf79cb4ec77c9a235a886b29fb7cdf850c9779f4b07b35 WHIRLPOOL 69917b746d353a884512e97b9d9a9b89e6f51add3119e69ddd119d51c0c3f2820b93a449fe42bd76d671dc505f92bf25b7f2c5868b33768fc68a19596e460951 diff --git a/x11-drivers/ati-userspace/ati-userspace-11.10.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.10.ebuild deleted file mode 100644 index dec54b19..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-11.10.ebuild +++ /dev/null @@ -1,384 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" -HOMEPAGE="http://ati.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.10.99 - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( app-emulation/emul-linux-x86-opengl ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - app-misc/pax-utils - app-portage/portage-utils - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/fglrxinfo - opt/sbin/atieventsd - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch" - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal libraries - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - -} - -pkg_postinst() { - elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "You will have to source /etc/profile (or logout and back in) for dri" - elog "to work, unless you previously had ati-drivers installed." - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-11.11.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.11.ebuild deleted file mode 100644 index 97d6c35e..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-11.11.ebuild +++ /dev/null @@ -1,412 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" -HOMEPAGE="http://ati.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib opencl" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.11.49 - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch" - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - use opencl && dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - # OpenCL - if use opencl ; then - insinto /etc/OpenCL/vendors/ - if [[ "${ABI}" == "amd64" ]] ; then - doins "${ARCH_DIR}"/etc/OpenCL/vendors/amdocl64.icd || die "doins failed" - else - doins "${ARCH_DIR}"/etc/OpenCL/vendors/amdocl32.icd || die "doins failed" - fi - fi - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir) - if use opencl ; then - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/lib*.so* - else - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - fi - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - -} - -pkg_postinst() { - elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-11.12.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.12.ebuild deleted file mode 100644 index 97d6c35e..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-11.12.ebuild +++ /dev/null @@ -1,412 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" -HOMEPAGE="http://ati.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib opencl" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.11.49 - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch" - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - use opencl && dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - # OpenCL - if use opencl ; then - insinto /etc/OpenCL/vendors/ - if [[ "${ABI}" == "amd64" ]] ; then - doins "${ARCH_DIR}"/etc/OpenCL/vendors/amdocl64.icd || die "doins failed" - else - doins "${ARCH_DIR}"/etc/OpenCL/vendors/amdocl32.icd || die "doins failed" - fi - fi - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir) - if use opencl ; then - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/lib*.so* - else - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - fi - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - -} - -pkg_postinst() { - elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-11.6.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.6.ebuild deleted file mode 100644 index 7060761f..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-11.6.ebuild +++ /dev/null @@ -1,386 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" -HOMEPAGE="http://ati.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.10.99 - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( app-emulation/emul-linux-x86-opengl ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - app-portage/portage-utils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/fglrxinfo - opt/sbin/atieventsd - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch" - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - local alllibdir="$(get_libdir)" - use multilib && alllibdir="lib64 lib32" - for libdir in ${alllibdir} - do - dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \ - /usr/${libdir}/fglrx/libGL.so.1.2 - dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2 - - # Fixup xvba-video compilation - dosym libXvBAW.so.1.0 /usr/${libdir}/libXvBAW.so - done - -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - # PowerXpress stuff - dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \ - ${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2 - dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2 - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \ - ${ATI_ROOT}/extensions/FGL.renamed.libglx.so - dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal libraries - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" -} - -pkg_postinst() { - elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "You will have to source /etc/profile (or logout and back in) for dri" - elog "to work, unless you previously had ati-drivers installed." - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-11.8.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.8.ebuild deleted file mode 100644 index 70be70a2..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-11.8.ebuild +++ /dev/null @@ -1,398 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" -HOMEPAGE="http://ati.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.10.99 - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( app-emulation/emul-linux-x86-opengl ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - app-misc/pax-utils - app-portage/portage-utils - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/fglrxinfo - opt/sbin/atieventsd - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch" - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - local alllibdir="$(get_libdir)" - use multilib && alllibdir="lib64 lib32" - for libdir in ${alllibdir} - do - dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \ - /usr/${libdir}/fglrx/libGL.so.1.2 - dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2 - - # Fixup xvba-video compilation - dosym libXvBAW.so.1.0 /usr/${libdir}/libXvBAW.so - done - -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - # PowerXpress stuff - dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \ - ${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2 - dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2 - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \ - ${ATI_ROOT}/extensions/FGL.renamed.libglx.so - dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal libraries - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - -} - -pkg_postinst() { - elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "You will have to source /etc/profile (or logout and back in) for dri" - elog "to work, unless you previously had ati-drivers installed." - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-11.9.ebuild b/x11-drivers/ati-userspace/ati-userspace-11.9.ebuild deleted file mode 100644 index 70be70a2..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-11.9.ebuild +++ /dev/null @@ -1,398 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for r600 (HD Series) and newer chipsets" -HOMEPAGE="http://ati.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.10.99 - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( app-emulation/emul-linux-x86-opengl ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - app-misc/pax-utils - app-portage/portage-utils - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/fglrxinfo - opt/sbin/atieventsd - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch" - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - local alllibdir="$(get_libdir)" - use multilib && alllibdir="lib64 lib32" - for libdir in ${alllibdir} - do - dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \ - /usr/${libdir}/fglrx/libGL.so.1.2 - dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2 - - # Fixup xvba-video compilation - dosym libXvBAW.so.1.0 /usr/${libdir}/libXvBAW.so - done - -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - # PowerXpress stuff - dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \ - ${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2 - dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2 - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \ - ${ATI_ROOT}/extensions/FGL.renamed.libglx.so - dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal libraries - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - -} - -pkg_postinst() { - elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "You will have to source /etc/profile (or logout and back in) for dri" - elog "to work, unless you previously had ati-drivers installed." - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-12.1-r1.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.1-r1.ebuild deleted file mode 100644 index 4f079e54..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-12.1-r1.ebuild +++ /dev/null @@ -1,414 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.11.49 - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-12.10.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.10.ebuild deleted file mode 100644 index 08601cf6..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-12.10.ebuild +++ /dev/null @@ -1,433 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -MY_V=( $(get_version_components) ) -#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" -SRC_URI="http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-${PV}-x86.x86_64.zip" -FOLDER_PREFIX="common/" -IUSE="debug multilib x-multilib static-libs" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" -RESTRICT="bindist" - -RDEPEND="<=x11-base/xorg-server-1.12.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - sys-power/acpid - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - x-multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst - sys-apps/findutils - app-misc/pax-utils" - - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ ${A} =~ .*\.tar\.gz ]]; then - unpack ${A} - else - #please note, RUN may be insanely assigned at top near SRC_URI - if [[ ${A} =~ .*\.zip ]]; then - unpack ${A} - [[ -z "$RUN" ]] && RUN="${S}/${A/%.zip/.run}" - else - RUN="${DISTDIR}/${A}" - fi - sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz - - # Get rid of watermark. Oldest known reference: - # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark - ebegin "Disabling watermark" - driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do - sed -i "s/${x}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 - done - eend $? || die "Disabling watermark failed" -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" - - # Required by upstream AMD - touch "${D}/etc/ati/atiapfuser.blb" || die - insinto /etc/ati - doins "${FOLDER_PREFIX}etc/ati/atiapfxx.blb" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-12.2.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.2.ebuild deleted file mode 100644 index 8e7a6b65..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-12.2.ebuild +++ /dev/null @@ -1,414 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.11.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-12.3.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.3.ebuild deleted file mode 100644 index 9c8bcd71..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-12.3.ebuild +++ /dev/null @@ -1,416 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib static-libs" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.11.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-12.4.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.4.ebuild deleted file mode 100644 index 9c8bcd71..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-12.4.ebuild +++ /dev/null @@ -1,416 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -# 8.ble will be used for beta releases. -if [[ $(get_major_version) -gt 8 ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib static-libs" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" - -RDEPEND="<=x11-base/xorg-server-1.11.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ $(get_major_version) -gt 8 ]]; then - # 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 - else - unpack ${A} - fi -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-12.6.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.6.ebuild deleted file mode 100644 index 6296ae5f..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-12.6.ebuild +++ /dev/null @@ -1,430 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -MY_V=( $(get_version_components) ) -if [[ ${MY_V[2]} != beta ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib static-libs" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" -RESTRICT="bindist" - -RDEPEND="<=x11-base/xorg-server-1.12.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ ${MY_V[2]} == beta ]]; then - unpack ${A} - RUN="${S}/${A/%.zip/.run}" - else - RUN="${DISTDIR}/${A}" - fi - sh ${RUN} --extract "${S}" # 2>&1 > /dev/null || die -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz - - # Get rid of watermark. Oldest known reference: - # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark - ebegin "Disabling watermark" - driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do - sed -i "s/${x}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 - done - eend $? || die "Disabling watermark failed" -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" - - # Required by upstream AMD - touch "${D}/etc/ati/atiapfuser.blb" || die - insinto /etc/ati - doins "${FOLDER_PREFIX}etc/ati/atiapfxx.blb" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-12.6_beta_pre897.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.6_beta_pre897.ebuild deleted file mode 100644 index 7500a882..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-12.6_beta_pre897.ebuild +++ /dev/null @@ -1,430 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -MY_V=( $(get_version_components) ) -if [[ ${MY_V[2]} != beta ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.run" - FOLDER_PREFIX="common/" -else - #SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - SRC_URI="http://www2.ati.com/drivers/legacy/amd-driver-installer-12.6-legacy-x86.x86_64.zip" - FOLDER_PREFIX="common/" -fi -IUSE="debug multilib static-libs" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" -RESTRICT="bindist" - -RDEPEND="<=x11-base/xorg-server-1.12.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - if [[ ${MY_V[2]} == beta ]]; then - unpack ${A} - RUN=${A/%.zip/.run} - else - RUN=${A} - fi - sh "${S}"/${RUN} --extract "${S}" 2>&1 > /dev/null || die \ - 'unpack failed' -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz - - # Get rid of watermark. Oldest known reference: - # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark - ebegin "Disabling watermark" - driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do - sed -i "s/${x}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 - done - eend $? || die "Disabling watermark failed" -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" - - # Required by upstream AMD - touch "${D}/etc/ati/atiapfuser.blb" || die -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-12.8.ebuild b/x11-drivers/ati-userspace/ati-userspace-12.8.ebuild deleted file mode 100644 index c3a78943..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-12.8.ebuild +++ /dev/null @@ -1,426 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="AMD X11 drivers for radeon r600 (HD Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -MY_V=( $(get_version_components) ) -if [[ ${MY_V[2]} != beta ]]; then - ATI_URL="http://www2.ati.com/drivers/linux/" - SRC_URI="${ATI_URL}/amd-driver-installer-${PV/./-}-x86.x86_64.zip" - FOLDER_PREFIX="common/" -else - SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" - FOLDER_PREFIX="" -fi -IUSE="debug multilib x-multilib static-libs" - -LICENSE="AMD GPL-2 as-is" -KEYWORDS="~amd64 ~x86" -SLOT="1" -RESTRICT="bindist" - -RDEPEND="<=x11-base/xorg-server-1.12.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - x-multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - sys-apps/findutils - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 -} - -src_unpack() { - unpack ${A} - RUN="${S}/"*.run - sh ${RUN} --extract "${S}" # 2>&1 > /dev/null || die -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz - - # Get rid of watermark. Oldest known reference: - # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark - ebegin "Disabling watermark" - driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do - sed -i "s/${x}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 - done - eend $? || die "Disabling watermark failed" -} - -src_compile() { - 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 - # and the like. We bypass those. - - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" - - # Required by upstream AMD - touch "${D}/etc/ati/atiapfuser.blb" || die - insinto /etc/ati - doins "${FOLDER_PREFIX}etc/ati/atiapfxx.blb" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - # PowerXpress stuff - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # lib. - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed in src_install-libs. - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) - done - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-13.1.ebuild b/x11-drivers/ati-userspace/ati-userspace-13.1.ebuild deleted file mode 100644 index d11ed452..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-13.1.ebuild +++ /dev/null @@ -1,481 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -inherit eutils multilib toolchain-funcs versionator - -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -MY_V=( $(get_version_components) ) -#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" -DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-${PV}-linux-x86.x86_64.zip" -XVBA_SDK_URI="http://developer.amd.com.php53-23.ord1-1.websitetestlink.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}" -FOLDER_PREFIX="common/" -IUSE="debug multilib x-multilib static-libs disable-watermark" - -LICENSE="AMD GPL-2 QPL-1.0" -KEYWORDS="-* ~amd64 ~x86" -SLOT="1" -RESTRICT="bindist" - -RDEPEND="<=x11-base/xorg-server-1.13.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - sys-power/acpid - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - x-multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst - sys-apps/findutils - app-misc/pax-utils - app-arch/unzip -" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 - - elog - elog "Please note that this driver supports only graphic cards based on" - elog "Evergreen chipset and newer." - elog "This represent the AMD Radeon HD 5400+ series at this moment." - elog - elog "If your card is older then use ${CATEGORY}/xf86-video-ati" - elog "For migration informations please reffer to:" - elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" - einfo -} - -src_unpack() { - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE - DRIVERS_DISTFILE=${DRIVERS_URI/*\//} - XVBA_SDK_DISTFILE=${XVBA_SDK_URI/*\//} - - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then - unpack ${DRIVERS_DISTFILE} - else - #please note, RUN may be insanely assigned at top near SRC_URI - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then - unpack ${DRIVERS_DISTFILE} - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}" - else - RUN="${DISTDIR}/${DRIVERS_DISTFILE}" - fi - sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die - fi - - mkdir xvba_sdk - cd xvba_sdk - unpack ${XVBA_SDK_DISTFILE} -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch - - # see http://ati.cchtml.com/show_bug.cgi?id=495 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch - # first hunk applied upstream second (x32 related) was not - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch - - # compile fix for linux-3.7 - # https://bugs.gentoo.org/show_bug.cgi?id=438516 - epatch "${FILESDIR}/ati-drivers-vm-reserverd.patch" - - # compile fix for AGP-less kernel, bug #435322 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch - - # Use ACPI_DEVICE_HANDLE wrapper to make driver build on linux-3.8 - # see https://bugs.gentoo.org/show_bug.cgi?id=448216 - epatch "${FILESDIR}/ati-drivers-kernel-3.8-acpihandle.patch" - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz - - if use disable-watermark; then - ebegin "Disabling watermark" - driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do - sed -i "s/${x/x5b/\x5b}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 - done - eend $? || die "Disabling watermark failed" - fi -} - -src_compile() { - 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 - # and the like. We bypass those. - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_test() { :; } # no tests present - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # other libs - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed some row above - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - local soname_one=${soname%.[0-9]} - local soname_zero=${soname_one%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/${soname_one} - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero} - done - - # See https://bugs.gentoo.org/show_bug.cgi?id=443466 - dodir /etc/revdep-rebuild/ - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers" - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a - - #install xvba sdk headers - doheader xvba_sdk/include/amdxvba.h -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - elog - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd - - if has_version ">=x11-drivers/xf86-video-intel-2.20.3"; then - ewarn "It is reported that xf86-video-intel-2.20.3 and later cause the X server" - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier." - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" - fi -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-13.12.ebuild b/x11-drivers/ati-userspace/ati-userspace-13.12.ebuild deleted file mode 100644 index a0014f9b..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-13.12.ebuild +++ /dev/null @@ -1,501 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -inherit eutils multilib toolchain-funcs versionator pax-utils - -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -#RUN="${WORKDIR}/amd-catalyst-13.11-beta1-linux-x86.x86_64.run" -SLOT="1" -# Uses javascript for download YESSSS -#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip" -DRIVERS_URI="http://dev.gentooexperimental.org/~scarabeus/amd-catalyst-13.12-linux-x86.x86_64.zip" -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}" -FOLDER_PREFIX="common/" -IUSE="debug multilib x-multilib static-libs +disable-watermark pax_kernel" - -LICENSE="AMD GPL-2 QPL-1.0" -KEYWORDS="-* ~amd64 ~x86" -RESTRICT="bindist test" - -# Note: do not add !>ati-userspace-ver or !<ati-userspace-ver -# because it would cause pkg_postrm to set the wrong opengl implementation -RDEPEND="<=x11-base/xorg-server-1.14.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - sys-power/acpid - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - x-multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - )" - -DEPEND="${RDEPEND} - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst - sys-apps/findutils - app-misc/pax-utils - app-arch/unzip -" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 - - elog - elog "Please note that this driver only supports graphic cards based on" - elog "Evergreen chipset and newer." - elog "This includes the AMD Radeon HD 5400+ series at this moment." - elog - elog "If your card is older then use ${CATEGORY}/xf86-video-ati" - elog "For migration information please refer to:" - elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" - einfo -} - -src_unpack() { - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE - DRIVERS_DISTFILE=${DRIVERS_URI##*/} - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/} - - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then - unpack ${DRIVERS_DISTFILE} - else - #please note, RUN may be insanely assigned at top near SRC_URI - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then - unpack ${DRIVERS_DISTFILE} - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}" - else - RUN="${DISTDIR}/${DRIVERS_DISTFILE}" - fi - sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die - fi - - mkdir xvba_sdk - cd xvba_sdk - unpack ${XVBA_SDK_DISTFILE} -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch - - # see http://ati.cchtml.com/show_bug.cgi?id=495 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch - # first hunk applied upstream second (x32 related) was not - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch - - # compile fix for AGP-less kernel, bug #435322 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch - - # Compile fix for kernel typesafe uid types #469160 - epatch "${FILESDIR}/typesafe-kuid.diff" - - epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch" - - epatch "${FILESDIR}/check-for-iommu-only-if-iommu-is-supported.patch" - - # Mesa 9.2 compatibility. This is a hack, has_version shouldn't be - # used this way. But it seems to work because only fgl_glxinfo is - # affected - if has_version ">=media-libs/mesa-9.2"; then - epatch "${FILESDIR}/ati-drivers-13.8-mesa-9.2-debug.patch" - fi - - # Fix build on new kernels - epatch "${FILESDIR}/ati-drivers-13.12-acpi.patch" - - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" - - cd "${S}" - mkdir extra || die "mkdir extra failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz - - # Get rid of watermark. Oldest known reference: - # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark - if use disable-watermark; then - ebegin "Disabling watermark" - driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do - sed -i "s/${x/x5b/\x5b}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 - done - eend $? || die "Disabling watermark failed" - fi -} - -src_compile() { - 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 - # and the like. We bypass those. - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_test() { :; } # no tests present - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # other libs - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed some row above - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - local soname_one=${soname%.[0-9]} - local soname_zero=${soname_one%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/${soname_one} - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero} - done - - # See https://bugs.gentoo.org/show_bug.cgi?id=443466 - dodir /etc/revdep-rebuild/ - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers" - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a - - #install xvba sdk headers - doheader xvba_sdk/include/amdxvba.h - - if use pax_kernel; then - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed" - fi -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - elog - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd - - if has_version "x11-drivers/xf86-video-intel[sna]"; then - ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server" - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or" - ewarn "try disabling sna for xf86-video-intel." - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" - fi -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-13.4.ebuild b/x11-drivers/ati-userspace/ati-userspace-13.4.ebuild deleted file mode 100644 index 83360820..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-13.4.ebuild +++ /dev/null @@ -1,487 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -inherit eutils multilib toolchain-funcs versionator pax-utils - -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -MY_V=( $(get_version_components) ) -#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" -SLOT="1" -[[ "${MY_V[2]}" =~ beta.* ]] && BETADIR="beta/" || BETADIR="linux/" -if [[ legacy != ${SLOT} ]]; then - DRIVERS_URI="http://www2.ati.com/drivers/${BETADIR}amd-catalyst-${PV/_beta/-beta}-linux-x86.x86_64.zip" -else - DRIVERS_URI="http://www2.ati.com/drivers/legacy/amd-driver-installer-catalyst-$(get_version_component_range 1-2)-$(get_version_component_range 3)-legacy-linux-x86.x86_64.zip" -fi -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}" -FOLDER_PREFIX="common/" -IUSE="debug multilib x-multilib static-libs +disable-watermark pax_kernel" - -LICENSE="AMD GPL-2 QPL-1.0" -KEYWORDS="-* ~amd64 ~x86" -RESTRICT="bindist test" - -RDEPEND="<=x11-base/xorg-server-1.13.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - sys-power/acpid - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - x-multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - ) - !<x11-drivers/ati-userspace-${PV} - !>x11-drivers/ati-userspace-${PV}" - -DEPEND="${RDEPEND} - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst - sys-apps/findutils - app-misc/pax-utils - app-arch/unzip -" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 - - elog - elog "Please note that this driver only supports graphic cards based on" - elog "Evergreen chipset and newer." - elog "This includes the AMD Radeon HD 5400+ series at this moment." - elog - elog "If your card is older then use ${CATEGORY}/xf86-video-ati" - elog "For migration information please refer to:" - elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" - einfo -} - -src_unpack() { - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE - DRIVERS_DISTFILE=${DRIVERS_URI##*/} - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/} - - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then - unpack ${DRIVERS_DISTFILE} - else - #please note, RUN may be insanely assigned at top near SRC_URI - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then - unpack ${DRIVERS_DISTFILE} - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}" - else - RUN="${DISTDIR}/${DRIVERS_DISTFILE}" - fi - sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die - fi - - mkdir xvba_sdk - cd xvba_sdk - unpack ${XVBA_SDK_DISTFILE} -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch - - # see http://ati.cchtml.com/show_bug.cgi?id=495 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch - # first hunk applied upstream second (x32 related) was not - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch - - # compile fix for AGP-less kernel, bug #435322 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch - - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" - - cd "${S}" - mkdir extra || die "mkdir failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz - - # Get rid of watermark. Oldest known reference: - # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark - if use disable-watermark; then - ebegin "Disabling watermark" - driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do - sed -i "s/${x/x5b/\x5b}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 - done - eend $? || die "Disabling watermark failed" - fi -} - -src_compile() { - 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 - # and the like. We bypass those. - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_test() { :; } # no tests present - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # other libs - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed some row above - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - local soname_one=${soname%.[0-9]} - local soname_zero=${soname_one%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/${soname_one} - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero} - done - - # See https://bugs.gentoo.org/show_bug.cgi?id=443466 - dodir /etc/revdep-rebuild/ - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers" - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a - - #install xvba sdk headers - doheader xvba_sdk/include/amdxvba.h - - if use pax_kernel; then - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed" - fi -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - elog - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd - - if has_version ">=x11-drivers/xf86-video-intel-2.20.3"; then - ewarn "It is reported that xf86-video-intel-2.20.3 and later cause the X server" - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier." - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" - fi -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-13.9.ebuild b/x11-drivers/ati-userspace/ati-userspace-13.9.ebuild deleted file mode 100644 index 48c7a900..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-13.9.ebuild +++ /dev/null @@ -1,494 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -inherit eutils multilib toolchain-funcs versionator pax-utils - -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" -SLOT="1" -DRIVERS_URI="https://www2.ati.com/drivers/linux/amd-catalyst-13.9-linux-x86.x86_64.zip" -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}" -FOLDER_PREFIX="common/" -IUSE="debug multilib x-multilib static-libs +disable-watermark pax_kernel" - -LICENSE="AMD GPL-2 QPL-1.0" -KEYWORDS="-* ~amd64 ~x86" -RESTRICT="bindist test" - -# Note: do not add !>ati-userspace-ver or !<ati-userspace-ver -# because it would cause pkg_postrm to set the wrong opengl implementation -RDEPEND="<=x11-base/xorg-server-1.14.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - sys-power/acpid - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - x-multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - )" - -DEPEND="${RDEPEND} - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst - sys-apps/findutils - app-misc/pax-utils - app-arch/unzip -" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 - - elog - elog "Please note that this driver only supports graphic cards based on" - elog "Evergreen chipset and newer." - elog "This includes the AMD Radeon HD 5400+ series at this moment." - elog - elog "If your card is older then use ${CATEGORY}/xf86-video-ati" - elog "For migration information please refer to:" - elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" - einfo -} - -src_unpack() { - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE - DRIVERS_DISTFILE=${DRIVERS_URI##*/} - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/} - - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then - unpack ${DRIVERS_DISTFILE} - else - #please note, RUN may be insanely assigned at top near SRC_URI - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then - unpack ${DRIVERS_DISTFILE} - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}" - else - RUN="${DISTDIR}/${DRIVERS_DISTFILE}" - fi - sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die - fi - - mkdir xvba_sdk - cd xvba_sdk - unpack ${XVBA_SDK_DISTFILE} -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "sed failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch - - # see http://ati.cchtml.com/show_bug.cgi?id=495 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch - # first hunk applied upstream second (x32 related) was not - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch - - # compile fix for AGP-less kernel, bug #435322 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch - - # Compile fix for kernel typesafe uid types #469160 - epatch "${FILESDIR}/typesafe-kuid.diff" - - epatch "${FILESDIR}/ati-drivers-13.6-linux-3.10-proc.diff" - - # Mesa 9.2 compatibility. This is a hack, has_version shouldn't be - # used this way. But it seems to work because only fgl_glxinfo is - # affected - if has_version ">=media-libs/mesa-9.2"; then - epatch "${FILESDIR}/ati-drivers-13.8-mesa-9.2-debug.patch" - fi - - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" - - cd "${S}" - mkdir extra || die "mkdir extra failed" - cd extra - unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz - - # Get rid of watermark. Oldest known reference: - # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark - if use disable-watermark; then - ebegin "Disabling watermark" - driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do - sed -i "s/${x/x5b/\x5b}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 - done - eend $? || die "Disabling watermark failed" - fi -} - -src_compile() { - 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 - # and the like. We bypass those. - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_test() { :; } # no tests present - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # other libs - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed some row above - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - local soname_one=${soname%.[0-9]} - local soname_zero=${soname_one%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/${soname_one} - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero} - done - - # See https://bugs.gentoo.org/show_bug.cgi?id=443466 - dodir /etc/revdep-rebuild/ - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers" - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a - - #install xvba sdk headers - doheader xvba_sdk/include/amdxvba.h - - if use pax_kernel; then - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed" - fi -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - elog - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd - - if has_version "x11-drivers/xf86-video-intel[sna]"; then - ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server" - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or" - ewarn "try disabling sna for xf86-video-intel." - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" - fi -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-14.12-r3.ebuild b/x11-drivers/ati-userspace/ati-userspace-14.12-r3.ebuild deleted file mode 100644 index 92586d0e..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-14.12-r3.ebuild +++ /dev/null @@ -1,479 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -MULTILIB_COMPAT=( abi_x86_{32,64} ) -inherit eutils multilib-build toolchain-funcs versionator pax-utils - -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -RUN="${WORKDIR}/fglrx-14.501.1003/amd-driver-installer-14.501.1003-x86.x86_64.run" -SLOT="1" -# Uses javascript for download YESSSS -#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip" -DRIVERS_URI="mirror://gentoo/amd-catalyst-omega-14.12-linux-run-installers.zip" -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}" -FOLDER_PREFIX="common/" -IUSE="debug static-libs pax_kernel" - -LICENSE="AMD GPL-2 QPL-1.0" -KEYWORDS="-* ~amd64 ~x86" -RESTRICT="bindist test" - -RDEPEND=" - <=x11-base/xorg-server-1.16.49[-minimal] - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - sys-power/acpid - x11-apps/xauth - virtual/glu[${MULTILIB_USEDEP}] - x11-libs/libX11[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libXinerama[${MULTILIB_USEDEP}] - x11-libs/libXrandr[${MULTILIB_USEDEP}] - x11-libs/libXrender[${MULTILIB_USEDEP}] - !x11-libs/xvba-video -" - -DEPEND="${RDEPEND} - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst - sys-apps/findutils - app-misc/pax-utils - app-arch/unzip -" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\).so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/libamdhsasc\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 - - elog - elog "Please note that this driver only supports graphic cards based on" - elog "Evergreen chipset and newer." - elog "This includes the AMD Radeon HD 5400+ series at this moment." - elog - elog "If your card is older then use ${CATEGORY}/xf86-video-ati" - elog "For migration information please refer to:" - elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" - einfo -} - -src_unpack() { - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE - DRIVERS_DISTFILE=${DRIVERS_URI##*/} - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/} - - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then - unpack ${DRIVERS_DISTFILE} - else - #please note, RUN may be insanely assigned at top near SRC_URI - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then - unpack ${DRIVERS_DISTFILE} - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}" - else - RUN="${DISTDIR}/${DRIVERS_DISTFILE}" - fi - sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die - fi - - mkdir xvba_sdk - cd xvba_sdk - unpack ${XVBA_SDK_DISTFILE} - - mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed" - cd "${WORKDIR}/extra" - tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz" -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "ACPI fixups failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch - - # see http://ati.cchtml.com/show_bug.cgi?id=495 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch - # first hunk applied upstream second (x32 related) was not - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch - - # compile fix for AGP-less kernel, bug #435322 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch - - epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch" - - # Fix #483400 - epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch" - - # Fix #524658 - epatch "${FILESDIR}/fix-the-linux-3.17-no_hotplug-error.patch" - - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" - - # Compile fix, #526602 - epatch "${FILESDIR}/use-kernel_fpu_begin.patch" -} - -src_compile() { - 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 - # and the like. We bypass those. - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - multilib_foreach_abi src_install-libs - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - if multilib_is_native_abi; then - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - fi - - # other libs - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed some row above - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdhsasc*.so - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - local soname_one=${soname%.[0-9]} - local soname_zero=${soname_one%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/${soname_one} - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero} - done - - # See https://bugs.gentoo.org/show_bug.cgi?id=443466 - dodir /etc/revdep-rebuild/ - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers" - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a - - #install xvba sdk headers - doheader xvba_sdk/include/amdxvba.h - - # VA-API internal wrapper - dosym /usr/$(get_libdir)/libXvBAW.so.1.0 /usr/$(get_libdir)/va/drivers/fglrx_drv_video.so - - if use pax_kernel; then - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed" - fi -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - elog - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd - - if has_version "x11-drivers/xf86-video-intel[sna]"; then - ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server" - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or" - ewarn "try disabling sna for xf86-video-intel." - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" - fi - - if use pax_kernel; then - ewarn "Please run \"revdep-pax -s libGL.so.1 -me\" after installation and" - ewarn "after you have run \"eselect opengl set ati\". Executacle" - ewarn "revdep-pax is part of package sys-apps/elfix." - fi -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-14.4.ebuild b/x11-drivers/ati-userspace/ati-userspace-14.4.ebuild deleted file mode 100644 index bfcd84bf..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-14.4.ebuild +++ /dev/null @@ -1,478 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -inherit eutils multilib toolchain-funcs versionator pax-utils - -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -RUN="${WORKDIR}/fglrx-14.10.1006/amd-driver-installer-14.10.1006-x86.x86_64.run" -SLOT="1" -DRIVERS_URI="mirror://kogaion/${CATEGORY}/amd-catalyst-14-4-linux-x86-x86-64.zip" -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}" -FOLDER_PREFIX="common/" -IUSE="debug multilib x-multilib static-libs pax_kernel" - -LICENSE="AMD GPL-2 QPL-1.0" -KEYWORDS="-* ~amd64 ~x86" -RESTRICT="bindist test" - -# Note: do not add !>ati-userspace-ver or !<ati-userspace-ver -# because it would cause pkg_postrm to set the wrong opengl implementation -RDEPEND="<=x11-base/xorg-server-1.14.49[-minimal] - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - sys-power/acpid - x11-apps/xauth - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXrender - x-multilib? ( - app-emulation/emul-linux-x86-opengl - app-emulation/emul-linux-x86-xlibs - )" - -DEPEND="${RDEPEND} - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst - sys-apps/findutils - app-misc/pax-utils - app-arch/unzip -" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - opt/bin/amdcccle - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\).so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so -" - -QA_DT_HASH=" - opt/bin/amdcccle - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - opt/sbin/amdnotifyui - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 - - elog - elog "Please note that this driver only supports graphic cards based on" - elog "Evergreen chipset and newer." - elog "This includes the AMD Radeon HD 5400+ series at this moment." - elog - elog "If your card is older then use ${CATEGORY}/xf86-video-ati" - elog "For migration information please refer to:" - elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" - einfo -} - -src_unpack() { - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE - DRIVERS_DISTFILE=${DRIVERS_URI##*/} - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/} - - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then - unpack ${DRIVERS_DISTFILE} - else - #please note, RUN may be insanely assigned at top near SRC_URI - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then - unpack ${DRIVERS_DISTFILE} - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}" - else - RUN="${DISTDIR}/${DRIVERS_DISTFILE}" - fi - sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die - fi - - mkdir xvba_sdk - cd xvba_sdk - unpack ${XVBA_SDK_DISTFILE} - - mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed" - cd "${WORKDIR}/extra" - tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz" -} - -src_prepare() { - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "ACPI fixups failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch - - # see http://ati.cchtml.com/show_bug.cgi?id=495 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch - # first hunk applied upstream second (x32 related) was not - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch - - # compile fix for AGP-less kernel, bug #435322 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch - - # Compile fix for kernel typesafe uid types #469160 - epatch "${FILESDIR}/typesafe-kuid.diff" - - epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch" - - # Fix #483400 - epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch" - - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" -} - -src_compile() { - 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 - # and the like. We bypass those. - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - - # There used to be some code here that tried to detect running - # under a "native multilib" portage ((precursor of) - # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it - # should just work (only doing some duplicate work). --marienz - if has_multilib_profile && use multilib; then - local OABI=${ABI} - for ABI in $(get_install_abis); do - src_install-libs - done - ABI=${OABI} - unset OABI - else - src_install-libs - fi - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - # other libs - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed some row above - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so - EOF - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - local soname_one=${soname%.[0-9]} - local soname_zero=${soname_one%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/${soname_one} - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero} - done - - # See https://bugs.gentoo.org/show_bug.cgi?id=443466 - dodir /etc/revdep-rebuild/ - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers" - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a - - #install xvba sdk headers - doheader xvba_sdk/include/amdxvba.h - - if use pax_kernel; then - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed" - fi -} - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - elog - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd - - if has_version "x11-drivers/xf86-video-intel[sna]"; then - ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server" - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or" - ewarn "try disabling sna for xf86-video-intel." - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" - fi -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/ati-userspace-15.7.ebuild b/x11-drivers/ati-userspace/ati-userspace-15.7.ebuild deleted file mode 100644 index 5663f751..00000000 --- a/x11-drivers/ati-userspace/ati-userspace-15.7.ebuild +++ /dev/null @@ -1,529 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -MULTILIB_COMPAT=( abi_x86_{32,64} ) -inherit eutils multilib-build linux-info linux-mod toolchain-funcs versionator pax-utils - -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" -HOMEPAGE="http://www.amd.com" -#RUN="${WORKDIR}/fglrx-14.501.1003/amd-driver-installer-14.501.1003-x86.x86_64.run" -SLOT="1" -# Uses javascript for download YESSSS -#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip" -DRIVERS_URI="mirror://gentoo/amd-driver-installer-15.20.1046-x86.x86_64.zip" -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}" -FOLDER_PREFIX="common/" -IUSE="debug static-libs pax_kernel +gdm-hack" - -LICENSE="AMD GPL-2 QPL-1.0" -KEYWORDS="-* ~amd64 ~x86" - -RESTRICT="bindist test" - -RDEPEND=" - <=x11-base/xorg-server-1.17.49[-minimal] - >=app-eselect/eselect-opengl-1.0.7 - app-eselect/eselect-opencl - sys-power/acpid - x11-apps/xauth - !x11-libs/xvba-video - virtual/glu[${MULTILIB_USEDEP}] - x11-libs/libX11[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libXinerama[${MULTILIB_USEDEP}] - x11-libs/libXrandr[${MULTILIB_USEDEP}] - x11-libs/libXrender[${MULTILIB_USEDEP}] - gdm-hack? ( - x11-base/xorg-server:= - ) -" - -DEPEND="${RDEPEND} - x11-proto/inputproto - x11-proto/xf86miscproto - x11-proto/xf86vidmodeproto - x11-proto/xineramaproto - x11-libs/libXtst - sys-apps/findutils - app-misc/pax-utils - app-arch/unzip -" - -EMULTILIB_PKG="true" - -S="${WORKDIR}" - -# QA Silencing -QA_TEXTRELS=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/libatiadlxx.so - usr/lib*/xorg/modules/glesx.so - usr/lib*/libaticaldd.so - usr/lib*/dri/fglrx_dri.so -" - -QA_EXECSTACK=" - opt/bin/atiode - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_WX_LOAD=" - usr/lib*/opengl/ati/lib/libGL.so.1.2 - usr/lib*/dri/fglrx_dri.so -" - -QA_PRESTRIPPED=" - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\).so -" - -QA_SONAME=" - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/libamdhsasc\(32\|64\)\?.so -" - -QA_DT_HASH="e - opt/bin/aticonfig - opt/bin/atiodcli - opt/bin/atiode - opt/bin/clinfo - opt/bin/fglrxinfo - opt/sbin/atieventsd - usr/lib\(32\|64\)\?/libaticalcl.so - usr/lib\(32\|64\)\?/libaticalrt.so - usr/lib\(32\|64\)\?/libatiuki.so.1.0 - usr/lib\(32\|64\)\?/libatiadlxx.so - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so - usr/lib\(32\|64\)\?/xorg/modules/glesx.so - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so - usr/lib\(32\|64\)\?/libaticaldd.so - usr/lib\(32\|64\)\?/dri/fglrx_dri.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 -" - -pkg_setup() { - MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/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_OUT_DIR}" - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" - if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" - else - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" - fi - - # Define module dir. - MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" - # get the xorg-server version and set BASE_DIR for that - BASE_DIR="${S}/xpic" - - # 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 - - elog - elog "Please note that this driver only supports graphic cards based on" - elog "Evergreen chipset and newer." - elog "This includes the AMD Radeon HD 5400+ series at this moment." - elog - elog "If your card is older then use ${CATEGORY}/xf86-video-ati" - elog "For migration informations please refer to:" - elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" - einfo -} - -src_unpack() { - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE - DRIVERS_DISTFILE=${DRIVERS_URI##*/} - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/} - - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then - unpack ${DRIVERS_DISTFILE} - mkdir -p common - mv etc lib usr common || die "Assumed to find etc lib and usr for common" - else - #please note, RUN may be insanely assigned at top near SRC_URI - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then - unpack ${DRIVERS_DISTFILE} - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}" - else - RUN="${DISTDIR}/${DRIVERS_DISTFILE}" - fi - sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die - fi - - mkdir xvba_sdk - cd xvba_sdk - unpack ${XVBA_SDK_DISTFILE} - - mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed" - cd "${WORKDIR}/extra" - tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz" -} - -src_prepare() { - 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 - - # These are the userspace utilities that we also have source for. - # We rebuild these later. - rm \ - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ - || die "bin rm failed" - - - # amdcccle is shipped separately - rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "cannot rm amdcccle" - - # ACPI fixups - sed -i \ - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ - -e "s:/var/lib/gdm/:/var/gdm/:" \ - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ - || die "ACPI fixups failed." - - # Since "who" is in coreutils, we're using that one instead of "finger". - sed -i -e 's:finger:who:' \ - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ - || die "Replacing 'finger' with 'who' failed." - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and - # add function to detect default state. - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch - - # see http://ati.cchtml.com/show_bug.cgi?id=495 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch - # first hunk applied upstream second (x32 related) was not - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch - - # compile fix for AGP-less kernel, bug #435322 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch - - epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch" - - # Fix #483400 - epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch" - - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" - - # Compile fix, #526602 - epatch "${FILESDIR}/use-kernel_fpu_begin.patch" - - epatch_user - - cd "${MODULE_DIR}" - - # bugged fglrx build system, this file should be copied by hand - cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x - - convert_to_m 2.6.x/Makefile || die "convert_to_m failed" - - # When built with ati's make.sh it defines a bunch of macros if - # certain .config values are set, falling back to less reliable - # detection methods if linux/autoconf.h is not available. We - # simply use the linux/autoconf.h settings directly, bypassing the - # detection script. - 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" -} - -src_compile() { - 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 - # and the like. We bypass those. - # The -DUSE_GLU is needed to compile using nvidia headers - # according to a comment in ati-drivers-extra-8.33.6.ebuild. - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" - eend $? -} - -src_install() { - # We can do two things here, and neither of them is very nice. - - # For direct rendering libGL has to be able to load one or more - # dri modules (files ending in _dri.so, like fglrx_dri.so). - # Gentoo's mesa looks for these files in the location specified by - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded - # location /usr/$(get_libdir)/dri. Ati's libGL does the same - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 - # 64bit. So we can either put the .so files in that (unusual, - # compared to "normal" mesa libGL) location or set - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug - # 101539. - - # The problem with this approach is that LIBGL_DRIVERS_PATH - # *overrides* the default hardcoded location, it does not extend - # it. So if ati-drivers is merged but a non-ati libGL is selected - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH - # (because it changed in a newer mesa or because it was compiled - # for a different set of multilib abis than we are) stuff breaks. - - # We create one file per ABI to work with "native" multilib, see - # below. - - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${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 - # (including libraries only available in native 64bit on amd64) - # goes in here. - multilib_foreach_abi src_install-libs - - # This is sorted by the order the files occur in the source tree. - - # X modules. - exeinto /usr/$(get_libdir)/xorg/modules/drivers - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so - exeinto /usr/$(get_libdir)/xorg/modules/linux - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so - exeinto /usr/$(get_libdir)/xorg/modules - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} - - #516816 - if use gdm-hack; then - sed -i 's#/proc/%i/fd/0#/etc/ati/xvrn#g' "${D}/usr/$(get_libdir)/xorg/modules/drivers/fglrx_drv.so" || die "Applying gdm-hack failed" - fi - - # Arch-specific files. - # (s)bin. - into /opt - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd - dobin "${ARCH_DIR}"/usr/bin/clinfo - # We cleaned out the compilable stuff in src_unpack - dobin "${ARCH_DIR}"/usr/X11R6/bin/* - - # Common files. - # etc. - insinto /etc/ati - exeinto /etc/ati - # Everything except for the authatieventsd.sh script. - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,signature,amdpcsdb.default} - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh - - # include. - insinto /usr - doins -r ${FOLDER_PREFIX}usr/include - insinto /usr/include/X11/extensions - - # Just the atigetsysteminfo.sh script. - into /usr - dosbin ${FOLDER_PREFIX}usr/sbin/* - - # doc. - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx - - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 - - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null - - exeinto /etc/acpi - doexe ati-powermode.sh - insinto /etc/acpi/events - doins events/* - - popd > /dev/null - - # Done with the "source" tree. Install tools we rebuilt: - dobin extra/fgl_glxgears/fgl_glxgears - newdoc extra/fgl_glxgears/README README.fgl_glxgears - - # Gentoo-specific stuff: - newinitd "${FILESDIR}"/atieventsd.init atieventsd - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf - newconfd "${T}"/atieventsd.conf atieventsd - - # PowerXpress stuff - exeinto /usr/$(get_libdir)/fglrx - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" - - #516816 - use gdm-hack && Xorg -version > "${D}/etc/ati/xvrn" 2>&1 -} - -src_install-libs() { - if [[ "${ABI}" == "amd64" ]]; then - local EX_BASE_DIR="${BASE_DIR}_64a" - local pkglibdir=lib64 - local MY_ARCH_DIR="${S}/arch/x86_64" - local oclsuffix=64 - else - local EX_BASE_DIR="${BASE_DIR}" - local pkglibdir=lib - local MY_ARCH_DIR="${S}/arch/x86" - local oclsuffix=32 - fi - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" - - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati - # To make sure we do not miss a spot when these change. - local libmajor=1 libminor=2 - local libver=${libmajor}.${libminor} - - # The GLX libraries - # (yes, this really is "lib" even on amd64/multilib --marienz) - exeinto ${ATI_ROOT}/lib - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \ - libGL.so.${libver} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - - if multilib_is_native_abi; then - exeinto ${ATI_ROOT}/extensions - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so - - #516816 - if use gdm-hack; then - sed -i 's#/proc/%i/fd/0#/etc/ati/xvrn#g' "${D}/${ATI_ROOT}/extensions/libglx.so" || die "Applying gdm-hack failed" - fi - fi - - # other libs - exeinto /usr/$(get_libdir) - # Everything except for the libGL.so installed some row above - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') - insinto /usr/$(get_libdir) - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \ - -maxdepth 1 -type f -not -name '*.so*') - - # 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 - - # AMD Cal and OpenCL libraries - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so* - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so* - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so - exeinto /usr/$(get_libdir) - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* - - # OpenCL vendor files - insinto /etc/OpenCL/vendors/ - echo "/usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so" > "${T}"/amdocl${oclsuffix}.icd - - doins "${T}"/amdocl${oclsuffix}.icd - - local envname="${T}"/04ati-dri-path - if [[ -n ${ABI} ]]; then - envname="${envname}-${ABI}" - fi - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" - doenvd "${envname}" - - # Silence the QA notice by creating missing soname symlinks - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) - do - local soname=${so##*/} - local soname_one=${soname%.[0-9]} - local soname_zero=${soname_one%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/${soname_one} - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero} - done - - # See https://bugs.gentoo.org/show_bug.cgi?id=443466 - dodir /etc/revdep-rebuild/ - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers" - - #remove static libs if not wanted - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a - - #install xvba sdk headers - doheader xvba_sdk/include/amdxvba.h - - # VA-API internal wrapper - dosym /usr/$(get_libdir)/libXvBAW.so.1.0 /usr/$(get_libdir)/va/drivers/fglrx_drv_video.so - - if use pax_kernel; then - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed" - fi -} - - -pkg_postinst() { - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" - elog "To change your xorg.conf you can use the bundled \"aticonfig\"" - elog - elog "If you experience unexplained segmentation faults and kernel crashes" - elog "with this driver and multi-threaded applications such as wine," - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." - elog - elog "Fully rebooting the system after an ${PN} update is recommended" - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" - elog "might not work" - elog - elog "Some cards need acpid running to handle events" - elog "Please add it to boot runlevel with rc-update add acpid boot" - elog - - "${ROOT}"/usr/bin/eselect opengl set --use-old ati - "${ROOT}"/usr/bin/eselect opencl set --use-old amd - - if has_version "x11-drivers/xf86-video-intel[sna]"; then - ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server" - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or" - ewarn "try disabling sna for xf86-video-intel." - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" - fi - - if use pax_kernel; then - ewarn "Please run \"revdep-pax -s libGL.so.1 -me\" after installation and" - ewarn "after you have run \"eselect opengl set ati\". Executacle" - ewarn "revdep-pax is part of package sys-apps/elfix." - fi -} - -pkg_prerm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} - -pkg_postrm() { - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 -} diff --git a/x11-drivers/ati-userspace/files/amd-drivers-3.2.7.1.patch b/x11-drivers/ati-userspace/files/amd-drivers-3.2.7.1.patch deleted file mode 100644 index 104c8788..00000000 --- a/x11-drivers/ati-userspace/files/amd-drivers-3.2.7.1.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void) - #ifdef CONFIG_X86_64 - kernel_fpu_begin(); - #else -+#ifndef TS_USEDFPU -+ preempt_disable(); -+ if (__thread_has_fpu(current)) -+ __save_init_fpu(current); -+#else - struct thread_info *cur_task = current_thread_info(); - preempt_disable(); - if (cur_task->status & TS_USEDFPU) - __save_init_fpu(cur_task->task); -+#endif - else - clts(); - #endif diff --git a/x11-drivers/ati-userspace/files/ati-drivers-12.2-redefine-WARN.patch b/x11-drivers/ati-userspace/files/ati-drivers-12.2-redefine-WARN.patch deleted file mode 100644 index f4fab432..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-12.2-redefine-WARN.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- common/lib/modules/fglrx/build_mod/kcl_debug.h.orig 2012-03-08 19:30:38.195025328 +0100 -+++ common/lib/modules/fglrx/build_mod/kcl_debug.h 2012-03-08 19:31:24.976024507 +0100 -@@ -85,8 +85,8 @@ - #ifdef ERROR - #undef ERROR - #endif --#ifdef WARN --#undef WARN -+#ifdef AMD_WARN -+#undef AMD_WARN - #endif - #ifdef INFO - #undef INFO -@@ -122,7 +122,7 @@ - { - SPECIAL = 0, - ERROR , -- WARN , -+ AMD_WARN , - INFO , - INFOEX, - TRACE, -@@ -160,7 +160,7 @@ - }log_map; - - --#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) )) -+#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(AMD_WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) )) - #define INFO_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX))) - extern const log_map module_log_map[]; - extern const module_map module_type_map[]; ---- common/lib/modules/fglrx/build_mod/kcl_debug.c.orig 2012-03-08 19:36:18.244019310 +0100 -+++ common/lib/modules/fglrx/build_mod/kcl_debug.c 2012-03-08 19:36:36.197018973 +0100 -@@ -69,7 +69,7 @@ - { - {SPECIAL , 'S'}, - {ERROR , 'E'}, -- {WARN , 'W'}, -+ {AMD_WARN , 'W'}, - {INFO , 'I'}, - {INFOEX , 'X'}, - {TRACE , 'T'}, diff --git a/x11-drivers/ati-userspace/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch b/x11-drivers/ati-userspace/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch deleted file mode 100644 index 0ea461b8..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Vasiliy Yeremeyev <vayerx@gmail.com> -Date: Sun, 4 Nov 2012 23:59:36 +0400 -Subject: [PATCH] KCL_AGP_FindCapsRegisters stub for AGP-less systems - ---- - common/lib/modules/fglrx/build_mod/kcl_agp.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/common/lib/modules/fglrx/build_mod/kcl_agp.c b/common/lib/modules/fglrx/build_mod/kcl_agp.c -index b9c0655..cb1902b 100644 ---- a/common/lib/modules/fglrx/build_mod/kcl_agp.c -+++ b/common/lib/modules/fglrx/build_mod/kcl_agp.c -@@ -479,6 +479,11 @@ int ATI_API_CALL KCL_AGP_Enable(unsigned long mode) - return -EINVAL; - } - -+int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev) -+{ -+ return -EINVAL; -+} -+ - int ATI_API_CALL KCL_AGP_ReadCapsRegisters(KCL_PCI_DevHandle dev, unsigned int *caps) - { - return -EINVAL; --- -1.7.12 - diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.12-acpi.patch b/x11-drivers/ati-userspace/files/ati-drivers-13.12-acpi.patch deleted file mode 100644 index 3c568742..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-13.12-acpi.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urN common.old/lib/modules/fglrx/build_mod/kcl_acpi.c common/lib/modules/fglrx/build_mod/kcl_acpi.c ---- common.old/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-27 13:32:34.734832283 +0100 -+++ common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-27 13:33:31.849831765 +0100 -@@ -1002,7 +1002,11 @@ - #endif - { - return KCL_ACPI_ERROR; -- } -+ } -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) -+ ((acpi_tbl_table_handler)handler)(hdr); -+#else - ((acpi_table_handler)handler)(hdr); -+#endif - return KCL_ACPI_OK; - } diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.6-linux-3.10-proc.diff b/x11-drivers/ati-userspace/files/ati-drivers-13.6-linux-3.10-proc.diff deleted file mode 100644 index bdb22eae..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-13.6-linux-3.10-proc.diff +++ /dev/null @@ -1,356 +0,0 @@ -diff --git a/common/lib/modules/fglrx/build_mod/drmP.h b/common/lib/modules/fglrx/build_mod/drmP.h -index 81546b2..4e74526 100755 ---- a/common/lib/modules/fglrx/build_mod/drmP.h -+++ b/common/lib/modules/fglrx/build_mod/drmP.h -@@ -901,10 +901,6 @@ int DRM(stub_register)(const char *name, - int DRM(stub_unregister)(int minor); - - /* Proc support (drm_proc.h) */ --extern struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, -- int minor, -- struct proc_dir_entry *root, -- struct proc_dir_entry **dev_root); - extern int DRM(proc_cleanup)(int minor, - struct proc_dir_entry *root, - struct proc_dir_entry *dev_root); -diff --git a/common/lib/modules/fglrx/build_mod/drm_proc.h b/common/lib/modules/fglrx/build_mod/drm_proc.h -index 1e3ab4a..c52ad7e 100755 ---- a/common/lib/modules/fglrx/build_mod/drm_proc.h -+++ b/common/lib/modules/fglrx/build_mod/drm_proc.h -@@ -75,61 +75,6 @@ struct drm_proc_list { - #define DRM_PROC_ENTRIES (sizeof(DRM(proc_list))/sizeof(DRM(proc_list)[0])) - - /** -- * Initialize the DRI proc filesystem for a device. -- * -- * \param dev DRM device. -- * \param minor device minor number. -- * \param root DRI proc dir entry. -- * \param dev_root resulting DRI device proc dir entry. -- * \return root entry pointer on success, or NULL on failure. -- * -- * Create the DRI proc root entry "/proc/ati", the device proc root entry -- * "/proc/ati/%minor%/", and each entry in proc_list as -- * "/proc/ati/%minor%/%name%". -- */ --struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, int minor, -- struct proc_dir_entry *root, -- struct proc_dir_entry **dev_root) --{ -- struct proc_dir_entry *ent; -- int i, j; -- char name[64]; -- -- if (!minor) root = create_proc_entry("dri", S_IFDIR, NULL); -- if (!root) { -- DRM_ERROR("Cannot create /proc/ati\n"); -- return NULL; -- } -- -- sprintf(name, "%d", minor); -- *dev_root = create_proc_entry(name, S_IFDIR, root); -- if (!*dev_root) { -- DRM_ERROR("Cannot create /proc/ati/%s\n", name); -- return NULL; -- } -- -- for (i = 0; i < DRM_PROC_ENTRIES; i++) { -- ent = create_proc_entry(DRM(proc_list)[i].name, -- S_IFREG|S_IRUGO, *dev_root); -- if (!ent) { -- DRM_ERROR("Cannot create /proc/ati/%s/%s\n", -- name, DRM(proc_list)[i].name); -- for (j = 0; j < i; j++) -- remove_proc_entry(DRM(proc_list)[i].name, -- *dev_root); -- remove_proc_entry(name, root); -- if (!minor) remove_proc_entry("dri", NULL); -- return NULL; -- } -- ent->read_proc = DRM(proc_list)[i].f; -- ent->data = dev; -- } -- -- return root; --} -- -- --/** - * Cleanup the proc filesystem resources. - * - * \param minor device minor number. -diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c -index d3ad3ce..890a0aa 100755 ---- a/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -583,6 +583,202 @@ kcl_proc_list_t KCL_PROC_FileList[] = - { "NULL", NULL, NULL} // Terminate List!!! - }; - -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) -+typedef int (read_proc_t)(char *page, char **start, off_t off, int count, int *eof, void *data); -+typedef int (write_proc_t)(struct file *file, const char __user *buffer, unsigned long count, void *data); -+#else -+#define PDE_DATA(inode) (PDE((inode))->data) -+#endif -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) -+typedef struct { -+ read_proc_t *read_func; -+ write_proc_t *write_func; -+ void *data; -+} gentoo_proc_wrapper_t; -+ -+#define GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC 939750305 -+ -+static ssize_t gentoo_proc_wrapper_read (struct file *myfile, char __user *buffer, size_t count, loff_t *offset) { -+ int is_eof=0, retval; -+ char *start, *usebuffer=NULL; -+ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data); -+ if (PAGE_SIZE<*offset) { -+ printk(KERN_ERR "Trying to read beyond 4k on proc\n"); -+ return -EIO; -+ } -+ //printk(KERN_NOTICE " call with: dev %p, func %p\n", wrapper_data->data, wrapper_data->read_func); -+ -+ usebuffer=kmalloc(2*PAGE_SIZE, GFP_KERNEL); -+ if (!usebuffer) -+ return -ENOMEM; -+ ((u32*)usebuffer)[1024]=GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC; -+ -+ retval=wrapper_data->read_func(usebuffer, &start, *offset, count, &is_eof, wrapper_data->data); -+ -+ BUG_ON(GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC != ((u32*)usebuffer)[1024]); -+ -+ if (0 > retval) -+ { -+ printk(KERN_ERR "Proc read failed with %d", retval); -+ goto out; -+ } -+ -+ if (copy_to_user(buffer, start, retval)) { -+ printk(KERN_NOTICE "copy to user failed in amd drivers proc code\n"); -+ retval=-EFAULT; -+ goto out; -+ } -+ *offset+=retval; -+ -+out: -+ if (usebuffer) -+ kfree(usebuffer); -+ return retval; -+} -+static ssize_t gentoo_proc_wrapper_write (struct file *myfile, const char __user *buffer, size_t count, loff_t *offset) { -+ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data); -+ int retval=0; -+ void *usebuffer=NULL; -+ -+ BUG_ON(*offset); -+ if (!wrapper_data->write_func) -+ return -EPERM; -+ -+ usebuffer=kmalloc(count, GFP_KERNEL); -+ if (!usebuffer) -+ return -ENOMEM; -+ if (copy_from_user(usebuffer, buffer, count)) { -+ printk(KERN_NOTICE "copy from user failed in amd drivers proc code\n"); -+ retval=-EFAULT; -+ goto out; -+ } -+ -+ retval=wrapper_data->write_func(myfile, buffer, count, wrapper_data->data); -+ *offset+=retval; -+out: -+ if (usebuffer) -+ kfree(usebuffer); -+ return retval; -+} -+static int gentoo_proc_wrapper_open(struct inode *myinode, struct file *myfile) { -+ myfile->private_data=PDE_DATA(myinode); -+ return generic_file_open(myinode, myfile); -+} -+struct file_operations gentoo_proc_fops = { -+ .read=gentoo_proc_wrapper_read, -+ .write=gentoo_proc_wrapper_write, -+ .open=gentoo_proc_wrapper_open, -+}; -+ -+static void *gentoo_proc_wrapper_data(read_proc_t *reader, write_proc_t *writer, void *mydata) { -+ gentoo_proc_wrapper_t *retval=kmalloc(sizeof(gentoo_proc_wrapper_t), GFP_KERNEL); -+ if (!retval) -+ return retval; -+ retval->read_func=reader; -+ retval->write_func=writer; -+ retval->data=mydata; -+ return retval; -+} -+ -+static struct proc_dir_entry *firegl_proc_init( device_t *dev, -+ int minor, -+ struct proc_dir_entry *root, -+ struct proc_dir_entry **dev_root, -+ kcl_proc_list_t *proc_list ) // proc_list must be terminated! -+{ -+ struct proc_dir_entry *ent; -+ char name[64]; -+ kcl_proc_list_t *list = proc_list; -+ void *tempdata; -+ KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list); -+ if (!minor) -+ { -+ root = proc_mkdir("ati", NULL); -+ } -+ -+ if (!root) -+ { -+ KCL_DEBUG_ERROR("Cannot create /proc/ati\n"); -+ return NULL; -+ } -+ -+ if (minor == 0) -+ { -+ // Global major debice number entry -+ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_major_proc_read, NULL, NULL); -+ if (!tempdata) -+ return NULL; -+ ent = proc_create_data("major", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata); -+ if (!ent) -+ { -+ remove_proc_entry("ati", NULL); -+ KCL_DEBUG_ERROR("Cannot create /proc/ati/major\n"); -+ return NULL; -+ } -+ } -+ -+ sprintf(name, "%d", minor); -+ *dev_root = proc_mkdir(name, root); -+ if (!*dev_root) { -+ remove_proc_entry("major", root); -+ remove_proc_entry("ati", NULL); -+ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s\n", name); -+ return NULL; -+ } -+ -+ while (list->f || list->fops) -+ { -+ struct file_operations *my_fops = &gentoo_proc_fops; -+ if (list->fops) -+ { -+ my_fops = (struct file_operations*)list->fops; -+ tempdata=(dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev); -+ } -+ else { -+ BUG_ON(!list->f); -+ tempdata=gentoo_proc_wrapper_data((read_proc_t*)list->f, NULL, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev) ); -+ if (!tempdata) -+ return NULL; -+ } -+ //printk(KERN_NOTICE "name %s, dev %p, func %p, data %p\n", list->name, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev), list->f, tempdata); -+ ent = proc_create_data(list->name, S_IFREG|S_IRUGO, *dev_root, my_fops, tempdata); -+ -+ if (!ent) -+ { -+ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s/%s\n", name, list->name); -+ while (proc_list != list) -+ { -+ remove_proc_entry(proc_list->name, *dev_root); -+ proc_list++; -+ } -+ remove_proc_entry(name, root); -+ if (!minor) -+ { -+ remove_proc_entry("major", root); -+ remove_proc_entry("ati", NULL); -+ } -+ return NULL; -+ } -+ -+ list++; -+ } -+ -+ if (minor == 0) -+ { -+ // Global debug entry, only create it once -+ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_debug_proc_read_wrap, (write_proc_t*)firegl_debug_proc_write_wrap, dev); -+ if (!tempdata) -+ return NULL; -+ ent=proc_create_data("debug", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata); -+ if (!ent) -+ return NULL; -+ } -+ -+ return root; -+} -+#else - static struct proc_dir_entry *firegl_proc_init( device_t *dev, - int minor, - struct proc_dir_entry *root, -@@ -677,6 +873,7 @@ static struct proc_dir_entry *firegl_proc_init( device_t *dev, - - return root; - } -+#endif - - static int firegl_proc_cleanup( int minor, - struct proc_dir_entry *root, -@@ -6135,59 +6332,4 @@ void ATI_API_CALL KCL_fpu_end(void) - kernel_fpu_end(); - } - --/** Create new directory entry under "/proc/ati/...." -- * Where -- * root_dir - Root directory. If NULL then we should use "/proc/ati" root. -- * name - Pointer to the name of directory -- * access - Access attribute. We could use it to disable access to the directory for everybody accept owner. -- * By default owner is root. -- * Return NULL if failure. Pointer to proc_dir_entry otherwise -- */ --void * KCL_create_proc_dir(void *root_dir, const char *name, unsigned int access) --{ -- struct proc_dir_entry *dir = NULL; -- -- if (root_dir == NULL) -- dir = create_proc_entry(name, S_IFDIR | access, firegl_stub_root); -- else -- dir = create_proc_entry(name, S_IFDIR | access, (struct proc_dir_entry *)root_dir); -- -- return dir; --} -- --/* Remove proc directory entry -- * root - Pointer to directory proc entry or NULL if for "/proc/ati" -- * name - Name to delete -- */ --void KCL_remove_proc_dir_entry(void *root, const char *name) --{ -- if (root == NULL) -- remove_proc_entry(name, firegl_stub_root); -- else -- remove_proc_entry(name, (struct proc_dir_entry *)root); --} -- -- --/* Create proc_entry under "root_dir" -- * read_fn - Function which will be called on read request -- * write_fn - Function which will be called on write request -- * private_data - Pointer to private data which will be passed -- */ --void KCL_create_proc_entry(void *root_dir, const char *name, unsigned int access_mode, void *read_fn, void *write_fn, void *private_data) --{ -- struct proc_dir_entry *ent = NULL; -- -- if (root_dir == NULL || name == NULL) -- return; -- -- ent = create_proc_entry(name, access_mode, (struct proc_dir_entry *)root_dir); -- -- if (ent) -- { -- ent->read_proc = (read_proc_t *)read_fn; -- ent->write_proc = (write_proc_t *)write_fn; -- ent->data = private_data; -- } --} -- - #endif /* __KERNEL__ */ diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.8-beta-include-seq_file.patch b/x11-drivers/ati-userspace/files/ati-drivers-13.8-beta-include-seq_file.patch deleted file mode 100644 index fb1ba17e..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-13.8-beta-include-seq_file.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c -index 22561c5..fdfe65e 100755 ---- a/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -520,6 +520,8 @@ static int func##_wrap(char *buf, char **start, kcl_off_t offset, \ - } - - #else -+#include <linux/seq_file.h> -+ - #define READ_PROC_WRAP(func) \ - static int func##_wrap(struct seq_file *m, void* data) \ - { \ diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.8-mesa-9.2-debug.patch b/x11-drivers/ati-userspace/files/ati-drivers-13.8-mesa-9.2-debug.patch deleted file mode 100644 index 8a15e0af..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-13.8-mesa-9.2-debug.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- work.orig/common/usr/include/GL/glATI.h -+++ work/common/usr/include/GL/glATI.h -@@ -6006,6 +6006,7 @@ typedef GLvoid (APIENTRY * PFNGLDEBUGMES - typedef GLvoid (APIENTRY * PFNGLDEBUGMESSAGECALLBACKARB)(GLvoid* callback, GLvoid* userParam); - typedef GLuint (APIENTRY * PFNGLGETDEBUGMESSAGELOGARB)(GLuint count, GLsizei bufsize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog); - -+#if 0 - typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source, - GLenum type, - GLuint id, -@@ -6014,6 +6015,7 @@ typedef void (APIENTRY *GLDEBUGPROCARB)( - const GLchar* message, - GLvoid* userParam); - // end ARB_debug_output -+#endif - - - /* ARB_debug_group (KHR_debug) */ diff --git a/x11-drivers/ati-userspace/files/ati-drivers-13.8-proc-permissions.diff b/x11-drivers/ati-userspace/files/ati-drivers-13.8-proc-permissions.diff deleted file mode 100644 index 26015f41..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-13.8-proc-permissions.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c -index 22561c5..6480d1a 100755 ---- a/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -821,7 +821,7 @@ static struct proc_dir_entry *firegl_proc_init( device_t *dev, - KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list); - if (!minor) - { -- root = KCL_create_proc_dir(NULL, "ati", S_IFDIR); -+ root = KCL_create_proc_dir(NULL, "ati", S_IFDIR|S_IRUGO|S_IXUGO); - } - - if (!root) diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.33.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.33.patch deleted file mode 100644 index 85f9aff7..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-2.6.33.patch +++ /dev/null @@ -1,140 +0,0 @@ ---- work.orig/common/lib/modules/fglrx/build_mod/drmP.h -+++ work/common/lib/modules/fglrx/build_mod/drmP.h -@@ -42,7 +42,11 @@ - * can build the DRM (part of PI DRI). 4/21/2000 S + B */ - #include <asm/current.h> - #endif /* __alpha__ */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/autoconf.h> -+#else - #include <linux/autoconf.h> -+#endif - #include <linux/module.h> - #include <linux/kernel.h> - #include <linux/miscdevice.h> ---- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ work/common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -28,7 +28,11 @@ - #error Kernel versions older than 2.6.0 are no longer supported by this module. - #endif - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/autoconf.h> -+#else - #include <linux/autoconf.h> -+#endif - - #if !defined(CONFIG_X86) - #if !defined(CONFIG_X86_PC) -@@ -163,8 +167,12 @@ - - // For 2.6.18 or higher, the UTS_RELEASE is defined in the linux/utsrelease.h. - #ifndef UTS_RELEASE -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/utsrelease.h> -+#else - #include <linux/utsrelease.h> - #endif -+#endif - - #if defined(__i386__) - #ifndef do_div ---- work.orig/common/lib/modules/fglrx/build_mod/kcl_acpi.c -+++ work/common/lib/modules/fglrx/build_mod/kcl_acpi.c -@@ -15,7 +15,11 @@ - ****************************************************************************/ - - #include <linux/version.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/autoconf.h> -+#else - #include <linux/autoconf.h> -+#endif - #include <linux/acpi.h> - - #include "kcl_config.h" ---- work.orig/common/lib/modules/fglrx/build_mod/kcl_agp.c -+++ work/common/lib/modules/fglrx/build_mod/kcl_agp.c -@@ -31,7 +31,11 @@ - */ - - #include <linux/version.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/autoconf.h> -+#else - #include <linux/autoconf.h> -+#endif - #include <linux/pci.h> - #include <linux/agp_backend.h> - #include <linux/string.h> ---- work.orig/common/lib/modules/fglrx/build_mod/kcl_io.c -+++ work/common/lib/modules/fglrx/build_mod/kcl_io.c -@@ -37,7 +37,11 @@ - */ - - #include <linux/version.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/autoconf.h> -+#else - #include <linux/autoconf.h> -+#endif - #include <linux/poll.h> - #include <linux/signal.h> - #include <asm/io.h> ---- work.orig/common/lib/modules/fglrx/build_mod/kcl_osconfig.h -+++ work/common/lib/modules/fglrx/build_mod/kcl_osconfig.h -@@ -20,7 +20,11 @@ - #define KCL_OSCONFIG_H - - #include <linux/version.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/autoconf.h> -+#else - #include <linux/autoconf.h> -+#endif - - // Choose modern way to call 32-on-64 IOCTLs if configured in the kernel - #if defined(CONFIG_COMPAT) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) ---- work.orig/common/lib/modules/fglrx/build_mod/kcl_pci.c -+++ work/common/lib/modules/fglrx/build_mod/kcl_pci.c -@@ -31,7 +31,11 @@ - */ - - #include <linux/version.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/autoconf.h> -+#else - #include <linux/autoconf.h> -+#endif - #include <linux/pci.h> - - #include "kcl_config.h" ---- work.orig/common/lib/modules/fglrx/build_mod/kcl_str.c -+++ work/common/lib/modules/fglrx/build_mod/kcl_str.c -@@ -30,7 +30,12 @@ - * - */ - -+#include <linux/version.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/autoconf.h> -+#else - #include <linux/autoconf.h> -+#endif - #include <linux/string.h> - #include <linux/module.h> - ---- work.orig/common/lib/modules/fglrx/build_mod/kcl_wait.c -+++ work/common/lib/modules/fglrx/build_mod/kcl_wait.c -@@ -31,7 +31,11 @@ - */ - - #include <linux/version.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include <generated/autoconf.h> -+#else - #include <linux/autoconf.h> -+#endif - #include <linux/wait.h> - #include <linux/highmem.h> - #include <linux/sched.h> diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.34.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.34.patch deleted file mode 100644 index 1993d134..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-2.6.34.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- work.orig/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 20:02:46.494496561 +0200 -+++ work/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 19:52:00.054563389 +0200 -@@ -39,6 +39,7 @@ - #include <linux/wait.h> - #include <linux/highmem.h> - #include <linux/sched.h> -+#include <linux/slab.h> - - #include "kcl_config.h" - #include "kcl_wait.h" diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.35-and-newer.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.35-and-newer.patch deleted file mode 100644 index e1703f34..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-2.6.35-and-newer.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- work.orig/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-19 11:45:04.922760268 +0200 -+++ work/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-19 12:04:29.092812959 +0200 -@@ -193,7 +193,7 @@ void ATI_API_CALL KCL_IOCTL_UnregisterCo - */ - void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size) - { -- return compat_alloc_user_space(size); -+ return arch_compat_alloc_user_space(size); - } - - #endif // __x86_64__ diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.36.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.36.patch deleted file mode 100644 index 5f8f5845..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-2.6.36.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 21:51:48.000000000 +0200 -+++ work/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 23:46:37.000000000 +0200 -@@ -320,7 +320,11 @@ - return firegl_release((KCL_IO_FILE_Handle)filp); - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+int ip_firegl_ioctl(struct file* filp, unsigned int cmd, unsigned long arg) -+#else - int ip_firegl_ioctl(struct inode* inode, struct file* filp, unsigned int cmd, unsigned long arg) -+#endif - { - return firegl_ioctl((KCL_IO_FILE_Handle)filp, cmd, arg); - } -@@ -407,7 +411,11 @@ - #endif - open: ip_firegl_open, - release: ip_firegl_release, -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ unlocked_ioctl: ip_firegl_ioctl, -+#else - ioctl: ip_firegl_ioctl, -+#endif - mmap: ip_firegl_mmap, - - write: ip_firegl_write, diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.37.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.37.patch deleted file mode 100644 index 75522b41..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-2.6.37.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 21:51:48.000000000 +0200 -+++ work/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 23:46:37.000000000 +0200 -@@ -5094,7 +5094,7 @@ - unsigned int ATI_API_CALL KAS_Mutex_Initialize(void* hMutex) - { - kasMutex_t* mutex_obj = (kasMutex_t*)hMutex; -- init_MUTEX(&(mutex_obj->mutex)); -+ sema_init(&(mutex_obj->mutex),1); - return 1; - } - diff --git a/x11-drivers/ati-userspace/files/ati-drivers-2.6.38.patch b/x11-drivers/ati-userspace/files/ati-drivers-2.6.38.patch deleted file mode 100644 index 1ecafece..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-2.6.38.patch +++ /dev/null @@ -1,59 +0,0 @@ -Description: Add Linux 2.6.38 support - The following commit renamed acquire_console_sem to console_lock and - release_console_sem to console_unlock on the Linux kernel: - http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff -Author: Miguel Colon <debian.micove@gmail.com> -Forwarded: no -Last-Update: 2011-02-01 - ---- fglrx-driver-11-1.orig/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ fglrx-driver-11-1/common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -850,7 +850,12 @@ static int fglrx_pci_suspend(struct pci_ - * happen much less frequent then without this workaround. - */ - if (state == PM_EVENT_SUSPEND) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) -+ console_lock(); -+#else - acquire_console_sem(); -+#endif -+ - - if (firegl_cail_powerdown(privdev, state)) - ret = -EIO; -@@ -872,7 +877,11 @@ static int fglrx_pci_suspend(struct pci_ - } - - if (state == PM_EVENT_SUSPEND) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) -+ console_unlock(); -+#else - release_console_sem(); -+#endif - - KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, ret, NULL); - -@@ -896,7 +905,11 @@ static int fglrx_pci_resume(struct pci_d - if (PMSG_EVENT(pdev->dev.power.power_state) == 0) return 0; - - if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) -+ console_lock(); -+#else - acquire_console_sem(); -+#endif - - #ifdef FIREGL_USWC_SUPPORT - // Restore the PAT after resuming from S3 or S4. -@@ -921,7 +934,11 @@ static int fglrx_pci_resume(struct pci_d - firegl_cail_powerup(privdev); - - if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) -+ console_unlock(); -+#else - release_console_sem(); -+#endif - - PMSG_EVENT(pdev->dev.power.power_state) = 0; - KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, 0, NULL); diff --git a/x11-drivers/ati-userspace/files/ati-drivers-CVE-2010-3081-fix.patch b/x11-drivers/ati-userspace/files/ati-drivers-CVE-2010-3081-fix.patch deleted file mode 100644 index 5a71da10..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-CVE-2010-3081-fix.patch +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** - * * - * Copyright 1999-2005 ATI Technologies Inc., Markham, Ontario, CANADA. * - * All Rights Reserved. * - * * - * Your use and or redistribution of this software in source and \ or * - * binary form, with or without modification, is subject to: (i) your * - * ongoing acceptance of and compliance with the terms and conditions of * - * the ATI Technologies Inc. software End User License Agreement; and (ii) * - * your inclusion of this notice in any version of this software that you * - * use or redistribute. A copy of the ATI Technologies Inc. software End * - * User License Agreement is included with this software and is also * - * available by contacting ATI Technologies Inc. at http://www.ati.com * - * * - ****************************************************************************/ - ---- common/lib/modules/fglrx/build_mod/kcl_ioctl.c.orig 2010-09-01 16:05:31.000000000 +0200 -+++ common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-23 01:41:46.711844303 +0200 -@@ -35,6 +35,9 @@ - - #ifdef __x86_64__ - # include "asm/compat.h" -+# if ARCH_COMPAT_ALLOC_USER_SPACE -+# include "linux/compat.h" -+# endif - # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) - # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) - # include "linux/ioctl32.h" -@@ -193,7 +196,20 @@ - */ - void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size) - { -- return compat_alloc_user_space(size); -+ void __user *ptr; -+ -+ /* If size would occupy more than half of the entire compat space... */ -+ if (unlikely(size > (((compat_uptr_t)~0) >> 1))) -+ return NULL; -+#if ARCH_COMPAT_ALLOC_USER_SPACE -+ ptr = arch_compat_alloc_user_space(size); -+#else -+ ptr = compat_alloc_user_space(size); -+#endif -+ if (unlikely(!access_ok(VERIFY_WRITE, ptr, size))) -+ return NULL; -+ -+ return ptr; - } - - #endif // __x86_64__ ---- common/lib/modules/fglrx/build_mod/2.6.x/Makefile.orig 2010-09-01 16:05:31.000000000 +0200 -+++ common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-09-23 01:47:46.533415019 +0200 -@@ -66,6 +66,7 @@ - -DFGL_GART_RESERVED_SLOT \ - -DFGL_LINUX253P1_VMA_API \ - -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \ -+ -DARCH_COMPAT_ALLOC_USER_SPACE=$(ARCH_COMPAT_ALLOC_USER_SPACE) \ - - ifeq ($(KERNELRELEASE),) - # on first call from remote location we get into this path diff --git a/x11-drivers/ati-userspace/files/ati-drivers-do_mmap.patch b/x11-drivers/ati-userspace/files/ati-drivers-do_mmap.patch deleted file mode 100644 index 04248eb7..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-do_mmap.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-15 18:30:13.483762070 +0200 -+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-17 17:47:36.543041869 +0200 -@@ -2106,6 +2106,12 @@ - } - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) -+# define NO_DO_MMAP -+# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f) -+# define do_munmap(a,b,c) vm_munmap(b, c) -+#endif -+ - unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval( - KCL_IO_FILE_Handle file, - unsigned long addr, -@@ -2117,10 +2123,13 @@ - - flags = MAP_SHARED; - prot = PROT_READ|PROT_WRITE; -- -+#ifdef NO_DO_MMAP -+ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff); -+#else - down_write(¤t->mm->mmap_sem); - vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff); - up_write(¤t->mm->mmap_sem); -+#endif - if (IS_ERR(vaddr)) - return 0; - else -@@ -2131,7 +2140,9 @@ - { - int retcode = 0; - -+#ifndef NO_DO_MMAP - down_write(¤t->mm->mmap_sem); -+#endif - #ifdef FGL_LINUX_RHEL_MUNMAP_API - retcode = do_munmap(current->mm, - addr, -@@ -2142,7 +2153,9 @@ - addr, - len); - #endif -+#ifndef NO_DO_MMAP - up_write(¤t->mm->mmap_sem); -+#endif - return retcode; - } - diff --git a/x11-drivers/ati-userspace/files/ati-drivers-fix_compilation-bug-297322.patch b/x11-drivers/ati-userspace/files/ati-drivers-fix_compilation-bug-297322.patch deleted file mode 100644 index e2af915a..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-fix_compilation-bug-297322.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- common/lib/modules/fglrx/build_mod/firegl_public.c -+++ common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -1441,7 +1441,9 @@ - todo !!! - #endif - --unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, -+void __cmpxchg_wrong_size(void) {} -+ -+unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, - unsigned long new, int size) - { - #ifndef __HAVE_ARCH_CMPXCHG ---- common/lib/modules/fglrx/build_mod/firegl_public.h -+++ common/lib/modules/fglrx/build_mod/firegl_public.h -@@ -441,7 +441,8 @@ - extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask); - extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void); - --extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, -+extern void __cmpxchg_wrong_size(void); -+extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, - unsigned long new, int size); - - #define __ke_cmpxchg(ptr,o,n) \ diff --git a/x11-drivers/ati-userspace/files/ati-drivers-kernel-3.8-acpihandle.patch b/x11-drivers/ati-userspace/files/ati-drivers-kernel-3.8-acpihandle.patch deleted file mode 100644 index bdff4fb7..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-kernel-3.8-acpihandle.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- common/lib/modules/fglrx/build_mod/kcl_acpi.c 2012-07-04 21:43:47.000000000 +0200 -+++ common/lib/modules/fglrx/build_mod/kcl_acpi.c.new 2012-12-23 11:25:38.000000000 +0100 -@@ -775,11 +775,7 @@ - unsigned int ATI_API_CALL KCL_ACPI_GetHandles(kcl_match_info_t *pInfo) - { - #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12) -- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19) -- pInfo->video_handle = pInfo->pcidev->dev.archdata.acpi_handle; -- #else -- pInfo->video_handle = pInfo->pcidev->dev.firmware_data; -- #endif -+ pInfo->video_handle = DEVICE_ACPI_HANDLE(&pInfo->pcidev->dev); - if ( pInfo->video_handle && - (KCL_ACPI_videoDevice(pInfo->video_handle) != KCL_ACPI_OK) ) - { diff --git a/x11-drivers/ati-userspace/files/ati-drivers-old_rsp.patch b/x11-drivers/ati-userspace/files/ati-drivers-old_rsp.patch deleted file mode 100644 index 0456bd6b..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-old_rsp.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:33:25.044695179 +0200
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:28:39.692699095 +0200
-@@ -4154,7 +4154,7 @@
- {
- unsigned int p;
- KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
-- for_each_cpu_mask(p, cpu_possible_map)
-+ for_each_possible_cpu(p)
- {
- KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);
- preempt_disable();
---- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200
-+++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200
-@@ -217,6 +217,10 @@
- * \param size [in] Number of bytes to allocate
- * \return Pointer to allocated memory
- */
-+#ifndef CONFIG_X86_X32
-+DEFINE_PER_CPU(unsigned long, old_rsp);
-+#endif
-+
- void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
- {
- void __user *ret = COMPAT_ALLOC_USER_SPACE(size);
\ No newline at end of file diff --git a/x11-drivers/ati-userspace/files/ati-drivers-vm-reserverd.patch b/x11-drivers/ati-userspace/files/ati-drivers-vm-reserverd.patch deleted file mode 100644 index 08045a65..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-vm-reserverd.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- common/lib/modules/fglrx/build_mod/firegl_public.c 2012-10-18 00:29:21.778369464 +0200 -+++ common/lib/modules/fglrx/build_mod/firegl_public.c.new 2012-10-18 00:30:39.647416026 +0200 -@@ -222,6 +222,10 @@ - #define preempt_enable() - #endif - -+#ifndef VM_RESERVED -+#define VM_RESERVED (VM_DONTEXPAND | VM_DONTDUMP) -+#endif -+ - // ============================================================ - /* globals */ diff --git a/x11-drivers/ati-userspace/files/ati-drivers-x32_something_something.patch b/x11-drivers/ati-userspace/files/ati-drivers-x32_something_something.patch deleted file mode 100644 index d37c1191..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-x32_something_something.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200 -+++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200 -@@ -217,6 +217,10 @@ - * \param size [in] Number of bytes to allocate - * \return Pointer to allocated memory - */ -+#ifndef CONFIG_X86_X32 -+DEFINE_PER_CPU(unsigned long, old_rsp); -+#endif -+ - void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size) - { - void __user *ret = COMPAT_ALLOC_USER_SPACE(size); diff --git a/x11-drivers/ati-userspace/files/ati-drivers-xen.patch b/x11-drivers/ati-userspace/files/ati-drivers-xen.patch deleted file mode 100644 index a1b88df7..00000000 --- a/x11-drivers/ati-userspace/files/ati-drivers-xen.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- common/lib/modules/fglrx/build_mod/firegl_public.c 2008-12-09 15:17:27.000000000 +0000 -+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2008-12-09 15:12:34.000000000 +0000 -@@ -31,6 +31,9 @@ - #include <linux/autoconf.h> - - #if !defined(CONFIG_X86_PC) -+#if !defined(CONFIG_X86_PC_XEN) -+#if !defined(CONFIG_X86_XEN) -+#if !defined(CONFIG_X86_64_XEN) - #if !defined(CONFIG_X86_64) - #if !defined(CONFIG_X86_VOYAGER) - #if !defined(CONFIG_X86_NUMAQ) -@@ -47,6 +50,9 @@ - #endif - #endif - #endif -+#endif -+#endif -+#endif - - /* The dirty-page-tracking patch included in NLD 9 SMP kernels defines - * a static inline function that uses a GPL-only symbol in a header ---- common/lib/modules/fglrx/build_mod/firegl_public.h 2008-12-09 15:17:27.000000000 +0000 -+++ common/lib/modules/fglrx/build_mod/firegl_public.h 2008-12-09 15:15:45.000000000 +0000 -@@ -30,9 +30,13 @@ - #endif - - #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) -- -+#ifdef CONFIG_XEN -+#define REMAP_PAGE_RANGE_FN io_remap_pfn_range -+#define REMAP_PAGE_RANGE_STR "io_remap_pfn_range" -+#else - #define REMAP_PAGE_RANGE_FN remap_pfn_range - #define REMAP_PAGE_RANGE_STR "remap_pfn_range" -+#endif - #define REMAP_PAGE_RANGE_OFF(offset) ((offset) >> PAGE_SHIFT) - - #else /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,9) */ -@@ -43,13 +47,21 @@ - - #endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) */ - -+#ifdef CONFIG_XEN -+#define REMAP_PAGE_RANGE(vma,offset) \ -+ REMAP_PAGE_RANGE_FN((vma), \ -+ (vma)->vm_start, \ -+ REMAP_PAGE_RANGE_OFF(offset), \ -+ (vma)->vm_end - (vma)->vm_start, \ -+ (vma)->vm_page_prot) -+#else - #define REMAP_PAGE_RANGE(vma,offset) \ - REMAP_PAGE_RANGE_FN(FGL_VMA_API_PASS \ - (vma)->vm_start, \ - REMAP_PAGE_RANGE_OFF(offset), \ - (vma)->vm_end - (vma)->vm_start, \ - (vma)->vm_page_prot) -- -+#endif - - /* Page table macros */ - diff --git a/x11-drivers/ati-userspace/files/ati-powermode-opt-path-2.patch b/x11-drivers/ati-userspace/files/ati-powermode-opt-path-2.patch deleted file mode 100644 index f5a35a30..00000000 --- a/x11-drivers/ati-userspace/files/ati-powermode-opt-path-2.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -ur common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh ---- common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-07-28 04:22:36.000000000 +0100 -+++ common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-08-04 12:19:42.000000000 +0100 -@@ -4,6 +4,8 @@ - # Control script for ACPI lid state and AC adapter state - # - -+aticonfig='/opt/bin/aticonfig' -+ - getXuser() { - user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'` - if [ x"$user" = x"" ]; then -@@ -47,7 +49,7 @@ - done - - #If PPLIB is enabled --su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB -+su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB - if [ $? = 0 ]; then - echo "Has PPLIB" - has_pplib=1 -@@ -61,15 +63,15 @@ - if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then - echo "Low power" - if [ ${has_pplib} -eq 1 ]; then -- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"' -+ su $user -c '$aticonfig --pplib-cmd="notify psrc dc"' - else -- su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now" -+ su $user -c "$aticonfig --set-powerstate=1" - fi - else - echo "high power" - if [ ${has_pplib} -eq 1 ]; then -- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"' -+ su $user -c '$aticonfig --pplib-cmd="notify psrc ac"' - else -- su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now" -+ su $user -c "$aticonfig --set-powerstate=$($aticonfig --lsp | grep 'default state' | cut -c 3)" - fi - fi - diff --git a/x11-drivers/ati-userspace/files/ati-powermode-opt-path-3.patch b/x11-drivers/ati-userspace/files/ati-powermode-opt-path-3.patch deleted file mode 100644 index 106e67ee..00000000 --- a/x11-drivers/ati-userspace/files/ati-powermode-opt-path-3.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2012-08-17 22:39:05.077984979 +0800 -+++ b/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2012-08-17 22:41:15.919976149 +0800 -@@ -4,6 +4,8 @@ - # Control script for ACPI lid state and AC adapter state - # - -+aticonfig='/opt/bin/aticonfig' -+ - getXuser() { - user=`who| grep -m1 ":$displaynum " | awk '{print $1}'` - if [ x"$user" = x"" ]; then -@@ -47,7 +49,7 @@ - done - - #If PPLIB is enabled --su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB -+su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB - if [ $? = 0 ]; then - echo "Has PPLIB" - has_pplib=1 -@@ -61,15 +63,15 @@ - if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then - echo "Low power" - if [ ${has_pplib} -eq 1 ]; then -- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"' -+ su $user -c '$aticonfig --pplib-cmd="notify psrc dc"' - else -- su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now" -+ su $user -c "$aticonfig --set-powerstate=1 --effective=now" - fi - else - echo "high power" - if [ ${has_pplib} -eq 1 ]; then -- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"' -+ su $user -c '$aticonfig --pplib-cmd="notify psrc ac"' - else -- su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now" -+ su $user -c "$aticonfig --set-powerstate=3 --effective=now" - fi - fi diff --git a/x11-drivers/ati-userspace/files/atieventsd.init b/x11-drivers/ati-userspace/files/atieventsd.init deleted file mode 100644 index 73139ce3..00000000 --- a/x11-drivers/ati-userspace/files/atieventsd.init +++ /dev/null @@ -1,20 +0,0 @@ -#!/sbin/runscript -# 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/files/atieventsd.init,v 1.3 2007/05/18 23:58:01 marienz Exp $ - -depend() { - need acpid -} - -start() { - ebegin "Starting ${SVCNAME}" - start-stop-daemon --start --exec /opt/sbin/atieventsd -- ${ATIEVENTSDOPTS} - eend $? -} - -stop() { - ebegin "Stopping ${SVCNAME}" - start-stop-daemon --stop --quiet --exec /opt/sbin/atieventsd - eend $? -}
\ No newline at end of file diff --git a/x11-drivers/ati-userspace/files/check-for-iommu-only-if-iommu-is-supported.patch b/x11-drivers/ati-userspace/files/check-for-iommu-only-if-iommu-is-supported.patch deleted file mode 100644 index 79324873..00000000 --- a/x11-drivers/ati-userspace/files/check-for-iommu-only-if-iommu-is-supported.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1633d55aa0fb9c2ceb0ae1eab15bdec5066d35ae Mon Sep 17 00:00:00 2001 -From: Emil Karlson <jekarlson@gmail.com> -Date: Fri, 2 Aug 2013 01:18:41 +0300 -Subject: [PATCH 1/3] Check for iommu only, if iommu is supported. - ---- - common/lib/modules/fglrx/build_mod/kcl_iommu.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/common/lib/modules/fglrx/build_mod/kcl_iommu.c b/common/lib/modules/fglrx/build_mod/kcl_iommu.c -index c6602dd..803455c 100755 ---- a/common/lib/modules/fglrx/build_mod/kcl_iommu.c -+++ b/common/lib/modules/fglrx/build_mod/kcl_iommu.c -@@ -183,11 +183,13 @@ void ATI_API_CALL KCL_IOMMU_UnbindPasid( KCL_PCI_DevHandle pcidev,int pasid) - */ - int ATI_API_CALL KCL_IOMMU_CheckInfo( KCL_PCI_DevHandle pcidev) - { -+#if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU) - struct pci_dev* pdev = (struct pci_dev*)pcidev; -- if ( pdev->dev.archdata.iommu ) -+ if ( pdev->dev.archdata.iommu ) - { - return 1; - } -+#endif - return 0; - } - --- -1.8.1.5 - diff --git a/x11-drivers/ati-userspace/files/const-notifier-block.patch b/x11-drivers/ati-userspace/files/const-notifier-block.patch deleted file mode 100644 index ba1fdb2b..00000000 --- a/x11-drivers/ati-userspace/files/const-notifier-block.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Nur common/lib/modules/fglrx/build_mod/kcl_acpi.c common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c ---- common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-01-29 17:03:51.000000000 +0200 -+++ common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-02-15 20:33:10.611838616 +0200 -@@ -15,6 +15,9 @@ - ****************************************************************************/ - - #include <linux/version.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) -+#include <linux/notifier.h> -+#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) - #include <generated/autoconf.h> - #else -@@ -145,7 +148,11 @@ - return NOTIFY_OK; - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) -+static notifier_block_no_const firegl_acpi_lid_notifier = { -+#else - static struct notifier_block firegl_acpi_lid_notifier = { -+#endif - .notifier_call = firegl_acpi_lid_event, - }; - #endif diff --git a/x11-drivers/ati-userspace/files/fgl_glxgears-do-not-include-glATI.patch b/x11-drivers/ati-userspace/files/fgl_glxgears-do-not-include-glATI.patch deleted file mode 100644 index d46e027c..00000000 --- a/x11-drivers/ati-userspace/files/fgl_glxgears-do-not-include-glATI.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur extra/fgl_glxgears/fgl_glxgears.c extra-r1/fgl_glxgears/fgl_glxgears.c ---- extra/fgl_glxgears/fgl_glxgears.c 2012-08-29 09:59:03.000000000 +0300 -+++ extra-r1/fgl_glxgears/fgl_glxgears.c 2013-09-07 09:26:11.034723135 +0300 -@@ -78,7 +78,6 @@ - #endif // _WIN32 - - #define INT_PTR ptrdiff_t --#include <GL/glATI.h> - - #ifdef _WIN32 - #include <GL/wglATI.h> diff --git a/x11-drivers/ati-userspace/files/fix-the-linux-3.17-no_hotplug-error.patch b/x11-drivers/ati-userspace/files/fix-the-linux-3.17-no_hotplug-error.patch deleted file mode 100644 index a8b54625..00000000 --- a/x11-drivers/ati-userspace/files/fix-the-linux-3.17-no_hotplug-error.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- common/lib/modules/fglrx/build_mod/kcl_acpi.c.orig 2014-07-11 11:46:19.000000000 +0200 -+++ common/lib/modules/fglrx/build_mod/kcl_acpi.c 2014-10-08 15:12:55.535638391 +0200 -@@ -829,6 +829,7 @@ - - static acpi_status KCL_ACPI_Slot_No_Hotplug(KCL_ACPI_DevHandle handle, u32 lvl, void *data, void **rv) - { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,7) - struct acpi_device *tdev; - struct pci_dev *pdev = (struct pci_dev *)data; -@@ -844,6 +845,7 @@ - } - } - #endif -+#endif - return 0; - } - diff --git a/x11-drivers/ati-userspace/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch b/x11-drivers/ati-userspace/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch deleted file mode 100644 index 1d4e030b..00000000 --- a/x11-drivers/ati-userspace/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- common/lib/modules/fglrx/build_mod/firegl_public.c.orig 2009-09-10 20:14:10.302938534 +0200 -+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2009-09-10 20:16:21.828943780 +0200 -@@ -183,6 +183,7 @@ - #include <linux/string.h> - #include <linux/gfp.h> - #include <linux/swap.h> -+#include <linux/pid.h> - - #include "firegl_public.h" - #include "kcl_osconfig.h" -@@ -1315,7 +1316,7 @@ - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) - p = find_task_by_pid( pid ); - #else -- p = find_task_by_vpid( pid ); -+ p = pid_task( pid, PIDTYPE_PID ); - #endif - if (p) - { diff --git a/x11-drivers/ati-userspace/files/kernel/2.6.32-9.11-fix_compilation.patch b/x11-drivers/ati-userspace/files/kernel/2.6.32-9.11-fix_compilation.patch deleted file mode 100644 index 38519d76..00000000 --- a/x11-drivers/ati-userspace/files/kernel/2.6.32-9.11-fix_compilation.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- work/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ work.new/common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -1441,7 +1441,9 @@ - todo !!! - #endif - --unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, -+void __cmpxchg_wrong_size(void) {} -+ -+unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, - unsigned long new, int size) - { - #ifndef __HAVE_ARCH_CMPXCHG ---- work/common/lib/modules/fglrx/build_mod/firegl_public.h -+++ work.new/common/lib/modules/fglrx/build_mod/firegl_public.h -@@ -441,7 +441,8 @@ - extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask); - extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void); - --extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old, -+extern void __cmpxchg_wrong_size(void); -+extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old, - unsigned long new, int size); - - #define __ke_cmpxchg(ptr,o,n) \ ---- work/common/lib/modules/fglrx/build_mod/kcl_io.c -+++ work.new/common/lib/modules/fglrx/build_mod/kcl_io.c -@@ -37,8 +37,9 @@ - */ - - #include <linux/version.h> - #include <linux/autoconf.h> - #include <linux/poll.h> -+#include <linux/signal.h> - #include <asm/io.h> - - #include "kcl_config.h" diff --git a/x11-drivers/ati-userspace/files/switchlibGL b/x11-drivers/ati-userspace/files/switchlibGL deleted file mode 100644 index a6aa4fce..00000000 --- a/x11-drivers/ati-userspace/files/switchlibGL +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -# switchlibGL -# -# Copyright (c) 2011 Advanced Micro Devices, Inc. -# -# Purpose: -# For switch between AMD and Intel graphic driver library. -# -# Usage: -# switchlibGL amd|intel|query -# amd: switches to the AMD version of libGL. -# intel: switches to the open-source version of libGL . -# query: checks, which version is currently active and prints either "amd" -# or "intel" or "unknown" on the standard output. -# must be root to execute this script - -ARCH=`uname -m` -E_ERR=1 - -# Check if root -if [ "`whoami`" != "root" ]; then - echo "Must be root to run this script." 1>&2 - exit $E_ERR -fi - -# One parameter -if [ $# -ne 1 ]; then - echo "Usage: `basename $0` amd|intel|query " 1>&2 - echo "Please choose one parameter " 1>&2 - exit $E_ERR -fi - -current=$(eselect opengl show) -# Switch to right mode -case "$1" in - "amd" ) - if [ $current != ati ] ; then - eselect opengl set ati || return 1 - fi - ;; - "intel" ) - if [ $current != xorg-x11 ] ; then - eselect opengl set xorg-x11 || return 1 - fi - ;; - "query" ) - case "$current" in - "ati" ) - echo "amd" - ;; - "xorg-x11" ) - echo "intel" - ;; - esac - ;; - * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;; - # other than amd|intel|query parameter report an error -esac - -# A zero return value from the script upon exit indicates success. -exit 0 diff --git a/x11-drivers/ati-userspace/files/typesafe-kuid.diff b/x11-drivers/ati-userspace/files/typesafe-kuid.diff deleted file mode 100644 index c226ea3d..00000000 --- a/x11-drivers/ati-userspace/files/typesafe-kuid.diff +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c -index d3ad3ce..9362b58 100755 ---- a/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -34,6 +34,11 @@ - #include <linux/autoconf.h> - #endif - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) -+#include <linux/uidgid.h> -+#endif -+ -+ - #if !defined(CONFIG_X86) - #if !defined(CONFIG_X86_PC) - #if !defined(CONFIG_X86_XEN) -@@ -1543,9 +1548,17 @@ KCL_TYPE_Pid ATI_API_CALL KCL_GetTgid(void) - KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void) - { - #ifdef current_euid -+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) -+ return __kuid_val(current_euid()); -+# else - return current_euid(); -+# endif - #else -+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) -+ return __kuid_val(current->euid); -+# else - return current->euid; -+# endif - #endif - } - diff --git a/x11-drivers/ati-userspace/files/use-kernel_fpu_begin.patch b/x11-drivers/ati-userspace/files/use-kernel_fpu_begin.patch deleted file mode 100644 index f0ba2785..00000000 --- a/x11-drivers/ati-userspace/files/use-kernel_fpu_begin.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c ---- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-10-27 23:30:58.630304842 +0200 -+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-10-27 23:32:57.300306011 +0200 -@@ -6389,7 +6389,7 @@ - */ - void ATI_API_CALL KCL_fpu_begin(void) - { --#ifdef CONFIG_X86_64 -+#if defined(CONFIG_X86_64) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) - kernel_fpu_begin(); - #else - #ifdef TS_USEDFPU |