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

(-)/usr/portage/x11-drivers/ati-drivers/ati-drivers-13.1.ebuild (-107 / +28 lines)
Lines 1-6 Link Here
1
# Copyright 1999-2013 Gentoo Foundation
1
# Copyright 1999-2013 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-13.1.ebuild,v 1.1 2013/01/18 23:13:47 chithanh Exp $
3
# $Header: $
4
4
5
EAPI=5
5
EAPI=5
6
6
Lines 8-17 Link Here
8
8
9
DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
9
DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
10
HOMEPAGE="http://www.amd.com"
10
HOMEPAGE="http://www.amd.com"
11
MY_V=( $(get_version_components) )
12
#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run"
13
DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-${PV}-linux-x86.x86_64.zip"
11
DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-${PV}-linux-x86.x86_64.zip"
14
XVBA_SDK_URI="http://developer.amd.com.php53-23.ord1-1.websitetestlink.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
12
XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
15
SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
13
SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
16
FOLDER_PREFIX="common/"
14
FOLDER_PREFIX="common/"
17
IUSE="debug +modules multilib qt4 static-libs disable-watermark"
15
IUSE="debug +modules multilib qt4 static-libs disable-watermark"
Lines 20-26 Link Here
20
KEYWORDS="-* ~amd64 ~x86"
18
KEYWORDS="-* ~amd64 ~x86"
21
SLOT="1"
19
SLOT="1"
22
20
23
RESTRICT="bindist"
21
RESTRICT="bindist test"
24
22
25
RDEPEND="
23
RDEPEND="
26
	<=x11-base/xorg-server-1.13.49[-minimal]
24
	<=x11-base/xorg-server-1.13.49[-minimal]
Lines 133-228 Link Here
133
	usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
131
	usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
134
"
132
"
135
133
134
CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP COMPAT"
135
ERROR_MTRR="CONFIG_MTRR required for direct rendering."
136
ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module for direct
137
rendering."
138
ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire\n
139
as GPL-only. This prevents ${P} from compiling with an error like this:\n
140
FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
141
142
136
_check_kernel_config() {
143
_check_kernel_config() {
137
	local failed=0
144
	local failed=0
138
	local error=""
145
	local error=""
139
	if ! kernel_is ge 2 6; then
146
	if ! kernel_is ge 2 6; then
140
		eerror "You need a 2.6 linux kernel to compile against!"
147
		eerror "Need Linux kernel 2.6+."
141
		die "No 2.6 Kernel found"
148
		die
142
	fi
143
144
	if ! linux_chkconfig_present MTRR; then
145
		ewarn "You don't have MTRR support enabled in the kernel."
146
		ewarn "Direct rendering will not work."
147
	fi
148
149
	if linux_chkconfig_builtin DRM; then
150
		ewarn "You have DRM support built in to the kernel"
151
		ewarn "Direct rendering will not work."
152
	fi
149
	fi
153
150
154
	if ! linux_chkconfig_present AGP && \
151
	if ! linux_chkconfig_present AGP && \
155
		! linux_chkconfig_present PCIEPORTBUS; then
152
		! linux_chkconfig_present PCIEPORTBUS; then
156
		ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
153
		ewarn "Either AGP (CONFIG_AGP) or PCIe (CONFIG_PCIEPORTBUS) support"
157
		ewarn "Direct rendering will not work."
154
		ewarn "must be enabled in the kernel for direct rendering."
158
	fi
159
160
	if ! linux_chkconfig_present ACPI; then
161
		eerror "${P} requires the ACPI support in the kernel"
162
		eerror "Please enable it:"
163
		eerror "    CONFIG_ACPI=y"
164
		eerror "in /usr/src/linux/.config or"
165
		eerror "    Power management and ACPI options --->"
166
		eerror "        [*] Power Management support"
167
		eerror "in the 'menuconfig'"
168
		error+=" CONFIG_ACPI disabled;"
169
		failed=1
170
	fi
171
172
	if ! linux_chkconfig_present PCI_MSI; then
173
		eerror "${P} requires MSI in the kernel."
174
		eerror "Please enable it:"
175
		eerror "    CONFIG_PCI_MSI=y"
176
		eerror "in /usr/src/linux/.config or"
177
		eerror "    Bus options (PCI etc.)  --->"
178
		eerror "        [*] Message Signaled Interrupts (MSI and MSI-X)"
179
		eerror "in the kernel config."
180
		error+=" CONFIG_PCI_MSI disabled;"
181
		failed=1
182
	fi
183
184
	if linux_chkconfig_present LOCKDEP; then
185
		eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
186
		eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only."
187
		eerror "This prevents ${P} from compiling with an error like this:"
188
		eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
189
		eerror "Please make sure the following options have been unset:"
190
		eerror "    Kernel hacking  --->"
191
		eerror "        [ ] Lock debugging: detect incorrect freeing of live locks"
192
		eerror "        [ ] Lock debugging: prove locking correctness"
193
		eerror "        [ ] Lock usage statistics"
194
		eerror "in 'menuconfig'"
195
		error+=" LOCKDEP enabled;"
196
		failed=1
197
	fi
198
199
	use amd64 && if ! linux_chkconfig_present COMPAT; then
200
		eerror "${P} requires COMPAT."
201
		eerror "Please enable the 32 bit emulation:"
202
		eerror "Executable file formats / Emulations  --->"
203
		eerror "    [*] IA32 Emulation"
204
		eerror "in the kernel config."
205
		eerror "if this doesn't enable CONFIG_COMPAT add"
206
		eerror "    CONFIG_COMPAT=y"
207
		eerror "in /usr/src/linux/.config"
208
		error+=" COMPAT disabled;"
209
		failed=1
210
	fi
155
	fi
211
156
212
	kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then
157
	kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then
213
		eerror "${P} requires BKL."
158
		eerror "CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38."
214
		eerror "Please enable the Big Kernel Lock:"
159
		die
215
		eerror "Kernel hacking  --->"
216
		eerror "    [*] Big Kernel Lock"
217
		eerror "in the kernel config."
218
		eerror "or add"
219
		eerror "    CONFIG_BKL=y"
220
		eerror "in /usr/src/linux/.config"
221
		error+=" BKL disabled;"
222
		failed=1
223
	fi
160
	fi
224
225
	[[ ${failed} -ne 0 ]] && die "${error}"
226
}
161
}
227
162
228
pkg_pretend() {
163
pkg_pretend() {
Lines 264-296 Link Here
264
	fi
199
	fi
265
200
266
	elog
201
	elog
267
	elog "Please note that this driver supports only graphic cards based on"
202
	elog "Please note that this driver only supports graphic cards based on"
268
	elog "Evergreen chipset and newer."
203
	elog "Evergreen chipset and newer."
269
	elog "This represent the AMD Radeon HD 5400+ series at this moment."
204
	elog "This includes the AMD Radeon HD 5400+ series at this moment."
270
	elog
205
	elog
271
	elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
206
	elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
272
	elog "For migration informations please reffer to:"
207
	elog "For migration informations please refer to:"
273
	elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
208
	elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
274
	einfo
209
	einfo
275
}
210
}
276
211
277
src_unpack() {
212
src_unpack() {
278
	local DRIVERS_DISTFILE XVBA_SDK_DISTFILE
213
	local DRIVERS_DISTFILE XVBA_SDK_DISTFILE
279
	DRIVERS_DISTFILE=${DRIVERS_URI/*\//}
214
	DRIVERS_DISTFILE=${DRIVERS_URI##*/}
280
	XVBA_SDK_DISTFILE=${XVBA_SDK_URI/*\//}
215
	XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/}
281
216
282
	if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then
217
	unpack ${DRIVERS_DISTFILE}
283
		unpack ${DRIVERS_DISTFILE}
218
	RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}"
284
	else
219
	sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die
285
		#please note, RUN may be insanely assigned at top near SRC_URI
286
		if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then
287
			unpack ${DRIVERS_DISTFILE}
288
			[[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}"
289
		else
290
			RUN="${DISTDIR}/${DRIVERS_DISTFILE}"
291
		fi
292
		sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die
293
	fi
294
220
295
	mkdir xvba_sdk
221
	mkdir xvba_sdk
296
	cd xvba_sdk
222
	cd xvba_sdk
Lines 298-307 Link Here
298
}
224
}
299
225
300
src_prepare() {
226
src_prepare() {
301
	# All kernel options for prepare are ment to be in here
302
	if use modules; then
227
	if use modules; then
303
		# version patches
304
		# epatch "${FILESDIR}"/kernel/${PV}-*.patch
305
		if use debug; then
228
		if use debug; then
306
			sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
229
			sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
307
				"${MODULE_DIR}/firegl_public.c" \
230
				"${MODULE_DIR}/firegl_public.c" \
Lines 323-329 Link Here
323
		-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
246
		-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
324
		-e "s:/var/lib/gdm/:/var/gdm/:" \
247
		-e "s:/var/lib/gdm/:/var/gdm/:" \
325
		"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
248
		"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
326
		|| die "sed failed."
249
		|| die "ACPI fixups failed."
327
250
328
	# Since "who" is in coreutils, we're using that one instead of "finger".
251
	# Since "who" is in coreutils, we're using that one instead of "finger".
329
	sed -i -e 's:finger:who:' \
252
	sed -i -e 's:finger:who:' \
Lines 366-372 Link Here
366
		|| die "MODVERSIONS sed failed"
289
		|| die "MODVERSIONS sed failed"
367
	cd "${S}"
290
	cd "${S}"
368
291
369
	mkdir extra || die "mkdir failed"
292
	mkdir extra || die
370
	cd extra
293
	cd extra
371
	unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz
294
	unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz
372
295
Lines 398-405 Link Here
398
	eend $?
321
	eend $?
399
}
322
}
400
323
401
src_test() { :; } # no tests present
402
403
src_install() {
324
src_install() {
404
	use modules && linux-mod_src_install
325
	use modules && linux-mod_src_install
405
326

Return to bug 453192