summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-07-28 14:42:11 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2009-07-28 14:42:11 +0000
commitbed62a3a517533e6b3cb5400ed957116cd0dff00 (patch)
tree5c2640d9520524d9f6396046c6021b8305f48da8 /x11-drivers
parentMask old ati-drivers. 8.XXX. (diff)
downloadhistorical-bed62a3a517533e6b3cb5400ed957116cd0dff00.tar.gz
historical-bed62a3a517533e6b3cb5400ed957116cd0dff00.tar.bz2
historical-bed62a3a517533e6b3cb5400ed957116cd0dff00.zip
Cleanup. Remove old masked mess.
Package-Manager: portage-2.2_rc33/cvs/Linux i686
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/ati-drivers/ChangeLog11
-rw-r--r--x11-drivers/ati-drivers/Manifest32
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.27.10-r1.ebuild372
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.32.5.ebuild345
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.33.6-r1.ebuild352
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.35.5.ebuild416
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.36.5.ebuild398
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.39.4.ebuild421
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild429
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.452.ebuild433
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.471.3.ebuild437
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.552-r3.ebuild450
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.573-r1.ebuild444
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-8.582.ebuild444
14 files changed, 14 insertions, 4970 deletions
diff --git a/x11-drivers/ati-drivers/ChangeLog b/x11-drivers/ati-drivers/ChangeLog
index e2d146b44dac..9822436f0c5a 100644
--- a/x11-drivers/ati-drivers/ChangeLog
+++ b/x11-drivers/ati-drivers/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for x11-drivers/ati-drivers
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.170 2009/07/28 14:23:06 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.171 2009/07/28 14:42:11 scarabeus Exp $
+
+ 28 Jul 2009; Tomáš Chvátal <scarabeus@gentoo.org>
+ -ati-drivers-8.27.10-r1.ebuild, -ati-drivers-8.32.5.ebuild,
+ -ati-drivers-8.33.6-r1.ebuild, -ati-drivers-8.35.5.ebuild,
+ -ati-drivers-8.36.5.ebuild, -ati-drivers-8.39.4.ebuild,
+ -ati-drivers-8.40.4.ebuild, -ati-drivers-8.452.ebuild,
+ -ati-drivers-8.471.3.ebuild, -ati-drivers-8.552-r3.ebuild,
+ -ati-drivers-8.573-r1.ebuild, -ati-drivers-8.582.ebuild:
+ Cleanup. Remove old masked mess.
28 Jul 2009; Tomáš Chvátal <scarabeus@gentoo.org> metadata.xml:
This package moves under x11 jurisdiction. x11-drivers are going to be
diff --git a/x11-drivers/ati-drivers/Manifest b/x11-drivers/ati-drivers/Manifest
index ec6d2741dc66..67c9b3f4b0ce 100644
--- a/x11-drivers/ati-drivers/Manifest
+++ b/x11-drivers/ati-drivers/Manifest
@@ -30,44 +30,20 @@ AUX kernel/2.6.30-tlb_flush.patch 585 RMD160 3719ae8b430e9e5fc92ff98a81e9a1ccd89
AUX kernel/9.7-smp.patch 349 RMD160 d799328b35ff298684e56aae478b1c81a9377283 SHA1 0d5f5d44203b009f48b68d3150a43decbfb670ba SHA256 e81979f6c6d69fc5e911c853366fada4dacdfc493133d23bd2397e130adb365e
AUX kernel/9.7-x86_32b.patch 522 RMD160 088d4337d249f4a4aafc2eea16e05318c52e2121 SHA1 4bdd79702d5aafbc652d70be62a2983521dddd56 SHA256 dab63289f6549d01ecec66bbac8b0a03c3a4a8fa9c576a468b9535d78e489f9d
AUX libGL.la.in 749 RMD160 b2eb11cd123cb0e789adb1e22dffdbfc03542f69 SHA1 be41cc2eb1754a44134a95475be5f0cb894e24bc SHA256 a7b4b58b1311f8e1caf83222cb020dfbc48e2881a8deef21eddefa23b3992f13
-DIST ati-driver-installer-8-01-x86.x86_64.run 52742953 RMD160 f2d59abb417e413f914d392701dd64e8e36ba12b SHA1 ac9ba375e49443a356e10a28a4a403a2db8c1c40 SHA256 e08921c30683050e955b7e6746fc82770747c7c814707e268a5d4738d1f3a352
DIST ati-driver-installer-8-11-x86.x86_64.run 75818703 RMD160 7fdda8fc18f6b19b8ce526c0a136291c873a7907 SHA1 75f9775f3df412617aa2897ef8d75e10c9fc9017 SHA256 d63d1a2d16eff0160d9007b6a1b6323d1b3ff34841afaa36a490c5bd6c813cee
-DIST ati-driver-installer-8-3-x86.x86_64.run 53433193 RMD160 74b004c81f372addcdec8f1a3d9c696855aeb376 SHA1 8fbba3deb2bda52162ea7d0aa292dce7595ed73e SHA256 00f6adf8f00d2e1ba3b97a7b8d29d2aae37dd46f85f8430e3e659c121322ddf6
-DIST ati-driver-installer-8.27.10-x86.run 25136032 RMD160 5080d72e97101b97da661019c00a89e01cf2abd6 SHA1 dc386ae275e7623d383a83b50b8685b53fe97f03 SHA256 444c2d957308793b1164ed013c724090900aae20fcd63ebf9001b795066fc4f0
-DIST ati-driver-installer-8.27.10-x86_64.run 32487472 RMD160 04dc8598253791b52215ba3be847a9dc6eb54079 SHA1 9844ad5dc79a8d914d8707d2d17cf6be0de9e7d5 SHA256 1039d0b2218bab7076ef55626e510a779027ab658e62730c74dc2de439f4ab33
-DIST ati-driver-installer-8.32.5-x86.x86_64.run 58503169 RMD160 45bf6649227081f6ec10f65305661417c0314748 SHA1 a7411f8e43bb08a822e94d2db7630f868e23afe8 SHA256 d30b7302d4d7952e82ada8a28df0fb8ddd995d2e3f7aac53b67de450c7895475
-DIST ati-driver-installer-8.33.6-x86.x86_64.run 58620730 RMD160 141531330a77d2981d56fd5682d3220d757cc51d SHA1 d1c364698e524da3f4cd8d43bfbd2cd261ed0ae3 SHA256 7e758637c578fe00de00e2bcdf561d92036c73125ef98512be7f1a1405e8f2ae
-DIST ati-driver-installer-8.35.5-x86.x86_64.run 57314907 RMD160 a398b0b1f5ac6ca8b56b91064ab39412dc039188 SHA1 07d02058a958a20c9b80a1802ff64524ad9a8b95 SHA256 c366ce2b53127307b1d6f301df6e060cff2b7145cb10605c864ca084e01c3414
-DIST ati-driver-installer-8.36.5-x86.x86_64.run 53331877 RMD160 5581d7ad761f60c874f7c2cd59b1d95506a2ea23 SHA1 c0edc17d1816ec7415d64d0cc85193060f61e080 SHA256 217cc46fed71eabfc3852f09f460d630dedad16bb7e86c2d761e06f6c0e0e8d1
-DIST ati-driver-installer-8.39.4-x86.x86_64.run 40085391 RMD160 b23da1864ab4718ddfbc077950443507f30af70a SHA1 2b1b66169df36c3e6c811562b63642ff4dce2b1d SHA256 c8c37f2e13dc10aa223c7dc50aa04cba211c913d254704908f5d3cd57debac22
-DIST ati-driver-installer-8.40.4-x86.x86_64.run 40335704 RMD160 8a35e68aa9108186ffd91244209377387b3313e5 SHA1 6260c8596529eac34fabe3437678afe6e2761490 SHA256 765386dbe60ba66088b0d6050d1e462432e7cfaddca33d70875b2bd554ddc7a2
-DIST ati-driver-installer-9-1-x86.x86_64.run 82398155 RMD160 b7d047131c4c3dc80e8d025f312a417605c75a02 SHA1 d7a23a74bc0209c54f6a24e1622e496a6cbeda07 SHA256 178ceffc6ad195bd5b210b2531180a6c0c8bdfa69f2dbfa9ac438170ca0f299e
DIST ati-driver-installer-9-3-x86.x86_64.run 84841550 RMD160 76d4aa6ec575403190b8feadce99000b69d64d14 SHA1 ceefdfd2f8ecee4998a4ce4b7b87a45f1851e8d0 SHA256 5efec58f92f2fbb90b0d9a9059eb27c9cfffcea0a4ba64f3c8f24fc5dbf8053e
DIST ati-driver-installer-9-6-x86.x86_64.run 93655957 RMD160 bb2896a50597c326c44f8d11015b8c9e23369953 SHA1 bc82e8ca0e2966d774b03e52d2bb6b30b0d7c61e SHA256 25dbe57165fc647f3eff5d4f5a865feeea4970326b7c7844012fd44b32eecdfd
DIST ati-driver-installer-9-7-x86.x86_64.run 93750313 RMD160 c8ab9154ade3524c3fd45f733e27e19210c1b5ad SHA1 d04d31ae473e7e5b98b075f2082d60b56f6fe403 SHA256 880a74008143fcd5c9d266f0b75e3747d251964057cc665eae02edcc08005e95
-DIST ati-driver-installer-9.2-x86.x86_64.run 83286827 RMD160 fe98a9b39dbf27c7350afd4767c793826e94c53d SHA1 3ae672145f60f0348c44a7dfef98ec730a51fbf5 SHA256 7a611b83a3a8937e3511a02a730f8c7fb0b89d9070f4fa4de4e7fa9aeada421a
-EBUILD ati-drivers-8.27.10-r1.ebuild 10567 RMD160 1f895a73a94524b74a12e146965fa12d5141f3a1 SHA1 7ddd8c9955487d4e642241130a2f13c8e6dad330 SHA256 f1792d199b950647d4a2b827e5e017094e96cf5f5002a65a12689823a6bd2215
-EBUILD ati-drivers-8.32.5.ebuild 9917 RMD160 af7cdad20a43f8e2fdef17745506724945afa63a SHA1 843e3ade7c92de12d1d0a2d9bb7d43d3924a62a8 SHA256 0d8d854f157559671c96910aaf041a044c6174b0bf466580c839a71da11b6318
-EBUILD ati-drivers-8.33.6-r1.ebuild 10010 RMD160 4c9efff62dc623c1a87c87924a6164877040ad4a SHA1 1aebd8eaa59b5c43882d1fed3276167385bb6de2 SHA256 540b0ed308f5354970aa871209ab03329851709a225f25f6347b1bbc84123c49
-EBUILD ati-drivers-8.35.5.ebuild 13457 RMD160 6969313da9cfc6814aa05ac9d72acf3a4db1fd92 SHA1 78f8d77610f52c6e71a9ace216c29c40f5b2c863 SHA256 d25cad0cbec0dd34780d4c17fef46efe157096b7c2b4c5e572a2d593f6f5c696
-EBUILD ati-drivers-8.36.5.ebuild 12946 RMD160 72391178ae4525a203affea069ed3ae93dc03267 SHA1 466527f2bdb8eb9016d1a5880e6167d244425fbc SHA256 732d378aac98b42a23825ecbbf02582224909e41e7d6ddcc455d47e8c5b213ad
-EBUILD ati-drivers-8.39.4.ebuild 14111 RMD160 4cd7d87055e941a56da78b2c0e00f285592e54f1 SHA1 5f87a1003c80d338596ceeb1cb5f19a09ce5650d SHA256 7023bf0e8ac2c6ceca515cdcfe75e5b3405e4dc37a07ae20548fd822f15badfb
-EBUILD ati-drivers-8.40.4.ebuild 14345 RMD160 8a608073caf8e8579eb7fee67738f9ffaeefe992 SHA1 259ba6119e672165d69dbc2e1fad4a294e7fe740 SHA256 353dd4b1d8c86a79cee19d6f119f512110e4002d57b3908308918c094a6eaad8
-EBUILD ati-drivers-8.452.ebuild 14542 RMD160 6d7160caec31ff239b86f8e2a2a43b7361bbf616 SHA1 97c4930133dcf8f9875b56599de4ee69a8f992a8 SHA256 443e93f4ab60709c3b76cd861ca1539fe7ac8575fbe2093febe442852f296ec7
-EBUILD ati-drivers-8.471.3.ebuild 14679 RMD160 6207bd14a240106959bae07c123527b11972eb17 SHA1 9a58d33ce0b36f04a47779fd04b875efcedb3287 SHA256 6a1b45e02825fff153b10f39eb6aa2982f7d7bf14702e7eab9a0e7243ae7851c
EBUILD ati-drivers-8.552-r2.ebuild 15132 RMD160 08693686e3a767576533c9625b6efaa0e727f5de SHA1 3f41f7bfc6e95f6520d5f38dbb6b05001db6b767 SHA256 059888be71be3759d9cd63cc4fa3300227ba9d99fcea1f32eb065ed5761aec79
-EBUILD ati-drivers-8.552-r3.ebuild 15151 RMD160 bedec196ddfefdb77722cc2c2f76dba01331d661 SHA1 396edd6fabbe10d9243941e598c987ca4ef57e7e SHA256 a9e5e0bd4ab91219cc5da990753eccf9d8666b1fb58b2e7dba2188c3f5130204
-EBUILD ati-drivers-8.573-r1.ebuild 14902 RMD160 3681f04c1c1f7a521fc23e97113eaef3e6483aea SHA1 819581553980ebebb8ad92c43b40852ef13670ee SHA256 e58a5710aab5b014834fe32b5f82fceec8c18b66dc6cd05efe74f9d0e4b0aeb6
-EBUILD ati-drivers-8.582.ebuild 14899 RMD160 89a2898119df824686f89e117f8dbd458877eb48 SHA1 efff07c4fda6b04c2cab622a0b5228bde300665d SHA256 9272dbd2dd98e621af559df6f388d8ad0e0db2ecbe6d6554f6c5936ed5007381
EBUILD ati-drivers-8.593.ebuild 15025 RMD160 920ec6d2623fa6a82350c3a218733c54931c3922 SHA1 ee02b762371bef8dc40dd524089987fc36c08693 SHA256 fcbd917e71a9cc0a5069ab19d92ffb50183aa3dc8fd08336d6f8f8ed73fbb8a5
EBUILD ati-drivers-9.6.ebuild 16822 RMD160 b77a975d9bcee0e8a1bf99e02329a0fb10527543 SHA1 11276f3dff854e3b0aefc8e3ac9139ff8512b105 SHA256 09f9e6e6c162cd96790731857fdc10247db355e4ea1ad1953f7590c75b022679
EBUILD ati-drivers-9.7.ebuild 16885 RMD160 fa95eaa6c6323b650dd3df3ee267dd53840eac2c SHA1 0856565a29151e126f32465b4e99caa9aa807347 SHA256 3d8b2340b34caf1dd6d71377642a91766ac52e9cf754faf71e2c7601a6a48fce
-MISC ChangeLog 55587 RMD160 274b39fe9043348c8dce6490c0eb624b9b5f89b8 SHA1 21a2b9212d3fa5fc35773f6237a5b6ece7b4a554 SHA256 476eeb0d488109fa44102f941c56a14b5a2af6f2ff9861bd5c1871ef87fc51dd
+MISC ChangeLog 56036 RMD160 f4772c8bc3f948637cac6870acaace0dd798cd27 SHA1 2a0a4059cfa9220054c60e0e0aeeb5026259b17d SHA256 aa1fb86a2618d7a87cf33db3dbfb99bbec2ae75afd297d550791da8ea7b08836
MISC metadata.xml 359 RMD160 ece931b7435755393a605d11de0b9276a7a61785 SHA1 e8fe2ec8e95714ae50c71cadfa63cb92f85a1c5d SHA256 9dcb0fd39cbf80a8ef47d64e0a038f6bdcb49f106c0f810db1008e2bc56ee39b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
-iEYEARECAAYFAkpvCdsACgkQHB6c3gNBRYfn4wCfYTfZTCB+ehndJ+uP3f9R2+nn
-WnMAnjRoa9yBZDCZsAmtCkr3FOKKRQVt
-=Bsri
+iEYEARECAAYFAkpvDlMACgkQHB6c3gNBRYdUBwCfXoegY10fWGNoyiIbvaJe79xb
+N+AAn2tMCM7Q7wZ49JE2b7f9OGIIrQ91
+=xLGd
-----END PGP SIGNATURE-----
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.27.10-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.27.10-r1.ebuild
deleted file mode 100644
index 8985e623e537..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.27.10-r1.ebuild
+++ /dev/null
@@ -1,372 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.27.10-r1.ebuild,v 1.12 2008/06/20 05:38:34 je_fro Exp $
-
-IUSE="acpi doc opengl"
-
-inherit eutils rpm multilib linux-mod linux-info toolchain-funcs
-
-DESCRIPTION="Ati precompiled drivers for r350, r300, r250 and r200 chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="x86? ( ${ATI_URL}/ati-driver-installer-${PV}-x86.run )
- amd64? ( ${ATI_URL}/64bit/ati-driver-installer-${PV}-x86_64.run )"
-
-LICENSE="ATI"
-KEYWORDS="-* amd64 x86"
-
-RDEPEND="x11-base/xorg-server
- app-admin/eselect-opengl
- || ( sys-libs/libstdc++-v3 =sys-devel/gcc-3.3* )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )"
-
-DEPEND=">=virtual/linux-sources-2.4
- ${RDEPEND}"
-
-ATIBIN="${D}/opt/ati/bin"
-RESTRICT="strip"
-EMULTILIB_PKG="true"
-
-MODULE_NAMES="fglrx(video:${WORKDIR}/common/lib/modules/fglrx/build_mod)"
-
-QA_EXECSTACK_x86="usr/lib/xorg/modules/dri/fglrx_dri.so"
-QA_EXECSTACK_amd64="usr/lib64/xorg/modules/dri/fglrx_dri.so usr/lib32/xorg/modules/dri/fglrx_dri.so"
-QA_TEXTRELS_x86="usr/lib/xorg/modules/dri/fglrx_dri.so usr/lib/opengl/ati/lib/libGL.so.1.2"
-QA_TEXTRELS_amd64="usr/lib64/xorg/modules/dri/fglrx_dri.so usr/lib32/opengl/ati/lib/libGL.so.1.2 usr/lib32/xorg/modules/dri/fglrx_dri.so usr/lib32/xorg/modules/dri/atiogl_a_dri.so"
-
-choose_driver_paths() {
- ARCH_DIR="${WORKDIR}/arch"
- COMMON_DIR="${WORKDIR}/common"
-
- #new modular X paths, 0 is a workaround.
- if has_version "x11-base/xorg-server"; then
- if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 1 ] &&
- [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 0 ] &&
- [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ] ||
- [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" != 0 ]
- then
- BASE_DIR="${WORKDIR}/x710"
- else
- BASE_DIR="${WORKDIR}/x690"
- fi
- xlibdir="xorg"
- else
- BASE_DIR="${WORKDIR}/x$(get_version_component_range 1 ${X11_IMPLEM_V})"
- xlibdir=""
-
- # Determine if we are facing X.org 6.8.99 aka 6.9
- if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 6 ] &&
- [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 8 ] &&
- [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ]
- then
- BASE_DIR="${BASE_DIR}90"
- else
- BASE_DIR="${BASE_DIR}$(get_version_component_range 2 ${X11_IMPLEM_V})0"
- fi
- fi
-
- if use amd64 ; then
- BASE_DIR="${BASE_DIR}_64a"
- ARCH_DIR="${ARCH_DIR}/x86_64"
- else
- ARCH_DIR="${ARCH_DIR}/x86"
- fi
-}
-
-pkg_setup(){
- #check kernel and sets up KV_OBJ
- linux-mod_pkg_setup
- local agp
- ebegin "Checking for MTRR support enabled"
- linux_chkconfig_present MTRR
- eend $?
- if [[ $? -ne 0 ]] ; then
- ewarn "You don't have MTRR support enabled, the direct rendering"
- ewarn "will not work."
- fi
-
- ebegin "Checking for AGP support enabled"
- linux_chkconfig_present AGP
- eend $?
-
- if [[ $? -ne 0 ]] ; then
-
- ebegin "Checking for PCI Express support enabled"
- linux_chkconfig_present PCIEPORTBUS
- eend $?
-
- if [[ $? -ne 0 ]] ; then
- ewarn "If you don't have either AGP or PCI Express support enabled, direct rendering"
- ewarn "could work only using the internal support."
- fi
-
- fi
- ebegin "Checking for DRM support disabled"
- ! linux_chkconfig_builtin DRM
- eend $?
- if [[ $? -ne 0 ]] ; then
- ewarn "You have DRM support enabled builtin, the direct rendering"
- ewarn "will not work."
- fi
-
- # Set up X11 implementation
- X11_IMPLEM=xorg-x11
- X11_IMPLEM_V="$(best_version x11-base/xorg-server)"
- X11_IMPLEM_V="${X11_IMPLEM_V/x11-base\/xorg-server-/}"
- einfo "X11 implementation is ${X11_IMPLEM}."
- choose_driver_paths
-}
-
-src_unpack() {
- local OLDBIN="/usr/X11R6/bin"
-
- ebegin "Unpacking Ati drivers"
- sh "${DISTDIR}"/${A} --extract "${WORKDIR}" &> /dev/null
- eend $? || die "unpack failed"
-
- rm -rf ${ARCH_DIR}/usr/X11R6/bin/{fgl_glxgears,fireglcontrolpanel}
-
- if use acpi
- then
- sed -i \
- -e "s/\/var\/lib\/xdm\/authdir/\/etc\/X11\/xdm\/authdir/" \
- -e "s/\/var\/lib\/gdm/\/var\/gdm/" \
- -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
- "${WORKDIR}/common/etc/ati/authatieventsd.sh" \
- || die "sed failed."
-
- cd "${WORKDIR}"
- epatch "${FILESDIR}"/ati-powermode.sh.patch
- fi
-}
-
-src_compile() {
- einfo "Building the DRM module..."
- cd "${WORKDIR}"/common/lib/modules/fglrx/build_mod
- ln -s \
- ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "cannot find precompiled core"
-
- if kernel_is 2 6
- then
- set_arch_to_kernel
- addwrite "/usr/src/${FK}"
- cp 2.6.x/Makefile .
- export _POSIX2_VERSION="199209"
- if use_m ;
- then
- make -C ${KV_DIR} M="`pwd`" GCC_VER_MAJ=$(gcc-major-version) \
- modules || ewarn "DRM module not built"
- else
- make -C ${KV_DIR} SUBDIRS="`pwd`" GCC_VER_MAJ=$(gcc-major-version) \
- modules || ewarn "DRM module not built"
- fi
- set_arch_to_portage
- else
- export _POSIX2_VERSION="199209"
- # That is the dirty way to avoid the id -u check
- sed -e 's:`id -u`:0:' \
- -e "s:\`uname -r\`:${KV_FULL}:" \
- -i make.sh
- chmod +x make.sh
- ./make.sh || ewarn "DRM module not built"
- fi
-}
-
-pkg_preinst() {
- # Clean the dynamic libGL stuff's home to ensure
- # we don't have stale libs floating around ...
- if [ -d "${ROOT}/usr/lib/opengl/ati" ]
- then
- rm -rf "${ROOT}"/usr/lib/opengl/ati/*
- fi
-}
-
-src_install() {
- local ATI_LIBGL_PATH=""
- cd "${WORKDIR}"/common/lib/modules/fglrx/build_mod
- linux-mod_src_install
-
- cd "${WORKDIR}"
-
- local native_dir
- use x86 && native_dir="lib"
- use amd64 && native_dir="lib64"
-
- if has_multilib_profile; then
- local OABI=${ABI}
- for ABI in $(get_install_abis); do
- src_install-libs
- done
- ABI=${OABI}
- unset OABI
- elif use amd64; then
- src_install-libs lib $(get_multilibdir)
- src_install-libs lib64 $(get_libdir)
- else
- src_install-libs
- fi &> /dev/null
-
- #apps, man pages, and conf files
- exeinto /opt/ati/bin
- doexe ${ARCH_DIR}/usr/X11R6/bin/*
- if use acpi
- then
- exeinto /opt/ati/sbin
- doexe ${ARCH_DIR}/usr/sbin/*
- insinto /opt/ati/man/man8
- doins common/usr/share/man/man8/*
- newinitd "${FILESDIR}"/atieventsd.rc6 atieventsd
- dodir /etc/conf.d
- echo 'ATIEVENTSDOPTS=""' > "${D}"/etc/conf.d/atieventsd
- fi
- #ati custom stuff
- insinto /usr
- doins -r "${WORKDIR}"/common/usr/include
-
- #documentation
- if use doc; then
- dodir /usr/share/doc/fglrx
- cp -pPR common/usr/share/doc/fglrx/* \
- "${D}"/usr/share/doc/fglrx
- fi
-
- #env.d entry
- cp "${FILESDIR}"/09ati "${T}"/
-
- if use acpi
- then
- local ATIETC="${WORKDIR}/common/usr/share/doc/fglrx/examples/etc/acpi"
- exeinto /etc/acpi
- doexe "${ATIETC}"/ati-powermode.sh
- insinto /etc/acpi/events
- doins "${ATIETC}"/events/a-ac-aticonfig
- doins "${ATIETC}"/events/a-lid-aticonfig
- fi
-
- #Work around hardcoded path in 32bit libGL.so on amd64, bug 101539
- if has_multilib_profile && [ $(get_abi_LIBDIR x86) = "lib32" ] ; then
- ATI_LIBGL_PATH="/usr/lib/dri:/usr/$(get_libdir)/dri:/usr/lib32/${xlibdir}/modules/dri/:/usr/$(get_libdir)/${xlibdir}/modules/dri"
- fi
- cat >>"${T}"/09ati <<EOF
-
-LIBGL_DRIVERS_PATH="\$LIBGL_DRIVERS_PATH:$ATI_LIBGL_PATH"
-EOF
-
- doenvd "${T}"/09ati
-}
-
-src_install-libs() {
- local pkglibdir=lib
- local inslibdir="$(get_libdir)/${xlibdir}"
- ATI_LIBGL_PATH="${ATI_LIBGL_PATH}:/usr/$(get_libdir)/${xlibdir}/modules/dri"
- if [ ${#} -eq 2 ]; then
- pkglibdir=${1}
- inslibdir=${2}
- elif has_multilib_profile && [ "${ABI}" == "amd64" ]; then
- pkglibdir=lib64
- fi
-
- einfo "${pkglibdir} -> ${inslibdir}"
-
- local ATI_ROOT="/usr/$(get_libdir)/opengl/ati"
-
- # The GLX libraries
- exeinto ${ATI_ROOT}/lib
- doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/libGL.so.1.2
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so
-
- # Don't do this... see bug #47598
- #dosym libGL.so.1.2 ${ATI_ROOT}/lib/libMesaGL.so
-
- # same as the xorg implementation
- dosym ../${X11_IMPLEM}/extensions ${ATI_ROOT}/extensions
- #Workaround
- if use opengl ; then
- sed -e "s:libdir=.*:libdir=${ATI_ROOT}/lib:" \
- /usr/$(get_libdir)/opengl/${X11_IMPLEM}/lib/libGL.la \
- > "$D"/${ATI_ROOT}/lib/libGL.la
- dosym ../${X11_IMPLEM}/include ${ATI_ROOT}/include
- fi
- # X and DRI driver
- if has_version "<x11-base/xorg-x11-6.8.0-r4"
- then
- local X11_DIR="/usr/X11R6/"
- else
- local X11_DIR="/usr/"
- fi
-
- local X11_LIB_DIR="${X11_DIR}${inslibdir}"
-
- exeinto ${X11_LIB_DIR}/modules/drivers
- # In X.org 6.8.99 / 6.9 this is a .so
- doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/drivers/fglrx_drv.*o
-
- exeinto ${X11_LIB_DIR}/modules/dri
- doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
- doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/atiogl_a_dri.so
-
- exeinto ${X11_LIB_DIR}/modules/linux
- # In X.org 6.8.99 / 6.9 this is a .so
- if has_version ">=x11-base/xorg-x11-6.8.99" || \
- has_version "x11-base/xorg-server"
- then
- doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.so
- else
- doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.a
- fi
-
- if has_version ">=x11-base/xorg-x11-6.8.99" || \
- has_version "x11-base/xorg-server"
- then
- cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig} \
- "${D}"/usr/$(get_libdir)
- else
- cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig.a} \
- "${D}"/usr/$(get_libdir)
- fi
-
- #Not the best place
- insinto ${X11_DIR}/include/X11/extensions
- doins ${COMMON_DIR}/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # misc ati configuration files for /etc
- dodir /etc
- cp -pP ${COMMON_DIR}/etc/fglrxprofiles.csv "${D}"/etc/
- cp -pP ${COMMON_DIR}/etc/fglrxrc "${D}"/etc/
- dodir /etc/ati
- cp -pP ${COMMON_DIR}/etc/ati/logo* "${D}"/etc/ati/
- if use acpi
- then
- cp -pP ${COMMON_DIR}/etc/ati/authatieventsd.sh "${D}"/etc/ati/
- fi
-}
-
-pkg_postinst() {
- /usr/bin/eselect opengl set --use-old ati
-
- echo
- einfo "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- einfo "To change your xorg.conf you can use the bundled \"aticonfig\""
- if use !opengl ; then
- ewarn "You don't have the opengl useflag enabled, you won't be able to build"
- ewarn "opengl applications nor use opengl driver features, if that isn't"
- ewarn "the intended behaviour please add opengl to your useflag and issue"
- ewarn "# emerge -Nu ati-drivers"
- fi
- echo
- einfo "If you experience unexplained segmentation faults and kernel crashes"
- einfo "with this driver and multi-threaded applications such as wine,"
- einfo "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
- # DRM module
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.32.5.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.32.5.ebuild
deleted file mode 100644
index 01731c2d5908..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.32.5.ebuild
+++ /dev/null
@@ -1,345 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.32.5.ebuild,v 1.12 2008/06/20 05:38:34 je_fro Exp $
-
-IUSE="acpi doc opengl"
-
-inherit eutils rpm multilib linux-mod toolchain-funcs
-
-DESCRIPTION="Ati precompiled drivers for r350, r300, r250 and r200 chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-${PV}-x86.x86_64.run"
-
-LICENSE="ATI"
-KEYWORDS="-* amd64 x86"
-
-RDEPEND="x11-base/xorg-server
- app-admin/eselect-opengl
- || ( sys-libs/libstdc++-v3 =sys-devel/gcc-3.3* )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- x11-libs/libXrandr"
-
-DEPEND=">=virtual/linux-sources-2.4
- ${RDEPEND}"
-
-S="${WORKDIR}/common/lib/modules/fglrx/build_mod"
-
-ATIBIN="${D}/opt/ati/bin"
-RESTRICT="strip test"
-EMULTILIB_PKG="true"
-
-QA_EXECSTACK_x86="usr/lib/xorg/modules/dri/fglrx_dri.so"
-QA_EXECSTACK_amd64="usr/lib64/xorg/modules/dri/fglrx_dri.so usr/lib32/xorg/modules/dri/fglrx_dri.so"
-QA_TEXTRELS_x86="usr/lib/xorg/modules/dri/fglrx_dri.so usr/lib/opengl/ati/lib/libGL.so.1.2"
-QA_TEXTRELS_amd64="usr/lib64/xorg/modules/dri/fglrx_dri.so usr/lib32/opengl/ati/lib/libGL.so.1.2 usr/lib32/xorg/modules/dri/fglrx_dri.so usr/lib32/xorg/modules/dri/atiogl_a_dri.so"
-
-choose_driver_paths() {
- ARCH_DIR="${WORKDIR}/arch"
- COMMON_DIR="${WORKDIR}/common"
-
- #new modular X paths, 0 is a workaround.
- if has_version "x11-base/xorg-server"; then
- if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 1 ] &&
- [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 0 ] &&
- [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ] ||
- [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" != 0 ]
- then
- BASE_DIR="${WORKDIR}/x710"
- else
- BASE_DIR="${WORKDIR}/x690"
- fi
- xlibdir="xorg"
- else
- BASE_DIR="${WORKDIR}/x$(get_version_component_range 1 ${X11_IMPLEM_V})"
- xlibdir=""
-
- # Determine if we are facing X.org 6.8.99 aka 6.9
- if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 6 ] &&
- [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 8 ] &&
- [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ]
- then
- BASE_DIR="${BASE_DIR}90"
- else
- BASE_DIR="${BASE_DIR}$(get_version_component_range 2 ${X11_IMPLEM_V})0"
- fi
- fi
-
- if use amd64 ; then
- BASE_DIR="${BASE_DIR}_64a"
- ARCH_DIR="${ARCH_DIR}/x86_64"
- else
- ARCH_DIR="${ARCH_DIR}/x86"
- fi
-}
-
-pkg_setup() {
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && ! linux_chkconfig_present PCIEPORTBUS ;then
- ewarn "If you don't have either AGP or PCI Express support enabled, direct rendering"
- ewarn "could work only using the internal support."
- fi
-
- # Set up X11 implementation
- X11_IMPLEM=xorg-x11
- X11_IMPLEM_V="$(best_version x11-base/xorg-server)"
- X11_IMPLEM_V="${X11_IMPLEM_V/x11-base\/xorg-server-/}"
- einfo "X11 implementation is ${X11_IMPLEM}."
- choose_driver_paths
-}
-
-src_unpack() {
- local OLDBIN="/usr/X11R6/bin"
-
- ebegin "Unpacking Ati drivers"
- sh "${DISTDIR}"/${A} --extract "${WORKDIR}" &> /dev/null
- eend $? || die "unpack failed"
-
- rm -rf ${ARCH_DIR}/usr/X11R6/bin/{fgl_glxgears,fireglcontrolpanel}
-
- epatch "${FILESDIR}"/${PN}-2.6.19.patch
-
- if use acpi
- then
- sed -i \
- -e "s/\/var\/lib\/xdm\/authdir/\/etc\/X11\/xdm\/authdir/" \
- -e "s/\/var\/lib\/gdm/\/var\/gdm/" \
- -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
- "${WORKDIR}/common/etc/ati/authatieventsd.sh" \
- || die "sed failed."
-
- cd "${WORKDIR}"
- epatch "${FILESDIR}"/ati-powermode.sh.patch
- fi
-}
-
-src_compile() {
- einfo "Building the DRM module..."
- ln -s \
- ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "cannot find precompiled core"
-
- export _POSIX2_VERSION="199209"
-
- if kernel_is 2 6; then
- cp 2.6.x/Makefile .
- convert_to_m Makefile
- linux-mod_src_compile
- else
- # That is the dirty way to avoid the id -u check
- sed -e 's:`id -u`:0:' \
- -e "s:\`uname -r\`:${KV_FULL}:" \
- -i make.sh
- chmod +x make.sh
- ./make.sh || ewarn "DRM module not built"
- fi
-}
-
-pkg_preinst() {
- # Clean the dynamic libGL stuff's home to ensure
- # we don't have stale libs floating around ...
- if [ -d "${ROOT}/usr/lib/opengl/ati" ]
- then
- rm -rf "${ROOT}"/usr/lib/opengl/ati/*
- fi
-}
-
-src_install() {
- local ATI_LIBGL_PATH=""
- linux-mod_src_install
-
- cd "${WORKDIR}"
-
- local native_dir
- use x86 && native_dir="lib"
- use amd64 && native_dir="lib64"
-
- if has_multilib_profile; then
- local OABI=${ABI}
- for ABI in $(get_install_abis); do
- src_install-libs
- done
- ABI=${OABI}
- unset OABI
- elif use amd64; then
- src_install-libs lib $(get_multilibdir)
- src_install-libs lib64 $(get_libdir)
- else
- src_install-libs
- fi &> /dev/null
-
- #apps, man pages, and conf files
- exeinto /opt/ati/bin
- doexe ${ARCH_DIR}/usr/X11R6/bin/*
- if use acpi
- then
- exeinto /opt/ati/sbin
- doexe ${ARCH_DIR}/usr/sbin/*
- insinto /opt/ati/man/man8
- doins common/usr/share/man/man8/*
- newinitd "${FILESDIR}"/atieventsd.rc6 atieventsd
- dodir /etc/conf.d
- echo 'ATIEVENTSDOPTS=""' > "${D}"/etc/conf.d/atieventsd
- fi
- #ati custom stuff
- insinto /usr
- doins -r "${WORKDIR}"/common/usr/include
-
- #documentation
- if use doc; then
- dodir /usr/share/doc/fglrx
- cp -pPR common/usr/share/doc/fglrx/* \
- "${D}"/usr/share/doc/fglrx
- fi
-
- #env.d entry
- cp "${FILESDIR}"/09ati "${T}"/
-
- if use acpi
- then
- local ATIETC="${WORKDIR}/common/usr/share/doc/fglrx/examples/etc/acpi"
- exeinto /etc/acpi
- doexe "${ATIETC}"/ati-powermode.sh
- insinto /etc/acpi/events
- doins "${ATIETC}"/events/a-ac-aticonfig
- doins "${ATIETC}"/events/a-lid-aticonfig
- fi
-
- #Work around hardcoded path in 32bit libGL.so on amd64, bug 101539
- if has_multilib_profile && [ $(get_abi_LIBDIR x86) = "lib32" ] ; then
- ATI_LIBGL_PATH="/usr/lib/dri:/usr/$(get_libdir)/dri:/usr/lib32/${xlibdir}/modules/dri/:/usr/$(get_libdir)/${xlibdir}/modules/dri"
- fi
- cat >>"${T}"/09ati <<EOF
-
-LIBGL_DRIVERS_PATH="\$LIBGL_DRIVERS_PATH:$ATI_LIBGL_PATH"
-EOF
-
- doenvd "${T}"/09ati
-}
-
-src_install-libs() {
- local pkglibdir=lib
- local inslibdir="$(get_libdir)/${xlibdir}"
- ATI_LIBGL_PATH="${ATI_LIBGL_PATH}:/usr/$(get_libdir)/${xlibdir}/modules/dri"
- if [ ${#} -eq 2 ]; then
- pkglibdir=${1}
- inslibdir=${2}
- elif has_multilib_profile && [ "${ABI}" == "amd64" ]; then
- pkglibdir=lib64
- fi
-
- einfo "${pkglibdir} -> ${inslibdir}"
-
- local ATI_ROOT="/usr/$(get_libdir)/opengl/ati"
-
- # The GLX libraries
- exeinto ${ATI_ROOT}/lib
- doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/libGL.so.1.2
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so
-
- # Don't do this... see bug #47598
- #dosym libGL.so.1.2 ${ATI_ROOT}/lib/libMesaGL.so
-
- # same as the xorg implementation
- dosym ../${X11_IMPLEM}/extensions ${ATI_ROOT}/extensions
- #Workaround
- if use opengl ; then
- sed -e "s:libdir=.*:libdir=${ATI_ROOT}/lib:" \
- /usr/$(get_libdir)/opengl/${X11_IMPLEM}/lib/libGL.la \
- > "$D"/${ATI_ROOT}/lib/libGL.la
- dosym ../${X11_IMPLEM}/include ${ATI_ROOT}/include
- fi
- # X and DRI driver
- if has_version "<x11-base/xorg-x11-6.8.0-r4"
- then
- local X11_DIR="/usr/X11R6/"
- else
- local X11_DIR="/usr/"
- fi
-
- local X11_LIB_DIR="${X11_DIR}${inslibdir}"
-
- exeinto ${X11_LIB_DIR}/modules/drivers
- # In X.org 6.8.99 / 6.9 this is a .so
- doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/drivers/fglrx_drv.*o
-
- exeinto ${X11_LIB_DIR}/modules/dri
- doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
- doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/atiogl_a_dri.so
-
- exeinto ${X11_LIB_DIR}/modules/linux
- # In X.org 6.8.99 / 6.9 this is a .so
- if has_version ">=x11-base/xorg-x11-6.8.99" || \
- has_version "x11-base/xorg-server"
- then
- doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.so
- else
- doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.a
- fi
-
- if has_version ">=x11-base/xorg-x11-6.8.99" || \
- has_version "x11-base/xorg-server"
- then
- cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig} \
- "${D}"/usr/$(get_libdir)
- else
- cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig.a} \
- "${D}"/usr/$(get_libdir)
- fi
-
- #Not the best place
- insinto ${X11_DIR}/include/X11/extensions
- doins ${COMMON_DIR}/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # misc ati configuration files for /etc
- dodir /etc/ati
- cp -pP ${COMMON_DIR}/etc/ati/fglrxprofiles.csv "${D}"/etc/ati/
- cp -pP ${COMMON_DIR}/etc/ati/fglrxrc "${D}"/etc/ati/
- cp -pP ${COMMON_DIR}/etc/ati/logo* "${D}"/etc/ati/
- if use acpi
- then
- cp -pP ${COMMON_DIR}/etc/ati/authatieventsd.sh "${D}"/etc/ati/
- fi
-}
-
-pkg_postinst() {
- /usr/bin/eselect opengl set --use-old ati
-
- echo
- einfo "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- einfo "To change your xorg.conf you can use the bundled \"aticonfig\""
- if use !opengl ; then
- ewarn "You don't have the opengl useflag enabled, you won't be able to build"
- ewarn "opengl applications nor use opengl driver features, if that isn't"
- ewarn "the intended behaviour please add opengl to your useflag and issue"
- ewarn "# emerge -Nu ati-drivers"
- fi
- echo
- einfo "If you experience unexplained segmentation faults and kernel crashes"
- einfo "with this driver and multi-threaded applications such as wine,"
- einfo "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
- # DRM module
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.33.6-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.33.6-r1.ebuild
deleted file mode 100644
index e8fdd68214b4..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.33.6-r1.ebuild
+++ /dev/null
@@ -1,352 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.33.6-r1.ebuild,v 1.9 2009/04/14 06:37:18 je_fro Exp $
-
-IUSE="acpi doc opengl"
-
-inherit eutils rpm multilib linux-mod toolchain-funcs
-
-DESCRIPTION="Ati precompiled drivers for r350, r300, r250 and r200 chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-${PV}-x86.x86_64.run"
-
-LICENSE="ATI"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="x11-base/xorg-server
- app-admin/eselect-opengl
- || ( sys-libs/libstdc++-v3 =sys-devel/gcc-3.3* )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )"
-
-DEPEND=">=virtual/linux-sources-2.4
- ${RDEPEND}"
-
-S="${WORKDIR}/common/lib/modules/fglrx/build_mod"
-
-ATIBIN="${D}/opt/ati/bin"
-RESTRICT="strip test"
-EMULTILIB_PKG="true"
-
-QA_EXECSTACK_x86="usr/lib/xorg/modules/dri/fglrx_dri.so
- usr/lib/opengl/ati/lib/libGL.so.1.2"
-QA_EXECSTACK_amd64="usr/lib64/xorg/modules/dri/fglrx_dri.so
- usr/lib32/xorg/modules/dri/fglrx_dri.so"
-QA_TEXTRELS_x86="usr/lib/xorg/modules/dri/fglrx_dri.so
- usr/lib/xorg/modules/dri/atiogl_a_dri.so
- usr/lib/xorg/modules/drivers/fglrx_drv.so
- usr/lib/opengl/ati/lib/libGL.so.1.2"
-QA_TEXTRELS_amd64="usr/lib64/xorg/modules/dri/fglrx_dri.so
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- usr/lib32/xorg/modules/dri/fglrx_dri.so
- usr/lib32/xorg/modules/dri/atiogl_a_dri.so"
-
-choose_driver_paths() {
- ARCH_DIR="${WORKDIR}/arch"
- COMMON_DIR="${WORKDIR}/common"
-
- #new modular X paths, 0 is a workaround.
- if has_version "x11-base/xorg-server"; then
- if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 1 ] &&
- [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 0 ] &&
- [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ] ||
- [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" != 0 ]
- then
- BASE_DIR="${WORKDIR}/x710"
- else
- BASE_DIR="${WORKDIR}/x690"
- fi
- xlibdir="xorg"
- else
- BASE_DIR="${WORKDIR}/x$(get_version_component_range 1 ${X11_IMPLEM_V})"
- xlibdir=""
-
- # Determine if we are facing X.org 6.8.99 aka 6.9
- if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 6 ] &&
- [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 8 ] &&
- [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ]
- then
- BASE_DIR="${BASE_DIR}90"
- else
- BASE_DIR="${BASE_DIR}$(get_version_component_range 2 ${X11_IMPLEM_V})0"
- fi
- fi
-
- if use amd64 ; then
- BASE_DIR="${BASE_DIR}_64a"
- ARCH_DIR="${ARCH_DIR}/x86_64"
- else
- ARCH_DIR="${ARCH_DIR}/x86"
- fi
-}
-
-pkg_setup() {
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && ! linux_chkconfig_present PCIEPORTBUS ;then
- ewarn "If you don't have either AGP or PCI Express support enabled, direct rendering"
- ewarn "could work only using the internal support."
- fi
-
- # Set up X11 implementation
- X11_IMPLEM=xorg-x11
- X11_IMPLEM_V="$(best_version x11-base/xorg-server)"
- X11_IMPLEM_V="${X11_IMPLEM_V/x11-base\/xorg-server-/}"
- einfo "X11 implementation is ${X11_IMPLEM}."
- choose_driver_paths
-}
-
-src_unpack() {
- local OLDBIN="/usr/X11R6/bin"
-
- ebegin "Unpacking Ati drivers"
- sh "${DISTDIR}"/${A} --extract "${WORKDIR}" &> /dev/null
- eend $? || die "unpack failed"
-
- rm -rf ${ARCH_DIR}/usr/X11R6/bin/{fgl_glxgears,fireglcontrolpanel}
-
- epatch "${FILESDIR}"/${PN}-2.6.20.patch
-
- if use acpi
- then
- sed -i \
- -e "s/\/var\/lib\/xdm\/authdir/\/etc\/X11\/xdm\/authdir/" \
- -e "s/\/var\/lib\/gdm/\/var\/gdm/" \
- -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
- "${WORKDIR}/common/etc/ati/authatieventsd.sh" \
- || die "sed failed."
-
- cd "${WORKDIR}"
- epatch "${FILESDIR}"/ati-powermode.sh.patch
- fi
-}
-
-src_compile() {
- einfo "Building the DRM module..."
- ln -s \
- ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "cannot find precompiled core"
-
- export _POSIX2_VERSION="199209"
-
- if kernel_is 2 6; then
- cp 2.6.x/Makefile .
- convert_to_m Makefile
- linux-mod_src_compile
- else
- # That is the dirty way to avoid the id -u check
- sed -e 's:`id -u`:0:' \
- -e "s:\`uname -r\`:${KV_FULL}:" \
- -i make.sh
- chmod +x make.sh
- ./make.sh || ewarn "DRM module not built"
- fi
-}
-
-pkg_preinst() {
- # Clean the dynamic libGL stuff's home to ensure
- # we don't have stale libs floating around ...
- if [ -d "${ROOT}/usr/lib/opengl/ati" ]
- then
- rm -rf "${ROOT}"/usr/lib/opengl/ati/*
- fi
-}
-
-src_install() {
- local ATI_LIBGL_PATH=""
- linux-mod_src_install
-
- cd "${WORKDIR}"
-
- local native_dir
- use x86 && native_dir="lib"
- use amd64 && native_dir="lib64"
-
- if has_multilib_profile; then
- local OABI=${ABI}
- for ABI in $(get_install_abis); do
- src_install-libs
- done
- ABI=${OABI}
- unset OABI
- elif use amd64; then
- src_install-libs lib $(get_multilibdir)
- src_install-libs lib64 $(get_libdir)
- else
- src_install-libs
- fi &> /dev/null
-
- #apps, man pages, and conf files
- exeinto /opt/ati/bin
- doexe ${ARCH_DIR}/usr/X11R6/bin/*
- if use acpi
- then
- exeinto /opt/ati/sbin
- doexe ${ARCH_DIR}/usr/sbin/*
- insinto /opt/ati/man/man8
- doins common/usr/share/man/man8/*
- newinitd "${FILESDIR}"/atieventsd.rc6 atieventsd
- dodir /etc/conf.d
- echo 'ATIEVENTSDOPTS=""' > "${D}"/etc/conf.d/atieventsd
- fi
- #ati custom stuff
- insinto /usr
- doins -r "${WORKDIR}"/common/usr/include
-
- #documentation
- if use doc; then
- dodir /usr/share/doc/fglrx
- cp -pPR common/usr/share/doc/fglrx/* \
- "${D}"/usr/share/doc/fglrx
- fi
-
- #env.d entry
- cp "${FILESDIR}"/09ati "${T}"/
-
- if use acpi
- then
- local ATIETC="${WORKDIR}/common/usr/share/doc/fglrx/examples/etc/acpi"
- exeinto /etc/acpi
- doexe "${ATIETC}"/ati-powermode.sh
- insinto /etc/acpi/events
- doins "${ATIETC}"/events/a-ac-aticonfig
- doins "${ATIETC}"/events/a-lid-aticonfig
- fi
-
- #Work around hardcoded path in 32bit libGL.so on amd64, bug 101539
- if has_multilib_profile && [ $(get_abi_LIBDIR x86) = "lib32" ] ; then
- ATI_LIBGL_PATH="/usr/lib/dri:/usr/$(get_libdir)/dri:/usr/lib32/${xlibdir}/modules/dri/:/usr/$(get_libdir)/${xlibdir}/modules/dri"
- fi
- cat >>"${T}"/09ati <<EOF
-
-LIBGL_DRIVERS_PATH="\$LIBGL_DRIVERS_PATH:$ATI_LIBGL_PATH"
-EOF
-
- doenvd "${T}"/09ati
-}
-
-src_install-libs() {
- local pkglibdir=lib
- local inslibdir="$(get_libdir)/${xlibdir}"
- ATI_LIBGL_PATH="${ATI_LIBGL_PATH}:/usr/$(get_libdir)/${xlibdir}/modules/dri"
- if [ ${#} -eq 2 ]; then
- pkglibdir=${1}
- inslibdir=${2}
- elif has_multilib_profile && [ "${ABI}" == "amd64" ]; then
- pkglibdir=lib64
- fi
-
- einfo "${pkglibdir} -> ${inslibdir}"
-
- local ATI_ROOT="/usr/$(get_libdir)/opengl/ati"
-
- # The GLX libraries
- exeinto ${ATI_ROOT}/lib
- doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/libGL.so.1.2
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so
-
- # Don't do this... see bug #47598
- #dosym libGL.so.1.2 ${ATI_ROOT}/lib/libMesaGL.so
-
- # same as the xorg implementation
- dosym ../${X11_IMPLEM}/extensions ${ATI_ROOT}/extensions
- #Workaround
- if use opengl ; then
- sed -e "s:libdir=.*:libdir=${ATI_ROOT}/lib:" \
- /usr/$(get_libdir)/opengl/${X11_IMPLEM}/lib/libGL.la \
- > "$D"/${ATI_ROOT}/lib/libGL.la
- dosym ../${X11_IMPLEM}/include ${ATI_ROOT}/include
- fi
- # X and DRI driver
- if has_version "<x11-base/xorg-x11-6.8.0-r4"
- then
- local X11_DIR="/usr/X11R6/"
- else
- local X11_DIR="/usr/"
- fi
-
- local X11_LIB_DIR="${X11_DIR}${inslibdir}"
-
- exeinto ${X11_LIB_DIR}/modules/drivers
- # In X.org 6.8.99 / 6.9 this is a .so
- doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/drivers/fglrx_drv.*o
-
- exeinto ${X11_LIB_DIR}/modules/dri
- doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
- doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/atiogl_a_dri.so
-
- exeinto ${X11_LIB_DIR}/modules/linux
- # In X.org 6.8.99 / 6.9 this is a .so
- if has_version ">=x11-base/xorg-x11-6.8.99" || \
- has_version "x11-base/xorg-server"
- then
- doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.so
- else
- doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.a
- fi
-
- if has_version ">=x11-base/xorg-x11-6.8.99" || \
- has_version "x11-base/xorg-server"
- then
- cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig} \
- "${D}"/usr/$(get_libdir)
- else
- cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig.a} \
- "${D}"/usr/$(get_libdir)
- fi
-
- #Not the best place
- insinto ${X11_DIR}/include/X11/extensions
- doins ${COMMON_DIR}/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # misc ati configuration files for /etc
- dodir /etc/ati
- cp -pP ${COMMON_DIR}/etc/ati/fglrxprofiles.csv "${D}"/etc/ati/
- cp -pP ${COMMON_DIR}/etc/ati/fglrxrc "${D}"/etc/ati/
- cp -pP ${COMMON_DIR}/etc/ati/logo* "${D}"/etc/ati/
- if use acpi
- then
- cp -pP ${COMMON_DIR}/etc/ati/authatieventsd.sh "${D}"/etc/ati/
- fi
-}
-
-pkg_postinst() {
- /usr/bin/eselect opengl set --use-old ati
-
- echo
- einfo "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- einfo "To change your xorg.conf you can use the bundled \"aticonfig\""
- if use !opengl ; then
- ewarn "You don't have the opengl useflag enabled, you won't be able to build"
- ewarn "opengl applications nor use opengl driver features, if that isn't"
- ewarn "the intended behaviour please add opengl to your useflag and issue"
- ewarn "# emerge -Nu ati-drivers"
- fi
- echo
- einfo "If you experience unexplained segmentation faults and kernel crashes"
- einfo "with this driver and multi-threaded applications such as wine,"
- einfo "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
- # DRM module
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.35.5.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.35.5.ebuild
deleted file mode 100644
index f876af0ba8f6..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.35.5.ebuild
+++ /dev/null
@@ -1,416 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.35.5.ebuild,v 1.5 2008/02/29 20:46:46 carlo Exp $
-
-IUSE="acpi qt3"
-
-inherit eutils multilib linux-mod toolchain-funcs
-
-DESCRIPTION="Ati precompiled drivers for recent chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-${PV}-x86.x86_64.run"
-
-LICENSE="ATI GPL-2 QPL-1.0"
-KEYWORDS="amd64 x86"
-
-# The portage dep is for COLON_SEPARATED support in env-update.
-RDEPEND="x11-base/xorg-server
- !x11-apps/ati-drivers-extra
- app-admin/eselect-opengl
- =virtual/libstdc++-3.3*
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- qt3? ( =x11-libs/qt-3* )
- >=sys-apps/portage-2.1.1-r1"
-
-DEPEND="${RDEPEND}
- x11-proto/xf86miscproto
- x11-proto/xf86vidmodeproto"
-
-EMULTILIB_PKG="true"
-
-QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/xorg/modules/drivers/fglrx_drv.so
- usr/lib/opengl/ati/lib/libGL.so.1.2"
-QA_TEXTRELS_amd64="
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so"
-
-S="${WORKDIR}"
-
-pkg_setup() {
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if ! kernel_is 2 6; then
- eerror "Need a 2.6 kernel to compile against!"
- die "Need a 2.6 kernel to compile against!"
- fi
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && \
- ! linux_chkconfig_present PCIEPORTBUS; then
- ewarn "You need AGP and/or PCI Express support for direct rendering to work."
- fi
-
- # xorg-server 1.1 and its prereleases correspond to xorg 7.1.
- if has_version ">=x11-base/xorg-server-1.0.99"; then
- BASE_DIR="${S}/x710"
- else
- BASE_DIR="${S}/x690"
- fi
-
- if use amd64 ; then
- BASE_DIR="${BASE_DIR}_64a"
- # This is used like $(get_libdir) for paths in ati's package.
- PKG_LIBDIR=lib64
- ARCH_DIR="${S}/arch/x86_64"
- else
- PKG_LIBDIR=lib
- ARCH_DIR="${S}/arch/x86"
- fi
-}
-
-src_unpack() {
- local src="${DISTDIR}/${A}"
- # This is apparently a nonstandard makeself archive, so extract
- # the offset by hand.
- local offset=$(grep -am1 SKIP "${src}" | sed -e 's/SKIP="\([0-9]\+\)"/\1/')
- # It is off by one because of an (unused) checksum field.
- unpack_makeself "${src}" $(( offset + 1 )) tail || die "unpack failed"
-
- gunzip common/usr/share/man/man8/atieventsd.8 || die "manpage unzip failed"
- # These are the userspace utilities that we also have source for.
- # We rebuild those in ati-drivers-extra.
- rm \
- "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
- "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
- || die "bin rm failed"
-
- # These patches are conditional because they contain api changes.
- if kernel_is ge 2 6 19; then
- epatch "${FILESDIR}"/ati-drivers-${PV}-2.6.19.patch
- fi
- if kernel_is ge 2 6 20; then
- epatch "${FILESDIR}"/ati-drivers-2.6.20.patch
- epatch "${FILESDIR}"/ati-drivers-${PV}-2.6.20.patch
- fi
-
- if use acpi; then
- sed -i \
- -e "s:/var/lib/xdm/authdir/:/etc/X11/xdm/authdir/:" \
- -e "s:/var/lib/gdm/:/var/gdm/:" \
- -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
- "${S}/common/etc/ati/authatieventsd.sh" \
- || die "sed failed."
-
- # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/
- epatch "${FILESDIR}"/ati-powermode-opt-path.patch
- fi
-
- pushd common/lib/modules/fglrx/build_mod >/dev/null
- ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "symlinking precompiled core failed"
-
- 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"
- popd >/dev/null
-
- mkdir panel extra || die "mkdirs failed"
- # The ./ in these unpacks is required (or unpack looks in ${DISTDIR})
- if use qt3; then
- cd panel
- unpack ./../common/usr/src/ati/fglrx_panel_sources.tgz
- cd ..
- else
- # Get rid of the precompiled control panel.
- rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle || die "rm failed"
- fi
- cd extra
- unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
- sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
- lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
- # Add a category.
- mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
- cd ..
-}
-
-src_compile() {
- linux-mod_src_compile
-
- einfo "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_fglxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
- -I"${S}"/common/usr/include fgl_glxgears.c \
- -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
-
- einfo "Building fglrx_gamma lib"
- cd "${S}"/extra/lib/fglrx_gamma
- "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
- -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
- -lXext || die "fglrx_gamma lib build failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
-
- einfo "Building fglrx_gamma util"
- cd "${S}"/extra/programs/fglrx_gamma
- "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
- -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
- fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
- || die "fglrx_gamma util build failed"
-
- if use qt3; then
- einfo "Building the QT panel"
- cd "${S}"/panel
- emake CDEBFLAGS="${CFLAGS}" CCDEBFLAGS="${CXXFLAGS}" STRIP=true \
- || die "panel build failed"
- fi
-}
-
-src_install() {
- linux-mod_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"
-
- # 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 "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
- exeinto /usr/$(get_libdir)/xorg/modules/linux
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
-
- # Arch-specific files.
- # (s)bin.
- into /opt
- if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
- fi
- # We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
-
- # lib.
- exeinto /usr/$(get_libdir)
- # Everything except for the libGL.so installed in src_install-libs.
- doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
- insinto /usr/$(get_libdir)
- doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -not -name '*.so*')
-
- # Common files.
- # etc.
- insinto /etc/ati
- # Everything except for the authatieventsd.sh script.
- doins common/etc/ati/{fglrxprofiles.csv,fglrxrc,logo*}
- if use acpi; then
- doins common/etc/ati/authatieventsd.sh
- fi
-
- # include.
- insinto /usr
- doins -r common/usr/include
- insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # Just the atigetsysteminfo.sh script.
- into /usr
- dosbin common/usr/sbin/*
-
- # data files for the control panel.
- if use qt3; then
- insinto /usr/share
- doins -r common/usr/share/ati
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
- make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
- ccc_large System
- fi
-
- # doc.
- dohtml -r common/usr/share/doc/fglrx
-
- if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
-
- pushd common/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
- fi
-
- # Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_fglxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
-
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
-
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
-
- if use qt3; then
- dobin panel/fireglcontrol
- make_desktop_entry fireglcontrol 'ATI Control' ati System
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ati.xpm
- fi
-
- # Gentoo-specific stuff:
-
- if use acpi; then
- newinitd "${FILESDIR}"/atieventsd.init atieventsd
- echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
- fi
-}
-
-src_install-libs() {
- if [[ "${ABI}" == "amd64" ]]; then
- local pkglibdir=lib64
- else
- local pkglibdir=lib
- fi
- einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
-
- local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
-
- # The GLX libraries
- # (yes, this really is "lib" even on amd64/multilib --marienz)
- exeinto ${ATI_ROOT}/lib
- doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.1.2
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so
-
- # Same as the xorg implementation (eselect opengl does not fall
- # back to xorg-x11 if we omit this symlink, meaning no glx).
- dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
-
- # Is this necessary? Is this sane? --marienz
- sed -e "s:libdir=.*:libdir=${ATI_ROOT}/lib:" \
- /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la \
- > "${D}"/${ATI_ROOT}/lib/libGL.la
-
- # Commented out until determined it is necessary --marienz
- # dosym ../xorg-x11/include ${ATI_ROOT}/include
-
- # DRI modules, installed into the path used by recent versions of mesa.
- exeinto /usr/$(get_libdir)/dri
- doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.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() {
- /usr/bin/eselect opengl set --use-old ati
-
- elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- elog "To change your xorg.conf you can use the bundled \"aticonfig\""
- elog
- 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
- # (to get the LIBGL_DRIVERS_PATH)
- 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."
- # DRM module
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.36.5.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.36.5.ebuild
deleted file mode 100644
index dca25224a8b0..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.36.5.ebuild
+++ /dev/null
@@ -1,398 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.36.5.ebuild,v 1.3 2008/02/29 20:46:46 carlo Exp $
-
-IUSE="acpi qt3"
-
-inherit eutils multilib linux-mod toolchain-funcs
-
-DESCRIPTION="Ati precompiled drivers for recent chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-${PV}-x86.x86_64.run"
-
-LICENSE="ATI GPL-2 QPL-1.0"
-KEYWORDS="~amd64 ~x86"
-
-# The portage dep is for COLON_SEPARATED support in env-update.
-# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
-RDEPEND="x11-base/xorg-server
- !x11-apps/ati-drivers-extra
- >=app-admin/eselect-1.0.9
- app-admin/eselect-opengl
- =virtual/libstdc++-3.3*
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- qt3? ( =x11-libs/qt-3* )
- >=sys-apps/portage-2.1.1-r1"
-
-DEPEND="${RDEPEND}
- x11-proto/xf86miscproto
- x11-proto/xf86vidmodeproto"
-
-EMULTILIB_PKG="true"
-
-QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/xorg/modules/drivers/fglrx_drv.so
- usr/lib/opengl/ati/lib/libGL.so.1.2"
-QA_TEXTRELS_amd64="
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so"
-
-S="${WORKDIR}"
-
-pkg_setup() {
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if ! kernel_is 2 6; then
- eerror "Need a 2.6 kernel to compile against!"
- die "Need a 2.6 kernel to compile against!"
- fi
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && \
- ! linux_chkconfig_present PCIEPORTBUS; then
- ewarn "You need AGP and/or PCI Express support for direct rendering to work."
- fi
-
- # xorg-server 1.1 and its prereleases correspond to xorg 7.1.
- if has_version ">=x11-base/xorg-server-1.0.99"; then
- BASE_DIR="${S}/x710"
- else
- BASE_DIR="${S}/x690"
- fi
-
- if use amd64 ; then
- BASE_DIR="${BASE_DIR}_64a"
- # This is used like $(get_libdir) for paths in ati's package.
- PKG_LIBDIR=lib64
- ARCH_DIR="${S}/arch/x86_64"
- else
- PKG_LIBDIR=lib
- ARCH_DIR="${S}/arch/x86"
- fi
-}
-
-src_unpack() {
- local src="${DISTDIR}/${A}"
- # This is apparently a nonstandard makeself archive, so extract
- # the offset by hand.
- local offset=$(grep -am1 SKIP "${src}" | sed -e 's/SKIP="\([0-9]\+\)"/\1/')
- # It is off by one because of an (unused) checksum field.
- unpack_makeself "${src}" $(( offset + 1 )) tail || die "unpack failed"
-
- gunzip common/usr/share/man/man8/atieventsd.8 || die "manpage unzip failed"
- # These are the userspace utilities that we also have source for.
- # We rebuild those in ati-drivers-extra.
- rm \
- "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
- "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
- || die "bin rm failed"
-
- if use acpi; then
- sed -i \
- -e "s:/var/lib/xdm/authdir/:/etc/X11/xdm/authdir/:" \
- -e "s:/var/lib/gdm/:/var/gdm/:" \
- -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
- "${S}/common/etc/ati/authatieventsd.sh" \
- || die "sed failed."
-
- # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/
- epatch "${FILESDIR}"/ati-powermode-opt-path.patch
- fi
-
- pushd common/lib/modules/fglrx/build_mod >/dev/null
- ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "symlinking precompiled core failed"
-
- 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"
- popd >/dev/null
-
- mkdir panel extra || die "mkdirs failed"
- # The ./ in these unpacks is required (or unpack looks in ${DISTDIR})
- if use qt3; then
- cd panel
- unpack ./../common/usr/src/ati/fglrx_panel_sources.tgz
- cd ..
- fi
- cd extra
- unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
- sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
- lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
- # Add a category.
- mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
- cd ..
-}
-
-src_compile() {
- linux-mod_src_compile
-
- einfo "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_fglxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
- -I"${S}"/common/usr/include fgl_glxgears.c \
- -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
-
- einfo "Building fglrx_gamma lib"
- cd "${S}"/extra/lib/fglrx_gamma
- "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
- -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
- -lXext || die "fglrx_gamma lib build failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
-
- einfo "Building fglrx_gamma util"
- cd "${S}"/extra/programs/fglrx_gamma
- "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
- -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
- fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
- || die "fglrx_gamma util build failed"
-
- if use qt3; then
- einfo "Building the QT panel"
- cd "${S}"/panel
- emake CDEBFLAGS="${CFLAGS}" CCDEBFLAGS="${CXXFLAGS}" STRIP=true \
- || die "panel build failed"
- fi
-}
-
-src_install() {
- linux-mod_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"
-
- # 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 "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
- exeinto /usr/$(get_libdir)/xorg/modules/linux
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
- exeinto /usr/$(get_libdir)/xorg/modules
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so}
-
- # Arch-specific files.
- # (s)bin.
- into /opt
- if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
- fi
- # We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
-
- # lib.
- exeinto /usr/$(get_libdir)
- # Everything except for the libGL.so installed in src_install-libs.
- doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
- insinto /usr/$(get_libdir)
- doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -not -name '*.so*')
-
- # Common files.
- # etc.
- insinto /etc/ati
- # Everything except for the authatieventsd.sh script.
- doins common/etc/ati/{fglrxprofiles.csv,fglrxrc,logo*}
- if use acpi; then
- doins common/etc/ati/authatieventsd.sh
- fi
-
- # include.
- insinto /usr
- doins -r common/usr/include
- insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # Just the atigetsysteminfo.sh script.
- into /usr
- dosbin common/usr/sbin/*
-
- # data files for the control panel.
- insinto /usr/share
- doins -r common/usr/share/ati
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
- make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
- ccc_large System
-
- # doc.
- dohtml -r common/usr/share/doc/fglrx
-
- if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
-
- pushd common/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
- fi
-
- # Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_fglxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
-
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
-
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
-
- if use qt3; then
- dobin panel/fireglcontrol
- make_desktop_entry fireglcontrol 'ATI Control' ati System
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ati.xpm
- fi
-
- # Gentoo-specific stuff:
-
- if use acpi; then
- newinitd "${FILESDIR}"/atieventsd.init atieventsd
- echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
- fi
-}
-
-src_install-libs() {
- if [[ "${ABI}" == "amd64" ]]; then
- local pkglibdir=lib64
- else
- local pkglibdir=lib
- fi
- einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
-
- local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
-
- # The GLX libraries
- # (yes, this really is "lib" even on amd64/multilib --marienz)
- exeinto ${ATI_ROOT}/lib
- doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.1.2
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
- dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so
-
- # Same as the xorg implementation (eselect opengl does not fall
- # back to xorg-x11 if we omit this symlink, meaning no glx).
- dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
-
- # DRI modules, installed into the path used by recent versions of mesa.
- exeinto /usr/$(get_libdir)/dri
- doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.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() {
- /usr/bin/eselect opengl set --use-old ati
-
- elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- elog "To change your xorg.conf you can use the bundled \"aticonfig\""
- elog
- 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
- # (to get the LIBGL_DRIVERS_PATH)
- 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."
- # DRM module
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.39.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.39.4.ebuild
deleted file mode 100644
index 6330ed842fc3..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.39.4.ebuild
+++ /dev/null
@@ -1,421 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.39.4.ebuild,v 1.7 2008/02/29 20:46:46 carlo Exp $
-
-IUSE="acpi multilib"
-
-inherit eutils multilib linux-mod toolchain-funcs versionator
-
-DESCRIPTION="Ati precompiled drivers for recent chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-${PV}-x86.x86_64.run"
-
-LICENSE="AMD GPL-2 QPL-1.0 as-is"
-KEYWORDS="amd64 x86"
-
-# The portage dep is for COLON_SEPARATED support in env-update.
-# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
-RDEPEND="x11-base/xorg-server
- !x11-apps/ati-drivers-extra
- >=app-admin/eselect-1.0.9
- app-admin/eselect-opengl
- =virtual/libstdc++-3.3*
- amd64? ( multilib? ( app-emulation/emul-linux-x86-compat ) )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- >=sys-apps/portage-2.1.1-r1"
-
-DEPEND="${RDEPEND}
- x11-proto/xf86miscproto
- x11-proto/xf86vidmodeproto"
-
-EMULTILIB_PKG="true"
-
-# Ignore QA warnings about multilib-pkg-force not existing:
-# multilib.eclass uses it (without it we do not install the 32 bit
-# libraries on amd64) --marienz
-# RESTRICT="multilib-pkg-force"
-
-QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/xorg/modules/drivers/fglrx_drv.so
- usr/lib/opengl/ati/lib/libGL.so.1.2"
-QA_TEXTRELS_amd64="
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so"
-
-S="${WORKDIR}"
-
-pkg_setup() {
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if ! kernel_is 2 6; then
- eerror "Need a 2.6 kernel to compile against!"
- die "Need a 2.6 kernel to compile against!"
- fi
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && \
- ! linux_chkconfig_present PCIEPORTBUS; then
- ewarn "You need AGP and/or PCI Express support for direct rendering to work."
- fi
-
- if linux_chkconfig_present PARAVIRT; then
- eerror "The current ati-drivers don't compile when having"
- eerror "paravirtualization active due to GPL symbol export"
- eerror "restrictions."
- eerror "Please disable it:"
- eerror " CONFIG_PARAVIRT=n"
- eerror "in /usr/src/linux/.config or"
- eerror " Processor type and features -->"
- eerror " [ ] Paravirtualization support (EXPERIMENTAL)"
- eerror "in 'menuconfig'"
- die "CONFIG_PARAVIRT enabled"
- fi
-
- # xorg-server 1.1 and its prereleases correspond to xorg 7.1.
- if has_version ">=x11-base/xorg-server-1.0.99"; then
- BASE_DIR="${S}/x710"
- else
- BASE_DIR="${S}/x690"
- fi
-
- if use amd64 ; then
- BASE_DIR="${BASE_DIR}_64a"
- # This is used like $(get_libdir) for paths in ati's package.
- PKG_LIBDIR=lib64
- ARCH_DIR="${S}/arch/x86_64"
- else
- PKG_LIBDIR=lib
- ARCH_DIR="${S}/arch/x86"
- fi
-}
-
-src_unpack() {
- local src="${DISTDIR}/${A}"
- # This is apparently a nonstandard makeself archive, so extract
- # the offset by hand.
- local offset=$(grep -am1 SKIP "${src}" | sed -e 's/SKIP="\([0-9]\+\)"/\1/')
-
- #Switching to a standard way to extract the files since otherwise no signature file
- #would be created
- sh "${src}" --extract "${S}" 2&>1 /dev/null
-
- gunzip common/usr/share/man/man8/atieventsd.8 || die "manpage unzip failed"
-
- # These are the userspace utilities that we also have source for.
- # We rebuild these later.
- rm \
- "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
- "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
- || die "bin rm failed"
-
- if use acpi; then
- sed -i \
- -e "s:/var/lib/xdm/authdir/:/etc/X11/xdm/authdir/:" \
- -e "s:/var/lib/gdm/:/var/gdm/:" \
- -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
- "${S}/common/etc/ati/authatieventsd.sh" \
- || die "sed failed."
-
- # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/
- epatch "${FILESDIR}"/ati-powermode-opt-path.patch
- fi
-
- pushd common/lib/modules/fglrx/build_mod >/dev/null
- ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "symlinking precompiled core failed"
-
- 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"
- popd >/dev/null
-
- mkdir extra || die "mkdir failed"
- cd extra
- unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
- sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
- lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
- # Add a category.
- mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
- cd ..
-
-}
-
-src_compile() {
- linux-mod_src_compile
-
- einfo "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_fglxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
- -I"${S}"/common/usr/include fgl_glxgears.c \
- -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
-
- einfo "Building fglrx_gamma lib"
- cd "${S}"/extra/lib/fglrx_gamma
- "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
- -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
- -lXext || die "fglrx_gamma lib build failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
-
- einfo "Building fglrx_gamma util"
- cd "${S}"/extra/programs/fglrx_gamma
- "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
- -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
- fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
- || die "fglrx_gamma util build failed"
-
-}
-
-src_install() {
- linux-mod_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"
-
- # 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 "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
- exeinto /usr/$(get_libdir)/xorg/modules/linux
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
- exeinto /usr/$(get_libdir)/xorg/modules
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so}
-
- # Arch-specific files.
- # (s)bin.
- into /opt
- if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
- fi
- # We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
-
- # lib.
- exeinto /usr/$(get_libdir)
- # Everything except for the libGL.so installed in src_install-libs.
- doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
- insinto /usr/$(get_libdir)
- doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -not -name '*.so*')
-
- # Common files.
- # etc.
- insinto /etc/ati
- # Everything except for the authatieventsd.sh script.
- doins common/etc/ati/{fglrxprofiles.csv,fglrxrc,logo*,control,atiogl.xml}
- if use acpi; then
- doins common/etc/ati/authatieventsd.sh
- fi
-
- # include.
- insinto /usr
- doins -r common/usr/include
- insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # Just the atigetsysteminfo.sh script.
- into /usr
- dosbin common/usr/sbin/*
-
- # data files for the control panel.
- insinto /usr/share
- doins -r common/usr/share/ati
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
- make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
- ccc_large System
-
- # doc.
- dohtml -r common/usr/share/doc/fglrx
-
- if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
-
- pushd common/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
- fi
-
- # Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_fglxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
-
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
-
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
-
- # Gentoo-specific stuff:
-
- if use acpi; then
- newinitd "${FILESDIR}"/atieventsd.init atieventsd
- echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
- fi
-}
-
-src_install-libs() {
- if [[ "${ABI}" == "amd64" ]]; then
- local pkglibdir=lib64
- else
- local pkglibdir=lib
- 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
- doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
-
- # Same as the xorg implementation (eselect opengl does not fall
- # back to xorg-x11 if we omit this symlink, meaning no glx).
- dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
-
- # DRI modules, installed into the path used by recent versions of mesa.
- exeinto /usr/$(get_libdir)/dri
- doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
-
- # Make up a libGL.la. Ati does not provide one, but mesa does. If
- # a (libtool-based) libfoo is built with libGL.la present a
- # reference to it is put into libfoo.la, and compiling
- # (libtool-based) things that link too libfoo.la will complain if
- # libGL.la disappears. So if we do not make up a libGL.la
- # switching between mesa and ati becomes painful.
- #
- # According to the libtool manual the "revision" should be updated
- # whenever the code changes. We construct this from the version
- # (8.37.6 becomes 83706).
- local revision=$(printf '%d%02d%02d' $(get_version_components))
- sed -e "s:\${libmajor}:${libmajor}:g" \
- -e "s:\${libminor}:${libminor}:g" \
- -e "s:\${libdir}:$(get_libdir):g" \
- -e "s:\${revision}:${revision}:g" \
- "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la
-
- 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() {
- /usr/bin/eselect opengl set --use-old ati
-
- elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- elog "To change your xorg.conf you can use the bundled \"aticonfig\""
- elog
- 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
- # (to get the LIBGL_DRIVERS_PATH)
- 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."
- # DRM module
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild
deleted file mode 100644
index 6bc83144c4bf..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild
+++ /dev/null
@@ -1,429 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.40.4.ebuild,v 1.7 2008/02/29 20:46:46 carlo Exp $
-
-IUSE="acpi multilib"
-
-inherit eutils multilib linux-mod toolchain-funcs versionator
-
-DESCRIPTION="Ati precompiled drivers for recent chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-${PV}-x86.x86_64.run"
-
-LICENSE="AMD GPL-2 QPL-1.0 as-is"
-KEYWORDS="amd64 x86"
-
-# The portage dep is for COLON_SEPARATED support in env-update.
-# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
-RDEPEND="x11-base/xorg-server
- !x11-apps/ati-drivers-extra
- >=app-admin/eselect-1.0.9
- app-admin/eselect-opengl
- =virtual/libstdc++-3.3*
- amd64? ( multilib? ( app-emulation/emul-linux-x86-compat ) )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- >=sys-apps/portage-2.1.1-r1"
-
-DEPEND="${RDEPEND}
- x11-proto/xf86miscproto
- x11-proto/xf86vidmodeproto"
-
-EMULTILIB_PKG="true"
-
-QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/xorg/modules/drivers/fglrx_drv.so
- usr/lib/opengl/ati/lib/libGL.so.1.2"
-QA_TEXTRELS_amd64="
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so"
-
-S="${WORKDIR}"
-
-pkg_setup() {
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if ! kernel_is 2 6; then
- eerror "Need a 2.6 kernel to compile against!"
- die "Need a 2.6 kernel to compile against!"
- fi
-
- if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then
- eerror "${P} requires support for pci_find_slot."
- die "${P} requires support for pci_find_slot."
- fi
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && \
- ! linux_chkconfig_present PCIEPORTBUS; then
- ewarn "You need AGP and/or PCI Express support for direct rendering to work."
- fi
-
- if linux_chkconfig_present PARAVIRT; then
- eerror "The current ati-drivers don't compile when having"
- eerror "paravirtualization active due to GPL symbol export"
- eerror "restrictions."
- eerror "Please disable it:"
- eerror " CONFIG_PARAVIRT=n"
- eerror "in /usr/src/linux/.config or"
- eerror " Processor type and features -->"
- eerror " [ ] Paravirtualization support (EXPERIMENTAL)"
- eerror "in 'menuconfig'"
- die "CONFIG_PARAVIRT enabled"
- fi
-
- # xorg-server 1.1 and its prereleases correspond to xorg 7.1.
- if has_version ">=x11-base/xorg-server-1.0.99"; then
- BASE_DIR="${S}/x710"
- else
- BASE_DIR="${S}/x690"
- fi
-
- if use amd64 ; then
- BASE_DIR="${BASE_DIR}_64a"
- # This is used like $(get_libdir) for paths in ati's package.
- PKG_LIBDIR=lib64
- ARCH_DIR="${S}/arch/x86_64"
- else
- PKG_LIBDIR=lib
- ARCH_DIR="${S}/arch/x86"
- fi
-}
-
-src_unpack() {
- local src="${DISTDIR}/${A}"
- # This is apparently a nonstandard makeself archive, so extract
- # the offset by hand.
- local offset=$(grep -am1 SKIP "${src}" | sed -e 's/SKIP="\([0-9]\+\)"/\1/')
-
- #Switching to a standard way to extract the files since otherwise no signature file
- #would be created
- sh "${src}" --extract "${S}" 2&>1 /dev/null
-
- gunzip common/usr/share/man/man8/atieventsd.8 || die "manpage unzip failed"
-
- # These are the userspace utilities that we also have source for.
- # We rebuild these later.
- rm \
- "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
- "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
- || die "bin rm failed"
-
- if use acpi; then
- sed -i \
- -e "s:/var/lib/xdm/authdir/:/etc/X11/xdm/authdir/:" \
- -e "s:/var/lib/gdm/:/var/gdm/:" \
- -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
- "${S}/common/etc/ati/authatieventsd.sh" \
- || die "sed failed."
-
- # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/
- epatch "${FILESDIR}"/ati-powermode-opt-path.patch
- fi
-
- pushd common/lib/modules/fglrx/build_mod >/dev/null
- ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "symlinking precompiled core failed"
-
- 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"
- popd >/dev/null
-
- mkdir extra || die "mkdir failed"
- cd extra
- unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
- sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
- lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
- # Add a category.
- mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
- cd ..
-
- # Misc. patches.
- epatch "${FILESDIR}"/${PV}/${P}-warnings.patch
-
- if kernel_is ge 2 6 23; then
- epatch "${FILESDIR}"/${PV}/${PN}-2.6.23.patch
- fi
-}
-
-src_compile() {
- linux-mod_src_compile
-
- einfo "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_fglxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
- -I"${S}"/common/usr/include fgl_glxgears.c \
- -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
-
- einfo "Building fglrx_gamma lib"
- cd "${S}"/extra/lib/fglrx_gamma
- "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
- -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
- -lXext || die "fglrx_gamma lib build failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
-
- einfo "Building fglrx_gamma util"
- cd "${S}"/extra/programs/fglrx_gamma
- "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
- -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
- fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
- || die "fglrx_gamma util build failed"
-
-}
-
-src_install() {
- linux-mod_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"
-
- # 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 "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
- exeinto /usr/$(get_libdir)/xorg/modules/linux
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
- exeinto /usr/$(get_libdir)/xorg/modules
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so}
-
- # Arch-specific files.
- # (s)bin.
- into /opt
- if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
- fi
- # We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
-
- # lib.
- exeinto /usr/$(get_libdir)
- # Everything except for the libGL.so installed in src_install-libs.
- doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
- insinto /usr/$(get_libdir)
- doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -not -name '*.so*')
-
- # Common files.
- # etc.
- insinto /etc/ati
- # Everything except for the authatieventsd.sh script.
- doins common/etc/ati/{fglrxprofiles.csv,fglrxrc,logo*,control,atiogl.xml,signature}
- if use acpi; then
- doins common/etc/ati/authatieventsd.sh
- fi
-
- # include.
- insinto /usr
- doins -r common/usr/include
- insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # Just the atigetsysteminfo.sh script.
- into /usr
- dosbin common/usr/sbin/*
-
- # data files for the control panel.
- insinto /usr/share
- doins -r common/usr/share/ati
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
- make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
- ccc_large System
-
- # doc.
- dohtml -r common/usr/share/doc/fglrx
-
- if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
-
- pushd common/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
- fi
-
- # Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_fglxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
-
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
-
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
-
- # Gentoo-specific stuff:
-
- if use acpi; then
- newinitd "${FILESDIR}"/atieventsd.init atieventsd \
- || die "Failed to install atieventsd.init.d"
- echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
- fi
-}
-
-src_install-libs() {
- if [[ "${ABI}" == "amd64" ]]; then
- local pkglibdir=lib64
- else
- local pkglibdir=lib
- 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
- doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
-
- # Same as the xorg implementation (eselect opengl does not fall
- # back to xorg-x11 if we omit this symlink, meaning no glx).
- dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
-
- # DRI modules, installed into the path used by recent versions of mesa.
- exeinto /usr/$(get_libdir)/dri
- doexe "${ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
-
- # Make up a libGL.la. Ati does not provide one, but mesa does. If
- # a (libtool-based) libfoo is built with libGL.la present a
- # reference to it is put into libfoo.la, and compiling
- # (libtool-based) things that link too libfoo.la will complain if
- # libGL.la disappears. So if we do not make up a libGL.la
- # switching between mesa and ati becomes painful.
- #
- # According to the libtool manual the "revision" should be updated
- # whenever the code changes. We construct this from the version
- # (8.37.6 becomes 83706).
- local revision=$(printf '%d%02d%02d' $(get_version_components))
- sed -e "s:\${libmajor}:${libmajor}:g" \
- -e "s:\${libminor}:${libminor}:g" \
- -e "s:\${libdir}:$(get_libdir):g" \
- -e "s:\${revision}:${revision}:g" \
- "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
- || die "sed failed to make libGL.la"
-
- 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() {
- /usr/bin/eselect opengl set --use-old ati
-
- elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- elog "To change your xorg.conf you can use the bundled \"aticonfig\""
- elog
- 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
- # (to get the LIBGL_DRIVERS_PATH)
- 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."
- # DRM module
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.452.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.452.ebuild
deleted file mode 100644
index 1bdb10e2e473..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.452.ebuild
+++ /dev/null
@@ -1,433 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.452.ebuild,v 1.3 2008/02/29 20:46:46 carlo Exp $
-
-IUSE="acpi debug"
-
-inherit eutils multilib linux-mod toolchain-funcs versionator
-
-DESCRIPTION="Ati precompiled drivers for recent chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-8-01-x86.x86_64.run"
-
-LICENSE="AMD GPL-2 QPL-1.0 as-is"
-KEYWORDS="~amd64 ~x86"
-
-# The portage dep is for COLON_SEPARATED support in env-update.
-# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
-RDEPEND="x11-base/xorg-server
- !x11-apps/ati-drivers-extra
- >=app-admin/eselect-1.0.9
- app-admin/eselect-opengl
- =virtual/libstdc++-3.3*
- amd64? ( app-emulation/emul-linux-x86-xlibs )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- x11-libs/libXrandr
- >=sys-apps/portage-2.1.1-r1"
-
-DEPEND="${RDEPEND}
- x11-proto/xf86miscproto
- x11-proto/xf86vidmodeproto"
-
-EMULTILIB_PKG="true"
-
-QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/xorg/modules/drivers/fglrx_drv.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- usr/lib/xorg/modules/glesx.so"
-QA_TEXTRELS_amd64="
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib32/xorg/modules/glesx.so
- usr/lib64/xorg/modules/glesx.so"
-
-S="${WORKDIR}"
-
-pkg_setup() {
-
- # Define module dir.
- MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod"
-
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if ! kernel_is 2 6; then
- eerror "Need a 2.6 kernel to compile against!"
- die "Need a 2.6 kernel to compile against!"
- fi
-
- if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then
- eerror "${P} requires support for pci_find_slot."
- die "${P} requires support for pci_find_slot."
- fi
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && \
- ! linux_chkconfig_present PCIEPORTBUS; then
- ewarn "You need AGP and/or PCI Express support for direct rendering to work."
- fi
-
- if linux_chkconfig_present PARAVIRT; then
- eerror "The current ati-drivers don't compile when having"
- eerror "paravirtualization active due to GPL symbol export"
- eerror "restrictions."
- eerror "Please disable it:"
- eerror " CONFIG_PARAVIRT=n"
- eerror "in /usr/src/linux/.config or"
- eerror " Processor type and features -->"
- eerror " [ ] Paravirtualization support (EXPERIMENTAL)"
- eerror "in 'menuconfig'"
- die "CONFIG_PARAVIRT enabled"
- fi
-
- # Only support xorg-server >=1.1
- BASE_DIR="${S}/x710"
-
- # This is used like $(get_libdir) for paths in ati's package.
- if use amd64 ; then
- BASE_DIR="${BASE_DIR}_64a"
- PKG_LIBDIR=lib64
- ARCH_DIR="${S}/arch/x86_64"
- else
- PKG_LIBDIR=lib
- ARCH_DIR="${S}/arch/x86"
- fi
-}
-
-src_unpack() {
- #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
-
- # These are the userspace utilities that we also have source for.
- # We rebuild these later.
- rm \
- "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
- "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
- || die "bin rm failed"
-
- if use debug; then
- # Enable debug mode in the Source Code.
- sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
- "${MODULE_DIR}/firegl_public.c" \
- || die "Failed to enable debug output."
- fi
-
- if use acpi; then
- sed -i \
- -e "s:/var/lib/xdm/authdir/:/etc/X11/xdm/authdir/:" \
- -e "s:/var/lib/gdm/:/var/gdm/:" \
- -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
- "${S}/common/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}/common/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 funktion to detect default state.
- epatch "${FILESDIR}"/${PV}/ati-powermode-opt-path-2.patch
- fi
-
- pushd ${MODULE_DIR} >/dev/null
- ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "symlinking precompiled core failed"
-
- 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"
- popd >/dev/null
-
- mkdir extra || die "mkdir failed"
- cd extra
- unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
- sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
- lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
- # Add a category.
- mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
- cd ..
-}
-
-src_compile() {
- linux-mod_src_compile
-
- einfo "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_fglxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
- -I"${S}"/common/usr/include fgl_glxgears.c \
- -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
-
- einfo "Building fglrx_gamma lib"
- cd "${S}"/extra/lib/fglrx_gamma
- "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
- -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
- -lXext || die "fglrx_gamma lib build failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
-
- einfo "Building fglrx_gamma util"
- cd "${S}"/extra/programs/fglrx_gamma
- "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
- -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
- fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
- || die "fglrx_gamma util build failed"
-
-}
-
-src_install() {
- linux-mod_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"
-
- # 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 "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
- exeinto /usr/$(get_libdir)/xorg/modules/linux
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
- exeinto /usr/$(get_libdir)/xorg/modules
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so}
-
- # Arch-specific files.
- # (s)bin.
- into /opt
- if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
- fi
- # We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
-
- # lib.
- exeinto /usr/$(get_libdir)
- # Everything except for the libGL.so installed in src_install-libs.
- doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
- insinto /usr/$(get_libdir)
- doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -not -name '*.so*')
-
- # Common files.
- # etc.
- insinto /etc/ati
- # Everything except for the authatieventsd.sh script.
- doins common/etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
- if use acpi; then
- doins common/etc/ati/authatieventsd.sh
- fi
-
- # include.
- insinto /usr
- doins -r common/usr/include
- insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # Just the atigetsysteminfo.sh script.
- into /usr
- dosbin common/usr/sbin/*
-
- # data files for the control panel.
- insinto /usr/share
- doins -r common/usr/share/ati
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
- make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
- ccc_large System
-
- # doc.
- dohtml -r common/usr/share/doc/fglrx
-
- if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
-
- pushd common/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
- fi
-
- # Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_fglxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
-
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
-
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
-
- # Gentoo-specific stuff:
- if use acpi; then
- newinitd "${FILESDIR}"/atieventsd.init atieventsd \
- || die "Failed to install atieventsd.init.d"
- echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
- fi
-}
-
-src_install-libs() {
- if [[ "${ABI}" == "amd64" ]]; then
- local pkglibdir=lib64
- local MY_ARCH_DIR="${S}/arch/x86_64"
- else
- 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
- doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
-
- # Same as the xorg implementation (eselect opengl does not fall
- # back to xorg-x11 if we omit this symlink, meaning no glx).
- dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
-
- # 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
-
- # Make up a libGL.la. Ati does not provide one, but mesa does. If
- # a (libtool-based) libfoo is built with libGL.la present a
- # reference to it is put into libfoo.la, and compiling
- # (libtool-based) things that link too libfoo.la will complain if
- # libGL.la disappears. So if we do not make up a libGL.la
- # switching between mesa and ati becomes painful.
- local revision=$(printf '%d%02d%02d' $(get_version_components))
- sed -e "s:\${libmajor}:${libmajor}:g" \
- -e "s:\${libminor}:${libminor}:g" \
- -e "s:\${libdir}:$(get_libdir):g" \
- -e "s:\${revision}:${revision}:g" \
- "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
- || die "sed failed to make libGL.la"
-
- 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() {
- /usr/bin/eselect opengl set --use-old ati
-
- elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- elog "To change your xorg.conf you can use the bundled \"aticonfig\""
- elog
- 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 "You will have to source /etc/profile (or logout and back in) for dri"
- elog "to work, unless you previously had ati-drivers installed."
-
- # Workaroud screen corruption
- ewarn "If you experience screen corruption with this driver, try putting"
- ewarn ' Option "XAANoOffscreenPixmaps" "true"'
- ewarn "in the Device Section of /etc/X11/xorg.conf."
-
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.471.3.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.471.3.ebuild
deleted file mode 100644
index b347c31bfee3..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.471.3.ebuild
+++ /dev/null
@@ -1,437 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.471.3.ebuild,v 1.5 2008/05/04 11:54:04 opfer Exp $
-
-IUSE="acpi debug"
-
-inherit eutils multilib linux-mod toolchain-funcs versionator
-
-DESCRIPTION="Ati precompiled drivers for recent chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-8-3-x86.x86_64.run"
-
-LICENSE="AMD GPL-2 QPL-1.0 as-is"
-KEYWORDS="amd64 x86"
-
-# The portage dep is for COLON_SEPARATED support in env-update.
-# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
-RDEPEND="x11-base/xorg-server
- !x11-apps/ati-drivers-extra
- >=app-admin/eselect-1.0.9
- app-admin/eselect-opengl
- amd64? ( app-emulation/emul-linux-x86-xlibs )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- x11-libs/libXrandr
- >=sys-apps/portage-2.1.1-r1"
-
-DEPEND="${RDEPEND}
- x11-proto/xf86miscproto
- x11-proto/xf86vidmodeproto
- x11-proto/inputproto"
-
-EMULTILIB_PKG="true"
-
-QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/xorg/modules/drivers/fglrx_drv.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- usr/lib/xorg/modules/glesx.so"
-QA_TEXTRELS_amd64="
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib32/xorg/modules/glesx.so
- usr/lib64/xorg/modules/glesx.so"
-
-S="${WORKDIR}"
-
-pkg_setup() {
-
- # Define module dir.
- MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod"
-
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
-# Add this next section until ATI fixes the issue. (gentoo bug #218422)
- if ( kernel_is 2 6 25 ); then
- die "This is currently broken on 2.6.25 kernels, see gentoo bug #218422."
- fi
-
- if ! kernel_is 2 6; then
- eerror "Need a 2.6 kernel to compile against!"
- die "Need a 2.6 kernel to compile against!"
- fi
-
- if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then
- eerror "${P} requires support for pci_find_slot."
- die "${P} requires support for pci_find_slot."
- fi
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && \
- ! linux_chkconfig_present PCIEPORTBUS; then
- ewarn "You need AGP and/or PCI Express support for direct rendering to work."
- fi
-
- if linux_chkconfig_present PARAVIRT; then
- eerror "The current ati-drivers don't compile when having"
- eerror "paravirtualization active due to GPL symbol export"
- eerror "restrictions."
- eerror "Please disable it:"
- eerror " CONFIG_PARAVIRT=n"
- eerror "in /usr/src/linux/.config or"
- eerror " Processor type and features -->"
- eerror " [ ] Paravirtualization support (EXPERIMENTAL)"
- eerror "in 'menuconfig'"
- die "CONFIG_PARAVIRT enabled"
- fi
-
- # Only support xorg-server >=1.1
- BASE_DIR="${S}/x710"
-
- # This is used like $(get_libdir) for paths in ati's package.
- if use amd64 ; then
- BASE_DIR="${BASE_DIR}_64a"
- PKG_LIBDIR=lib64
- ARCH_DIR="${S}/arch/x86_64"
- else
- PKG_LIBDIR=lib
- ARCH_DIR="${S}/arch/x86"
- fi
-}
-
-src_unpack() {
- #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
-
- # These are the userspace utilities that we also have source for.
- # We rebuild these later.
- rm \
- "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
- "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
- || die "bin rm failed"
-
- if use debug; then
- # Enable debug mode in the Source Code.
- sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
- "${MODULE_DIR}/firegl_public.c" \
- || die "Failed to enable debug output."
- fi
-
- if use acpi; then
- sed -i \
- -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
- -e "s:/var/lib/gdm/:/var/gdm/:" \
- "${S}/common/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}/common/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 funktion to detect default state.
- epatch "${FILESDIR}"/${PV}/ati-powermode-opt-path-2.patch
- fi
-
- pushd ${MODULE_DIR} >/dev/null
- ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "symlinking precompiled core failed"
-
- 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"
- popd >/dev/null
-
- mkdir extra || die "mkdir failed"
- cd extra
- unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
- sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
- lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
- # Add a category.
- mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
- cd ..
-}
-
-src_compile() {
- linux-mod_src_compile
-
- einfo "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_fglxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
- -I"${S}"/common/usr/include fgl_glxgears.c \
- -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
-
- einfo "Building fglrx_gamma lib"
- cd "${S}"/extra/lib/fglrx_gamma
- "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
- -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
- -lXext || die "fglrx_gamma lib build failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
-
- einfo "Building fglrx_gamma util"
- cd "${S}"/extra/programs/fglrx_gamma
- "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
- -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
- fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
- || die "fglrx_gamma util build failed"
-
-}
-
-src_install() {
- linux-mod_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"
-
- # 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 "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
- exeinto /usr/$(get_libdir)/xorg/modules/linux
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
- exeinto /usr/$(get_libdir)/xorg/modules
- doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so}
-
- # Arch-specific files.
- # (s)bin.
- into /opt
- if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
- fi
- # We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
-
- # lib.
- exeinto /usr/$(get_libdir)
- # Everything except for the libGL.so installed in src_install-libs.
- doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
- insinto /usr/$(get_libdir)
- doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -not -name '*.so*')
-
- # Common files.
- # etc.
- insinto /etc/ati
- # Everything except for the authatieventsd.sh script.
- doins common/etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
- if use acpi; then
- doins common/etc/ati/authatieventsd.sh
- fi
-
- # include.
- insinto /usr
- doins -r common/usr/include
- insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # Just the atigetsysteminfo.sh script.
- into /usr
- dosbin common/usr/sbin/*
-
- # data files for the control panel.
- insinto /usr/share
- doins -r common/usr/share/ati
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
- make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
- ccc_large System
-
- # doc.
- dohtml -r common/usr/share/doc/fglrx
-
- if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
-
- pushd common/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
- fi
-
- # Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_fglxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
-
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
-
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
-
- # Gentoo-specific stuff:
- if use acpi; then
- newinitd "${FILESDIR}"/atieventsd.init atieventsd \
- || die "Failed to install atieventsd.init.d"
- echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
- fi
-}
-
-src_install-libs() {
- if [[ "${ABI}" == "amd64" ]]; then
- local pkglibdir=lib64
- local MY_ARCH_DIR="${S}/arch/x86_64"
- else
- 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
- doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
-
- # Same as the xorg implementation (eselect opengl does not fall
- # back to xorg-x11 if we omit this symlink, meaning no glx).
- dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
-
- # 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
-
- # Make up a libGL.la. Ati does not provide one, but mesa does. If
- # a (libtool-based) libfoo is built with libGL.la present a
- # reference to it is put into libfoo.la, and compiling
- # (libtool-based) things that link too libfoo.la will complain if
- # libGL.la disappears. So if we do not make up a libGL.la
- # switching between mesa and ati becomes painful.
- local revision=$(printf '%d%02d%02d' $(get_version_components))
- sed -e "s:\${libmajor}:${libmajor}:g" \
- -e "s:\${libminor}:${libminor}:g" \
- -e "s:\${libdir}:$(get_libdir):g" \
- -e "s:\${revision}:${revision}:g" \
- "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
- || die "sed failed to make libGL.la"
-
- 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() {
- /usr/bin/eselect opengl set --use-old ati
-
- elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- elog "To change your xorg.conf you can use the bundled \"aticonfig\""
- elog
- 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 "You will have to source /etc/profile (or logout and back in) for dri"
- elog "to work, unless you previously had ati-drivers installed."
-
- # Workaroud screen corruption
- ewarn "If you experience screen corruption with this driver, try putting"
- ewarn ' Option "XAANoOffscreenPixmaps" "true"'
- ewarn "in the Device Section of /etc/X11/xorg.conf."
-
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.552-r3.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.552-r3.ebuild
deleted file mode 100644
index 67934ee90db5..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.552-r3.ebuild
+++ /dev/null
@@ -1,450 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.552-r3.ebuild,v 1.1 2009/04/25 07:24:52 je_fro Exp $
-
-IUSE="acpi debug"
-
-inherit eutils multilib linux-mod toolchain-funcs versionator
-
-DESCRIPTION="Ati precompiled drivers for recent chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-8-11-x86.x86_64.run"
-
-LICENSE="AMD GPL-2 QPL-1.0 as-is"
-KEYWORDS="~amd64 ~x86"
-
-# The portage dep is for COLON_SEPARATED support in env-update.
-# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
-RDEPEND=">=x11-base/xorg-server-1.5
- !x11-apps/ati-drivers-extra
- >=app-admin/eselect-1.0.9
- app-admin/eselect-opengl
- amd64? ( app-emulation/emul-linux-x86-xlibs )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- x11-libs/libXrandr
- >=sys-apps/portage-2.1.1-r1"
-
-DEPEND="${RDEPEND}
- x11-proto/xf86miscproto
- x11-proto/xf86vidmodeproto
- x11-proto/inputproto
- !<x11-drivers/ati-drivers-8.552-r1"
-
-EMULTILIB_PKG="true"
-
-QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- opt/bin/amdcccle"
-QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
- usr/lib/xorg/modules/drivers/fglrx_drv.so
- usr/lib/opengl/ati/lib/libGL.so.1.2
- usr/lib/xorg/modules/glesx.so
- usr/lib/xorg/modules/amdxmm.so"
-QA_TEXTRELS_amd64="
- usr/lib64/opengl/ati/lib/libGL.so.1.2
- usr/lib32/opengl/ati/lib/libGL.so.1.2
- usr/lib64/dri/fglrx_dri.so
- usr/lib32/dri/fglrx_dri.so
- usr/lib32/xorg/modules/glesx.so
- usr/lib64/xorg/modules/glesx.so"
-
-S="${WORKDIR}"
-
-pkg_setup() {
-
- # Define module dir.
- MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod"
-
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if ! kernel_is 2 6; then
- eerror "Need a 2.6 kernel to compile against!"
- die "Need a 2.6 kernel to compile against!"
- fi
-
- if kernel_is ge 2 6 25 && linux_chkconfig_present PREEMPT_RCU; then
- die "${P} is not compatible with RCU Preemption (bug #223281), please disable it"
- fi
-
- if kernel_is ge 2 6 26 && ! linux_chkconfig_present UNUSED_SYMBOLS; then
- ewarn "You have to Enable unused/obsolete exported symbols in Kernel hacking section of kernel config for fglrx to load"
- fi
-
- if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then
- eerror "${P} requires support for pci_find_slot."
- die "${P} requires support for pci_find_slot."
- fi
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && \
- ! linux_chkconfig_present PCIEPORTBUS; then
- ewarn "You need AGP and/or PCI Express support for direct rendering to work."
- fi
-
- if linux_chkconfig_present PARAVIRT; then
- eerror "The current ati-drivers don't compile when having"
- eerror "paravirtualization active due to GPL symbol export"
- eerror "restrictions."
- eerror "Please disable it:"
- eerror " CONFIG_PARAVIRT=n"
- eerror "in /usr/src/linux/.config or"
- eerror " Processor type and features -->"
- eerror " [ ] Paravirtualization support (EXPERIMENTAL)"
- eerror "in 'menuconfig'"
- die "CONFIG_PARAVIRT enabled"
- fi
-
- if ! linux_chkconfig_present MAGIC_SYSRQ; then
- eerror "You need MAGIC_SYSRQ enabled in order to build ati-drivers"
- die "CONFIG_MAGIC_SYSRQ disabled"
- fi
-
- # Only support xorg-server >=1.5
- BASE_DIR="${S}/x740"
-
- # This is used like $(get_libdir) for paths in ati's package.
- 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() {
- #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
-
- # These are the userspace utilities that we also have source for.
- # We rebuild these later.
- rm \
- "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
- "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
- || die "bin rm failed"
-
- if use debug; then
- # Enable debug mode in the Source Code.
- sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
- "${MODULE_DIR}/firegl_public.c" \
- || die "Failed to enable debug output."
- fi
-
- if use acpi; then
- sed -i \
- -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
- -e "s:/var/lib/gdm/:/var/gdm/:" \
- "${S}/common/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}/common/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 funktion to detect default state.
- epatch "${FILESDIR}"/${PV}/ati-powermode-opt-path-2.patch
- fi
-
- pushd ${MODULE_DIR} >/dev/null
- ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "symlinking precompiled core failed"
-
- 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"
- popd >/dev/null
-
- mkdir extra || die "mkdir failed"
- cd extra
- unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
- sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
- lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
- # Add a category.
- mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
- cd ..
-}
-
-src_compile() {
- linux-mod_src_compile
-
- einfo "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}"/common/usr/include fgl_glxgears.c \
- -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
-
- einfo "Building fglrx_gamma lib"
- cd "${S}"/extra/lib/fglrx_gamma
- "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
- -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
- -lXext || die "fglrx_gamma lib build failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
-
- einfo "Building fglrx_gamma util"
- cd "${S}"/extra/programs/fglrx_gamma
- "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
- -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
- fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
- || die "fglrx_gamma util build failed"
-
-}
-
-src_install() {
- linux-mod_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"
-
- # 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/{esut.a,glesx.so,amdxmm.so}
-
- # Arch-specific files.
- # (s)bin.
- into /opt
- if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
- fi
- # We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
-
- # lib.
- exeinto /usr/$(get_libdir)
- # Everything except for the libGL.so installed in src_install-libs.
- doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
- insinto /usr/$(get_libdir)
- doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -not -name '*.so*')
-
- # Common files.
- # etc.
- insinto /etc/ati
- # Everything except for the authatieventsd.sh script.
- doins common/etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
- if use acpi; then
- insopts -m0755
- doins common/etc/ati/authatieventsd.sh
- fi
-
- # include.
- insinto /usr
- doins -r common/usr/include
- insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # Just the atigetsysteminfo.sh script.
- into /usr
- dosbin common/usr/sbin/*
-
- # data files for the control panel.
- insinto /usr/share
- doins -r common/usr/share/ati
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
- make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
- ccc_large System
-
- # doc.
- dohtml -r common/usr/share/doc/fglrx
-
- if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
-
- pushd common/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
- fi
-
- # Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_glxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
-
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
-
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
-
- # Gentoo-specific stuff:
- if use acpi; then
- newinitd "${FILESDIR}"/atieventsd.init atieventsd \
- || die "Failed to install atieventsd.init.d"
- echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
- fi
-}
-
-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
- doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
-
- exeinto ${ATI_ROOT}/extensions
- doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/*
-
- # 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
-
- # Make up a libGL.la. Ati does not provide one, but mesa does. If
- # a (libtool-based) libfoo is built with libGL.la present a
- # reference to it is put into libfoo.la, and compiling
- # (libtool-based) things that link too libfoo.la will complain if
- # libGL.la disappears. So if we do not make up a libGL.la
- # switching between mesa and ati becomes painful.
- local revision=$(printf '%d%02d%02d' $(get_version_components))
- sed -e "s:\${libmajor}:${libmajor}:g" \
- -e "s:\${libminor}:${libminor}:g" \
- -e "s:\${libdir}:$(get_libdir):g" \
- -e "s:\${revision}:${revision}:g" \
- "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
- || die "sed failed to make libGL.la"
-
- 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() {
- /usr/bin/eselect opengl set --use-old ati
-
- elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- elog "To change your xorg.conf you can use the bundled \"aticonfig\""
- elog
- 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 "You will have to source /etc/profile (or logout and back in) for dri"
- elog "to work, unless you previously had ati-drivers installed."
-
- # Workaroud screen corruption
- ewarn "If you experience screen corruption with this driver, try putting"
- ewarn ' Option "XAANoOffscreenPixmaps" "true"'
- ewarn "in the Device Section of /etc/X11/xorg.conf."
-
- linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- linux-mod_pkg_postrm
- /usr/bin/eselect opengl set --use-old xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.573-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.573-r1.ebuild
deleted file mode 100644
index e58f2293f3da..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.573-r1.ebuild
+++ /dev/null
@@ -1,444 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.573-r1.ebuild,v 1.4 2009/04/23 04:54:54 je_fro Exp $
-
-IUSE="acpi debug"
-
-inherit eutils multilib linux-mod toolchain-funcs versionator
-
-DESCRIPTION="Ati precompiled drivers for recent chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-9-1-x86.x86_64.run"
-
-LICENSE="AMD GPL-2 QPL-1.0 as-is"
-KEYWORDS="~amd64 ~x86"
-
-# The portage dep is for COLON_SEPARATED support in env-update.
-# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
-RDEPEND=">=x11-base/xorg-server-1.5
- !x11-apps/ati-drivers-extra
- >=app-admin/eselect-1.0.9
- app-admin/eselect-opengl
- sys-libs/libstdc++-v3
- amd64? ( app-emulation/emul-linux-x86-xlibs )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- x11-libs/libXrandr
- >=sys-apps/portage-2.1.1-r1"
-
-DEPEND="${RDEPEND}
- x11-proto/xf86miscproto
- x11-proto/xf86vidmodeproto
- x11-proto/inputproto
- !<x11-drivers/ati-drivers-8.552-r1"
-
-EMULTILIB_PKG="true"
-
-S="${WORKDIR}"
-
-pkg_setup() {
-
- # Define module dir.
- MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod"
-
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if kernel_is ge 2 6 29; then
- die "${P} is not yet compatible with 2.6.29 kernels. See bug #264021."
- fi
-
- if ! kernel_is 2 6; then
- eerror "Need a 2.6 kernel to compile against!"
- die "Need a 2.6 kernel to compile against!"
- fi
-
- if kernel_is ge 2 6 25 && linux_chkconfig_present PREEMPT_RCU; then
- die "${P} is not compatible with RCU Preemption (bug #223281), please disable it"
- fi
-
- if kernel_is ge 2 6 26 && ! linux_chkconfig_present UNUSED_SYMBOLS; then
- ewarn "You have to Enable unused/obsolete exported symbols in Kernel hacking section of kernel config for fglrx to load"
- fi
-
- if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then
- eerror "${P} requires support for pci_find_slot."
- die "${P} requires support for pci_find_slot."
- fi
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && \
- ! linux_chkconfig_present PCIEPORTBUS; then
- ewarn "You need AGP and/or PCI Express support for direct rendering to work."
- fi
-
- if linux_chkconfig_present PARAVIRT; then
- eerror "The current ati-drivers don't compile when having"
- eerror "paravirtualization active due to GPL symbol export"
- eerror "restrictions."
- eerror "Please disable it:"
- eerror " CONFIG_PARAVIRT=n"
- eerror "in /usr/src/linux/.config or"
- eerror " Processor type and features -->"
- eerror " [ ] Paravirtualization support (EXPERIMENTAL)"
- eerror "in 'menuconfig'"
- die "CONFIG_PARAVIRT enabled"
- fi
-
- if ! linux_chkconfig_present MAGIC_SYSRQ; then
- eerror "You need MAGIC_SYSRQ enabled in order to build ati-drivers"
- die "CONFIG_MAGIC_SYSRQ disabled"
- fi
-
- # Only support xorg-server >=1.5
- BASE_DIR="${S}/x740"
-
- if ! linux_chkconfig_present PCI_MSI; then
- eerror "You need PCI_MSI enabled in order to build ati-drivers"
- die "CONFIG_PCI_MSI disabled"
- fi
-
- # This is used like $(get_libdir) for paths in ati's package.
- 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() {
- #Switching to a standard way to extract the files since otherwise no signature file
- #would be created
- local src="${DISTDIR}/${A}"
- sh "${src}" --extract "${S}" 2&>1 /dev/null
- cd "${S}"
- epatch "${FILESDIR}"/${PV}/ati-drivers-xen-8.552.patch || die "epatch failed"
-
- # These are the userspace utilities that we also have source for.
- # We rebuild these later.
- rm \
- "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
- "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
- || die "bin rm failed"
-
- if use debug; then
- # Enable debug mode in the Source Code.
- sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
- "${MODULE_DIR}/firegl_public.c" \
- || die "Failed to enable debug output."
- fi
-
- if use acpi; then
- sed -i \
- -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
- -e "s:/var/lib/gdm/:/var/gdm/:" \
- "${S}/common/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}/common/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 funktion to detect default state.
- epatch "${FILESDIR}"/${PV}/ati-powermode-opt-path-2.patch
- fi
-
- pushd ${MODULE_DIR} >/dev/null
- ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "symlinking precompiled core failed"
-
- 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"
- popd >/dev/null
-
- mkdir extra || die "mkdir failed"
- cd extra
- unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
- sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
- lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
- # Add a category.
- mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
- cd ..
-}
-
-src_compile() {
- linux-mod_src_compile
-
- einfo "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}"/common/usr/include fgl_glxgears.c \
- -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
-
- einfo "Building fglrx_gamma lib"
- cd "${S}"/extra/lib/fglrx_gamma
- "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
- -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
- -lXext || die "fglrx_gamma lib build failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
-
- einfo "Building fglrx_gamma util"
- cd "${S}"/extra/programs/fglrx_gamma
- "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
- -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
- fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
- || die "fglrx_gamma util build failed"
-
-}
-
-src_install() {
- linux-mod_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"
-
- # 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/{esut.a,glesx.so,amdxmm.so}
-
- # Arch-specific files.
- # (s)bin.
- into /opt
- if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
- fi
- # We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
-
- # lib.
- exeinto /usr/$(get_libdir)
- # Everything except for the libGL.so installed in src_install-libs.
- doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
- insinto /usr/$(get_libdir)
- doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -not -name '*.so*')
-
- # Common files.
- # etc.
- insinto /etc/ati
- # Everything except for the authatieventsd.sh script.
- doins common/etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
- if use acpi; then
- insopts -m0755
- doins common/etc/ati/authatieventsd.sh
- fi
-
- # include.
- insinto /usr
- doins -r common/usr/include
- insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # Just the atigetsysteminfo.sh script.
- into /usr
- dosbin common/usr/sbin/*
-
- # data files for the control panel.
- insinto /usr/share
- doins -r common/usr/share/ati
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
- make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
- ccc_large System
-
- # doc.
- dohtml -r common/usr/share/doc/fglrx
-
- if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
-
- pushd common/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
- fi
-
- # Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_glxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
-
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
-
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
-
- # Gentoo-specific stuff:
- if use acpi; then
- newinitd "${FILESDIR}"/atieventsd.init atieventsd \
- || die "Failed to install atieventsd.init.d"
- echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
- fi
-}
-
-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
- doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
-
- exeinto ${ATI_ROOT}/extensions
- doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/*
-
- # 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}/*.so
-
- # Make up a libGL.la. Ati does not provide one, but mesa does. If
- # a (libtool-based) libfoo is built with libGL.la present a
- # reference to it is put into libfoo.la, and compiling
- # (libtool-based) things that link too libfoo.la will complain if
- # libGL.la disappears. So if we do not make up a libGL.la
- # switching between mesa and ati becomes painful.
- local revision=$(printf '%d%02d%02d' $(get_version_components))
- sed -e "s:\${libmajor}:${libmajor}:g" \
- -e "s:\${libminor}:${libminor}:g" \
- -e "s:\${libdir}:$(get_libdir):g" \
- -e "s:\${revision}:${revision}:g" \
- "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
- || die "sed failed to make libGL.la"
-
- 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() {
- /usr/bin/eselect opengl set --use-old ati
-
- elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- elog "To change your xorg.conf you can use the bundled \"aticonfig\""
- elog
- 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 "You will have to source /etc/profile (or logout and back in) for dri"
- elog "to work, unless you previously had ati-drivers installed."
-
- # Workaroud screen corruption
- ewarn "If you experience screen corruption with this driver, try putting"
- ewarn ' Option "XAANoOffscreenPixmaps" "true"'
- ewarn "in the Device Section of /etc/X11/xorg.conf."
-
- linux-mod_pkg_postinst
-}
-
-pkg_prerm() {
- /usr/bin/eselect opengl set xorg-x11
-}
diff --git a/x11-drivers/ati-drivers/ati-drivers-8.582.ebuild b/x11-drivers/ati-drivers/ati-drivers-8.582.ebuild
deleted file mode 100644
index 4edc42e3dc3b..000000000000
--- a/x11-drivers/ati-drivers/ati-drivers-8.582.ebuild
+++ /dev/null
@@ -1,444 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.582.ebuild,v 1.4 2009/04/23 04:54:54 je_fro Exp $
-
-IUSE="acpi debug"
-
-inherit eutils multilib linux-mod toolchain-funcs versionator
-
-DESCRIPTION="Ati precompiled drivers for recent chipsets"
-HOMEPAGE="http://www.ati.com"
-ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
-SRC_URI="${ATI_URL}/ati-driver-installer-9.2-x86.x86_64.run"
-
-LICENSE="AMD GPL-2 QPL-1.0 as-is"
-KEYWORDS="~amd64 ~x86"
-
-# The portage dep is for COLON_SEPARATED support in env-update.
-# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
-RDEPEND=">=x11-base/xorg-server-1.5
- !x11-apps/ati-drivers-extra
- >=app-admin/eselect-1.0.9
- app-admin/eselect-opengl
- sys-libs/libstdc++-v3
- amd64? ( app-emulation/emul-linux-x86-xlibs )
- acpi? (
- x11-apps/xauth
- sys-power/acpid
- )
- x11-libs/libXrandr
- >=sys-apps/portage-2.1.1-r1"
-
-DEPEND="${RDEPEND}
- x11-proto/xf86miscproto
- x11-proto/xf86vidmodeproto
- x11-proto/inputproto
- !<x11-drivers/ati-drivers-8.552-r1"
-
-EMULTILIB_PKG="true"
-
-S="${WORKDIR}"
-
-pkg_setup() {
-
- # Define module dir.
- MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod"
-
- #check kernel and sets up KV_OBJ
- MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
- BUILD_TARGETS="kmod_build"
- linux-mod_pkg_setup
- BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
-
- if kernel_is ge 2 6 29; then
- die "${P} is not yet compatible with 2.6.29 kernels. See bug #264021."
- fi
-
- if ! kernel_is 2 6; then
- eerror "Need a 2.6 kernel to compile against!"
- die "Need a 2.6 kernel to compile against!"
- fi
-
- if kernel_is ge 2 6 25 && linux_chkconfig_present PREEMPT_RCU; then
- die "${P} is not compatible with RCU Preemption (bug #223281), please disable it"
- fi
-
- if kernel_is ge 2 6 26 && ! linux_chkconfig_present UNUSED_SYMBOLS; then
- ewarn "You have to Enable unused/obsolete exported symbols in Kernel hacking section of kernel config for fglrx to load"
- fi
-
- if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then
- eerror "${P} requires support for pci_find_slot."
- die "${P} requires support for pci_find_slot."
- fi
-
- if ! linux_chkconfig_present MTRR; then
- ewarn "You don't have MTRR support enabled, the direct rendering will not work."
- fi
-
- if linux_chkconfig_builtin DRM; then
- ewarn "You have DRM support enabled builtin, the direct rendering will not work."
- fi
-
- if ! linux_chkconfig_present AGP && \
- ! linux_chkconfig_present PCIEPORTBUS; then
- ewarn "You need AGP and/or PCI Express support for direct rendering to work."
- fi
-
- if linux_chkconfig_present PARAVIRT; then
- eerror "The current ati-drivers don't compile when having"
- eerror "paravirtualization active due to GPL symbol export"
- eerror "restrictions."
- eerror "Please disable it:"
- eerror " CONFIG_PARAVIRT=n"
- eerror "in /usr/src/linux/.config or"
- eerror " Processor type and features -->"
- eerror " [ ] Paravirtualization support (EXPERIMENTAL)"
- eerror "in 'menuconfig'"
- die "CONFIG_PARAVIRT enabled"
- fi
-
- if ! linux_chkconfig_present MAGIC_SYSRQ; then
- eerror "You need MAGIC_SYSRQ enabled in order to build ati-drivers"
- die "CONFIG_MAGIC_SYSRQ disabled"
- fi
-
- # Only support xorg-server >=1.5
- BASE_DIR="${S}/x740"
-
- if ! linux_chkconfig_present PCI_MSI; then
- eerror "You need PCI_MSI enabled in order to build ati-drivers"
- die "CONFIG_PCI_MSI disabled"
- fi
-
- # This is used like $(get_libdir) for paths in ati's package.
- 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() {
- #Switching to a standard way to extract the files since otherwise no signature file
- #would be created
- local src="${DISTDIR}/${A}"
- sh "${src}" --extract "${S}" 2&>1 /dev/null
- cd "${S}"
- epatch "${FILESDIR}"/${PV}/ati-drivers-xen-8.552.patch || die "epatch failed"
-
- # These are the userspace utilities that we also have source for.
- # We rebuild these later.
- rm \
- "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
- "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
- || die "bin rm failed"
-
- if use debug; then
- # Enable debug mode in the Source Code.
- sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
- "${MODULE_DIR}/firegl_public.c" \
- || die "Failed to enable debug output."
- fi
-
- if use acpi; then
- sed -i \
- -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
- -e "s:/var/lib/gdm/:/var/gdm/:" \
- "${S}/common/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}/common/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 funktion to detect default state.
- epatch "${FILESDIR}"/${PV}/ati-powermode-opt-path-2.patch
- fi
-
- pushd ${MODULE_DIR} >/dev/null
- ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
- || die "symlinking precompiled core failed"
-
- 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"
- popd >/dev/null
-
- mkdir extra || die "mkdir failed"
- cd extra
- unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
- sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
- lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
- # Add a category.
- mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
- cd ..
-}
-
-src_compile() {
- linux-mod_src_compile
-
- einfo "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}"/common/usr/include fgl_glxgears.c \
- -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
-
- einfo "Building fglrx_gamma lib"
- cd "${S}"/extra/lib/fglrx_gamma
- "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
- -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
- -lXext || die "fglrx_gamma lib build failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
- ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
-
- einfo "Building fglrx_gamma util"
- cd "${S}"/extra/programs/fglrx_gamma
- "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
- -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
- fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
- || die "fglrx_gamma util build failed"
-
-}
-
-src_install() {
- linux-mod_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"
-
- # 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/{esut.a,glesx.so,amdxmm.so}
-
- # Arch-specific files.
- # (s)bin.
- into /opt
- if use acpi; then
- dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
- fi
- # We cleaned out the compilable stuff in src_unpack
- dobin "${ARCH_DIR}"/usr/X11R6/bin/*
-
- # lib.
- exeinto /usr/$(get_libdir)
- # Everything except for the libGL.so installed in src_install-libs.
- doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
- insinto /usr/$(get_libdir)
- doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
- -maxdepth 1 -type f -not -name '*.so*')
-
- # Common files.
- # etc.
- insinto /etc/ati
- # Everything except for the authatieventsd.sh script.
- doins common/etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
- if use acpi; then
- insopts -m0755
- doins common/etc/ati/authatieventsd.sh
- fi
-
- # include.
- insinto /usr
- doins -r common/usr/include
- insinto /usr/include/X11/extensions
- doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
-
- # Just the atigetsysteminfo.sh script.
- into /usr
- dosbin common/usr/sbin/*
-
- # data files for the control panel.
- insinto /usr/share
- doins -r common/usr/share/ati
- insinto /usr/share/pixmaps
- doins common/usr/share/icons/ccc_{large,small}.xpm
- make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
- ccc_large System
-
- # doc.
- dohtml -r common/usr/share/doc/fglrx
-
- if use acpi; then
- doman common/usr/share/man/man8/atieventsd.8
-
- pushd common/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
- fi
-
- # Done with the "source" tree. Install tools we rebuilt:
- dobin extra/fgl_glxgears/fgl_glxgears
- newdoc extra/fgl_glxgears/README README.fgl_glxgears
-
- dolib extra/lib/fglrx_gamma/*so*
- newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
-
- dobin extra/programs/fglrx_gamma/fglrx_xgamma
- doman extra/programs/fglrx_gamma/fglrx_xgamma.1
- newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
-
- # Gentoo-specific stuff:
- if use acpi; then
- newinitd "${FILESDIR}"/atieventsd.init atieventsd \
- || die "Failed to install atieventsd.init.d"
- echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
- newconfd "${T}"/atieventsd.conf atieventsd
- fi
-}
-
-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
- doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
- dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
-
- exeinto ${ATI_ROOT}/extensions
- doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/*
-
- # 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}/*.so
-
- # Make up a libGL.la. Ati does not provide one, but mesa does. If
- # a (libtool-based) libfoo is built with libGL.la present a
- # reference to it is put into libfoo.la, and compiling
- # (libtool-based) things that link too libfoo.la will complain if
- # libGL.la disappears. So if we do not make up a libGL.la
- # switching between mesa and ati becomes painful.
- local revision=$(printf '%d%02d%02d' $(get_version_components))
- sed -e "s:\${libmajor}:${libmajor}:g" \
- -e "s:\${libminor}:${libminor}:g" \
- -e "s:\${libdir}:$(get_libdir):g" \
- -e "s:\${revision}:${revision}:g" \
- "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
- || die "sed failed to make libGL.la"
-
- 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() {
- /usr/bin/eselect opengl set --use-old ati
-
- elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
- elog "To change your xorg.conf you can use the bundled \"aticonfig\""
- elog
- 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 "You will have to source /etc/profile (or logout and back in) for dri"
- elog "to work, unless you previously had ati-drivers installed."
-
- # Workaroud screen corruption
- ewarn "If you experience screen corruption with this driver, try putting"
- ewarn ' Option "XAANoOffscreenPixmaps" "true"'
- ewarn "in the Device Section of /etc/X11/xorg.conf."
-
- linux-mod_pkg_postinst
-}
-
-pkg_prerm() {
- /usr/bin/eselect opengl set xorg-x11
-}