mesa: revert to 9.2.* until the driver problems are fixed
I was unable to make the gallium drivers not to miss some LLVM RTTI stuff. 9.* don't build with llvm-3.4.
This commit is contained in:
parent
5888f27c56
commit
fcaa782b6a
4 changed files with 236 additions and 8 deletions
|
@ -23,8 +23,8 @@ else
|
|||
*/
|
||||
|
||||
let
|
||||
version = "10.0.2";
|
||||
# this is the default search path for DRI drivers
|
||||
version = "9.2.5";
|
||||
# this is the default search path for DRI drivers (note: X server no longer introduces an overriding env var)
|
||||
driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32";
|
||||
in
|
||||
with { inherit (stdenv.lib) optional optionals optionalString; };
|
||||
|
@ -34,15 +34,15 @@ stdenv.mkDerivation {
|
|||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
|
||||
sha256 = "0zkayy6gl0nwgqg11ga95vl4z0hldcz1b77qzzc1agm5vziah0j5";
|
||||
sha256 = "1w3bxclgwl2hwyxk3za7dbdakb8jsya7afck35cz0v8pxppvjsml";
|
||||
};
|
||||
|
||||
prePatch = "patchShebangs .";
|
||||
|
||||
patches = [
|
||||
./static-gallium.patch
|
||||
# TODO: revive ./dricore-gallium.patch when it gets ported (from Ubuntu),
|
||||
# as it saved ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
|
||||
./dricore-gallium.patch
|
||||
./werror-wundef.patch
|
||||
];
|
||||
|
||||
# Change the search path for EGL drivers from $drivers/* to driverLink
|
||||
|
@ -69,7 +69,7 @@ stdenv.mkDerivation {
|
|||
"--enable-osmesa" # used by wine
|
||||
|
||||
"--with-dri-drivers=i965,r200,radeon"
|
||||
("--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast,radeonsi")
|
||||
"--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast,radeonsi"
|
||||
"--with-egl-platforms=x11,wayland,drm" "--enable-gbm" "--enable-shared-glapi"
|
||||
]
|
||||
++ optional enableTextureFloats "--enable-texture-float"
|
||||
|
@ -94,7 +94,7 @@ stdenv.mkDerivation {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
#doCheck = true; # https://bugs.freedesktop.org/show_bug.cgi?id=67672,
|
||||
#tests for 10.* fail to link due to some RTTI problem
|
||||
# also, 10.* links bad due to some RTTI problem
|
||||
|
||||
# move gallium-related stuff to $drivers, so $out doesn't depend on LLVM;
|
||||
# also move libOSMesa to $osmesa, as it's relatively big
|
||||
|
|
216
pkgs/development/libraries/mesa/dricore-gallium.patch
Normal file
216
pkgs/development/libraries/mesa/dricore-gallium.patch
Normal file
|
@ -0,0 +1,216 @@
|
|||
commit 5208f187c7dade2c33385a56c1a5f1c3cedc8377 (HEAD, nix-patches)
|
||||
Author: Vladimír Čunát <vcunat@gmail.com>
|
||||
Date: Mon May 13 11:34:59 2013 +0200
|
||||
|
||||
118-dricore-gallium.patch
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index be89843..08f6761 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -928,6 +928,8 @@ AC_SUBST([GLESv2_LIB_DEPS])
|
||||
AC_SUBST([GLESv2_PC_LIB_PRIV])
|
||||
|
||||
DRI_LIB_DEPS="\$(top_builddir)/src/mesa/libdricore/libdricore${VERSION}.la"
|
||||
+MESAGALLIUM_LIBS="${DRI_LIB_DEPS}"
|
||||
+AC_SUBST([MESAGALLIUM_LIBS], ${MESAGALLIUM_LIBS})
|
||||
|
||||
AC_SUBST([HAVE_XF86VIDMODE])
|
||||
|
||||
diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
|
||||
index 3cdec83..53ff69b 100644
|
||||
--- a/src/gallium/auxiliary/Makefile.am
|
||||
+++ b/src/gallium/auxiliary/Makefile.am
|
||||
@@ -34,14 +34,14 @@ if LLVM_NEEDS_FNORTTI
|
||||
|
||||
AM_CXXFLAGS += -fno-rtti
|
||||
|
||||
-libgallium_la_LIBADD = $(LLVM_LIBS)
|
||||
-
|
||||
endif
|
||||
|
||||
libgallium_la_SOURCES += \
|
||||
$(GALLIVM_SOURCES) \
|
||||
$(GALLIVM_CPP_SOURCES)
|
||||
|
||||
+libgallium_la_LIBADD = ../../mesa/libdricore/libmesagallium.la $(LLVM_LIBS) $(GALLIUM_DRI_LIB_DEPS)
|
||||
+
|
||||
endif
|
||||
|
||||
indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py
|
||||
diff --git a/src/gallium/targets/dri-i915/Makefile.am b/src/gallium/targets/dri-i915/Makefile.am
|
||||
index f4f9030..e9b9462 100644
|
||||
--- a/src/gallium/targets/dri-i915/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-i915/Makefile.am
|
||||
@@ -49,7 +49,7 @@ i915_dri_la_SOURCES = \
|
||||
i915_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
i915_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
|
||||
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am b/src/gallium/targets/dri-nouveau/Makefile.am
|
||||
index 69ccf32..fef4c63 100644
|
||||
--- a/src/gallium/targets/dri-nouveau/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-nouveau/Makefile.am
|
||||
@@ -48,7 +48,7 @@ nouveau_dri_la_SOURCES = \
|
||||
nouveau_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
nouveau_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
|
||||
diff --git a/src/gallium/targets/dri-r300/Makefile.am b/src/gallium/targets/dri-r300/Makefile.am
|
||||
index 8c0215d..6beb536 100644
|
||||
--- a/src/gallium/targets/dri-r300/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-r300/Makefile.am
|
||||
@@ -49,7 +49,7 @@ r300_dri_la_SOURCES = \
|
||||
r300_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
r300_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
|
||||
diff --git a/src/gallium/targets/dri-r600/Makefile.am b/src/gallium/targets/dri-r600/Makefile.am
|
||||
index 2b3524b..d40fb89 100644
|
||||
--- a/src/gallium/targets/dri-r600/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-r600/Makefile.am
|
||||
@@ -48,7 +48,7 @@ r600_dri_la_SOURCES = \
|
||||
r600_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
r600_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/drivers/r600/libr600.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
diff --git a/src/gallium/targets/dri-radeonsi/Makefile.am b/src/gallium/targets/dri-radeonsi/Makefile.am
|
||||
index f7d87a6..87ab2aa 100644
|
||||
--- a/src/gallium/targets/dri-radeonsi/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-radeonsi/Makefile.am
|
||||
@@ -49,7 +49,7 @@ radeonsi_dri_la_SOURCES = \
|
||||
radeonsi_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
radeonsi_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
diff --git a/src/gallium/targets/dri-swrast/Makefile.am b/src/gallium/targets/dri-swrast/Makefile.am
|
||||
index 1104379..72d2401 100644
|
||||
--- a/src/gallium/targets/dri-swrast/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-swrast/Makefile.am
|
||||
@@ -49,7 +49,7 @@ swrast_dri_la_SOURCES = \
|
||||
swrast_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
swrast_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/sw/libdrisw.la \
|
||||
$(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la \
|
||||
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile.am b/src/gallium/targets/dri-vmwgfx/Makefile.am
|
||||
index ca7df65..4384976 100644
|
||||
--- a/src/gallium/targets/dri-vmwgfx/Makefile.am
|
||||
+++ b/src/gallium/targets/dri-vmwgfx/Makefile.am
|
||||
@@ -48,7 +48,7 @@ vmwgfx_dri_la_SOURCES = \
|
||||
vmwgfx_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
|
||||
|
||||
vmwgfx_dri_la_LIBADD = \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la \
|
||||
+ @MESAGALLIUM_LIBS@ \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
|
||||
diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am
|
||||
index 5c40ae8..6922ab2 100644
|
||||
--- a/src/gallium/targets/egl-static/Makefile.am
|
||||
+++ b/src/gallium/targets/egl-static/Makefile.am
|
||||
@@ -104,7 +104,7 @@ AM_CPPFLAGS += \
|
||||
$(API_DEFINES)
|
||||
|
||||
egl_gallium_la_LIBADD += \
|
||||
- $(top_builddir)/src/mesa/libmesagallium.la
|
||||
+ @MESAGALLIUM_LIBS@
|
||||
# make st/mesa built-in when there is a single glapi provider
|
||||
if HAVE_SHARED_GLAPI
|
||||
egl_gallium_la_LIBADD += \
|
||||
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
|
||||
index 41483dd..0045a673 100644
|
||||
--- a/src/mesa/Makefile.am
|
||||
+++ b/src/mesa/Makefile.am
|
||||
@@ -75,9 +75,6 @@ noinst_LTLIBRARIES += libmesa.la
|
||||
else
|
||||
check_LTLIBRARIES = libmesa.la
|
||||
endif
|
||||
-if HAVE_GALLIUM
|
||||
-noinst_LTLIBRARIES += libmesagallium.la
|
||||
-endif
|
||||
|
||||
SRCDIR = $(top_srcdir)/src/mesa/
|
||||
BUILDDIR = $(top_builddir)/src/mesa/
|
||||
@@ -119,15 +116,6 @@ libmesa_la_LIBADD = \
|
||||
$()
|
||||
libmesa_la_LDFLAGS =
|
||||
|
||||
-libmesagallium_la_SOURCES = \
|
||||
- $(MESA_GALLIUM_FILES) \
|
||||
- $(MESA_ASM_FILES_FOR_ARCH)
|
||||
-
|
||||
-libmesagallium_la_LIBADD = \
|
||||
- $(top_builddir)/src/glsl/libglsl.la \
|
||||
- $(top_builddir)/src/mesa/program/libprogram.la \
|
||||
- $()
|
||||
-
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gl.pc
|
||||
|
||||
diff --git a/src/mesa/libdricore/Makefile.am b/src/mesa/libdricore/Makefile.am
|
||||
index 753548e..8761418 100644
|
||||
--- a/src/mesa/libdricore/Makefile.am
|
||||
+++ b/src/mesa/libdricore/Makefile.am
|
||||
@@ -42,6 +42,7 @@ libdricore@VERSION@_la_SOURCES = \
|
||||
libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
|
||||
libdricore@VERSION@_la_LIBADD = \
|
||||
../program/libdricore_program.la \
|
||||
+ $(top_builddir)/src/mapi/shared-glapi/libglapi.la
|
||||
$()
|
||||
|
||||
if HAVE_X86_ASM
|
||||
@@ -65,8 +66,10 @@ AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/src/mesa/sparc
|
||||
endif
|
||||
|
||||
+lib_LTLIBRARIES =
|
||||
+
|
||||
if HAVE_DRI
|
||||
-lib_LTLIBRARIES = libdricore@VERSION@.la
|
||||
+lib_LTLIBRARIES += libdricore@VERSION@.la
|
||||
|
||||
# Provide compatibility with scripts for the old Mesa build system for
|
||||
# a while by putting a link to the driver into /lib of the build tree.
|
||||
@@ -76,6 +79,17 @@ all-local: libdricore@VERSION@.la
|
||||
ln -sf libdricore@VERSION@.so.1 $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so
|
||||
endif
|
||||
|
||||
+libmesagallium_la_SOURCES = \
|
||||
+ $(STATETRACKER_FILES)
|
||||
+libmesagallium_la_CFLAGS = @LLVM_CFLAGS@
|
||||
+libmesagallium_la_CXXFLAGS = @LLVM_CXXFLAGS@
|
||||
+libmesagallium_la_LIBADD = libdricore@VERSION@.la $(LLVM_LIBS)
|
||||
+
|
||||
+if HAVE_GALLIUM
|
||||
+noinst_LTLIBRARIES = libmesagallium.la
|
||||
+endif
|
||||
+
|
||||
+
|
||||
CLEANFILES = \
|
||||
$(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so.1 \
|
||||
$(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so
|
12
pkgs/development/libraries/mesa/werror-wundef.patch
Normal file
12
pkgs/development/libraries/mesa/werror-wundef.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -rupN Mesa-9.2.0-orig/include/GL/gl.h Mesa-9.2.0/include/GL/gl.h
|
||||
--- Mesa-9.2.0-orig/include/GL/gl.h 2013-08-14 03:34:42.000000000 +0200
|
||||
+++ Mesa-9.2.0/include/GL/gl.h 2013-09-24 19:34:58.319140812 +0200
|
||||
@@ -2088,7 +2088,7 @@ typedef void (APIENTRYP PFNGLMULTITEXCOO
|
||||
|
||||
|
||||
|
||||
-#if GL_ARB_shader_objects
|
||||
+#if defined(GL_ARB_shaders_objects) && GL_ARB_shader_objects
|
||||
|
||||
#ifndef GL_MESA_shader_debug
|
||||
#define GL_MESA_shader_debug 1
|
|
@ -5104,7 +5104,7 @@ let
|
|||
|
||||
mesaSupported = lib.elem system lib.platforms.mesaPlatforms;
|
||||
|
||||
mesa_original = callPackage ../development/libraries/mesa { };
|
||||
mesa_original = callPackage ../development/libraries/mesa { llvm = llvm_33; };
|
||||
mesa_noglu = if stdenv.isDarwin
|
||||
then darwinX11AndOpenGL // { driverLink = mesa_noglu; }
|
||||
else mesa_original;
|
||||
|
|
Loading…
Reference in a new issue