makedepends=(cmake git gperf icu json-cpp kerberos libevent libvpx libwebp libxml2 libxslt 
             node nss qt6-webchannel qt6-declarative qt6-positioning qt6-tools pciutils
             poppler protobuf re2 snappy xorg-libxcomposite xorg-libxkbfile xorg-libxrandr
             xorg-libxscrnsaver zlib python-html5lib pipewire ffmpeg8)

description="Provides support for web applications using the Chromium browser project"
url="http://qt-project.org/"

packager="Great-OS Team"
maintainer="Great-OS Team"

set=(qt6-dev)
name=qt6-webengine
version=6.10.2
release=2

_name="${name/6-/}-everywhere-src"

source=(https://download.qt.io/official_releases/qt/${version:0:4}/$version/submodules/${name/6-/}-everywhere-src-$version.tar.xz)

build() {

  mkdir -pv build && cd build

  cmake -D CMAKE_MESSAGE_LOG_LEVEL=STATUS             \
        -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_webrtc_pipewire=ON    \
        -D QT_BUILD_EXAMPLES_BY_DEFAULT=OFF           \
        -D QT_GENERATE_SBOM=OFF                       \
        -G Ninja \
        ../${_name}-${version}

  ninja
  DESTDIR=$PKG ninja install
}
