Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 200140
Collapse All | Expand All

(-)ati-drivers-8.42.3.ebuild (-28 / +71 lines)
Lines 1-26 Link Here
1
# Copyright 1999-2007 Gentoo Foundation
1
# Copyright 1999-2007 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.42.3.ebuild,v 1.2 2007/11/20 22:41:09 wltjr Exp $
4
3
5
IUSE="acpi multilib"
4
5
IUSE="fireglhack debug acpi multilib"
6
6
7
inherit eutils multilib linux-mod toolchain-funcs versionator
7
inherit eutils multilib linux-mod toolchain-funcs versionator
8
8
9
DESCRIPTION="Ati precompiled drivers for recent chipsets"
9
DESCRIPTION="Ati precompiled drivers for recent chipsets"
10
HOMEPAGE="http://www.ati.com"
10
HOMEPAGE="http://www.ati.com"
11
ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
11
ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
12
SRC_URI="${ATI_URL}/ati-driver-installer-${PV}-x86.x86_64.run"
12
SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run"
13
13
14
LICENSE="AMD GPL-2 QPL-1.0 as-is"
14
LICENSE="AMD GPL-2 QPL-1.0 as-is"
15
KEYWORDS="~amd64 ~x86"
15
KEYWORDS="~amd64 ~x86"
16
16
17
# The portage dep is for COLON_SEPARATED support in env-update.
17
# The portage dep is for COLON_SEPARATED support in env-update.
18
# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
18
# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
19
# The libXrandr dep is for ati-config. See bug #197378.
19
RDEPEND="x11-base/xorg-server
20
RDEPEND="x11-base/xorg-server
20
	!x11-apps/ati-drivers-extra
21
	!x11-apps/ati-drivers-extra
22
	!x11-drivers/ati-drivers
21
	>=app-admin/eselect-1.0.9
23
	>=app-admin/eselect-1.0.9
24
	x11-libs/libXrandr
22
	app-admin/eselect-opengl
25
	app-admin/eselect-opengl
23
	=virtual/libstdc++-3.3*
26
	=virtual/libstdc++-3.3*
24
	amd64? ( multilib? ( app-emulation/emul-linux-x86-compat ) )
27
	amd64? ( multilib? ( app-emulation/emul-linux-x86-compat ) )
25
	acpi? (
28
	acpi? (
26
		x11-apps/xauth
29
		x11-apps/xauth
Lines 42-57 Link Here
42
	usr/lib64/opengl/ati/lib/libGL.so.1.2
45
	usr/lib64/opengl/ati/lib/libGL.so.1.2
43
	usr/lib32/opengl/ati/lib/libGL.so.1.2
46
	usr/lib32/opengl/ati/lib/libGL.so.1.2
44
	opt/bin/amdcccle"
47
	opt/bin/amdcccle"
45
QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
48
QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
46
	usr/lib/xorg/modules/drivers/fglrx_drv.so
49
	usr/lib/xorg/modules/drivers/fglrx_drv.so
47
	usr/lib/opengl/ati/lib/libGL.so.1.2"
50
	usr/lib/opengl/ati/lib/libGL.so.1.2
51
	usr/lib/xorg/modules/glesx.so"
48
QA_TEXTRELS_amd64="
52
QA_TEXTRELS_amd64="
49
	usr/lib64/opengl/ati/lib/libGL.so.1.2
53
	usr/lib64/opengl/ati/lib/libGL.so.1.2
50
	usr/lib32/opengl/ati/lib/libGL.so.1.2
54
	usr/lib32/opengl/ati/lib/libGL.so.1.2
51
	usr/lib64/dri/fglrx_dri.so
55
	usr/lib64/dri/fglrx_dri.so
52
	usr/lib32/dri/fglrx_dri.so"
56
	usr/lib32/dri/fglrx_dri.so
57
	usr/lib32/xorg/modules/glesx.so
58
	usr/lib64/xorg/modules/glesx.so"
53
59
54
S="${WORKDIR}"
60
S="${WORKDIR}"
55
61
56
pkg_setup() {
62
pkg_setup() {
57
	#check kernel and sets up KV_OBJ
63
	#check kernel and sets up KV_OBJ
Lines 77-87 Link Here
77
		! linux_chkconfig_present PCIEPORTBUS; then
83
		! linux_chkconfig_present PCIEPORTBUS; then
78
		ewarn "You need AGP and/or PCI Express support for direct rendering to work."
84
		ewarn "You need AGP and/or PCI Express support for direct rendering to work."
79
	fi
85
	fi
80
86
81
	if linux_chkconfig_present PARAVIRT; then
87
	if linux_chkconfig_present PARAVIRT; then
82
		eerror "The current ati-drivers don't compile when having"
88
		eerror "The current ati-catalyst drivers don't compile when having"
83
		eerror "paravirtualization active due to GPL symbol export"
89
		eerror "paravirtualization active due to GPL symbol export"
84
		eerror "restrictions."
90
		eerror "restrictions."
85
		eerror "Please disable it:"
91
		eerror "Please disable it:"
86
		eerror "	CONFIG_PARAVIRT=n"
92
		eerror "	CONFIG_PARAVIRT=n"
87
		eerror "in /usr/src/linux/.config or"
93
		eerror "in /usr/src/linux/.config or"
Lines 89-110 Link Here
89
		eerror "		[ ] Paravirtualization support (EXPERIMENTAL)"
95
		eerror "		[ ] Paravirtualization support (EXPERIMENTAL)"
90
		eerror "in 'menuconfig'"
96
		eerror "in 'menuconfig'"
91
		die "CONFIG_PARAVIRT enabled"
97
		die "CONFIG_PARAVIRT enabled"
92
	fi
98
	fi
93
99
94
	if linux_chkconfig_present SLUB; then
100
	if use fireglhack; then
95
		ewarn  "You have selected support for the SLUB allocator. Suspending is"
101
		ewarn "You have set the fireglhack use flag. This will enable"
96
		ewarn  "known to be broken with this allocator and ati-drivers. If you"
102
		ewarn "firegl support in the Ati Catalyst driver, even though this"
97
		ewarn  "need support for Suspend-To-Ram or Suspend-To-Disk, select SLAB"
103
		ewarn "support is TOTALLY undocumented and may VOID your warranty"
98
		ewarn  "instead. To do this enable CONFIG_SLAB and disable CONFIG_SLUB"
104
		ewarn "and/or cause IRREPARABLE HARM to your hardware."
99
		ewarn  "in /usr/src/linux/.config or select"
105
		if [ x$BREAKMYCOMPUTER = xyes ]
100
		ewarn  "		General setup  --->"
106
		then
101
		ewarn  "			Choose SLAB allocator (SLUB)  --->"
107
			ewarn "You have set the magic cookie. Proceeding down the"
102
		ewarn  "				(X) SLAB"
108
			ewarn "Rabbit's Hole. Nothing Follows."
103
		ewarn  "in 'menuconfig'"
109
		else
110
			ewarn "To document that you have understood the above warning,"
111
			ewarn "you will have to pass the variable 'BREAKMYCOMPUTER' with"
112
			ewarn "the value 'yes' to this ebuild."
113
			die "Magic cookie needed. Access to Rabbit Hole barred."
114
		fi
104
	fi
115
	fi
105
116
117
106
	# xorg-server 1.1 and its prereleases correspond to xorg 7.1.
118
	# xorg-server 1.1 and its prereleases correspond to xorg 7.1.
107
	if has_version ">=x11-base/xorg-server-1.0.99"; then
119
	if has_version ">=x11-base/xorg-server-1.0.99"; then
108
		BASE_DIR="${S}/x710"
120
		BASE_DIR="${S}/x710"
109
	else
121
	else
110
		BASE_DIR="${S}/x690"
122
		BASE_DIR="${S}/x690"
Lines 145-155 Link Here
145
			-e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
157
			-e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
146
			"${S}/common/etc/ati/authatieventsd.sh" \
158
			"${S}/common/etc/ati/authatieventsd.sh" \
147
			|| die "sed failed."
159
			|| die "sed failed."
148
160
149
		# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/
161
		# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/
150
		epatch "${FILESDIR}"/ati-powermode-opt-path.patch
162
		epatch "${FILESDIR}"/${PN/-catalyst/}-powermode-opt-path.patch
163
	fi
164
165
	if use debug; then
166
		sed -i \
167
			-e "s:#define DRM_DEBUG_CODE 0:#define DRM_DEBUG_CODE 1:" \
168
			"${S}/common/lib/modules/fglrx/build_mod/firegl_public.c" \
169
			|| die "Failed sedding firegl_public.c"
151
	fi
170
	fi
152
171
153
	pushd common/lib/modules/fglrx/build_mod >/dev/null
172
	pushd common/lib/modules/fglrx/build_mod >/dev/null
154
	ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
173
	ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
155
		|| die "symlinking precompiled core failed"
174
		|| die "symlinking precompiled core failed"
Lines 173-188 Link Here
173
		lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
192
		lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
174
	# Add a category.
193
	# Add a category.
175
	mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
194
	mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
176
	cd ..
195
	cd ..
177
196
178
	# Misc. patches.
197
	#Fix bug 197470
179
	epatch "${FILESDIR}"/${PV}/warnings.patch
198
	#x11-drivers/ati-drivers-8.40.4: ati-powermode.sh doesn't work
180
199
	epatch "${FILESDIR}"/${PN/-catalyst/}-powermode.sh.who.patch \
181
	if kernel_is ge 2 6 23; then
200
		|| die "Failed patching ${PN/-catalyst//}-powermode.sh.who.patch"
182
		epatch "${FILESDIR}"/${PV}/linux-2.6.23.patch
201
	#Fix bug 196684
183
	fi
202
	#x11-drivers/ati-drivers resume broken with 2.6.23 due to renamed
203
	#config option
204
	epatch "${FILESDIR}"/${PV}/${PN}-smp-sleep-fix.patch \
205
		|| die "Failed patching ${PN}-smp-sleep-fix.patch"
206
	
207
	if use fireglhack; then
208
		epatch "${FILESDIR}"/${PV}/${PN}-firegl-pci-id-hack-hack-hack.patch \
209
		|| die "Failed patching ${PN}-firegl-pci-id-hack-hack-hack.patch"
210
	fi
211
212
	#The former -warnings patch (see bug 187015 ) was defective because it
213
	#disabled an SMP compatibility feature to fix a warning about an unused
214
	#function. It failed to fix the warning, yet crippled the feature.
215
	#It seemed a good time to split this into two different patches.
216
217
	#This patch fixes a warning that appears on systems where CONFIG_SMP
218
	#is not defined
219
	epatch "${FILESDIR}"/${PV}/${PN}-firegl_smp_func_parameter_wrap-warning.patch
220
221
	#This patch fixes warnings on x86_64 (amd64) systems.
222
	#-firegl_interrupt_poll_wrap(struct file *user_file, poll_table *pt) 
223
	#+firegl_interrupt_poll_wrap(struct file *user_file, struct poll_table_struct *pt)
224
	#was dropped because it *caused* warnings on x86 systems.
225
	epatch "${FILESDIR}"/${PV}/${PN}-x86_64-warnings.patch
184
}
226
}
185
227
186
src_compile() {
228
src_compile() {
187
	linux-mod_src_compile
229
	linux-mod_src_compile
188
230
Lines 412-448 Link Here
412
	echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
454
	echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
413
	doenvd "${envname}"
455
	doenvd "${envname}"
414
}
456
}
415
457
416
pkg_postinst() {
458
pkg_postinst() {
417
	ewarn "If you experience screen corruption with this driver, try putting"
418
	ewarn '		Option "XAANoOffscreenPixmaps" "true"'
419
	ewarn "in the Device Section of /etc/X11/xorg.conf."
420
459
421
	/usr/bin/eselect opengl set --use-old ati
460
	/usr/bin/eselect opengl set --use-old ati
422
461
423
	elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
462
	elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
424
	elog "To change your xorg.conf you can use the bundled \"aticonfig\""
463
	elog "To change your xorg.conf you can use the bundled \"aticonfig\""
425
	elog
464
	elog
426
	elog "If you experience unexplained segmentation faults and kernel crashes"
465
	elog "If you experience unexplained segmentation faults and kernel crashes"
427
	elog "with this driver and multi-threaded applications such as wine,"
466
	elog "with this driver and multi-threaded applications such as wine,"
428
	elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
467
	elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
429
	elog
468
	elog
469
	elog "If you experience screen corruption with this driver, try putting"
470
	elog '         Option "XAANoOffscreenPixmaps" "true"'
471
	elog "in the Device Section of /etc/X11/xorg.conf."
472
	elog
430
	# (to get the LIBGL_DRIVERS_PATH)
473
	# (to get the LIBGL_DRIVERS_PATH)
431
	elog "You will have to source /etc/profile (or logout and back in) for dri"
474
	elog "You will have to source /etc/profile (or logout and back in) for dri"
432
	elog "to work, unless you previously had ati-drivers installed."
475
	elog "to work, unless you previously had ati-drivers installed."
433
	# DRM module
476
	# DRM module
434
	linux-mod_pkg_postinst
477
	linux-mod_pkg_postinst
435
	# Warning per bug #199720
478
	# Warning per bug #199720
436
	elog "***** Warning *****"
479
	elog "***** Warning *****"
437
	elog "ATI has stated this is not a complete release version and should"
480
	elog "ATI has stated this is not a complete release version and should"
438
	elog "not be distributed. Although it is the version presented on their"
481
	elog "not be distributed, although it is the version presented on their"
439
	elog "website for certain chipsets/cards. Due to this version being"
482
	elog "website for certain chipsets/cards. Due to this version being"
440
	elog "incomplete, some users will experience \"(EE) No devices detected.\""
483
	elog "incomplete, some users will experience \"(EE) No devices detected.\""
441
	elog "errors. This is known and please mask this version locally if you"
484
	elog "errors. This is known and please mask this version locally if you"
442
	elog "experience that. For further information please see the following"
485
	elog "experience that. For further information please see the following"
443
	elog "http://www2.ati.com/drivers/linux/linux_8.42.3.html"
486
	elog "http://www2.ati.com/drivers/linux/catalyst_711_linux.html"
444
}
487
}
445
488
446
pkg_postrm() {
489
pkg_postrm() {
447
	linux-mod_pkg_postrm
490
	linux-mod_pkg_postrm
448
	/usr/bin/eselect opengl set --use-old xorg-x11
491
	/usr/bin/eselect opengl set --use-old xorg-x11

Return to bug 200140