mesa: Reduce dependency bloat

In particular, don't depend on clang. It's really bad to have a core
package like Mesa pull in multiple C compilers.
This commit is contained in:
Eelco Dolstra 2015-06-11 02:17:00 +02:00
parent 8b2f226a96
commit d21b6702a3
2 changed files with 4 additions and 10 deletions

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, flex, bison, autoreconfHook, substituteAll { stdenv, fetchurl, fetchpatch, pkgconfig, intltool, flex, bison, autoreconfHook, substituteAll
, python, libxml2Python, file, expat, makedepend, pythonPackages , python, libxml2Python, file, expat, makedepend, pythonPackages
, libdrm, xorg, wayland, udev, llvmPackages, libffi, libomxil-bellagio , libdrm, xorg, wayland, udev, llvmPackages, libffi, libomxil-bellagio
, libvdpau, libelf, libva, libclc , libvdpau, libelf, libva
, grsecEnabled , grsecEnabled
, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
, enableExtraFeatures ? false # not maintained , enableExtraFeatures ? false # not maintained
@ -26,7 +26,6 @@ let
version = "10.5.6"; version = "10.5.6";
# this is the default search path for DRI drivers # this is the default search path for DRI drivers
driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32"; driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32";
clang = if llvmPackages ? clang-unwrapped then llvmPackages.clang-unwrapped else llvmPackages.clang;
in in
with { inherit (stdenv.lib) optional optionals optionalString; }; with { inherit (stdenv.lib) optional optionals optionalString; };
@ -63,7 +62,6 @@ stdenv.mkDerivation {
configureFlags = [ configureFlags = [
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--localstatedir=/var" "--localstatedir=/var"
"--with-clang-libdir=${clang}/lib"
"--with-dri-driverdir=$(drivers)/lib/dri" "--with-dri-driverdir=$(drivers)/lib/dri"
"--with-dri-searchpath=${driverLink}/lib/dri" "--with-dri-searchpath=${driverLink}/lib/dri"
@ -81,13 +79,11 @@ stdenv.mkDerivation {
++ [ ++ [
"--enable-xvmc" "--enable-xvmc"
"--enable-vdpau" "--enable-vdpau"
"--enable-omx" #"--enable-omx"
"--enable-va" #"--enable-va"
# TODO: Figure out how to enable opencl without having a runtime dependency on clang # TODO: Figure out how to enable opencl without having a runtime dependency on clang
"--disable-opencl" "--disable-opencl"
#"--enable-opencl"
#"--enable-opencl-icd"
"--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast" "--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast"
"--enable-shared-glapi" "--enable-shared-glapi"
@ -111,8 +107,7 @@ stdenv.mkDerivation {
autoreconfHook intltool expat libxml2Python llvmPackages.llvm autoreconfHook intltool expat libxml2Python llvmPackages.llvm
glproto dri2proto dri3proto presentproto glproto dri2proto dri3proto presentproto
libX11 libXext libxcb libXt libXfixes libxshmfence libX11 libXext libxcb libXt libXfixes libxshmfence
libffi wayland libvdpau libelf libXvMC libomxil-bellagio libva libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */
libclc clang
] ++ optional stdenv.isLinux udev; ] ++ optional stdenv.isLinux udev;
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -7340,7 +7340,6 @@ let
# makes it slower, but during runtime we link against just mesa_drivers # makes it slower, but during runtime we link against just mesa_drivers
# through /run/opengl-driver*, which is overriden according to config.grsecurity # through /run/opengl-driver*, which is overriden according to config.grsecurity
grsecEnabled = true; grsecEnabled = true;
libva = libva.override { mesa = null; };
llvmPackages = llvmPackages_36; llvmPackages = llvmPackages_36;
}); });
mesa_glu = mesaDarwinOr (callPackage ../development/libraries/mesa-glu { }); mesa_glu = mesaDarwinOr (callPackage ../development/libraries/mesa-glu { });