# Contributor: ProgCat # Maintainer: ProgCat pkgname=fcitx5-qt pkgver=5.0.17 pkgrel=1 pkgdesc="Qt library and IM module for Fcitx5" url="https://github.com/fcitx/fcitx5-qt" # armhf: extra-cmake-modules arch="all !armhf" license="LGPL-2.1-or-later AND BSD-3-Clause" makedepends=" cmake extra-cmake-modules fcitx5-dev libxkbcommon-dev libxcb-dev libxkbcommon-dev libxcb-dev libx11-dev libxcb-dev libxkbcommon-dev qt5-qtbase-dev qt6-qtbase-dev samurai " subpackages=" $pkgname-dev $pkgname-lang $pkgname-qt5 $pkgname-qt6 " source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-qt/archive/refs/tags/$pkgver.tar.gz" build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi CXXFLAGS="$CXXFLAGS -flto=auto -DNDEBUG" \ cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=None \ -DENABLE_QT4=Off \ -DENABLE_QT6=ON \ $CMAKE_CROSSOPTS cmake --build build } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { DESTDIR="$pkgdir" cmake --install build } qt5() { pkgdesc="$pkgdesc (Qt5)" install_if="$pkgname=$pkgver-r$pkgrel qt5-qtbase-x11" amove usr/lib/libFcitx5Qt5* amove usr/lib/fcitx5/qt5 amove usr/lib/qt5 amove usr/libexec/fcitx5-qt5-gui-wrapper amove usr/share/applications/org.fcitx.fcitx5-qt5-gui-wrapper.desktop } qt6() { pkgdesc="$pkgdesc (Qt6)" install_if="$pkgname=$pkgver-r$pkgrel qt6-qtbase-x11" amove usr/lib/libFcitx5Qt6* amove usr/lib/qt6 } sha512sums=" 8f1dace932fe05b1f30b99987aa8f94a0477efa01360870bede1acb27f29f9eaaec7b9ff50b2a8f1cae54fd6b405b89b53123dcb3260ec75d73c0b43ae24e8c9 fcitx5-qt-5.0.17.tar.gz "