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
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_WEBSITE := http://qt-project.org/
|
|
|
|
$(PKG)_DESCR := Qt
|
2012-12-13 20:28:04 +00:00
|
|
|
$(PKG)_IGNORE :=
|
2017-01-29 13:07:45 +00:00
|
|
|
$(PKG)_VERSION := 5.8.0
|
|
|
|
$(PKG)_CHECKSUM := c17111ae02a44dc7be1ec2cf979a47ee9e58edf4904041a525c21f4fa53fc005
|
2012-12-19 22:53:14 +00:00
|
|
|
$(PKG)_SUBDIR := $(PKG)-opensource-src-$($(PKG)_VERSION)
|
|
|
|
$(PKG)_FILE := $(PKG)-opensource-src-$($(PKG)_VERSION).tar.xz
|
2017-01-29 13:07:45 +00:00
|
|
|
$(PKG)_URL := http://download.qt.io/official_releases/qt/5.8/$($(PKG)_VERSION)/submodules/$($(PKG)_FILE)
|
2016-12-03 21:46:52 +00:00
|
|
|
$(PKG)_DEPS := gcc dbus fontconfig freetds freetype harfbuzz jpeg libmysqlclient libpng openssl pcre postgresql sqlite zlib
|
2012-12-13 20:28:04 +00:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2017-01-29 13:07:45 +00:00
|
|
|
$(WGET) -q -O- http://download.qt-project.org/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" \
|
2012-12-13 20:28:04 +00:00
|
|
|
SYBASE_LIBS="-lsybdb `'$(TARGET)-pkg-config' --libs-only-l gnutls` -liconv -lws2_32" \
|
2017-01-29 13:07:45 +00:00
|
|
|
PKG_CONFIG="${TARGET}-pkg-config" \
|
|
|
|
PKG_CONFIG_SYSROOT_DIR="/" \
|
|
|
|
PKG_CONFIG_LIBDIR="$(PREFIX)/$(TARGET)/lib/pc" \
|
2012-12-13 20:28:04 +00:00
|
|
|
./configure \
|
|
|
|
-opensource \
|
2016-04-06 21:20:46 +01:00
|
|
|
-c++std c++11 \
|
2012-12-13 20:28:04 +00:00
|
|
|
-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 \
|
|
|
|
-static \
|
|
|
|
-prefix '$(PREFIX)/$(TARGET)/qt5' \
|
2015-06-23 09:09:32 +01:00
|
|
|
-no-icu \
|
2012-12-13 20:28:04 +00:00
|
|
|
-opengl desktop \
|
|
|
|
-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'
|
2016-07-16 15:29:41 +01:00
|
|
|
$(MAKE) -C '$(1)/test-qt' -j '$(JOBS)' $(BUILD_TYPE)
|
|
|
|
$(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++' \
|
|
|
|
-W -Wall -Werror -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
|
|
|
|
2014-12-10 22:21:40 +00:00
|
|
|
# setup cmake toolchain
|
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'
|
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
|
|
|
|
2014-08-28 09:10:21 +01:00
|
|
|
|
2014-02-16 02:10:47 +00:00
|
|
|
$(PKG)_BUILD_SHARED = $(subst -static ,-shared ,\
|
2014-12-10 16:55:09 +00:00
|
|
|
$($(PKG)_BUILD))
|