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

(-)/usr/portage/media-video/ati-drivers/ati-drivers-8.18.6.ebuild (-41 / +63 lines)
Lines 8-15 Link Here
8
8
9
DESCRIPTION="Ati precompiled drivers for r350, r300, r250 and r200 chipsets"
9
DESCRIPTION="Ati precompiled drivers for r350, r300, r250 and r200 chipsets"
10
HOMEPAGE="http://www.ati.com"
10
HOMEPAGE="http://www.ati.com"
11
SRC_URI="x86? ( mirror://gentoo/fglrx_6_8_0-${PV}-1.i386.rpm )
11
SRC_URI="x86? ( mirror://gentoo/ati-driver-installer-${PV}-i386.run )
12
	 amd64? ( mirror://gentoo/fglrx64_6_8_0-${PV}-1.x86_64.rpm )"
12
	 amd64? ( mirror://gentoo/ati-driver-installer-${PV}-x86_64.run )"
13
13
14
LICENSE="ATI"
14
LICENSE="ATI"
15
KEYWORDS="~amd64 ~x86"
15
KEYWORDS="~amd64 ~x86"
Lines 26-32 Link Here
26
ATIBIN="${D}/opt/ati/bin"
26
ATIBIN="${D}/opt/ati/bin"
27
RESTRICT="nostrip multilib-pkg-force"
27
RESTRICT="nostrip multilib-pkg-force"
28
28
29
MODULE_NAMES="fglrx(video:${WORKDIR}/lib/modules/fglrx/build_mod)"
29
MODULE_NAMES="fglrx(video:${WORKDIR}/common/lib/modules/fglrx/build_mod)"
30
31
32
choose_driver_folder() {
33
	BASE_NAME="${WORKDIR}/x$(get_version_component_range 1 ${X11_IMPLEM_V})"
34
35
	# Determine if we are facing X.org 6.8.99 aka 6.9
36
	if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 6 ] &&
37
	   [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 8 ] &&
38
	   [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ] 
39
	then
40
		BASE_NAME="${BASE_NAME}90"
41
	else
42
		BASE_NAME="${BASE_NAME}$(get_version_component_range 2)0"
43
	fi
44
	
45
	if use amd64 ; then
46
		BASE_NAME="${BASE_NAME}_64a"
47
	fi
48
}
30
49
31
pkg_setup(){
50
pkg_setup(){
32
	#check kernel and sets up KV_OBJ
51
	#check kernel and sets up KV_OBJ
Lines 47-60 Link Here
47
66
48
	if [[ $? -ne 0 ]] ; then
67
	if [[ $? -ne 0 ]] ; then
49
68
50
		ebegin "Checking for PCI Express support enabled"
69
                ebegin "Checking for PCI Express support enabled"
51
		linux_chkconfig_present PCIEPORTBUS
70
                linux_chkconfig_present PCIEPORTBUS
52
		eend $?
71
                eend $?
53
72
54
		if [[ $? -ne 0 ]] ; then
73
                if [[ $? -ne 0 ]] ; then
55
		ewarn "If you don't have either AGP or PCI Express support enabled, direct rendering"
74
                ewarn "If you don't have either AGP or PCI Express support enabled, direct rendering"
56
		ewarn "will not work."
75
                ewarn "will not work."
57
	fi
76
	        fi
58
77
59
	fi
78
	fi
60
	ebegin "Checking for DRM support disabled"
79
	ebegin "Checking for DRM support disabled"
Lines 69-102 Link Here
69
	X11_IMPLEM_P="$(best_version virtual/x11)"
88
	X11_IMPLEM_P="$(best_version virtual/x11)"
70
	X11_IMPLEM="${X11_IMPLEM_P%-[0-9]*}"
89
	X11_IMPLEM="${X11_IMPLEM_P%-[0-9]*}"
71
	X11_IMPLEM="${X11_IMPLEM##*\/}"
90
	X11_IMPLEM="${X11_IMPLEM##*\/}"
91
	X11_IMPLEM_V="${X11_IMPLEM_P/${X11_IMPLEM}-}"
92
	X11_IMPLEM_V="${X11_IMPLEM_V##*\/}"
72
	einfo "X11 implementation is ${X11_IMPLEM}."
93
	einfo "X11 implementation is ${X11_IMPLEM}."
94
	choose_driver_folder
73
}
95
}
74
96
75
src_unpack() {
97
src_unpack() {
76
	local OLDBIN="/usr/X11R6/bin"
98
	local OLDBIN="/usr/X11R6/bin"
77
99
78
	cd ${WORKDIR}
100
	cd ${WORKDIR}
79
	rpm_src_unpack
101
	
102
	sh ${DISTDIR}/${A} --extract .
80
103
81
	cd ${WORKDIR}/lib/modules/fglrx/build_mod
104
	rm -rf ${BASE_NAME}/usr/X11R6/bin/{fgl_glxgears,fireglcontrolpanel}
82
105
        rm -rf ${BASE_NAME}/usr/X11R6/bin/{aticonfig,fglrx_pplay}
83
#	if kernel_is 2 6
84
#	then
85
#		epatch ${FILESDIR}/fglrx-2.6.12-pci_name.patch
86
#		epatch ${FILESDIR}/fglrx-2.6.12-inter_module_get.patch
87
#	fi
88
#	epatch ${FILESDIR}/8.8.25-via-amd64.patch
89
#	epatch ${FILESDIR}/8.8.25-smp.patch
90
#	epatch ${FILESDIR}/8.14.13-amd64.patch
91
	rm -rf ${WORKDIR}/usr/X11R6/bin/{fgl_glxgears,fireglcontrolpanel}
92
	rm -rf ${WORKDIR}/usr/X11R6/bin/{aticonfig,fglrx_pplay}
93
106
107
	cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
94
}
108
}
95
109
96
97
src_compile() {
110
src_compile() {
98
	einfo "Building the DRM module..."
111
	einfo "Building the DRM module..."
99
	cd ${WORKDIR}/lib/modules/fglrx/build_mod
112
	cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
113
	ln -s ${BASE_NAME}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version)
114
100
	if kernel_is 2 6
115
	if kernel_is 2 6
101
	then
116
	then
102
		set_arch_to_kernel
117
		set_arch_to_kernel
Lines 124-130 Link Here
124
}
139
}
125
140
126
pkg_preinst() {
141
pkg_preinst() {
127
	# Clean the dinamic libGL stuff's home to ensure
142
	# Clean the dynamic libGL stuff's home to ensure
128
	# we don't have stale libs floating around ...
143
	# we don't have stale libs floating around ...
129
	if [ -d "${ROOT}/usr/lib/opengl/ati" ]
144
	if [ -d "${ROOT}/usr/lib/opengl/ati" ]
130
	then
145
	then
Lines 135-146 Link Here
135
src_install() {
150
src_install() {
136
	local ATI_ROOT="/usr/lib/opengl/ati"
151
	local ATI_ROOT="/usr/lib/opengl/ati"
137
152
138
	cd ${WORKDIR}/lib/modules/fglrx/build_mod
153
	cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
154
	MODULE_NAMES="fglrx(video::${WORKDIR}/common/lib/modules/fglrx/build_mod)"
139
	linux-mod_src_install
155
	linux-mod_src_install
140
	# DRM module
156
141
	# insinto /lib/modules/${KV_FULL}/video
142
	# set_kvobj
143
	# doins ${WORKDIR}/lib/modules/fglrx/build_mod/fglrx.${KV_OBJ}
144
	cd ${WORKDIR}
157
	cd ${WORKDIR}
145
158
146
	local native_dir
159
	local native_dir
Lines 168-178 Link Here
168
181
169
	#apps
182
	#apps
170
	exeinto /opt/ati/bin
183
	exeinto /opt/ati/bin
171
	doexe usr/X11R6/bin/*
184
	doexe ${BASE_NAME}/usr/X11R6/bin/*
172
185
173
	#ati custom stuff
186
	#ati custom stuff
174
	insinto /usr
187
	insinto /usr
175
	doins -r ${WORKDIR}/usr/include
188
	doins -r ${WORKDIR}/common/usr/include
176
189
177
	#env.d entry
190
	#env.d entry
178
	cp ${FILESDIR}/09ati ${T}/
191
	cp ${FILESDIR}/09ati ${T}/
Lines 205-211 Link Here
205
218
206
	# The GLX libraries
219
	# The GLX libraries
207
	exeinto ${ATI_ROOT}/lib
220
	exeinto ${ATI_ROOT}/lib
208
	doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/libGL.so.1.2
221
	doexe ${BASE_NAME}/usr/X11R6/${pkglibdir}/libGL.so.1.2
209
	dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
222
	dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
210
	dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so
223
	dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so
211
224
Lines 232-251 Link Here
232
	local X11_LIB_DIR="${X11_DIR}${inslibdir}"
245
	local X11_LIB_DIR="${X11_DIR}${inslibdir}"
233
246
234
	exeinto ${X11_LIB_DIR}/modules/drivers
247
	exeinto ${X11_LIB_DIR}/modules/drivers
235
	doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/modules/drivers/fglrx_drv.o
248
	# In X.org 6.8.99 / 6.9 this is a .so
249
	doexe ${BASE_NAME}/usr/X11R6/${pkglibdir}/modules/drivers/fglrx_drv.*o
236
250
237
	exeinto ${X11_LIB_DIR}/modules/dri
251
	exeinto ${X11_LIB_DIR}/modules/dri
238
	doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
252
	doexe ${BASE_NAME}/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
239
	doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/modules/dri/atiogl_a_dri.so
253
	doexe ${BASE_NAME}/usr/X11R6/${pkglibdir}/modules/dri/atiogl_a_dri.so
240
254
241
	exeinto ${X11_LIB_DIR}/modules/linux
255
	exeinto ${X11_LIB_DIR}/modules/linux
242
	doexe ${WORKDIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.a
256
	# In X.org 6.8.99 / 6.9 this is a .so
243
	cp -pPR ${WORKDIR}/usr/X11R6/${pkglibdir}/libfglrx_gamma.* \
257
	if has_version ">=x11-base/xorg-x11-6.8.99"
258
	then
259
		doexe ${BASE_NAME}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.so
260
	else
261
		doexe ${BASE_NAME}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.a
262
	fi
263
	cp -pPR ${BASE_NAME}/usr/X11R6/${pkglibdir}/libfglrx_gamma.* \
244
			${D}/${X11_LIB_DIR}
264
			${D}/${X11_LIB_DIR}
245
	#Not the best place
265
	#Not the best place
246
	insinto ${X11_DIR}/include/X11/extensions
266
	insinto ${X11_DIR}/include/X11/extensions
247
	doins ${WORKDIR}/usr/X11R6/include/X11/extensions/fglrx_gamma.h
267
	doins ${BASE_NAME}/usr/X11R6/include/X11/extensions/fglrx_gamma.h
248
268
269
	dodir /etc
270
	cp -pPR ${BASE_NAME}/etc/* ${D}/etc/
249
}
271
}
250
272
251
273

Return to bug 109118