pkgname=(qt6-qtbase qt6-xcb-private-headers) pkgbase=qtbase pkgver=6.8.1 pkgrel=1 pkgdesc="A cross-platform application and UI framework" arch=('x86_64') url="https://www.qt.io" license=('GPL-3.0-only' 'LGPL-3.0-only' 'LicenseRef-Qt-Commercial' 'Qt-GPL-exception-1.0') groups=('qt6') depends=( 'brotli' 'dbus' 'double-conversion' 'fontconfig' 'freetype2' 'gcc-libs' 'glib2' 'glibc' 'harfbuzz' 'icu' 'krb5' 'libb2' 'libcups' 'libdrm' 'libice' 'libinput' 'libjpeg-turbo' 'libpng' 'libproxy' 'libsm' 'libx11' 'libxcb' 'libxkbcommon' 'mesa' 'mtdev' 'openssl' 'pcre2' 'shared-mime-info' 'sqlite' 'systemd' 'vulkan-headers' 'xcb-util-cursor' 'xcb-util-image' 'xcb-util-keysyms' 'xcb-util-renderutil' 'xcb-util-wm' 'xdg-utils' 'zlib' 'zstd' ) makedepends=( 'alsa-lib' 'cmake' 'cups' 'gst-plugins-base' 'gtk3' 'ninja' 'pulseaudio' 'unixodbc' 'xmlstarlet' ) source=(git+https://code.qt.io/qt/${pkgname#*-}#tag=v${pkgver} qt6-qtbase-cflags.patch qt6-qtbase-nostrip.patch) sha256sums=(1582d2a5953a0ba8499bf63ef873847dbbb7717b8e2e55207ad4206f877023c6 5411edbe215c24b30448fac69bd0ba7c882f545e8cf05027b2b6e2227abc5e78 4b93f6a79039e676a56f9d6990a324a64a36f143916065973ded89adc621e094) prepare() { cd ${pkgname#*-} patch -p1 < ${srcdir}/qt6-qtbase-cflags.patch # Use system CFLAGS patch -p1 < ${srcdir}/qt6-qtbase-nostrip.patch # Don't strip binaries with qmake } build() { cd ${pkgname#*-} cmake -B flarebird-build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DINSTALL_BINDIR=lib64/qt6/bin \ -DINSTALL_PUBLICBINDIR=usr/bin \ -DINSTALL_LIBDIR=lib64 \ -DINSTALL_LIBEXECDIR=lib64/qt6/libexec \ -DINSTALL_DOCDIR=share/doc/qt6 \ -DINSTALL_ARCHDATADIR=lib64/qt6 \ -DINSTALL_DATADIR=share/qt6 \ -DINSTALL_INCLUDEDIR=include/qt6 \ -DINSTALL_MKSPECSDIR=lib64/qt6/mkspecs \ -DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \ -DFEATURE_journald=ON \ -DFEATURE_libproxy=ON \ -DFEATURE_openssl_linked=ON \ -DFEATURE_system_sqlite=ON \ -DFEATURE_system_xcb_xinput=ON \ -DFEATURE_no_direct_extern_access=ON \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_MESSAGE_LOG_LEVEL=STATUS \ -DFEATURE_sql_mysql=OFF \ -DFEATURE_sql_psql=OFF cmake --build flarebird-build } package_qt6-qtbase() { pkgdesc='A cross-platform application and UI framework' depends+=('qt6-qttranslations') cd ${pkgname#*-} DESTDIR=${pkgdir} cmake --install flarebird-build # Install symlinks for user-facing tools cd ${pkgdir} mkdir usr/bin while read _line; do ln -s $_line done < ${srcdir}/${pkgname#*-}/flarebird-build/user_facing_tool_links.txt } package_qt6-xcb-private-headers() { pkgdesc='Private headers for Qt6 Xcb' depends=("qt6-qtbase=${pkgver}") cd ${pkgname#*-} install -d -m755 ${pkgdir}/usr/include/qt6xcb-private/{gl_integrations,nativepainting} cp -r src/plugins/platforms/xcb/*.h ${pkgdir}/usr/include/qt6xcb-private/ cp -r src/plugins/platforms/xcb/gl_integrations/*.h ${pkgdir}/usr/include/qt6xcb-private/gl_integrations/ cp -r src/plugins/platforms/xcb/nativepainting/*.h ${pkgdir}/usr/include/qt6xcb-private/nativepainting/ }