opt/qt6-webengine/Pkgfile

50 lines
2.6 KiB
Plaintext
Raw Normal View History

# Description: Provides support for web applications using the Chromium browser project
# URL: https://www.qt.io/
2023-07-21 21:17:31 +02:00
# Maintainer: Tim Biermann, tbier at posteo dot de
2024-01-20 11:52:08 +01:00
# Depends on: cups ffmpeg icu libevent libva libvpx libwebp minizip nodejs nss pciutils python3-html5lib qt6-positioning qt6-tools qt6-webchannel re2 snappy xorg-libxcomposite xorg-libxcursor
# Optional: dav1d fdk-aac gnutls graphite2 keyutils krb5 lame lcms2 libpcre2 libvdpau numactl pipewire x264 x265
name=qt6-webengine
2024-04-03 23:33:52 +02:00
version=6.7.0
release=1
2024-02-15 22:28:27 +01:00
source=(https://download.qt.io/official_releases/qt/${version%.*}/$version/submodules/qtwebengine-everywhere-src-$version.tar.xz)
build() {
2023-10-10 21:25:32 +02:00
if [[ ! -e /usr/include/xkbcommon/xkbcommon-x11.h ]]; then
printf '\e[31m%s\e[m\n' "libxkbcommon is not built with x11 support!"
printf '\e[31m%s\e[m\n' "Therefor, qt6-base is not built with x11-support!"
printf '\e[33m%s\e[m\n' "This build will fail because x11 is needed, else it will fail"
printf '\e[31m%s\e[m\n' "Rebuild libxkbcommon with x11 support, then rebuild qt6-base"
printf '\e[31m%s\e[m\n' "Rebuild libxkbcommon with x11 support, then rebuild qt6-base"
exit 1
fi
2023-07-21 21:17:31 +02:00
prt-get isinst krb5 && PKGMK_QT6+=' -D QT_FEATURE_webengine_kerberos=ON'
prt-get isinst pipewire && PKGMK_QT6+=' -D QT_FEATURE_webengine_webrtc_pipewire=ON'
2023-07-21 21:17:31 +02:00
# use ccache if found on system and in PATH, else use sccache if found on system
prt-get isinst ccache && echo "${PATH}" | grep '/usr/lib/ccache' && \
2023-10-10 21:25:32 +02:00
PKGMK_QT6+=' -D QT_USE_CCACHE=ON' && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
2023-07-21 21:17:31 +02:00
prt-get isinst sccache && echo "${PATH}" | grep --invert-match '/usr/lib/ccache' && \
2023-10-10 21:25:32 +02:00
PKGMK_QT6+=' -D CMAKE_C_COMPILER_LAUNCHER=sccache -D CMAKE_CXX_COMPILER_LAUNCHER=sccache'
2023-11-27 20:51:43 +01:00
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
2023-07-21 21:17:31 +02:00
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_re2=OFF \
2023-10-10 21:25:32 +02:00
-D QT_FEATURE_webengine_ozone_x11=ON \
2023-07-21 21:17:31 +02:00
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
}