summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Manner <robert.manner@balabit.com>2017-12-15 15:59:51 (GMT)
committermabrand <mabrand@mabrand.nl>2020-09-09 17:33:26 (GMT)
commit159208832fff727e4b3b2dc7d6a0c5d20b3e27de (patch)
tree59e706df6cb2d06e002f8a764643d697a93283e5
parent3735aa8020609e680ca6867e3f4835d8a06efa9b (diff)
downloadmxe-159208832fff727e4b3b2dc7d6a0c5d20b3e27de.zip
mxe-159208832fff727e4b3b2dc7d6a0c5d20b3e27de.tar.gz
mxe-159208832fff727e4b3b2dc7d6a0c5d20b3e27de.tar.bz2
src/mesa: add recipe for Mesa, needed for qtbase
We are going to enable the dynamic OpenGL selection in qtbase, and for that we also need the headers from Mesa.
-rw-r--r--src/mesa-1-fixes.patch25
-rw-r--r--src/mesa.mk32
2 files changed, 57 insertions, 0 deletions
diff --git a/src/mesa-1-fixes.patch b/src/mesa-1-fixes.patch
new file mode 100644
index 0000000..56e365b
--- /dev/null
+++ b/src/mesa-1-fixes.patch
@@ -0,0 +1,25 @@
+This file is part of MXE. See LICENSE.md for licensing information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Robert Manner <robert.manner@balabit.com>
+Date: Fri, 15 Dec 2017 16:40:18 +0100
+Subject: [PATCH] scons/crossmingw.py: compiler prefix can be customized
+ through environment
+
+
+diff --git a/scons/crossmingw.py b/scons/crossmingw.py
+index 1111111..2222222 100644
+--- a/scons/crossmingw.py
++++ b/scons/crossmingw.py
+@@ -51,6 +51,9 @@ prefixes64 = SCons.Util.Split("""
+ """)
+
+ def find(env):
++ if os.environ['MINGW_PREFIX']:
++ return os.environ['MINGW_PREFIX']
++
+ if env['machine'] == 'x86_64':
+ prefixes = prefixes64
+ else:
diff --git a/src/mesa.mk b/src/mesa.mk
new file mode 100644
index 0000000..51a1bc6
--- /dev/null
+++ b/src/mesa.mk
@@ -0,0 +1,32 @@
+PKG := mesa
+$(PKG)_VERSION := 18.3.6
+$(PKG)_CHECKSUM := aaf17638dcf5a90b93b6389e152fdc9ef147768b09598f24d2c5cf482fcfc705
+$(PKG)_SUBDIR := mesa-$($(PKG)_VERSION)
+$(PKG)_FILE := mesa-$($(PKG)_VERSION).tar.xz
+$(PKG)_URL := ftp://ftp.freedesktop.org/pub/mesa/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc scons-local
+
+ifeq (,$(findstring x86_64,$(TARGET)))
+ MACHINE=x86_64
+else
+ MACHINE=x86
+endif
+
+define $(PKG)_BUILD
+ mkdir -p '$(BUILD_DIR).scons'
+ $(call PREPARE_PKG_SOURCE,scons-local,'$(BUILD_DIR).scons')
+ cd '$(1)' && \
+ MINGW_PREFIX='$(TARGET)-' $(SCONS_LOCAL) \
+ platform=windows \
+ toolchain=crossmingw \
+ machine=$(MACHINE) \
+ verbose=1 \
+ build=release \
+ libgl-gdi
+
+ for i in EGL GLES GLES2 GLES3 KHR; do \
+ $(INSTALL) -d "$(PREFIX)/$(TARGET)/include/$$i"; \
+ $(INSTALL) -m 644 "$(1)/include/$$i/"* "$(PREFIX)/$(TARGET)/include/$$i/"; \
+ done
+ $(INSTALL) -m 755 '$(1)/build/windows-$(MACHINE)/gallium/targets/libgl-gdi/opengl32.dll' '$(PREFIX)/$(TARGET)/bin/'
+endef