anchor.diff:    #doCheck = true; # https://bugs.freedesktop.org/show_bug.cgi?id=67672
     # TODO: best fix this before merging >=9.2 to master
   
  -  # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
  +  # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM;
  +  #   also move libOSMesa to $osmesa, as it's relatively big
     # ToDo: probably not all .la files are completely fixed, but it shouldn't matter
     postInstall = with stdenv.lib; ''
       mv -t "$drivers/lib/" \
     '' + optionalString enableExtraFeatures ''
         `#$out/lib/libXvMC*` \
  -      $out/lib/libOSMesa* \
         $out/lib/gbm $out/lib/libgbm* \
         $out/lib/gallium-pipe \
     '' + ''
  
positive.code:       $out/lib/vdpau \
        $out/lib/libxatracker*
  
    '' + /* now fix references in .la files */ ''
      sed "/^libdir=/s,$out,$drivers," -i \
    '' + optionalString enableExtraFeatures ''
        `#$drivers/lib/libXvMC*.la` \
        $drivers/lib/libOSMesa*.la \
        $drivers/lib/gallium-pipe/*.la \
    '' + ''
        $drivers/lib/libgallium.la \
  
negative.code:     ++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler"
      ++ optional enableTextureFloats "--enable-texture-float"
      ++ optionals enableExtraFeatures [
        "--enable-openvg" "--enable-gallium-egl" # not needed for EGL in Gallium, but OpenVG might be useful
        #"--enable-xvmc" # tests segfault with 9.1.{1,2,3}
        #"--enable-opencl" # ToDo: opencl seems to need libclc for clover
  