From a6ed6f3c323c301dcdeed3fc685fce4b993d8900 Mon Sep 17 00:00:00 2001 From: dsc Date: Fri, 14 Aug 2020 00:41:23 +0200 Subject: [PATCH] Slim Qt5 and added mesa dependency --- src/mesa-1-fixes.patch | 25 +++++++++++++++++++++++++ src/mesa.mk | 30 ++++++++++++++++++++++++++++++ src/qtbase.mk | 37 ++++++++++++++++++++++++++++++------- 3 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 src/mesa-1-fixes.patch create mode 100644 src/mesa.mk diff --git a/src/mesa-1-fixes.patch b/src/mesa-1-fixes.patch new file mode 100644 index 00000000..11ca69ba --- /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 +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 00000000..6acf59d8 --- /dev/null +++ b/src/mesa.mk @@ -0,0 +1,30 @@ +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 + +ifeq (,$(findstring x86_64,$(TARGET))) + MACHINE=x86_64 +else + MACHINE=x86 +endif + +define $(PKG)_BUILD + cd '$(1)' && \ + MINGW_PREFIX='$(TARGET)-' scons \ + 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 diff --git a/src/qtbase.mk b/src/qtbase.mk index d9ac501f..0a4cff63 100644 --- a/src/qtbase.mk +++ b/src/qtbase.mk @@ -9,7 +9,7 @@ $(PKG)_CHECKSUM := 9e7af10aece15fa9500369efde69cb220eee8ec3a6818afe01ce1e7d48482 $(PKG)_SUBDIR := $(PKG)-everywhere-src-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-everywhere-src-$($(PKG)_VERSION).tar.xz $(PKG)_URL := https://download.qt.io/official_releases/qt/5.15/$($(PKG)_VERSION)/submodules/$($(PKG)_FILE) -$(PKG)_DEPS := cc dbus fontconfig freetds freetype harfbuzz jpeg libmysqlclient libpng openssl pcre2 postgresql sqlite zlib zstd $(BUILD)~zstd +$(PKG)_DEPS := cc dbus fontconfig freetds freetype harfbuzz jpeg libmysqlclient libpng openssl pcre2 postgresql sqlite zlib zstd $(BUILD)~zstd mesa $(PKG)_DEPS_$(BUILD) := $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) @@ -49,12 +49,35 @@ define $(PKG)_BUILD -accessibility \ -nomake examples \ -nomake tests \ - -plugin-sql-mysql \ - -mysql_config $(PREFIX)/$(TARGET)/bin/mysql_config \ - -plugin-sql-sqlite \ - -plugin-sql-odbc \ - -plugin-sql-psql \ - -plugin-sql-tds -D Q_USE_SYBASE \ + -skip qtlocation \ + -skip qtsensors \ + -skip qtwayland \ + -skip qtgamepad \ + -skip qtserialbus \ + -skip qtquickcontrols \ + -skip qtquickcontrols2 \ + -skip qtspeech \ + -skip qtserialport \ + -skip qtandroidextras \ + -skip qtpurchasing \ + -skip qtwebview \ + -skip qtscript \ + -skip qtvirtualkeyboard \ + -skip qtcharts \ + -skip qtwebchannel \ + -skip qtwebengine \ + -skip qt3d \ + -skip qtcanvas3d \ + -optimize-size \ + -no-feature-cups \ + -no-feature-ftp \ + -no-feature-pdf \ + -no-feature-animation \ + -skip qtdeclarative \ + -skip qtwebkit \ + -skip qtwebkit-examples \ + -skip qtmultimedia \ + -skip qtquick1 \ -system-zlib \ -system-libpng \ -system-libjpeg \