# Description: Provides support for web applications using the Chromium browser project # URL: https://www.qt.io/ # Maintainer: Tim Biermann, tbier at posteo dot de # Depends on: cups ffmpeg icu libevent libva libvpx libwebp minizip nodejs nss pciutils python3-html5lib qt6-positioning qt6-tools qt6-webchannel snappy xorg-libxcomposite xorg-libxcursor # Optional: dav1d fdk-aac gnutls graphite2 keyutils krb5 lame lcms2 libpcre2 libvdpau numactl pipewire x264 x265 name=qt6-webengine version=6.7.0 release=1 source=(https://download.qt.io/official_releases/qt/${version%.*}/$version/submodules/qtwebengine-everywhere-src-$version.tar.xz ninja-1.12.patch ninja-1.12-2.patch ) build() { # WARNING: QtWebEngine won't be built. Could not find all necessary libraries for qpa-xcb support. X11:YES LIBDRM:YES XCOMPOSITE:YES XCURSOR:YES XRANDR:YES XI:YES XPROTO:YES XSHMFENCE:YES XTST:YES if [[ ! -e /usr/lib/qt6/plugins/platforms/libqxcb.so ]]; then printf '\e[31m%s\e[m\n' " opt/qt6-base is not build with x11-platform support, and opt/qt6-webeningedepends on it! Please make sure xorg/xkeyboard-config is installed, then rebuild opt/libxkbcommon and opt/qt6-base. After that, you can attempt to build opt/qt6-webengine again. " exit 1 fi if [[ ! -e /usr/lib/qt6/plugins/printsupport/libcupsprintersupport.so ]]; then printf '\e[31m%s\e[m\n' " opt/qt6-base is not build with opt/cups support, and opt/qt6-webeninge depends on it! Please make sure opt/cups is installed, then rebuild opt/qt6-base. After that, you can attempt to build opt/qt6-webengine again. " exit 1 fi SYSLIBS="freetype harfbuzz-ng libdrm libevent libpng libxml libxslt" prt-get isinst alsa-lib && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_alsa=ON' prt-get isinst krb5 && PKGMK_QT6+=' -D QT_FEATURE_webengine_kerberos=ON' prt-get isinst lcms2 && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_liblcms2=ON' prt-get isinst openjpeg2 && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_libopenjpeg2=ON' prt-get isinst opus && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_opus=ON' SYSLIBS+=' opus' prt-get isinst openh264 && SYSLIBS+=' openh264' prt-get isinst pipewire && PKGMK_QT6+=' -D QT_FEATURE_webengine_webrtc_pipewire=ON' prt-get isinst poppler && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_poppler=ON' prt-get isinst pulseaudio && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_pulseaudio=ON' if prt-get isinst ccache; then PKGMK_QT6+=' -D QT_USE_CCACHE=ON' PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')" fi sed -e 's/^#define BA_LB_COUNT.*$/#define BA_LB_COUNT 40/' \ -i qtwebengine-everywhere-src-$version/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc patch -Np1 -d qtwebengine-everywhere-src-$version/src/3rdparty -i $SRC/ninja-1.12.patch patch -Np1 -d qtwebengine-everywhere-src-$version -i $SRC/ninja-1.12-2.patch cd $SRC/qtwebengine-everywhere-src-$version/src/3rdparty/chromium ./build/linux/unbundle/replace_gn_files.py --system-libraries $SYSLIBS cd $SRC PYTHON=/usr/bin/python3 \ cmake -S qtwebengine-everywhere-src-$version -B build -G Ninja $PKGMK_QT6 \ -D CMAKE_BUILD_TYPE=Release \ -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \ -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \ -D CMAKE_TOOLCHAIN_FILE=/usr/lib/cmake/Qt6/qt.toolchain.cmake \ -D QT_FEATURE_webengine_system_ffmpeg=ON \ -D QT_FEATURE_webengine_system_icu=ON \ -D QT_FEATURE_webengine_system_libevent=ON \ -D QT_FEATURE_webengine_proprietary_codecs=ON \ -D QT_FEATURE_webengine_system_libxml=ON \ -D QT_FEATURE_webengine_ozone_x11=ON \ -D QT_FEATURE_qtpdf_build=ON \ -D QT_FEATURE_webengine_system_re2=OFF \ -D QT_BUILD_EXAMPLES_BY_DEFAULT=OFF \ -Wno-dev cmake --build build DESTDIR=$PKG cmake --install build }