void-packages/srcpkgs/qt5dxcb-plugin/template

38 lines
1.4 KiB
Bash

# Template file for 'qt5dxcb-plugin'
pkgname=qt5dxcb-plugin
version=5.0.11
revision=1
wrksrc="qt5platform-plugins-${version}"
build_style=qmake
make_build_args="VERSION=${version}"
hostmakedepends="pkg-config qt5-qmake"
makedepends="cairo-devel libSM-devel libXi-devel libxkbcommon-devel
qt5-x11extras-devel xcb-util-image-devel xcb-util-keysyms-devel
xcb-util-renderutil-devel xcb-util-wm-devel qt5-xcb-private-headers"
depends="qt5-core>=5.15.0<5.15.1"
short_desc="Qt platform plugins for DDE"
maintainer="John <me@johnnynator.dev>"
license="GPL-3.0-or-later"
homepage="https://github.com/linuxdeepin/qt5platform-plugins"
distfiles="https://github.com/linuxdeepin/qt5platform-plugins/archive/${version}.tar.gz"
checksum=46b55b3114a2b028c64f5e88bdc01db31670a33f00969acc1ce8eb98af8a089c
pre_configure() {
_qt5_dep_ver="${depends#*>=}"
_qt5_dep_ver="${_qt5_dep_ver%<*}"
_qt5_version="$(xbps-uhelper version qt5-core)"
if [[ "${_qt5_version%_*}" != "${_qt5_dep_ver}" ]]; then
echo
msg_red "Qt5 version doesn't match version listed in \$depends\\n"
msg_red "${_qt5_version%_*} does not match ${_qt5_dep_ver}\\n"
exit 1
fi
sed -i "s|error(Not support Qt Version: .*)|INCLUDEPATH += ${XBPS_CROSS_BASE}/usr/include/qt5xcb-private|" platformplugin/linux.pri
sed -i 's/active = VtableHook::overrideVfptrFun.*/active = 1;/' platformplugin/dhighdpi.cpp
}
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-x11extras-devel"
fi