Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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