mxe/src/qtbase.mk

77 lines
3.0 KiB
Makefile
Raw Normal View History

2012-12-13 20:28:04 +00:00
# This file is part of MXE.
# See index.html for further information.
PKG := qtbase
2012-12-13 20:28:04 +00:00
$(PKG)_IGNORE :=
2013-12-12 11:37:52 +00:00
$(PKG)_VERSION := 5.2.0
$(PKG)_CHECKSUM := 36cbda404e1fe27938a3d5778c757de96ff9f27a
$(PKG)_SUBDIR := $(PKG)-opensource-src-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-opensource-src-$($(PKG)_VERSION).tar.xz
2013-12-12 11:37:52 +00:00
$(PKG)_URL := http://download.qt-project.org/official_releases/qt/5.2/$($(PKG)_VERSION)/submodules/$($(PKG)_FILE)
$(PKG)_DEPS := gcc postgresql freetds openssl zlib libpng jpeg sqlite pcre fontconfig freetype dbus icu4c
2012-12-13 20:28:04 +00:00
define $(PKG)_UPDATE
2013-07-06 05:59:27 +01:00
$(WGET) -q -O- http://download.qt-project.org/official_releases/qt/5.1/ | \
2013-01-28 23:55:11 +00:00
$(SED) -n 's,.*href="\(5\.[0-9]\.[^/]*\)/".*,\1,p' | \
grep -iv -- '-rc' | \
tail -1
2012-12-13 20:28:04 +00:00
endef
define $(PKG)_BUILD
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 \
-confirm-license \
-xplatform win32-g++ \
-device-option CROSS_COMPILE=${TARGET}- \
-device-option PKG_CONFIG='${TARGET}-pkg-config' \
-force-pkg-config \
-release \
-static \
-prefix '$(PREFIX)/$(TARGET)/qt5' \
2013-05-18 23:32:07 +01:00
-icu \
2012-12-13 20:28:04 +00:00
-opengl desktop \
-no-glib \
-accessibility \
-nomake examples \
-nomake tests \
-qt-sql-sqlite \
-qt-sql-odbc \
-qt-sql-psql \
-qt-sql-tds -D Q_USE_SYBASE \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-sqlite \
-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'"
2012-12-13 20:28:04 +00:00
rm -rf '$(PREFIX)/$(TARGET)/qt5'
$(MAKE) -C '$(1)' -j 1 install
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/'
# copy pkg-config files to standard directory
cp '$(PREFIX)/$(TARGET)'/qt5/lib/pkgconfig/* '$(PREFIX)/$(TARGET)'/lib/pkgconfig/
# 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'
'$(TARGET)-g++' \
-W -Wall -Werror -std=c++0x -pedantic \
'$(TOP_DIR)/src/qt-test.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG)-pkgconfig.exe' \
-I'$(1)/test-$(PKG)-pkgconfig' \
`'$(TARGET)-pkg-config' Qt5Widgets --cflags --libs`
2012-12-13 20:28:04 +00:00
endef