makedepends=(cmake qt6-base qt6-shadertools vulkan-headers at-spi2-core)

description="A cross-platform application and UI framework, QtDeclarative files"
url="http://qt-project.org/"

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

set=(qt6-dev)
name=qt6-declarative 
version=6.10.2
release=5

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

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

build() {
  export CXXFLAGS+=" -ffat-lto-objects"

  mkdir -pv build && cd build

  cmake -G Ninja \
        -DINSTALL_PUBLICBINDIR=usr/bin \
        ../${_name}-${version}

  ninja
  DESTDIR=$PKG ninja install

  cd "$PKG"
  mkdir usr/bin
  while read _line; do
    ln -s $_line
  done < "$SRC"/build/user_facing_tool_links.txt
}
