From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R90jZ-0005Xu-FT for garchives@archives.gentoo.org; Wed, 28 Sep 2011 20:28:01 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 462A921C1AB; Wed, 28 Sep 2011 20:27:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E4F7721C1AB for ; Wed, 28 Sep 2011 20:27:53 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 36DB81B4015 for ; Wed, 28 Sep 2011 20:27:53 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 6EEF080042 for ; Wed, 28 Sep 2011 20:27:52 +0000 (UTC) From: "Enrico Tagliavini" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Enrico Tagliavini" Message-ID: Subject: [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/ X-VCS-Repository: proj/x11 X-VCS-Files: x11-drivers/ati-drivers/ati-drivers-11.8.ebuild x11-drivers/ati-drivers/ati-drivers-11.9.ebuild x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch x11-drivers/ati-drivers/files/switchlibGL X-VCS-Directories: x11-drivers/ati-drivers/ x11-drivers/ati-drivers/files/ X-VCS-Committer: Enrico X-VCS-Committer-Name: Enrico Tagliavini X-VCS-Revision: c859ae87b336c0bfa8fee8b035919a3b4b973b92 Date: Wed, 28 Sep 2011 20:27:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 2d7ea803ef69e2545b2374ac5c086e70 commit: c859ae87b336c0bfa8fee8b035919a3b4b973b92 Author: Enrico Tagliavini gmail com> AuthorDate: Wed Sep 28 20:27:24 2011 +0000 Commit: Enrico Tagliavini gmail com> CommitDate: Wed Sep 28 20:27:24 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/x11.git;a=3Dc= ommit;h=3Dc859ae87 [ati-drivers] version bump and PowerXpress support added Finally the PowerXpress support should be there. Be aware i don't have the hardware to test on so this work should be tested. The switch can be done with amdcccle or aticonfig tools. Needless to say only root can do that. All the libs symlinks are removed since they should not be needed with the custom switchlib{GL,glx} scripts, instead eselect is used. Many many thanks to gdbalbuzard [0] and chickpea [1] for the help! A null src_test was added since the package provides no test functions. [0] https://forums.gentoo.org/viewtopic-p-6748306.html?sid=3D789ed92ff252= 599668e53fbbcaf8b936#6748306 [1] https://bugs.sabayon.org/show_bug.cgi?id=3D2210 --- ...drivers-11.8.ebuild =3D> ati-drivers-11.9.ebuild} | 29 +++------- .../ati-drivers-fix_compilation-bug-297322.patch | 25 --------- x11-drivers/ati-drivers/files/switchlibGL | 58 ++++++++++++++= ++++++ 3 files changed, 67 insertions(+), 45 deletions(-) diff --git a/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild b/x11-driver= s/ati-drivers/ati-drivers-11.9.ebuild similarity index 95% rename from x11-drivers/ati-drivers/ati-drivers-11.8.ebuild rename to x11-drivers/ati-drivers/ati-drivers-11.9.ebuild index dfb3317..ec6093e 100644 --- a/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild +++ b/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild @@ -25,8 +25,6 @@ SLOT=3D"1" =20 RDEPEND=3D" <=3Dx11-base/xorg-server-1.10.99 - !x11-drivers/ati-drivers:0 - !x11-apps/ati-drivers-extra >=3Dapp-admin/eselect-opengl-1.0.7 sys-power/acpid x11-apps/xauth @@ -86,7 +84,7 @@ QA_WX_LOAD=3D" QA_PRESTRIPPED=3D" usr/lib\(32\|64\)\?/libXvBAW.so.1.0 usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so + usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so usr/lib\(32\|64\)\?/xorg/modules/glesx.so usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 usr/lib\(32\|64\)\?/libaticaldd.so @@ -346,7 +344,7 @@ src_compile() { # These extra libs/utils either have an Imakefile that does not # work very well without tweaking or a Makefile ignoring CFLAGS # and the like. We bypass those. - +src_test() { :; } # no tests present # The -DUSE_GLU is needed to compile using nvidia headers # according to a comment in ati-drivers-extra-8.33.6.ebuild. "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ @@ -355,6 +353,8 @@ src_compile() { eend $? } =20 +src_test() { :; } # no tests presentsrc_test() { :; } # no tests present + src_install() { use modules && linux-mod_src_install =20 @@ -473,14 +473,10 @@ src_install() { newconfd "${T}"/atieventsd.conf atieventsd =20 # PowerXpress stuff - local alllibdir=3D"$(get_libdir)" - use multilib && alllibdir=3D"lib64 lib32" - for libdir in ${alllibdir} - do - dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \ - /usr/${libdir}/fglrx/libGL.so.1.2 - dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2 - done + exeinto /usr/$(get_libdir)/fglrx + doexe "${FILESDIR}"/switchlibGL || die "newexe switchlibGL failed" + dosym ./switchlibGL /usr/$(get_libdir)/fglrx/switchlibglx || die \ + "dosym switchlibglx failed" } =20 src_install-libs() { @@ -507,17 +503,10 @@ src_install-libs() { libGL.so.${libver} dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so - # PowerXpress stuff - dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \ - ${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2 - dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2 =20 exeinto ${ATI_ROOT}/extensions doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/= fglrx-libglx.so - # PowerXpress stuff - dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \ - ${ATI_ROOT}/extensions/FGL.renamed.libglx.so - dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so + mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so =20 # other libs exeinto /usr/$(get_libdir) diff --git a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bu= g-297322.patch b/x11-drivers/ati-drivers/files/ati-drivers-fix_compilatio= n-bug-297322.patch deleted file mode 100644 index e2af915..0000000 --- a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-29732= 2.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- common/lib/modules/fglrx/build_mod/firegl_public.c -+++ common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -1441,7 +1441,9 @@ - todo !!! - #endif -=20 --unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned l= ong old, -+void __cmpxchg_wrong_size(void) {} -+ -+unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, u= nsigned long old, - unsigned long new, int size) - { - #ifndef __HAVE_ARCH_CMPXCHG ---- common/lib/modules/fglrx/build_mod/firegl_public.h -+++ common/lib/modules/fglrx/build_mod/firegl_public.h -@@ -441,7 +441,8 @@ - extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv= ), void *pPriv, __ke_sigset_t *pSigMask); - extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void); -=20 --extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, uns= igned long old, =20 -+extern void __cmpxchg_wrong_size(void); -+extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long = *ptr, unsigned long old, =20 - unsigned long new, int size); -=20 - #define __ke_cmpxchg(ptr,o,n) \ diff --git a/x11-drivers/ati-drivers/files/switchlibGL b/x11-drivers/ati-= drivers/files/switchlibGL new file mode 100644 index 0000000..e8fac1e --- /dev/null +++ b/x11-drivers/ati-drivers/files/switchlibGL @@ -0,0 +1,58 @@ +#!/bin/bash +# switchlibGL +# +# Copyright (c) 2011 Advanced Micro Devices, Inc. +# +# Purpose: +# For switch between AMD and Intel graphic driver library. +# +# Usage: +# switchlibGL amd|intel|query +# amd: switches to the AMD version of libGL. +# intel: switches to the open-source version of libGL . +# query: checks, which version is currently active and prints either = "amd" +# or "intel" or "unknown" on the standard output. +# must be root to execute this script + +ARCH=3D`uname -m` +E_ERR=3D1 + +# Check if root +if [ "`whoami`" !=3D "root" ]; then + echo "Must be root to run this script." 1>&2 + exit $E_ERR +fi + +# One parameter +if [ $# -ne 1 ]; then + echo "Usage: `basename $0` amd|intel|query " 1>&2 + echo "Please choose one parameter " 1>&2 + exit $E_ERR +fi + + +# Switch to right mode +case "$1" in + "amd" ) + eselect opengl set ati + ;; + "intel" ) + eselect opengl set xorg-x11 + ;; + "query" ) + current=3D`eselect opengl show` + case "$current" in + "ati" ) + echo "amd" + ;; + "xorg-x11" ) + echo "intel" + ;; + esac + ;; + * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;; + # other than amd|intel|query parameter report an error +esac + +# A zero return value from the script upon exit indicates success. +exit 0