void-packages/srcpkgs/qt6-wayland/template

72 lines
2.3 KiB
Bash

# Template file for 'qt6-wayland'
pkgname=qt6-wayland
version=6.7.2
revision=2
build_style=cmake
hostmakedepends="qt6-base perl pkg-config wayland-devel qt6-declarative-host-tools"
# XXX: Qml as optional dep
makedepends="qt6-base-private-devel wayland-devel libxkbcommon-devel
qt6-declarative-private-devel
libXcomposite-devel MesaLib-devel Vulkan-Headers libdrm-devel"
checkdepends="dbus mesa-dri"
short_desc="Cross-platform application and UI framework - Wayland"
maintainer="John <me@johnnynator.dev>"
license="GPL-3.0-only with Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
homepage="https://www.qt.io"
distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwayland-everywhere-src-${version}.tar.xz"
checksum=a2a057e1dd644bd44abb9990fecc194b2e25c2e0f39e81aa9fee4c1e5e2a8a5b
subpackages="qt6-wayland-tools qt6-wayland-private-devel qt6-wayland-devel"
if [ "$CROSS_BUILD" ]; then
configure_args="-DQT_FORCE_BUILD_TOOLS=true"
hostmakedepends+=" qt6-wayland-tools"
fi
do_check() {
cd build
dbus-run-session ctest -E 'tst_(seatv4|wl_reconnect)'
}
qt6-wayland-tools_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - Tools"
pkg_install() {
vmove usr/lib/qt6/libexec
vmove "usr/lib/cmake/*Tools"
}
}
qt6-wayland-private-devel_package() {
depends="qt6-wayland-devel>=${version}_${revision}"
short_desc+=" - private development files"
pkg_install() {
for dir in $(cd ${DESTDIR} && find usr/include -type d -name private); do
vmove "$dir"
done
vmove "usr/lib/cmake/*Private"
vmove "usr/lib/qt6/metatypes/*private_*_metatypes.json"
vmove "usr/lib/qt6/mkspecs/modules/*_private.pri"
vmove "usr/lib/qt6/modules/*Private.json"
# Move back to ${sourcepkg}, in order to be moved to -devel
# base development expected to have those targets
mv ${PKGDESTDIR}/usr/lib/cmake/Qt6WaylandGlobalPrivate \
${DESTDIR}/usr/lib/cmake/
}
}
qt6-wayland-devel_package() {
depends="qt6-wayland-tools>=${version}_${revision} qt6-base-devel>=${version}_1"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove usr/lib/qt6/metatypes
vmove usr/lib/pkgconfig
vmove usr/lib/qt6/mkspecs
vmove "usr/lib/*.so"
vmove "usr/lib/*.prl"
vmove usr/lib/qt6/modules
}
}