qt5webengine.mk 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. ################################################################################
  2. #
  3. # qt5webengine
  4. #
  5. ################################################################################
  6. QT5WEBENGINE_VERSION = $(QT5_VERSION)
  7. QT5WEBENGINE_SITE = $(QT5_SITE)/qtwebengine/-/archive/v$(QT5WEBENGINE_VERSION)-lts
  8. QT5WEBENGINE_SOURCE = qtwebengine-v$(QT5WEBENGINE_VERSION)-lts.tar.bz2
  9. QT5WEBENGINE_DEPENDENCIES = qt5declarative qt5webchannel
  10. QT5WEBENGINE_PATCH_DEPENDENCIES = qt5webengine-chromium
  11. QT5WEBENGINE_INSTALL_STAGING = YES
  12. QT5WEBENGINE_SYNC_QT_HEADERS = YES
  13. QT5WEBENGINE_LICENSE = GPL-2.0 or LGPL-3.0 or GPL-3.0 or GPL-3.0 with exception
  14. QT5WEBENGINE_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT \
  15. LICENSE.GPLv3 LICENSE.LGPL3
  16. # command line argument separator
  17. QT5WEBENGINE_CONF_OPTS = --
  18. ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
  19. QT5WEBENGINE_DEPENDENCIES += qt5svg
  20. endif
  21. ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
  22. QT5WEBENGINE_DEPENDENCIES += \
  23. xlib_libXcomposite \
  24. xlib_libXcursor \
  25. xlib_libXi \
  26. xlib_libxkbfile \
  27. xlib_libXrandr \
  28. xlib_libXScrnSaver \
  29. xlib_libXtst
  30. QT5WEBENGINE_CONF_OPTS += \
  31. -feature-webengine-ozone \
  32. -feature-webengine-system-libdrm \
  33. -feature-webengine-system-x11 \
  34. -feature-webengine-system-xkbfile \
  35. -feature-webengine-system-xcomposite \
  36. -feature-webengine-system-xcursor \
  37. -feature-webengine-system-xi \
  38. -feature-webengine-system-xproto-gl \
  39. -feature-webengine-system-xtst
  40. else
  41. QT5WEBENGINE_CONF_OPTS += \
  42. -no-feature-webengine-ozone \
  43. -no-feature-webengine-system-libdrm \
  44. -no-feature-webengine-system-x11 \
  45. -no-feature-webengine-system-xkbfile \
  46. -no-feature-webengine-system-xcomposite \
  47. -no-feature-webengine-system-xcursor \
  48. -no-feature-webengine-system-xi \
  49. -no-feature-webengine-system-xproto-gl \
  50. -no-feature-webengine-system-xtst
  51. endif
  52. QT5WEBENGINE_DEPENDENCIES += \
  53. host-bison \
  54. host-flex \
  55. host-freetype \
  56. host-gperf \
  57. host-harfbuzz \
  58. host-ninja \
  59. host-nodejs \
  60. host-pkgconf \
  61. host-libjpeg \
  62. host-libnss \
  63. host-libpng \
  64. host-python3 \
  65. host-webp \
  66. host-zlib \
  67. freetype \
  68. lcms2 \
  69. libevent \
  70. libnss \
  71. libvpx \
  72. libxml2 \
  73. libxslt \
  74. opus \
  75. snappy \
  76. webp
  77. QT5WEBENGINE_CONF_OPTS += \
  78. -webengine-embedded-build \
  79. -webengine-opus \
  80. -webengine-webchannel \
  81. -webengine-webp \
  82. -feature-build-qtwebengine-core \
  83. -feature-webengine-core-support \
  84. -feature-webengine-noexecstack \
  85. -feature-webengine-system-dbus \
  86. -feature-webengine-system-fontconfig \
  87. -feature-webengine-system-freetype \
  88. -feature-webengine-system-glib \
  89. -feature-webengine-system-glibc \
  90. -feature-webengine-system-harfbuzz \
  91. -feature-webengine-system-khr \
  92. -feature-webengine-system-lcms2 \
  93. -feature-webengine-system-libevent \
  94. -feature-webengine-system-libvpx \
  95. -feature-webengine-system-libxml2 \
  96. -feature-webengine-system-ninja \
  97. -feature-webengine-system-nss \
  98. -feature-webengine-system-png \
  99. -feature-webengine-system-snappy \
  100. -feature-webengine-system-zlib
  101. QT5WEBENGINE_CONF_OPTS += \
  102. -no-webengine-geolocation \
  103. -no-webengine-kerberos \
  104. -no-webengine-pepper-plugins \
  105. -no-webengine-printing-and-pdf \
  106. -no-webengine-spellchecker \
  107. -no-webengine-webrtc \
  108. -no-webengine-webrtc-pipewire \
  109. -no-feature-webengine-developer-build \
  110. -no-feature-webengine-full-debug-info \
  111. -no-feature-webengine-native-spellchecker \
  112. -no-feature-webengine-system-jpeg \
  113. -no-feature-webengine-system-minizip \
  114. -no-feature-webengine-system-gn
  115. ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
  116. QT5WEBENGINE_CONF_OPTS += -webengine-proprietary-codecs
  117. else
  118. QT5WEBENGINE_CONF_OPTS += -no-webengine-proprietary-codecs
  119. endif
  120. ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
  121. QT5WEBENGINE_DEPENDENCIES += alsa-lib
  122. QT5WEBENGINE_CONF_OPTS += -webengine-alsa
  123. else
  124. QT5WEBENGINE_CONF_OPTS += -no-webengine-alsa
  125. endif
  126. ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
  127. QT5WEBENGINE_DEPENDENCIES += pulseaudio
  128. QT5WEBENGINE_CONF_OPTS += -webengine-pulseaudio
  129. else
  130. QT5WEBENGINE_CONF_OPTS += -no-webengine-pulseaudio
  131. endif
  132. QT5WEBENGINE_ENV = \
  133. PATH=$(@D)/host-bin:$(BR_PATH) \
  134. PKG_CONFIG_SYSROOT_DIR="/"
  135. define QT5WEBENGINE_CREATE_HOST_PYTHON_WRAPPER
  136. mkdir -p $(@D)/host-bin
  137. sed s%@HOST_DIR@%$(HOST_DIR)%g $(QT5WEBENGINE_PKGDIR)/host-python-wrapper.in > $(@D)/host-bin/python
  138. chmod +x $(@D)/host-bin/python
  139. endef
  140. QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_CREATE_HOST_PYTHON_WRAPPER
  141. QT5WEBENGINE_ENV += NINJAFLAGS="-j$(PARALLEL_JOBS)"
  142. define QT5WEBENGINE_COPY_CHROMIUM
  143. rm -rf $(@D)/src/3rdparty
  144. cp -a $(QT5WEBENGINE_CHROMIUM_DIR) $(@D)/src/3rdparty
  145. endef
  146. QT5WEBENGINE_POST_PATCH_HOOKS += QT5WEBENGINE_COPY_CHROMIUM
  147. define QT5WEBENGINE_CREATE_HOST_PKG_CONFIG
  148. mkdir -p $(@D)/host-bin
  149. sed s%@HOST_DIR@%$(HOST_DIR)%g $(QT5WEBENGINE_PKGDIR)/host-pkg-config.in > $(@D)/host-bin/host-pkg-config
  150. chmod +x $(@D)/host-bin/host-pkg-config
  151. endef
  152. QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_CREATE_HOST_PKG_CONFIG
  153. QT5WEBENGINE_ENV += \
  154. GN_PKG_CONFIG_HOST=$(@D)/host-bin/host-pkg-config \
  155. GN_HOST_TOOLCHAIN_EXTRA_CPPFLAGS="$(HOST_CPPFLAGS)"
  156. QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
  157. QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)
  158. $(eval $(qmake-package))