From 046ee5ac3ffbc7e5daa706bd3ad405bd30c7aad5 Mon Sep 17 00:00:00 2001 From: Edward Tjörnhammar Date: Tue, 3 May 2016 10:54:49 +0200 Subject: ati-drivers: 15.7 -> 15.12 Also addresses breakage due to the multiple-outputs merge. --- pkgs/os-specific/linux/ati-drivers/builder.sh | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'pkgs/os-specific/linux/ati-drivers/builder.sh') diff --git a/pkgs/os-specific/linux/ati-drivers/builder.sh b/pkgs/os-specific/linux/ati-drivers/builder.sh index 844f30e0c60..4394e785960 100644 --- a/pkgs/os-specific/linux/ati-drivers/builder.sh +++ b/pkgs/os-specific/linux/ati-drivers/builder.sh @@ -1,4 +1,3 @@ -# What is LIBGL_DRIVERS_PATH used for? # TODO gentoo removes some tools because there are xorg sources (?) source $stdenv/setup @@ -6,15 +5,10 @@ set -x die(){ echo $@; exit 1; } -mkdir fglrx # custom unpack: -cd fglrx unzip $src -cd .. -run_file=$(echo fglrx/amd-driver-installer-*) +run_file=fglrx-$build/amd-driver-installer-$build-x86.x86_64.run sh $run_file --extract . -eval "$patchPhase1" - case "$system" in x86_64-linux) arch=x86_64 @@ -33,9 +27,9 @@ esac if test -z "$libsOnly"; then - kernelVersion=$(cd ${kernel}/lib/modules && ls) - kernelBuild=$(echo ${kernel}/lib/modules/$kernelVersion/build) - linuxsources=$(echo ${kernel}/lib/modules/$kernelVersion/source) + kernelVersion=$(cd ${kernelDir}/lib/modules && ls) + kernelBuild=$(echo ${kernelDir}/lib/modules/$kernelVersion/build) + linuxsources=$(echo ${kernelDir}/lib/modules/$kernelVersion/source) # note: maybe the .config file should be used to determine this ? # current kbuild infrastructure allows using CONFIG_* defines @@ -231,7 +225,7 @@ fi fglrx_dri.so \ libaticaldd.so do - patchelf --set-rpath $gcc/$lib_arch/ $out/lib/$pelib2 + patchelf --set-rpath $glibcDir/lib/:$libStdCxx/lib/ $out/lib/$pelib2 done } @@ -245,12 +239,12 @@ if test -z "$libsOnly"; then eval "$patchPhaseSamples" ( # build and install fgl_glxgears - cd fgl_glxgears; + cd fgl_glxgears; gcc -DGL_ARB_texture_multisample=1 -g \ -I$mesa/include \ -I$out/include \ -L$mesa/lib -lGL -lGLU -lX11 -lm \ - -o $out/bin/fgl_glxgears -Wall fgl_glxgears.c + -o $out/bin/fgl_glxgears -Wall fgl_glxgears.c ) true || ( # build and install @@ -267,12 +261,12 @@ if test -z "$libsOnly"; then -I${xf86vidmodeproto}/include \ -I$out/X11R6/include \ -L$out/lib \ - -Wall -lm -lfglrx_gamma -lX11 -lXext -o $out/bin/fglrx_xgamma fglrx_xgamma.c + -Wall -lm -lfglrx_gamma -lX11 -lXext -o $out/bin/fglrx_xgamma fglrx_xgamma.c ) { # patch and copy statically linked qt libs used by amdcccle - patchelf --set-interpreter $(echo $glibc/lib/ld-linux*.so.2) $TMP/arch/$arch/usr/share/ati/$lib_arch/libQtCore.so.4 && + patchelf --set-interpreter $(echo $glibcDir/lib/ld-linux*.so.2) $TMP/arch/$arch/usr/share/ati/$lib_arch/libQtCore.so.4 && patchelf --set-rpath $gcc/$lib_arch/ $TMP/arch/$arch/usr/share/ati/$lib_arch/libQtCore.so.4 && patchelf --set-rpath $gcc/$lib_arch/:$out/share/ati/:$libXrender/lib/:$libSM/lib/:$libICE/lib/:$libfontconfig/lib/:$libfreetype/lib/ $TMP/arch/$arch/usr/share/ati/$lib_arch/libQtGui.so.4 && mkdir -p $out/share/ati @@ -285,7 +279,7 @@ if test -z "$libsOnly"; then patchelf --shrink-rpath $BIN/amdcccle for prog in $BIN/*; do cp -f $prog $out/bin && - patchelf --set-interpreter $(echo $glibc/lib/ld-linux*.so.2) $out/bin/$(basename $prog) && + patchelf --set-interpreter $(echo $glibcDir/lib/ld-linux*.so.2) $out/bin/$(basename $prog) && wrapProgram $out/bin/$(basename $prog) --prefix LD_LIBRARY_PATH : $out/lib/:$gcc/lib/:$out/share/ati/:$libXinerama/lib/:$libXrandr/lib/:$libfontconfig/lib/:$libfreetype/lib/:$LD_LIBRARY_PATH done } -- cgit 1.4.1