description='Module that contains unsupported Qt 5 APIs'
url='https://www.qt.io/'

packager="Tnut <tnut@nutyx.org>"

name=qt6-5compat
version=6.4.2
makedepends=(cmake ninja qt6-base qt6-declarative)

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

build() {
 cmake -S qt5compat-everywhere-src-$version -B build -G Ninja
 cmake --build build
 DESTDIR=$PKG cmake --install build
}
devel() {
  cd $PKG
  bsdtar -cf \
  $PKGMK_PACKAGE_DIR/$name.devel${PKGMK_BUILDVER}any.cards.tar \
  usr/include \
  usr/lib/qt6/mkspecs \
  usr/lib/cmake/
  
  rm -r usr/include usr/lib/qt6/mkspecs \
  usr/lib/cmake
}
