1 |
lu_zero 10/02/23 20:55:17 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: ati-drivers-10.2.ebuild |
5 |
Log: |
6 |
New version |
7 |
(Portage version: 2.1.7.17/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.208 x11-drivers/ati-drivers/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.208&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.208&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?r1=1.207&r2=1.208 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v |
19 |
retrieving revision 1.207 |
20 |
retrieving revision 1.208 |
21 |
diff -u -r1.207 -r1.208 |
22 |
--- ChangeLog 13 Feb 2010 15:55:29 -0000 1.207 |
23 |
+++ ChangeLog 23 Feb 2010 20:55:16 -0000 1.208 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for x11-drivers/ati-drivers |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.207 2010/02/13 15:55:29 lu_zero Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.208 2010/02/23 20:55:16 lu_zero Exp $ |
29 |
+ |
30 |
+*ati-drivers-10.2 (23 Feb 2010) |
31 |
+ |
32 |
+ 23 Feb 2010; Luca Barbato <lu_zero@g.o> +ati-drivers-10.2.ebuild: |
33 |
+ Updated version |
34 |
|
35 |
*ati-drivers-10.1 (13 Feb 2010) |
36 |
|
37 |
|
38 |
|
39 |
|
40 |
1.1 x11-drivers/ati-drivers/ati-drivers-10.2.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-10.2.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-10.2.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: ati-drivers-10.2.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2010 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-10.2.ebuild,v 1.1 2010/02/23 20:55:16 lu_zero Exp $ |
50 |
|
51 |
EAPI="2" |
52 |
|
53 |
inherit eutils multilib linux-mod toolchain-funcs versionator |
54 |
|
55 |
DESCRIPTION="Ati precompiled drivers for r600 (HD Series) and newer chipsets" |
56 |
HOMEPAGE="http://www.ati.com" |
57 |
# 8.ble will be used for beta releases. |
58 |
if [[ $(get_major_version) -gt 8 ]]; then |
59 |
ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/" |
60 |
SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" |
61 |
FOLDER_PREFIX="common/" |
62 |
else |
63 |
SRC_URI="https://launchpad.net/ubuntu/karmic/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" |
64 |
FOLDER_PREFIX="" |
65 |
fi |
66 |
IUSE="debug +modules multilib" |
67 |
|
68 |
LICENSE="AMD GPL-2 QPL-1.0 as-is" |
69 |
KEYWORDS="~amd64 ~x86" |
70 |
SLOT="1" |
71 |
|
72 |
RDEPEND=" |
73 |
!>=x11-base/xorg-server-1.7.0 |
74 |
!x11-drivers/ati-drivers:0 |
75 |
!x11-apps/ati-drivers-extra |
76 |
>=app-admin/eselect-opengl-1.0.7 |
77 |
sys-power/acpid |
78 |
x11-apps/xauth |
79 |
>=x11-base/xorg-server-1.5.3-r7 |
80 |
x11-libs/libXinerama |
81 |
x11-libs/libXrandr |
82 |
multilib? ( app-emulation/emul-linux-x86-xlibs ) |
83 |
" |
84 |
|
85 |
DEPEND="${RDEPEND} |
86 |
x11-proto/inputproto |
87 |
x11-proto/xf86miscproto |
88 |
x11-proto/xf86vidmodeproto |
89 |
x11-proto/xineramaproto |
90 |
" |
91 |
|
92 |
EMULTILIB_PKG="true" |
93 |
|
94 |
S="${WORKDIR}" |
95 |
|
96 |
# QA Silencing |
97 |
QA_TEXTRELS=" |
98 |
usr/lib*/opengl/ati/lib/libGL.so.1.2 |
99 |
usr/lib*/libatiadlxx.so |
100 |
usr/lib*/xorg/modules/glesx.so |
101 |
usr/lib*/libaticaldd.so |
102 |
usr/lib*/dri/fglrx_dri.so |
103 |
" |
104 |
|
105 |
QA_EXECSTACK=" |
106 |
opt/bin/atiode |
107 |
opt/bin/amdcccle |
108 |
usr/lib*/opengl/ati/lib/libGL.so.1.2 |
109 |
usr/lib*/dri/fglrx_dri.so |
110 |
" |
111 |
|
112 |
QA_WX_LOAD=" |
113 |
usr/lib*/opengl/ati/lib/libGL.so.1.2 |
114 |
usr/lib*/dri/fglrx_dri.so |
115 |
" |
116 |
|
117 |
QA_PRESTRIPPED=" |
118 |
usr/lib\(32\|64\)\?/libXvBAW.so.1.0 |
119 |
usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 |
120 |
usr/lib\(32\|64\)\?/xorg/modules/glesx.so |
121 |
usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 |
122 |
usr/lib\(32\|64\)\?/libaticaldd.so |
123 |
usr/lib\(32\|64\)\?/dri/fglrx_dri.so |
124 |
" |
125 |
|
126 |
QA_SONAME=" |
127 |
usr/lib\(32\|64\)\?/libatiadlxx.so |
128 |
usr/lib\(32\|64\)\?/libaticalcl.so |
129 |
usr/lib\(32\|64\)\?/libaticaldd.so |
130 |
usr/lib\(32\|64\)\?/libaticalrt.so |
131 |
" |
132 |
|
133 |
_check_kernel_config() { |
134 |
if ! kernel_is 2 6; then |
135 |
eerror "You need a 2.6 linux kernel to compile against!" |
136 |
die "No 2.6 Kernel found" |
137 |
fi |
138 |
|
139 |
if kernel_is ge 2 6 25 && linux_chkconfig_present PREEMPT_RCU; then |
140 |
eerror "${P} is incompatible with RCU preemption (bug #223281)." |
141 |
eerror "Please disable it:" |
142 |
eerror " CONFIG_PREEMT_RCU=n" |
143 |
eerror "in /usr/src/linux/.config or" |
144 |
eerror " Processor type and features --->" |
145 |
eerror " [ ] Preemptible RCU" |
146 |
eerror "in the 'menuconfig'" |
147 |
die "CONFIG_PREEMT_RCU enabled" |
148 |
fi |
149 |
|
150 |
if ! linux_chkconfig_present MTRR; then |
151 |
ewarn "You don't have MTRR support enabled in the kernel." |
152 |
ewarn "Direct rendering will not work." |
153 |
fi |
154 |
|
155 |
if linux_chkconfig_builtin DRM; then |
156 |
ewarn "You have DRM support built in to the kernel" |
157 |
ewarn "Direct rendering will not work." |
158 |
fi |
159 |
|
160 |
if ! linux_chkconfig_present AGP && \ |
161 |
! linux_chkconfig_present PCIEPORTBUS; then |
162 |
ewarn "You don't have AGP and/or PCIe support enabled in the kernel" |
163 |
ewarn "Direct rendering will not work." |
164 |
fi |
165 |
|
166 |
if ! linux_chkconfig_present ACPI; then |
167 |
eerror "${P} requires the ACPI support in the kernel" |
168 |
eerror "Please enable it:" |
169 |
eerror " CONFIG_ACPI=y" |
170 |
eerror "in /usr/src/linux/.config or" |
171 |
eerror " Power management and ACPI options --->" |
172 |
eerror " [*] Power Management support" |
173 |
eerror "in the 'menuconfig'" |
174 |
die "CONFIG_ACPI disabled" |
175 |
fi |
176 |
|
177 |
if ! linux_chkconfig_present MAGIC_SYSRQ; then |
178 |
eerror "${P} requires the magic SysRq keys in the kernel." |
179 |
eerror "Please enable it:" |
180 |
eerror " CONFIG_MAGIC_SYSRQ=y" |
181 |
eerror "in /usr/src/linux/.config or" |
182 |
eerror " Kernel hacking --->" |
183 |
eerror " [*] Magic SysRq key" |
184 |
eerror "in the 'menuconfig'" |
185 |
die "CONFIG_MAGIC_SYSRQ disabled" |
186 |
fi |
187 |
|
188 |
if ! linux_chkconfig_present PCI_MSI; then |
189 |
eerror "${P} requires MSI in the kernel." |
190 |
eerror "Please enable it:" |
191 |
eerror " CONFIG_PCI_MSI=y" |
192 |
eerror "in /usr/src/linux/.config or" |
193 |
eerror " Bus options (PCI etc.) --->" |
194 |
eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" |
195 |
eerror "in the kernel config." |
196 |
die "CONFIG_PCI_MSI disabled" |
197 |
fi |
198 |
|
199 |
if linux_chkconfig_present LOCKDEP; then |
200 |
eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." |
201 |
eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." |
202 |
eerror "This prevents ${P} from compiling with an error like this:" |
203 |
eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" |
204 |
eerror "Please make sure the following options have been unset:" |
205 |
eerror " Kernel hacking --->" |
206 |
eerror " [ ] Lock debugging: detect incorrect freeing of live locks" |
207 |
eerror " [ ] Lock debugging: prove locking correctness" |
208 |
eerror " [ ] Lock usage statistics" |
209 |
eerror "in 'menuconfig'" |
210 |
die "LOCKDEP enabled" |
211 |
fi |
212 |
} |
213 |
|
214 |
pkg_setup() { |
215 |
# Define module dir. |
216 |
MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" |
217 |
# xorg folder |
218 |
BASE_DIR="${S}/x740" |
219 |
|
220 |
# amd64/x86 |
221 |
if use amd64 ; then |
222 |
MY_BASE_DIR="${BASE_DIR}_64a" |
223 |
PKG_LIBDIR=lib64 |
224 |
ARCH_DIR="${S}/arch/x86_64" |
225 |
else |
226 |
MY_BASE_DIR="${BASE_DIR}" |
227 |
PKG_LIBDIR=lib |
228 |
ARCH_DIR="${S}/arch/x86" |
229 |
fi |
230 |
|
231 |
if use modules; then |
232 |
MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)" |
233 |
BUILD_TARGETS="kmod_build" |
234 |
linux-mod_pkg_setup |
235 |
BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}" |
236 |
_check_kernel_config |
237 |
fi |
238 |
|
239 |
elog |
240 |
elog "Please note that this driver supports only graphic cards based on" |
241 |
elog "r600 chipset and newer." |
242 |
elog "This represent the ATI Radeon HD series at this moment." |
243 |
elog |
244 |
elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" |
245 |
elog "as replacement is highly recommended. Rather than staying with" |
246 |
elog "old versions of this driver." |
247 |
elog "For migration informations please reffer to:" |
248 |
elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" |
249 |
einfo |
250 |
} |
251 |
|
252 |
src_unpack() { |
253 |
if [[ $(get_major_version) -gt 8 ]]; then |
254 |
# Switching to a standard way to extract the files since otherwise no signature file |
255 |
# would be created |
256 |
local src="${DISTDIR}/${A}" |
257 |
sh "${src}" --extract "${S}" 2&>1 /dev/null |
258 |
else |
259 |
unpack ${A} |
260 |
fi |
261 |
} |
262 |
|
263 |
src_prepare() { |
264 |
# All kernel options for prepare are ment to be in here |
265 |
if use modules; then |
266 |
# version patches |
267 |
# epatch "${FILESDIR}"/kernel/${PV}-*.patch |
268 |
if use debug; then |
269 |
sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ |
270 |
"${MODULE_DIR}/firegl_public.c" \ |
271 |
|| die "Failed to enable debug output." |
272 |
fi |
273 |
fi |
274 |
|
275 |
# These are the userspace utilities that we also have source for. |
276 |
# We rebuild these later. |
277 |
rm \ |
278 |
"${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \ |
279 |
"${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \ |
280 |
|| die "bin rm failed" |
281 |
|
282 |
# ACPI fixups |
283 |
sed -i \ |
284 |
-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ |
285 |
-e "s:/var/lib/gdm/:/var/gdm/:" \ |
286 |
"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ |
287 |
|| die "sed failed." |
288 |
|
289 |
# Since "who" is in coreutils, we're using that one instead of "finger". |
290 |
sed -i -e 's:finger:who:' \ |
291 |
"${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ |
292 |
|| die "Replacing 'finger' with 'who' failed." |
293 |
# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and |
294 |
# add function to detect default state. |
295 |
epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch" |
296 |
|
297 |
cd "${MODULE_DIR}" |
298 |
ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \ |
299 |
|| die "symlinking precompiled core failed" |
300 |
|
301 |
convert_to_m 2.6.x/Makefile || die "convert_to_m failed" |
302 |
|
303 |
# When built with ati's make.sh it defines a bunch of macros if |
304 |
# certain .config values are set, falling back to less reliable |
305 |
# detection methods if linux/autoconf.h is not available. We |
306 |
# simply use the linux/autoconf.h settings directly, bypassing the |
307 |
# detection script. |
308 |
sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed" |
309 |
sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \ |
310 |
|| die "MODVERSIONS sed failed" |
311 |
cd "${S}" |
312 |
|
313 |
mkdir extra || die "mkdir failed" |
314 |
cd extra |
315 |
unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz |
316 |
sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \ |
317 |
lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed" |
318 |
# Add a category. |
319 |
mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed" |
320 |
} |
321 |
|
322 |
src_compile() { |
323 |
use modules && linux-mod_src_compile |
324 |
|
325 |
ebegin "Building fgl_glxgears" |
326 |
cd "${S}"/extra/fgl_glxgears |
327 |
# These extra libs/utils either have an Imakefile that does not |
328 |
# work very well without tweaking or a Makefile ignoring CFLAGS |
329 |
# and the like. We bypass those. |
330 |
|
331 |
# The -DUSE_GLU is needed to compile using nvidia headers |
332 |
# according to a comment in ati-drivers-extra-8.33.6.ebuild. |
333 |
"$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ |
334 |
-I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ |
335 |
-lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" |
336 |
eend $? |
337 |
|
338 |
ebegin "Building fglrx_gamma lib" |
339 |
cd "${S}"/extra/lib/fglrx_gamma |
340 |
"$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \ |
341 |
-DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \ |
342 |
-lXext || die "fglrx_gamma lib build failed" |
343 |
ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed" |
344 |
ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed" |
345 |
eend $? |
346 |
|
347 |
ebegin "Building fglrx_gamma util" |
348 |
cd "${S}"/extra/programs/fglrx_gamma |
349 |
"$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \ |
350 |
-I../../../${FOLDER_PREFIX}usr/X11R6/include -L../../lib/fglrx_gamma \ |
351 |
fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \ |
352 |
|| die "fglrx_gamma util build failed" |
353 |
eend $? |
354 |
|
355 |
} |
356 |
|
357 |
src_install() { |
358 |
use modules && linux-mod_src_install |
359 |
|
360 |
# We can do two things here, and neither of them is very nice. |
361 |
|
362 |
# For direct rendering libGL has to be able to load one or more |
363 |
# dri modules (files ending in _dri.so, like fglrx_dri.so). |
364 |
# Gentoo's mesa looks for these files in the location specified by |
365 |
# LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded |
366 |
# location /usr/$(get_libdir)/dri. Ati's libGL does the same |
367 |
# thing, but the hardcoded location is /usr/X11R6/lib/modules/dri |
368 |
# on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 |
369 |
# 64bit. So we can either put the .so files in that (unusual, |
370 |
# compared to "normal" mesa libGL) location or set |
371 |
# LIBGL_DRIVERS_PATH. We currently do the latter. See also bug |
372 |
# 101539. |
373 |
|
374 |
# The problem with this approach is that LIBGL_DRIVERS_PATH |
375 |
# *overrides* the default hardcoded location, it does not extend |
376 |
# it. So if ati-drivers is merged but a non-ati libGL is selected |
377 |
# and its hardcoded path does not match our LIBGL_DRIVERS_PATH |
378 |
# (because it changed in a newer mesa or because it was compiled |
379 |
# for a different set of multilib abis than we are) stuff breaks. |
380 |
|
381 |
# We create one file per ABI to work with "native" multilib, see |
382 |
# below. |
383 |
|
384 |
echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep" |
385 |
doenvd "${T}/03ati-colon-sep" || die |
386 |
|
387 |
# All libraries that we have a 32 bit and 64 bit version of on |
388 |
# amd64 are installed in src_install-libs. Everything else |
389 |
# (including libraries only available in native 64bit on amd64) |
390 |
# goes in here. |
391 |
|
392 |
# There used to be some code here that tried to detect running |
393 |
# under a "native multilib" portage ((precursor of) |
394 |
# http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it |
395 |
# should just work (only doing some duplicate work). --marienz |
396 |
if has_multilib_profile; then |
397 |
local OABI=${ABI} |
398 |
for ABI in $(get_install_abis); do |
399 |
src_install-libs |
400 |
done |
401 |
ABI=${OABI} |
402 |
unset OABI |
403 |
else |
404 |
src_install-libs |
405 |
fi |
406 |
|
407 |
# This is sorted by the order the files occur in the source tree. |
408 |
|
409 |
# X modules. |
410 |
exeinto /usr/$(get_libdir)/xorg/modules/drivers |
411 |
doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so || die |
412 |
exeinto /usr/$(get_libdir)/xorg/modules/linux |
413 |
doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so || die |
414 |
exeinto /usr/$(get_libdir)/xorg/modules |
415 |
doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so,amdxmm.so} || die |
416 |
|
417 |
# Arch-specific files. |
418 |
# (s)bin. |
419 |
into /opt |
420 |
dosbin "${ARCH_DIR}"/usr/sbin/atieventsd || die |
421 |
# We cleaned out the compilable stuff in src_unpack |
422 |
dobin "${ARCH_DIR}"/usr/X11R6/bin/* || die |
423 |
|
424 |
# lib. |
425 |
exeinto /usr/$(get_libdir) |
426 |
# Everything except for the libGL.so installed in src_install-libs. |
427 |
doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \ |
428 |
-maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*') |
429 |
insinto /usr/$(get_libdir) |
430 |
doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \ |
431 |
-maxdepth 1 -type f -not -name '*.so*') |
432 |
|
433 |
# Common files. |
434 |
# etc. |
435 |
insinto /etc/ati |
436 |
# Everything except for the authatieventsd.sh script. |
437 |
doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} |
438 |
insopts -m0755 |
439 |
doins ${FOLDER_PREFIX}etc/ati/authatieventsd.sh || die |
440 |
|
441 |
# include. |
442 |
insinto /usr |
443 |
doins -r ${FOLDER_PREFIX}usr/include || die |
444 |
insinto /usr/include/X11/extensions |
445 |
doins ${FOLDER_PREFIX}usr/X11R6/include/X11/extensions/fglrx_gamma.h || die |
446 |
|
447 |
# Just the atigetsysteminfo.sh script. |
448 |
into /usr |
449 |
dosbin ${FOLDER_PREFIX}usr/sbin/* || die |
450 |
|
451 |
# data files for the control panel. |
452 |
insinto /usr/share |
453 |
doins -r ${FOLDER_PREFIX}usr/share/ati || die |
454 |
insinto /usr/share/pixmaps |
455 |
doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm || die |
456 |
make_desktop_entry amdcccle 'ATI Catalyst Control Center' \ |
457 |
ccc_large System |
458 |
|
459 |
# doc. |
460 |
dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx || die |
461 |
|
462 |
doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 || die |
463 |
|
464 |
pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null |
465 |
|
466 |
exeinto /etc/acpi |
467 |
doexe ati-powermode.sh || die |
468 |
insinto /etc/acpi/events |
469 |
doins events/* || die |
470 |
|
471 |
popd > /dev/null |
472 |
|
473 |
# Done with the "source" tree. Install tools we rebuilt: |
474 |
dobin extra/fgl_glxgears/fgl_glxgears || die |
475 |
newdoc extra/fgl_glxgears/README README.fgl_glxgears || die |
476 |
|
477 |
dolib extra/lib/fglrx_gamma/*so* || die |
478 |
newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma || die |
479 |
|
480 |
dobin extra/programs/fglrx_gamma/fglrx_xgamma || die |
481 |
doman extra/programs/fglrx_gamma/fglrx_xgamma.1 || die |
482 |
newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma || die |
483 |
|
484 |
# Gentoo-specific stuff: |
485 |
newinitd "${FILESDIR}"/atieventsd.init atieventsd \ |
486 |
|| die "Failed to install atieventsd.init.d" |
487 |
echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf |
488 |
newconfd "${T}"/atieventsd.conf atieventsd || die |
489 |
} |
490 |
|
491 |
src_install-libs() { |
492 |
if [[ "${ABI}" == "amd64" ]]; then |
493 |
local EX_BASE_DIR="${BASE_DIR}_64a" |
494 |
local pkglibdir=lib64 |
495 |
local MY_ARCH_DIR="${S}/arch/x86_64" |
496 |
else |
497 |
local EX_BASE_DIR="${BASE_DIR}" |
498 |
local pkglibdir=lib |
499 |
local MY_ARCH_DIR="${S}/arch/x86" |
500 |
fi |
501 |
einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" |
502 |
|
503 |
local ATI_ROOT=/usr/$(get_libdir)/opengl/ati |
504 |
# To make sure we do not miss a spot when these change. |
505 |
local libmajor=1 libminor=2 |
506 |
local libver=${libmajor}.${libminor} |
507 |
|
508 |
# The GLX libraries |
509 |
# (yes, this really is "lib" even on amd64/multilib --marienz) |
510 |
exeinto ${ATI_ROOT}/lib |
511 |
doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver} || die |
512 |
dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} || die |
513 |
dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so || die |
514 |
|
515 |
exeinto ${ATI_ROOT}/extensions |
516 |
doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/* || die |
517 |
|
518 |
# DRI modules, installed into the path used by recent versions of mesa. |
519 |
exeinto /usr/$(get_libdir)/dri |
520 |
doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so || die |
521 |
|
522 |
# AMD Cal libraries |
523 |
exeinto /usr/$(get_libdir) |
524 |
doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* || die |
525 |
|
526 |
# warn about removal of .la file |
527 |
# WILL BE NEEDED IN FUTURE |
528 |
#if [[ -e ${ATI_ROOT}/lib/libGL.la ]]; then |
529 |
# ewarn "Since this version the libGL.la is not installed" |
530 |
# ewarn "For fixing this issues please take look on:" |
531 |
# ewarn " dev-util/lafilefixer" |
532 |
# ewarn "This step is needed because the libGL.la is going" |
533 |
# ewarn "to be removed by newer versions of the media-libs/mesa" |
534 |
#fi |
535 |
# Make up a libGL.la. Ati does not provide one, but mesa does. If |
536 |
# a (libtool-based) libfoo is built with libGL.la present a |
537 |
# reference to it is put into libfoo.la, and compiling |
538 |
# (libtool-based) things that link too libfoo.la will complain if |
539 |
# libGL.la disappears. So if we do not make up a libGL.la |
540 |
# switching between mesa and ati becomes painful. |
541 |
local revision=$(printf '%d%02d%02d' $(get_version_components)) |
542 |
sed -e "s:\${libmajor}:${libmajor}:g" \ |
543 |
-e "s:\${libminor}:${libminor}:g" \ |
544 |
-e "s:\${libdir}:$(get_libdir):g" \ |
545 |
-e "s:\${revision}:${revision}:g" \ |
546 |
"${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \ |
547 |
|| die "sed failed to make libGL.la" |
548 |
|
549 |
local envname="${T}"/04ati-dri-path |
550 |
if [[ -n ${ABI} ]]; then |
551 |
envname="${envname}-${ABI}" |
552 |
fi |
553 |
echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" |
554 |
doenvd "${envname}" || die |
555 |
} |
556 |
|
557 |
pkg_postinst() { |
558 |
elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" |
559 |
elog "To change your xorg.conf you can use the bundled \"aticonfig\"" |
560 |
elog |
561 |
elog "If you experience unexplained segmentation faults and kernel crashes" |
562 |
elog "with this driver and multi-threaded applications such as wine," |
563 |
elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." |
564 |
elog |
565 |
elog "You will have to source /etc/profile (or logout and back in) for dri" |
566 |
elog "to work, unless you previously had ati-drivers installed." |
567 |
|
568 |
# Workaroud screen corruption |
569 |
ewarn "If you experience screen corruption with this driver, try putting" |
570 |
ewarn ' Option "XAANoOffscreenPixmaps" "true"' |
571 |
ewarn "in the Device Section of /etc/X11/xorg.conf." |
572 |
|
573 |
use modules && linux-mod_pkg_postinst |
574 |
"${ROOT}"/usr/bin/eselect opengl set --use-old ati |
575 |
} |
576 |
|
577 |
pkg_preinst() { |
578 |
use modules && linux-mod_pkg_preinst |
579 |
} |
580 |
|
581 |
pkg_prerm() { |
582 |
"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 |
583 |
} |
584 |
|
585 |
pkg_postrm() { |
586 |
use modules && linux-mod_pkg_postrm |
587 |
"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 |
588 |
} |