4 QT_URL
:= https
://download.qt.io
/official_releases
/qt
/5.11/$(QT_VERSION
)/submodules
/qtbase-everywhere-src-
$(QT_VERSION
).
tar.xz
13 ifeq ($(call need_pkg
,"Qt5Core Qt5Gui Qt5Widgets"),)
17 $(TARBALLS
)/qt-
$(QT_VERSION
).
tar.xz
:
18 $(call download
,$(QT_URL
))
20 .sum-qt
: qt-
$(QT_VERSION
).
tar.xz
22 qt
: qt-
$(QT_VERSION
).
tar.xz .sum-qt
24 mv qtbase-everywhere-src-
$(QT_VERSION
) qt-
$(QT_VERSION
)
25 $(APPLY
) $(SRC
)/qt
/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
26 $(APPLY
) $(SRC
)/qt
/0002-Windows-QPA-Disable-systray-notification-sounds.patch
30 QT_PLATFORM
:= -platform darwin-g
++
34 QT_SPEC
:= win32-clang-g
++
38 ifdef HAVE_CROSS_COMPILE
39 QT_PLATFORM
:= -xplatform
$(QT_SPEC
) -device-option CROSS_COMPILE
=$(HOST
)-
41 QT_PLATFORM
:= -platform
$(QT_SPEC
)
45 QT_CONFIG
:= -static
-opensource
-confirm-license
-no-pkg-config \
46 -no-sql-sqlite
-no-gif
-qt-libjpeg
-no-openssl
-no-opengl
-no-dbus \
47 -no-sql-odbc
-no-pch \
48 -no-compile-examples
-nomake examples
-qt-zlib
53 cd
$< && .
/configure
$(QT_PLATFORM
) $(QT_CONFIG
) -prefix $(PREFIX
)
54 # Make && Install libraries
56 cd
$< && $(MAKE
) -C src sub-corelib-install_subtargets sub-gui-install_subtargets sub-widgets-install_subtargets sub-platformsupport-install_subtargets sub-zlib-install_subtargets sub-bootstrap-install_subtargets
58 cd
$< && $(MAKE
) -C src sub-moc-install_subtargets sub-rcc-install_subtargets sub-uic-install_subtargets
60 cd
$< && $(MAKE
) -C src
/plugins sub-platforms-install_subtargets
61 mv
$(PREFIX
)/plugins
/platforms
/libqwindows.a
$(PREFIX
)/lib
/ && rm -rf
$(PREFIX
)/plugins
62 # Move includes to match what VLC expects
63 mkdir
-p
$(PREFIX
)/include/QtGui
/qpa
64 cp
$(PREFIX
)/include/QtGui
/$(QT_VERSION
)/QtGui
/qpa
/qplatformnativeinterface.h
$(PREFIX
)/include/QtGui
/qpa
66 rm -rf
$(PREFIX
)/lib
/libQt5Bootstrap
* $</lib
/libQt5Bootstrap
*
67 # Fix .pc files to remove debug version (d)
68 cd
$(PREFIX
)/lib
/pkgconfig
; for i in Qt5Core.
pc Qt5Gui.
pc Qt5Widgets.
pc; do sed
-i.orig
-e
's/d\.a/.a/g' -e
's/d $$/ /' $$i; done
69 # Fix Qt5Gui.pc file to include qwindows (QWindowsIntegrationPlugin) and platform support libraries
70 cd
$(PREFIX
)/lib
/pkgconfig
; sed
-i.orig
-e
's/ -lQt5Gui/ -lqwindows -ldwmapi -lQt5ThemeSupport -lQt5FontDatabaseSupport -lQt5EventDispatcherSupport -lQt5WindowsUIAutomationSupport -lqtfreetype -lQt5Gui/g' Qt5Gui.
pc
71 ifdef HAVE_CROSS_COMPILE
72 # Building Qt build tools for Xcompilation
73 cd
$</include/QtCore
; ln
-sf
$(QT_VERSION
)/QtCore
/private
74 cd
$<; $(MAKE
) -C qmake
75 cd
$<; $(MAKE
) sub-qmake-qmake-aux-pro-install_subtargets install_mkspecs
77 for i in bootstrap uic rcc moc
; \
78 do
(cd
$$i; echo
$$i && ..
/..
/..
/bin
/qmake
-spec
$(QT_SPEC
) QMAKE_RC
=$(HOST
)-windres
&& $(MAKE
) clean && $(MAKE
) CC
=$(HOST
)-gcc CXX
=$(HOST
)-g
++ LINKER
=$(HOST
)-g
++ LIB
="$(HOST)-ar -rc" && $(MAKE
) install); \