You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/qtbase.mk

106 lines
4.3 KiB

12 years ago
# This file is part of MXE.
# See index.html for further information.
PKG := qtbase
12 years ago
$(PKG)_IGNORE :=
$(PKG)_VERSION := 5.7.0
$(PKG)_CHECKSUM := 3e7b6d123cab23a587ccbc45173296b33786faa409dba0494e4658fda3ede646
$(PKG)_SUBDIR := $(PKG)-opensource-src-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-opensource-src-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := http://download.qt.io/official_releases/qt/5.7/$($(PKG)_VERSION)/submodules/$($(PKG)_FILE)
$(PKG)_DEPS := gcc dbus freetds harfbuzz jpeg libpng libmysqlclient openssl pcre postgresql sqlite zlib
12 years ago
define $(PKG)_UPDATE
$(WGET) -q -O- http://download.qt-project.org/official_releases/qt/5.5/ | \
$(SED) -n 's,.*href="\(5\.[0-9]\.[^/]*\)/".*,\1,p' | \
grep -iv -- '-rc' | \
sort |
tail -1
12 years ago
endef
define $(PKG)_BUILD
# ICU is buggy. See #653. TODO: reenable it some time in the future.
12 years ago
cd '$(1)' && \
OPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \
PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl` -lws2_32" \
SYBASE_LIBS="-lsybdb `'$(TARGET)-pkg-config' --libs-only-l gnutls` -liconv -lws2_32" \
./configure \
-opensource \
-c++std c++11 \
12 years ago
-confirm-license \
-xplatform win32-g++ \
-device-option CROSS_COMPILE=${TARGET}- \
-device-option PKG_CONFIG='${TARGET}-pkg-config' \
-force-pkg-config \
-no-use-gold-linker \
12 years ago
-release \
-static \
-prefix '$(PREFIX)/$(TARGET)/qt5' \
-no-icu \
12 years ago
-opengl desktop \
-no-glib \
-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 \
12 years ago
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-sqlite \
-no-fontconfig \
-no-freetype \
-system-harfbuzz \
12 years ago
-system-pcre \
-openssl-linked \
-dbus-linked \
-v
# invoke qmake with removed debug options as a workaround for
# https://bugreports.qt-project.org/browse/QTBUG-30898
$(MAKE) -C '$(1)' -j '$(JOBS)' QMAKE="$(1)/bin/qmake CONFIG-='debug debug_and_release'"
12 years ago
rm -rf '$(PREFIX)/$(TARGET)/qt5'
$(MAKE) -C '$(1)' -j 1 install
ln -sf '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PREFIX)/bin/$(TARGET)'-qmake-qt5
12 years ago
mkdir '$(1)/test-qt'
cd '$(1)/test-qt' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PWD)/src/qt-test.pro'
$(MAKE) -C '$(1)/test-qt' -j '$(JOBS)'
$(INSTALL) -m755 '$(1)/test-qt/release/test-qt5.exe' '$(PREFIX)/$(TARGET)/bin/'
# 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'
'$(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'
'$(TARGET)-g++' \
-W -Wall -Werror -std=c++0x -pedantic \
'$(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' \
-I'$(1)/test-$(PKG)-pkgconfig' \
`'$(TARGET)-pkg-config' Qt5Widgets --cflags --libs`
# setup cmake toolchain
echo 'set(CMAKE_SYSTEM_PREFIX_PATH "$(PREFIX)/$(TARGET)/qt5" ${CMAKE_SYSTEM_PREFIX_PATH})' > '$(CMAKE_TOOLCHAIN_DIR)/$(PKG).cmake'
# 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'
12 years ago
endef
$(PKG)_BUILD_SHARED = $(subst -static ,-shared ,\
$($(PKG)_BUILD))