2 $(package
)_version
=5.7.1
3 $(package
)_download_path
=http
://download.qt.io
/official_releases
/qt
/5.7/$($(package
)_version
)/submodules
4 $(package
)_suffix
=opensource-src-
$($(package
)_version
).
tar.gz
5 $(package
)_file_name
=qtbase-
$($(package
)_suffix
)
6 $(package
)_sha256_hash
=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
7 $(package
)_dependencies
=openssl zlib
8 $(package
)_linux_dependencies
=freetype fontconfig libxcb libX11 xproto libXext
9 $(package
)_build_subdir
=qtbase
10 $(package
)_qt_libs
=corelib network widgets gui plugins testlib
11 $(package
)_patches
=mac-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch fix_qt_pkgconfig.patch
13 $(package
)_qttranslations_file_name
=qttranslations-
$($(package
)_suffix
)
14 $(package
)_qttranslations_sha256_hash
=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
17 $(package
)_qttools_file_name
=qttools-
$($(package
)_suffix
)
18 $(package
)_qttools_sha256_hash
=22d67de915cb8cd93e16fdd38fa006224ad9170bd217c2be1e53045a8dd02f0f
20 $(package
)_extra_sources
= $($(package
)_qttranslations_file_name
)
21 $(package
)_extra_sources
+= $($(package
)_qttools_file_name
)
23 define $(package
)_set_vars
24 $(package
)_config_opts_release
= -release
25 $(package
)_config_opts_debug
= -debug
26 $(package
)_config_opts
+= -bindir $(build_prefix
)/bin
27 $(package
)_config_opts
+= -c
++std c
++11
28 $(package
)_config_opts
+= -confirm-license
29 $(package
)_config_opts
+= -dbus-runtime
30 $(package
)_config_opts
+= -hostprefix
$(build_prefix
)
31 $(package
)_config_opts
+= -no-alsa
32 $(package
)_config_opts
+= -no-audio-backend
33 $(package
)_config_opts
+= -no-cups
34 $(package
)_config_opts
+= -no-egl
35 $(package
)_config_opts
+= -no-eglfs
36 $(package
)_config_opts
+= -no-feature-style-windowsmobile
37 $(package
)_config_opts
+= -no-feature-style-windowsce
38 $(package
)_config_opts
+= -no-freetype
39 $(package
)_config_opts
+= -no-gif
40 $(package
)_config_opts
+= -no-glib
41 $(package
)_config_opts
+= -no-gstreamer
42 $(package
)_config_opts
+= -no-icu
43 $(package
)_config_opts
+= -no-iconv
44 $(package
)_config_opts
+= -no-kms
45 $(package
)_config_opts
+= -no-linuxfb
46 $(package
)_config_opts
+= -no-libudev
47 $(package
)_config_opts
+= -no-mitshm
48 $(package
)_config_opts
+= -no-mtdev
49 $(package
)_config_opts
+= -no-pulseaudio
50 $(package
)_config_opts
+= -no-openvg
51 $(package
)_config_opts
+= -no-reduce-relocations
52 $(package
)_config_opts
+= -no-qml-debug
53 $(package
)_config_opts
+= -no-sql-db2
54 $(package
)_config_opts
+= -no-sql-ibase
55 $(package
)_config_opts
+= -no-sql-oci
56 $(package
)_config_opts
+= -no-sql-tds
57 $(package
)_config_opts
+= -no-sql-mysql
58 $(package
)_config_opts
+= -no-sql-odbc
59 $(package
)_config_opts
+= -no-sql-psql
60 $(package
)_config_opts
+= -no-sql-sqlite
61 $(package
)_config_opts
+= -no-sql-sqlite2
62 $(package
)_config_opts
+= -no-use-gold-linker
63 $(package
)_config_opts
+= -no-xinput2
64 $(package
)_config_opts
+= -no-xrender
65 $(package
)_config_opts
+= -nomake examples
66 $(package
)_config_opts
+= -nomake tests
67 $(package
)_config_opts
+= -opensource
68 $(package
)_config_opts
+= -openssl-linked
69 $(package
)_config_opts
+= -optimized-qmake
70 $(package
)_config_opts
+= -pch
71 $(package
)_config_opts
+= -pkg-config
72 $(package
)_config_opts
+= -prefix $(host_prefix
)
73 $(package
)_config_opts
+= -qt-libpng
74 $(package
)_config_opts
+= -qt-libjpeg
75 $(package
)_config_opts
+= -qt-pcre
76 $(package
)_config_opts
+= -system-zlib
77 $(package
)_config_opts
+= -reduce-exports
78 $(package
)_config_opts
+= -static
79 $(package
)_config_opts
+= -silent
80 $(package
)_config_opts
+= -v
81 $(package
)_config_opts
+= -no-feature-printer
82 $(package
)_config_opts
+= -no-feature-printdialog
84 ifneq ($(build_os
),darwin
)
85 $(package
)_config_opts_darwin
= -xplatform macx-clang-linux
86 $(package
)_config_opts_darwin
+= -device-option MAC_SDK_PATH
=$(OSX_SDK
)
87 $(package
)_config_opts_darwin
+= -device-option MAC_SDK_VERSION
=$(OSX_SDK_VERSION
)
88 $(package
)_config_opts_darwin
+= -device-option CROSS_COMPILE
="$(host)-"
89 $(package
)_config_opts_darwin
+= -device-option MAC_MIN_VERSION
=$(OSX_MIN_VERSION
)
90 $(package
)_config_opts_darwin
+= -device-option MAC_TARGET
=$(host
)
91 $(package
)_config_opts_darwin
+= -device-option MAC_LD64_VERSION
=$(LD64_VERSION
)
94 $(package
)_config_opts_linux
= -qt-xkbcommon
95 $(package
)_config_opts_linux
+= -qt-xcb
96 $(package
)_config_opts_linux
+= -system-freetype
97 $(package
)_config_opts_linux
+= -no-sm
98 $(package
)_config_opts_linux
+= -fontconfig
99 $(package
)_config_opts_linux
+= -no-opengl
100 $(package
)_config_opts_arm_linux
= -platform linux-g
++ -xplatform
$(host
)
101 $(package
)_config_opts_i686_linux
= -xplatform linux-g
++-32
102 $(package
)_config_opts_mingw32
= -no-opengl
-xplatform win32-g
++ -device-option CROSS_COMPILE
="$(host)-"
103 $(package
)_build_env
= QT_RCC_TEST
=1
106 define $(package
)_fetch_cmds
107 $(call fetch_file
,$(package
),$($(package
)_download_path
),$($(package
)_download_file
),$($(package
)_file_name
),$($(package
)_sha256_hash
)) && \
108 $(call fetch_file
,$(package
),$($(package
)_download_path
),$($(package
)_qttranslations_file_name
),$($(package
)_qttranslations_file_name
),$($(package
)_qttranslations_sha256_hash
)) && \
109 $(call fetch_file
,$(package
),$($(package
)_download_path
),$($(package
)_qttools_file_name
),$($(package
)_qttools_file_name
),$($(package
)_qttools_sha256_hash
))
112 define $(package
)_extract_cmds
113 mkdir
-p
$($(package
)_extract_dir
) && \
114 echo
"$($(package)_sha256_hash) $($(package)_source)" > $($(package
)_extract_dir
)/.
$($(package
)_file_name
).hash
&& \
115 echo
"$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package
)_extract_dir
)/.
$($(package
)_file_name
).hash
&& \
116 echo
"$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package
)_extract_dir
)/.
$($(package
)_file_name
).hash
&& \
117 $(build_SHA256SUM
) -c
$($(package
)_extract_dir
)/.
$($(package
)_file_name
).hash
&& \
119 tar --strip-components
=1 -xf
$($(package
)_source
) -C qtbase
&& \
120 mkdir qttranslations
&& \
121 tar --strip-components
=1 -xf
$($(package
)_source_dir
)/$($(package
)_qttranslations_file_name
) -C qttranslations
&& \
123 tar --strip-components
=1 -xf
$($(package
)_source_dir
)/$($(package
)_qttools_file_name
) -C qttools
127 define $(package
)_preprocess_cmds
128 sed
-i.old
"s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations
/translations
/translations.pro
&& \
129 sed
-i.old
"/updateqm.depends =/d" qttranslations
/translations
/translations.pro
&& \
130 sed
-i.old
"s/src_plugins.depends = src_sql src_xml src_network/src_plugins.depends = src_xml src_network/" qtbase
/src
/src.pro
&& \
131 sed
-i.old
"s|X11/extensions/XIproto.h|X11/X.h|" qtbase
/src
/plugins
/platforms
/xcb
/qxcbxsettings.
cpp && \
132 sed
-i.old
's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' qtbase
/configure
&& \
133 sed
-i.old
's/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0)/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, kCGMouseButtonLeft)/' qtbase
/src
/plugins
/platforms
/cocoa
/qcocoacursor.mm
&& \
134 mkdir
-p qtbase
/mkspecs
/macx-clang-linux
&&\
135 cp
-f qtbase
/mkspecs
/macx-clang
/Info.plist.lib qtbase
/mkspecs
/macx-clang-linux
/ &&\
136 cp
-f qtbase
/mkspecs
/macx-clang
/Info.plist.app qtbase
/mkspecs
/macx-clang-linux
/ &&\
137 cp
-f qtbase
/mkspecs
/macx-clang
/qplatformdefs.h qtbase
/mkspecs
/macx-clang-linux
/ &&\
138 cp
-f
$($(package
)_patch_dir
)/mac-qmake.conf qtbase
/mkspecs
/macx-clang-linux
/qmake.conf
&& \
139 patch
-p1
< $($(package
)_patch_dir
)/mingw-uuidof.patch
&& \
140 patch
-p1
< $($(package
)_patch_dir
)/pidlist_absolute.patch
&& \
141 patch
-p1
< $($(package
)_patch_dir
)/fix-xcb-include-order.patch
&& \
142 patch
-p1
< $($(package
)_patch_dir
)/fix_qt_pkgconfig.patch
&& \
143 echo
"!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase
/mkspecs
/common
/gcc-base.conf
&& \
144 echo
"!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase
/mkspecs
/common
/gcc-base.conf
&& \
145 echo
"!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase
/mkspecs
/common
/gcc-base.conf
&& \
146 sed
-i.old
"s|QMAKE_CFLAGS = |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase
/mkspecs
/win32-g
++/qmake.conf
&& \
147 sed
-i.old
"s|QMAKE_LFLAGS = |!host_build: QMAKE_LFLAGS = $($(package)_ldflags) |" qtbase
/mkspecs
/win32-g
++/qmake.conf
&& \
148 sed
-i.old
"s|QMAKE_CXXFLAGS = |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase
/mkspecs
/win32-g
++/qmake.conf
152 define $(package
)_config_cmds
153 export PKG_CONFIG_SYSROOT_DIR
=/ && \
154 export PKG_CONFIG_LIBDIR
=$(host_prefix
)/lib
/pkgconfig
&& \
155 export PKG_CONFIG_PATH
=$(host_prefix
)/share
/pkgconfig
&& \
156 .
/configure
$($(package
)_config_opts
) && \
157 echo
"host_build: QT_CONFIG ~= s/system-zlib/zlib" >> mkspecs
/qconfig.pri
&& \
158 echo
"CONFIG += force_bootstrap" >> mkspecs
/qconfig.pri
&& \
159 $(MAKE
) sub-src-clean
&& \
160 cd ..
/qttranslations
&& ..
/qtbase
/bin
/qmake qttranslations.pro
-o Makefile
&& \
161 cd translations
&& ..
/..
/qtbase
/bin
/qmake translations.pro
-o Makefile
&& cd ..
/..
&&\
162 cd qttools
/src
/linguist
/lrelease
/ && ..
/..
/..
/..
/qtbase
/bin
/qmake lrelease.pro
-o Makefile
165 define $(package
)_build_cmds
166 $(MAKE
) -C src
$(addprefix sub-
,$($(package
)_qt_libs
)) && \
167 $(MAKE
) -C ..
/qttools
/src
/linguist
/lrelease
&& \
168 $(MAKE
) -C ..
/qttranslations
171 define $(package
)_stage_cmds
172 $(MAKE
) -C src INSTALL_ROOT
=$($(package
)_staging_dir
) $(addsuffix -install_subtargets
,$(addprefix sub-
,$($(package
)_qt_libs
))) && cd ..
&&\
173 $(MAKE
) -C qttools
/src
/linguist
/lrelease INSTALL_ROOT
=$($(package
)_staging_dir
) install_target
&& \
174 $(MAKE
) -C qttranslations INSTALL_ROOT
=$($(package
)_staging_dir
) install_subtargets
&& \
175 if
`test -f qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a`; then \
176 cp qtbase
/src
/plugins
/platforms
/xcb
/xcb-static
/libxcb-static.a
$($(package
)_staging_prefix_dir
)/lib
; \
180 define $(package
)_postprocess_cmds
181 rm -rf native
/mkspecs
/ native
/lib
/ lib
/cmake
/ && \
182 rm -f lib
/lib
*.la lib
/*.prl plugins
/*/*.prl