Gentoo Archives: gentoo-commits

From: Enrico Tagliavini <enrico.tagliavini@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
Date: Wed, 28 Sep 2011 20:28:01
Message-Id: c859ae87b336c0bfa8fee8b035919a3b4b973b92.Enrico@gentoo
1 commit: c859ae87b336c0bfa8fee8b035919a3b4b973b92
2 Author: Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
3 AuthorDate: Wed Sep 28 20:27:24 2011 +0000
4 Commit: Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
5 CommitDate: Wed Sep 28 20:27:24 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=c859ae87
7
8 [ati-drivers] version bump and PowerXpress support added
9
10 Finally the PowerXpress support should be there.
11 Be aware i don't have the hardware to test on
12 so this work should be tested.
13 The switch can be done with amdcccle or aticonfig
14 tools. Needless to say only root can do that.
15 All the libs symlinks are removed since they
16 should not be needed with the custom switchlib{GL,glx}
17 scripts, instead eselect is used.
18
19 Many many thanks to gdbalbuzard [0] and chickpea [1]
20 for the help!
21
22 A null src_test was added since the package provides no test
23 functions.
24
25 [0] https://forums.gentoo.org/viewtopic-p-6748306.html?sid=789ed92ff252599668e53fbbcaf8b936#6748306
26 [1] https://bugs.sabayon.org/show_bug.cgi?id=2210
27
28 ---
29 ...drivers-11.8.ebuild => ati-drivers-11.9.ebuild} | 29 +++-------
30 .../ati-drivers-fix_compilation-bug-297322.patch | 25 ---------
31 x11-drivers/ati-drivers/files/switchlibGL | 58 ++++++++++++++++++++
32 3 files changed, 67 insertions(+), 45 deletions(-)
33
34 diff --git a/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild
35 similarity index 95%
36 rename from x11-drivers/ati-drivers/ati-drivers-11.8.ebuild
37 rename to x11-drivers/ati-drivers/ati-drivers-11.9.ebuild
38 index dfb3317..ec6093e 100644
39 --- a/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild
40 +++ b/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild
41 @@ -25,8 +25,6 @@ SLOT="1"
42
43 RDEPEND="
44 <=x11-base/xorg-server-1.10.99
45 - !x11-drivers/ati-drivers:0
46 - !x11-apps/ati-drivers-extra
47 >=app-admin/eselect-opengl-1.0.7
48 sys-power/acpid
49 x11-apps/xauth
50 @@ -86,7 +84,7 @@ QA_WX_LOAD="
51 QA_PRESTRIPPED="
52 usr/lib\(32\|64\)\?/libXvBAW.so.1.0
53 usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
54 - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
55 + usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
56 usr/lib\(32\|64\)\?/xorg/modules/glesx.so
57 usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
58 usr/lib\(32\|64\)\?/libaticaldd.so
59 @@ -346,7 +344,7 @@ src_compile() {
60 # These extra libs/utils either have an Imakefile that does not
61 # work very well without tweaking or a Makefile ignoring CFLAGS
62 # and the like. We bypass those.
63 -
64 +src_test() { :; } # no tests present
65 # The -DUSE_GLU is needed to compile using nvidia headers
66 # according to a comment in ati-drivers-extra-8.33.6.ebuild.
67 "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
68 @@ -355,6 +353,8 @@ src_compile() {
69 eend $?
70 }
71
72 +src_test() { :; } # no tests presentsrc_test() { :; } # no tests present
73 +
74 src_install() {
75 use modules && linux-mod_src_install
76
77 @@ -473,14 +473,10 @@ src_install() {
78 newconfd "${T}"/atieventsd.conf atieventsd
79
80 # PowerXpress stuff
81 - local alllibdir="$(get_libdir)"
82 - use multilib && alllibdir="lib64 lib32"
83 - for libdir in ${alllibdir}
84 - do
85 - dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \
86 - /usr/${libdir}/fglrx/libGL.so.1.2
87 - dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2
88 - done
89 + exeinto /usr/$(get_libdir)/fglrx
90 + doexe "${FILESDIR}"/switchlibGL || die "newexe switchlibGL failed"
91 + dosym ./switchlibGL /usr/$(get_libdir)/fglrx/switchlibglx || die \
92 + "dosym switchlibglx failed"
93 }
94
95 src_install-libs() {
96 @@ -507,17 +503,10 @@ src_install-libs() {
97 libGL.so.${libver}
98 dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
99 dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
100 - # PowerXpress stuff
101 - dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \
102 - ${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2
103 - dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2
104
105 exeinto ${ATI_ROOT}/extensions
106 doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
107 - # PowerXpress stuff
108 - dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \
109 - ${ATI_ROOT}/extensions/FGL.renamed.libglx.so
110 - dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so
111 + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
112
113 # other libs
114 exeinto /usr/$(get_libdir)
115
116 diff --git a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch b/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch
117 deleted file mode 100644
118 index e2af915..0000000
119 --- a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch
120 +++ /dev/null
121 @@ -1,25 +0,0 @@
122 ---- common/lib/modules/fglrx/build_mod/firegl_public.c
123 -+++ common/lib/modules/fglrx/build_mod/firegl_public.c
124 -@@ -1441,7 +1441,9 @@
125 - todo !!!
126 - #endif
127 -
128 --unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,
129 -+void __cmpxchg_wrong_size(void) {}
130 -+
131 -+unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,
132 - unsigned long new, int size)
133 - {
134 - #ifndef __HAVE_ARCH_CMPXCHG
135 ---- common/lib/modules/fglrx/build_mod/firegl_public.h
136 -+++ common/lib/modules/fglrx/build_mod/firegl_public.h
137 -@@ -441,7 +441,8 @@
138 - extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask);
139 - extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void);
140 -
141 --extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,
142 -+extern void __cmpxchg_wrong_size(void);
143 -+extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,
144 - unsigned long new, int size);
145 -
146 - #define __ke_cmpxchg(ptr,o,n) \
147
148 diff --git a/x11-drivers/ati-drivers/files/switchlibGL b/x11-drivers/ati-drivers/files/switchlibGL
149 new file mode 100644
150 index 0000000..e8fac1e
151 --- /dev/null
152 +++ b/x11-drivers/ati-drivers/files/switchlibGL
153 @@ -0,0 +1,58 @@
154 +#!/bin/bash
155 +# switchlibGL
156 +#
157 +# Copyright (c) 2011 Advanced Micro Devices, Inc.
158 +#
159 +# Purpose:
160 +# For switch between AMD and Intel graphic driver library.
161 +#
162 +# Usage:
163 +# switchlibGL amd|intel|query
164 +# amd: switches to the AMD version of libGL.
165 +# intel: switches to the open-source version of libGL .
166 +# query: checks, which version is currently active and prints either "amd"
167 +# or "intel" or "unknown" on the standard output.
168 +# must be root to execute this script
169 +
170 +ARCH=`uname -m`
171 +E_ERR=1
172 +
173 +# Check if root
174 +if [ "`whoami`" != "root" ]; then
175 + echo "Must be root to run this script." 1>&2
176 + exit $E_ERR
177 +fi
178 +
179 +# One parameter
180 +if [ $# -ne 1 ]; then
181 + echo "Usage: `basename $0` amd|intel|query " 1>&2
182 + echo "Please choose one parameter " 1>&2
183 + exit $E_ERR
184 +fi
185 +
186 +
187 +# Switch to right mode
188 +case "$1" in
189 + "amd" )
190 + eselect opengl set ati
191 + ;;
192 + "intel" )
193 + eselect opengl set xorg-x11
194 + ;;
195 + "query" )
196 + current=`eselect opengl show`
197 + case "$current" in
198 + "ati" )
199 + echo "amd"
200 + ;;
201 + "xorg-x11" )
202 + echo "intel"
203 + ;;
204 + esac
205 + ;;
206 + * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;;
207 + # other than amd|intel|query parameter report an error
208 +esac
209 +
210 +# A zero return value from the script upon exit indicates success.
211 +exit 0