2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2012-12-13 20:28:04 +00:00
|
|
|
|
2012-12-19 22:53:14 +00:00
|
|
|
PKG := qtbase
|
2017-03-04 10:33:47 +00:00
|
|
|
$(PKG)_WEBSITE := https://www.qt.io/
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_DESCR := Qt
|
2012-12-13 20:28:04 +00:00
|
|
|
$(PKG)_IGNORE :=
|
2020-09-09 09:07:58 +01:00
|
|
|
$(PKG)_VERSION := 5.15.1
|
|
|
|
$(PKG)_CHECKSUM := 33960404d579675b7210de103ed06a72613bfc4305443e278e2d32a3eb1f3d8c
|
2017-12-16 08:44:26 +00:00
|
|
|
$(PKG)_SUBDIR := $(PKG)-everywhere-src-$($(PKG)_VERSION)
|
|
|
|
$(PKG)_FILE := $(PKG)-everywhere-src-$($(PKG)_VERSION).tar.xz
|
2020-05-26 09:36:15 +01:00
|
|
|
$(PKG)_URL := https://download.qt.io/official_releases/qt/5.15/$($(PKG)_VERSION)/submodules/$($(PKG)_FILE)
|
2020-04-08 22:22:41 +01:00
|
|
|
$(PKG)_DEPS := cc dbus fontconfig freetds freetype harfbuzz jpeg libmysqlclient libpng mesa openssl pcre2 postgresql sqlite zlib zstd $(BUILD)~zstd
|
2018-11-22 14:24:16 +00:00
|
|
|
$(PKG)_DEPS_$(BUILD) :=
|
|
|
|
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
|
2012-12-13 20:28:04 +00:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2017-03-05 03:41:39 +00:00
|
|
|
$(WGET) -q -O- https://download.qt.io/official_releases/qt/5.8/ | \
|
2013-01-28 23:55:11 +00:00
|
|
|
$(SED) -n 's,.*href="\(5\.[0-9]\.[^/]*\)/".*,\1,p' | \
|
|
|
|
grep -iv -- '-rc' | \
|
2015-10-16 09:44:19 +01:00
|
|
|
sort |
|
2013-01-28 23:55:11 +00:00
|
|
|
tail -1
|
2012-12-13 20:28:04 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
2015-06-23 09:09:32 +01:00
|
|
|
# ICU is buggy. See #653. TODO: reenable it some time in the future.
|
2012-12-13 20:28:04 +00:00
|
|
|
cd '$(1)' && \
|
|
|
|
OPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \
|
2016-08-16 06:18:09 +01:00
|
|
|
PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl pthreads` -lws2_32" \
|
2018-12-06 09:59:22 +00:00
|
|
|
SYBASE_LIBS="-lsybdb `'$(TARGET)-pkg-config' --libs-only-l openssl` -liconv -lws2_32" \
|
2017-01-29 13:07:45 +00:00
|
|
|
PKG_CONFIG="${TARGET}-pkg-config" \
|
|
|
|
PKG_CONFIG_SYSROOT_DIR="/" \
|
2017-06-16 08:07:53 +01:00
|
|
|
PKG_CONFIG_LIBDIR="$(PREFIX)/$(TARGET)/lib/pkgconfig" \
|
2019-10-15 08:21:47 +01:00
|
|
|
MAKE=$(MAKE) \
|
2012-12-13 20:28:04 +00:00
|
|
|
./configure \
|
|
|
|
-opensource \
|
|
|
|
-confirm-license \
|
|
|
|
-xplatform win32-g++ \
|
|
|
|
-device-option CROSS_COMPILE=${TARGET}- \
|
|
|
|
-device-option PKG_CONFIG='${TARGET}-pkg-config' \
|
2017-01-29 13:07:45 +00:00
|
|
|
-pkg-config \
|
2012-12-13 20:28:04 +00:00
|
|
|
-force-pkg-config \
|
2015-02-05 18:55:03 +00:00
|
|
|
-no-use-gold-linker \
|
2012-12-13 20:28:04 +00:00
|
|
|
-release \
|
2019-12-18 11:06:23 +00:00
|
|
|
$(if $(BUILD_STATIC), -static,)$(if $(BUILD_SHARED), -shared,) \
|
2012-12-13 20:28:04 +00:00
|
|
|
-prefix '$(PREFIX)/$(TARGET)/qt5' \
|
2015-06-23 09:09:32 +01:00
|
|
|
-no-icu \
|
2020-04-08 22:22:41 +01:00
|
|
|
-opengl dynamic \
|
2012-12-13 20:28:04 +00:00
|
|
|
-no-glib \
|
|
|
|
-accessibility \
|
|
|
|
-nomake examples \
|
|
|
|
-nomake tests \
|
2015-10-08 06:28:13 +01:00
|
|
|
-plugin-sql-mysql \
|
2015-10-15 19:32:24 +01:00
|
|
|
-mysql_config $(PREFIX)/$(TARGET)/bin/mysql_config \
|
2014-12-09 09:40:40 +00:00
|
|
|
-plugin-sql-sqlite \
|
|
|
|
-plugin-sql-odbc \
|
|
|
|
-plugin-sql-psql \
|
|
|
|
-plugin-sql-tds -D Q_USE_SYBASE \
|
2012-12-13 20:28:04 +00:00
|
|
|
-system-zlib \
|
|
|
|
-system-libpng \
|
|
|
|
-system-libjpeg \
|
|
|
|
-system-sqlite \
|
2016-06-19 09:30:48 +01:00
|
|
|
-fontconfig \
|
|
|
|
-system-freetype \
|
2014-06-17 20:34:43 +01:00
|
|
|
-system-harfbuzz \
|
2012-12-13 20:28:04 +00:00
|
|
|
-system-pcre \
|
|
|
|
-openssl-linked \
|
|
|
|
-dbus-linked \
|
2016-10-27 01:01:25 +01:00
|
|
|
-no-pch \
|
2016-07-16 15:29:41 +01:00
|
|
|
-v \
|
|
|
|
$($(PKG)_CONFIGURE_OPTS)
|
2012-12-13 20:28:04 +00:00
|
|
|
|
2016-07-16 15:29:41 +01:00
|
|
|
$(MAKE) -C '$(1)' -j '$(JOBS)'
|
2012-12-13 20:28:04 +00:00
|
|
|
rm -rf '$(PREFIX)/$(TARGET)/qt5'
|
|
|
|
$(MAKE) -C '$(1)' -j 1 install
|
2014-01-30 16:00:54 +00:00
|
|
|
ln -sf '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PREFIX)/bin/$(TARGET)'-qmake-qt5
|
2012-12-13 20:28:04 +00:00
|
|
|
|
|
|
|
mkdir '$(1)/test-qt'
|
|
|
|
cd '$(1)/test-qt' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PWD)/src/qt-test.pro'
|
2020-07-06 16:51:48 +01:00
|
|
|
$(MAKE) -C '$(1)/test-qt' '$(BUILD_TYPE)' -j '$(JOBS)'
|
2020-03-31 20:41:34 +01:00
|
|
|
$(INSTALL) -m755 '$(1)/test-qt/$(BUILD_TYPE)/test-qt5.exe' '$(PREFIX)/$(TARGET)/bin/'
|
2013-07-31 09:39:47 +01:00
|
|
|
|
|
|
|
# build test the manual way
|
|
|
|
mkdir '$(1)/test-$(PKG)-pkgconfig'
|
|
|
|
'$(PREFIX)/$(TARGET)/qt5/bin/uic' -o '$(1)/test-$(PKG)-pkgconfig/ui_qt-test.h' '$(TOP_DIR)/src/qt-test.ui'
|
2015-09-23 19:02:27 +01:00
|
|
|
'$(PREFIX)/$(TARGET)/qt5/bin/moc' \
|
|
|
|
-o '$(1)/test-$(PKG)-pkgconfig/moc_qt-test.cpp' \
|
|
|
|
-I'$(1)/test-$(PKG)-pkgconfig' \
|
|
|
|
'$(TOP_DIR)/src/qt-test.hpp'
|
|
|
|
'$(PREFIX)/$(TARGET)/qt5/bin/rcc' -name qt-test -o '$(1)/test-$(PKG)-pkgconfig/qrc_qt-test.cpp' '$(TOP_DIR)/src/qt-test.qrc'
|
2013-07-31 09:39:47 +01:00
|
|
|
'$(TARGET)-g++' \
|
2018-05-23 09:48:16 +01:00
|
|
|
-W -Wall -std=c++0x -pedantic \
|
2015-09-23 19:02:27 +01:00
|
|
|
'$(TOP_DIR)/src/qt-test.cpp' \
|
|
|
|
'$(1)/test-$(PKG)-pkgconfig/moc_qt-test.cpp' \
|
|
|
|
'$(1)/test-$(PKG)-pkgconfig/qrc_qt-test.cpp' \
|
|
|
|
-o '$(PREFIX)/$(TARGET)/bin/test-$(PKG)-pkgconfig.exe' \
|
2013-07-31 09:39:47 +01:00
|
|
|
-I'$(1)/test-$(PKG)-pkgconfig' \
|
2016-07-16 15:29:41 +01:00
|
|
|
`'$(TARGET)-pkg-config' Qt5Widgets$(BUILD_TYPE_SUFFIX) --cflags --libs`
|
2014-02-16 02:10:47 +00:00
|
|
|
|
2020-01-18 02:46:49 +00:00
|
|
|
# setup cmake toolchain and test
|
2015-09-07 13:58:19 +01:00
|
|
|
echo 'set(CMAKE_SYSTEM_PREFIX_PATH "$(PREFIX)/$(TARGET)/qt5" ${CMAKE_SYSTEM_PREFIX_PATH})' > '$(CMAKE_TOOLCHAIN_DIR)/$(PKG).cmake'
|
2020-01-18 02:46:49 +00:00
|
|
|
$(CMAKE_TEST)
|
2014-12-10 22:21:40 +00:00
|
|
|
|
2014-02-16 02:10:47 +00:00
|
|
|
# batch file to run test programs
|
|
|
|
(printf 'set PATH=..\\lib;..\\qt5\\bin;..\\qt5\\lib;%%PATH%%\r\n'; \
|
|
|
|
printf 'set QT_QPA_PLATFORM_PLUGIN_PATH=..\\qt5\\plugins\r\n'; \
|
|
|
|
printf 'test-qt5.exe\r\n'; \
|
|
|
|
printf 'test-qtbase-pkgconfig.exe\r\n';) \
|
|
|
|
> '$(PREFIX)/$(TARGET)/bin/test-qt5.bat'
|
2012-12-13 20:28:04 +00:00
|
|
|
endef
|
2014-02-16 02:10:47 +00:00
|
|
|
|
2018-11-22 14:24:16 +00:00
|
|
|
define $(PKG)_BUILD_$(BUILD)
|
|
|
|
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
|
|
|
|
-prefix '$(PREFIX)/$(TARGET)/qt5' \
|
|
|
|
-static \
|
|
|
|
-release \
|
|
|
|
-opensource \
|
|
|
|
-confirm-license \
|
|
|
|
-no-dbus \
|
2018-12-11 08:29:15 +00:00
|
|
|
-no-{eventfd,glib,icu,openssl} \
|
2020-05-26 12:20:08 +01:00
|
|
|
-no-sql-{db2,ibase,mysql,oci,odbc,psql,sqlite2,tds} \
|
2018-11-22 14:24:16 +00:00
|
|
|
-no-use-gold-linker \
|
|
|
|
-nomake examples \
|
|
|
|
-nomake tests \
|
|
|
|
-make tools \
|
|
|
|
-continue \
|
|
|
|
-verbose
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
|
|
|
|
rm -rf '$(PREFIX)/$(TARGET)/qt5'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
|
|
|
|
ln -sf '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PREFIX)/bin/$(TARGET)'-qmake-qt5
|
|
|
|
endef
|