# Maintainer: Martchus # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. # This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. # All patches are managed at https://github.com/Martchus/qtbase pkgname=static-compat-qt6-base _qtver=6.6.2 pkgver=${_qtver/-/} pkgrel=1 arch=(x86_64) url='https://www.qt.io' license=(GPL3 LGPL3 FDL custom) pkgdesc='A cross-platform application and UI framework' depends=(shared-mime-info static-compat-brotli static-compat-dbus static-compat-double-conversion static-compat-fontconfig static-compat-libb2 static-compat-libglvnd static-compat-libice static-compat-libinput static-compat-libjpeg-turbo static-compat-libxdamage static-compat-libxkbcommon static-compat-libxmu static-compat-libxxf86vm static-compat-md4c static-compat-pcre2 static-compat-sqlite static-compat-xcb-util-image static-compat-xcb-util-keysyms static-compat-xcb-util-renderutil static-compat-xcb-util-cursor static-compat-vulkan-headers static-compat-xcb-util-wm static-compat-xorgproto static-compat-xtrans) makedepends=(static-compat-cmake xdg-utils ninja) options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') _pkgfqn="qtbase-everywhere-src-${_qtver}" source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz" '0001-Use-CMake-s-default-import-library-suffix.patch' '0002-Fix-finding-D-Bus.patch' '0003-Fix-using-static-PCRE2-and-DBus-1.patch' '0004-Fix-transitive-dependencies-of-static-libraries.patch' '0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch' '0006-Support-finding-static-MariaDB-client-library.patch' '0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch' '0008-Fix-crashes-in-rasterization-code-using-setjmp.patch' '0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch' '0010-Fix-dependency-of-xcb-image-on-xcb-util.patch' '0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch' '0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch' '0013-Allow-overriding-preference-for-shared-libzstd-libra.patch' '0014-Fix-errors-due-to-disabled-exceptions-with-cpp_winrt.patch' '0015-Fix-setting-exception-flags-of-plugin-targets.patch' '0016-Link-corelib-correctly-against-runtimeobject-when-co.patch' '0017-Workaround-linker-error-about-missing-symbol-__sync_.patch') sha256sums=('b89b426b9852a17d3e96230ab0871346574d635c7914480a2a27f98ff942677b' '7691272ccd272a6b0a750777a7d8d738588145cefce1f250d6ad756fcf1fe3d4' '7dcb792c97098b44857e4932088b4164a85dc702f5f519654937ee38c98e5ffc' '140904d07d65e77080040337536f4ccd5285672e0d8867a3807a8b1f80c430a5' '17a09b620fc06518167f04fc5b28bd453c58ca3d32c70ef10e09802160843639' 'eeb14b5298ec1b9b564ee78edc41670470e0efa68755f954b79ac83c684ea387' '5f1780805561985c9f575dbbefe704f5c61b622ce75bb4a30532f51c95ae1436' 'adc1b10e565b10944951df9e10ce6999c0210071b75b7a4dd230f617d88aab4f' '54646442b7a00aa59d6be6ec7be95b2424fb4b152b0ee801451b38e8252c2c2f' 'a8971b7c21da5ed1f7fcd02a69d4f1491303d991b0f84b83ed97367bb9778247' '9e97d8c5487c9212ffb00a1e90c7ccd11cb400696b77c94306e65360d2c11ede' '6d31790b364ce516d82b78f78146076d1f6b8fdf9adaa90c63aeb4cfb8dc00ee' '7be1875458af031925d2e91e262782f15801f6f5deff8babd0685037a7588d1f' 'a73a8fbdbd14a132e97a58abf0b58270d2af43d86ba238a236265d1341e84d06' 'c7c30f1da326b07abae0ab1c3f257cee0691c8b1ca26d1266978e77d6a769272' 'a316377d963838af16c02645b88ac16cb49714e6df998a44675f8536dea72301' 'fd77316b643ebde5bb607e871c1d7983273b1292798d510c848aa2873037ab9e' '120e463090b99b70235a722fb1a671b7b742cb77f5c400a3856da534fcfae356') prepare () { cd $_pkgfqn # apply patches; further descriptions can be found in patch files itself for patch in "$srcdir/"*.patch; do msg2 "Applying patch $patch" patch -p1 -i "$patch" done } build() { check_buildoption ccache y && ccache_args=' -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' source static-compat-environment export PATH=$PWD:$PATH printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config chmod +x pkg-config static-compat-cmake -G Ninja -B build -S $_pkgfqn \ $ccache_args \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DINSTALL_BINDIR=lib/qt6/bin \ -DINSTALL_DOCDIR=share/doc/qt6 \ -DINSTALL_ARCHDATADIR=lib/qt6 \ -DINSTALL_DATADIR=share/qt6 \ -DINSTALL_INCLUDEDIR=include/qt6 \ -DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \ -DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \ -DINPUT_openssl=linked \ -DQT_FEATURE_openssl_linked=ON \ -DQT_FEATURE_static_runtime=ON \ -DQT_FEATURE_system_sqlite=ON \ -DQT_FEATURE_system_xcb_xinput=ON \ -DQT_FEATURE_xcb=ON \ -DQT_FEATURE_xcb_sm=ON \ -DQT_FEATURE_icu=OFF \ -DQT_FEATURE_kms=OFF \ -DQT_FEATURE_eglfs=OFF \ -DQT_FEATURE_gbm=OFF \ -DQT_FEATURE_linuxfb=OFF \ -DQT_FEATURE_gssapi=OFF \ -DQT_FEATURE_fontconfig=ON \ -DQT_FEATURE_dynamicgl=OFF \ -DQT_FEATURE_opengl_dynamic=OFF \ -DGLIB2_USE_PKG_CONFIG=ON \ -DWAYLAND_USE_PKG_CONFIG=ON \ -DCMAKE_DISABLE_FIND_PACKAGE_harfbuzz=TRUE \ -DCMAKE_INSTALL_OLDINCLUDEDIR=$static_compat_prefix/include \ -DGSSAPI_INCLUDE_DIRS=$static_compat_prefix/include \ -DICU_INCLUDE_DIR=$static_compat_prefix/include \ -DLibdrm_INCLUDE_DIR=$static_compat_prefix/include \ -DGLESv2_INCLUDE_DIR=$static_compat_prefix/include \ -Dgbm_INCLUDE_DIR=$static_compat_prefix/include VERBOSE=1 cmake --build build } package() { source static-compat-environment DESTDIR="$pkgdir" cmake --install build install -Dm644 $_pkgfqn/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgname # Drop QMAKE_PRL_BUILD_DIR because reference the build dir find "$pkgdir" -type f -name '*.prl' \ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; rm -r "$pkgdir/$static_compat_prefix"/share/doc }