changeset 4778:a50783d698b2

mesa.mk: Update to mesa 18.1.5 and build with llvm on Windows systems Disable osmesa for Linux builds. * mesa-1-fixes.patch: Update for mesa 18.1.5. * mesa-2-fixes.patch, mingw-mesa-1-fixes.patch: Delete. * dist-files.mk: Update.
author John W. Eaton <jwe@octave.org>
date Mon, 30 Jul 2018 11:27:32 -0400
parents f6f934903cd2
children 2612d718f3a5
files dist-files.mk src/mesa-1-fixes.patch src/mesa-2-fixes.patch src/mesa.mk src/mingw-mesa-1-fixes.patch
diffstat 5 files changed, 17 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Mon Jul 30 11:24:47 2018 -0400
+++ b/dist-files.mk	Mon Jul 30 11:27:32 2018 -0400
@@ -325,7 +325,6 @@
   matio.mk \
   mdbtools.mk \
   mesa-1-fixes.patch \
-  mesa-2-fixes.patch \
   mesa-proto.mk \
   mesa.mk \
   mingw-blas-1-xerbla.patch \
@@ -339,7 +338,6 @@
   mingw-lapack-1-xerbla.patch \
   mingw-libgcrypt-1-fixes.patch \
   mingw-libmng-1-noundefines.patch \
-  mingw-mesa-1-fixes.patch \
   mingw-openblas-1-xerbla.patch \
   mingw-portaudio-1-pkgconfig.patch \
   mingw-s2tc-1-fixes.patch \
--- a/src/mesa-1-fixes.patch	Mon Jul 30 11:24:47 2018 -0400
+++ b/src/mesa-1-fixes.patch	Mon Jul 30 11:27:32 2018 -0400
@@ -11,3 +11,14 @@
              # Handle the @xx symbol munging of DLL exports
              shlinkflags += ['-Wl,--enable-stdcall-fixup']
              #shlinkflags += ['-Wl,--kill-at']
+diff -uNr a/scons/llvm.py b/scons/llvm.py
+--- a/scons/llvm.py	2018-07-27 09:52:17.000000000 -0400
++++ b/scons/llvm.py	2018-07-30 10:16:26.424580230 -0400
+@@ -122,6 +122,7 @@
+                 'LLVMIRReader', 'LLVMAsmParser',
+                 'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
+                 'LLVMBinaryFormat',
++                'version', 'uuid', 'ole32', 'oleaut32', 'z',
+             ])
+         elif llvm_version >= distutils.version.LooseVersion('4.0'):
+             env.Prepend(LIBS = [
--- a/src/mesa-2-fixes.patch	Mon Jul 30 11:24:47 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-diff -uNr a/src/util/u_queue.c b/src/util/u_queue.c
---- a/src/util/u_queue.c	2017-09-17 19:03:22.000000000 -0400
-+++ b/src/util/u_queue.c	2018-04-12 20:13:52.000000000 -0400
-@@ -246,7 +246,7 @@
-       }
- 
-       if (flags & UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY) {
--   #if defined(__linux__)
-+   #if defined(__linux__) && defined (SCHED_IDLE)
-          struct sched_param sched_param = {0};
- 
-          /* The nice() function can only set a maximum of 19.
--- a/src/mesa.mk	Mon Jul 30 11:24:47 2018 -0400
+++ b/src/mesa.mk	Mon Jul 30 11:27:32 2018 -0400
@@ -2,16 +2,15 @@
 # See index.html for further information.
 
 PKG             := mesa
-$(PKG)_VERSION  := 17.2.1
-$(PKG)_CHECKSUM := 7429e74a0ef12ea9d60b41b2b852898b3da0b238
+$(PKG)_VERSION  := 18.1.5
+$(PKG)_CHECKSUM := 1ca7d5f5d12c95f8da137be34223229b9f0594fe
 $(PKG)_SUBDIR   := mesa-$($(PKG)_VERSION)
 $(PKG)_FILE     := mesa-$($(PKG)_VERSION).tar.xz
 $(PKG)_URL      := ftp://ftp.freedesktop.org/pub/mesa/$($(PKG)_FILE)
-$(PKG)_DEPS     := build-mako expat zlib
+$(PKG)_DEPS     := build-mako expat zlib llvm s2tc
 ifeq ($(MXE_WINDOWS_BUILD),yes)
   ifeq ($(USE_SYSTEM_OPENGL),no)
     $(PKG)_SCONS_OPENGL_OPTIONS := libgl-gdi
-    $(PKG)_DEPS += s2tc
   endif
 else
   ifeq ($(USE_SYSTEM_OPENGL),yes)
@@ -28,7 +27,6 @@
     ifeq ($(USE_SYSTEM_X11_LIBS),no)
       $(PKG)_DEPS += dri2proto glproto libdrm libxshmfence x11 xdamage xext xfixes
     endif
-    $(PKG)_DEPS += llvm s2tc
   endif
 endif
 
@@ -44,7 +42,7 @@
     $(PKG)_MACHINE := x86
   endif
   define $(PKG)_BUILD
-    cd '$(1)' && scons platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 build=release osmesa $($(PKG)_SCONS_OPENGL_OPTIONS)
+    cd '$(1)' && LLVM=$(HOST_PREFIX) scons platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 build=release $($(PKG)_SCONS_OPENGL_OPTIONS)
 
     ## Do the scons config files have useful install targets?
     $(INSTALL) -d '$(3)$(HOST_INCDIR)/GL';
@@ -52,13 +50,8 @@
       $(INSTALL) -m 644 $$f '$(3)$(HOST_INCDIR)/GL'; \
     done
 
-    $(INSTALL) -d '$(3)$(HOST_LIBDIR)';
-    $(INSTALL) -m 644 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/osmesa/libosmesa.a' '$(3)$(HOST_LIBDIR)/libOSMesa.a';
-
-    $(INSTALL) -d '$(3)$(HOST_BINDIR)';
-    $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/osmesa/osmesa.dll' '$(3)$(HOST_BINDIR)/osmesa.dll';
-
     if [ -f '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/libgl-gdi/opengl32.dll' ]; then \
+      $(INSTALL) -d '$(3)$(HOST_BINDIR)'; \
       $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/libgl-gdi/opengl32.dll' '$(3)$(HOST_BINDIR)/opengl32.dll'; \
     fi
   endef
@@ -71,7 +64,7 @@
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
         --prefix='$(HOST_PREFIX)' \
         $($(PKG)_CONFIGURE_OPENGL_OPTIONS) \
-        --enable-osmesa \
+        --disable-osmesa \
         --disable-gbm \
         --disable-xvmc \
         --enable-texture-float \
--- a/src/mingw-mesa-1-fixes.patch	Mon Jul 30 11:24:47 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-diff -uNr a/src/mesa/main/imports.h b/src/mesa/main/imports.h
---- a/src/mesa/main/imports.h	2017-09-17 19:03:22.000000000 -0400
-+++ b/src/mesa/main/imports.h	2017-10-02 09:54:19.341817963 -0400
-@@ -357,10 +357,6 @@
- #define snprintf _snprintf
- #endif
- 
--#if defined(_WIN32) && !defined(strtok_r)
--#define strtok_r strtok_s
--#endif
--
- #ifdef __cplusplus
- }
- #endif