mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 20:02:14 +03:00
mesa: 10.4.5 -> 10.5.1
This commit is contained in:
parent
50cd623632
commit
7a77553d97
@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, flex, bison, autoreconfHook, substituteAll
|
||||
, python, libxml2Python, file, expat, makedepend
|
||||
, libdrm, xorg, wayland, udev, llvm, libffi
|
||||
, libvdpau, libelf
|
||||
, python, libxml2Python, file, expat, makedepend, pythonPackages
|
||||
, libdrm, xorg, wayland, udev, llvmPackages, libffi, libomxil-bellagio
|
||||
, libvdpau, libelf, libva, libclc
|
||||
, grsecEnabled
|
||||
, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
|
||||
, enableExtraFeatures ? false # not maintained
|
||||
@ -23,9 +23,10 @@ else
|
||||
*/
|
||||
|
||||
let
|
||||
version = "10.4.5";
|
||||
version = "10.5.1";
|
||||
# this is the default search path for DRI drivers
|
||||
driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32";
|
||||
clang = if llvmPackages ? clang-unwrapped then llvmPackages.clang-unwrapped else llvmPackages.clang;
|
||||
in
|
||||
with { inherit (stdenv.lib) optional optionals optionalString; };
|
||||
|
||||
@ -34,10 +35,10 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"https://launchpad.net/mesa/trunk/${version}/+download/MesaLib-${version}.tar.bz2"
|
||||
"ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2"
|
||||
"https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
|
||||
"ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
|
||||
];
|
||||
sha256 = "bf60000700a9d58e3aca2bfeee7e781053b0d839e61a95b1883e05a2dee247a0";
|
||||
sha256 = "ffc51943d15c6812ee7611d053d8980a683fbd6a4986cff567b12cc66637d679";
|
||||
};
|
||||
|
||||
prePatch = "patchShebangs .";
|
||||
@ -60,52 +61,78 @@ stdenv.mkDerivation {
|
||||
outputs = ["out" "drivers" "osmesa"];
|
||||
|
||||
configureFlags = [
|
||||
"--sysconfdir=/etc"
|
||||
"--localstatedir=/var"
|
||||
"--with-clang-libdir=${clang}/lib"
|
||||
"--with-dri-driverdir=$(drivers)/lib/dri"
|
||||
"--with-dri-searchpath=${driverLink}/lib/dri"
|
||||
|
||||
"--enable-gles1"
|
||||
"--enable-gles2"
|
||||
"--enable-dri"
|
||||
"--enable-glx-tls"
|
||||
"--enable-shared-glapi"
|
||||
"--enable-driglx-direct" # seems enabled anyway
|
||||
"--enable-gallium-llvm" "--enable-llvm-shared-libs"
|
||||
] ++ optional stdenv.isLinux "--enable-dri3"
|
||||
++ [
|
||||
"--enable-glx"
|
||||
"--enable-gallium-osmesa" # used by wine
|
||||
"--enable-egl"
|
||||
"--enable-xa" # used in vmware driver
|
||||
"--enable-gles1" "--enable-gles2"
|
||||
"--enable-gbm"
|
||||
] ++ optional stdenv.isLinux "--enable-nine" # Direct3D in Wine
|
||||
++ [
|
||||
"--enable-xvmc"
|
||||
"--enable-vdpau"
|
||||
"--enable-osmesa" # used by wine
|
||||
"--enable-omx"
|
||||
"--enable-va"
|
||||
"--enable-opencl"
|
||||
"--enable-opencl-icd"
|
||||
|
||||
"--with-dri-drivers=i965,r200,radeon"
|
||||
"--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast,radeonsi"
|
||||
"--with-egl-platforms=x11,wayland,drm" "--enable-gbm"
|
||||
]
|
||||
++ 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
|
||||
]
|
||||
"--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast"
|
||||
"--enable-shared-glapi"
|
||||
"--enable-sysfs"
|
||||
"--enable-driglx-direct" # seems enabled anyway
|
||||
"--enable-glx-tls"
|
||||
"--with-dri-drivers=i915,i965,nouveau,radeon,r200,swrast"
|
||||
"--with-egl-platforms=x11,wayland,drm"
|
||||
|
||||
"--enable-gallium-llvm"
|
||||
"--enable-llvm-shared-libs"
|
||||
] ++ optional enableTextureFloats "--enable-texture-float"
|
||||
++ optional grsecEnabled "--enable-glx-rts"; # slight performance degradation, enable only for grsec
|
||||
|
||||
nativeBuildInputs = [ pkgconfig python makedepend file flex bison ];
|
||||
nativeBuildInputs = [ pkgconfig python makedepend file flex bison pythonPackages.Mako ];
|
||||
|
||||
propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ]
|
||||
++ optionals stdenv.isLinux [libdrm]
|
||||
;
|
||||
++ optionals stdenv.isLinux [ libdrm ];
|
||||
|
||||
buildInputs = with xorg; [
|
||||
autoreconfHook intltool expat libxml2Python llvm
|
||||
autoreconfHook intltool expat libxml2Python llvmPackages.llvm
|
||||
glproto dri2proto dri3proto presentproto
|
||||
libX11 libXext libxcb libXt libXfixes libxshmfence
|
||||
libffi wayland libvdpau libelf
|
||||
] ++ optionals enableExtraFeatures [ /*libXvMC*/ ]
|
||||
++ optional stdenv.isLinux udev
|
||||
;
|
||||
libffi wayland libvdpau libelf libXvMC libomxil-bellagio libva
|
||||
libclc clang
|
||||
] ++ optional stdenv.isLinux udev;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
doCheck = false;
|
||||
|
||||
installFlags = [ "DESTDIR=\${out}" ];
|
||||
|
||||
# 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; ''
|
||||
fix_dirs () {
|
||||
mkdir -p $1
|
||||
mv $out/$1/* $1
|
||||
DIR=$out/$1
|
||||
while rmdir $DIR 2>/dev/null; do
|
||||
DIR="$(dirname "$DIR")"
|
||||
done
|
||||
}
|
||||
fix_dirs $out
|
||||
fix_dirs $drivers
|
||||
fix_dirs $osmesa
|
||||
|
||||
mv -t "$drivers/lib/" \
|
||||
'' + optionalString enableExtraFeatures ''
|
||||
`#$out/lib/libXvMC*` \
|
||||
|
@ -6912,7 +6912,8 @@ let
|
||||
# makes it slower, but during runtime we link against just mesa_drivers
|
||||
# through /run/opengl-driver*, which is overriden according to config.grsecurity
|
||||
grsecEnabled = true;
|
||||
llvm = llvm_35;
|
||||
libva = libva.override { mesa = null; };
|
||||
llvmPackages = llvmPackages_36;
|
||||
});
|
||||
mesa_glu = mesaDarwinOr (callPackage ../development/libraries/mesa-glu { });
|
||||
mesa_drivers = mesaDarwinOr (
|
||||
|
Loading…
Reference in New Issue
Block a user