112 lines
5.1 KiB
Bash
112 lines
5.1 KiB
Bash
# Maintainer: Martchus <martchus@gmx.net>
|
|
# Based on: AUR packages qt6-base-git and mingw-w64-qt6-base-git, official qt5-base package
|
|
|
|
# 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=mingw-w64-qt6-base-static
|
|
_qtver=6.5.1
|
|
pkgver=${_qtver/-/}
|
|
pkgrel=1
|
|
arch=(any)
|
|
url='https://www.qt.io'
|
|
license=(GPL3 LGPL3 FDL custom)
|
|
pkgdesc='A cross-platform application and UI framework (mingw-w64)'
|
|
depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
|
|
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz'
|
|
'mingw-w64-brotli' 'mingw-w64-pcre2' 'mingw-w64-zstd')
|
|
makedepends=('mingw-w64-cmake-static' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c'
|
|
'mingw-w64-vulkan-headers' 'mingw-w64-vulkan-icd-loader' 'mingw-w64-pkg-config'
|
|
'qt6-base' 'ninja')
|
|
optdepends=('mingw-w64-postgresql: PostgreSQL driver'
|
|
'mingw-w64-mariadb-connector-c: MariaDB driver'
|
|
'qt6-base: development tools')
|
|
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
|
|
groups=(mingw-w64-qt6)
|
|
_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')
|
|
sha256sums=('db56fa1f4303a1189fe33418d25d1924931c7aef237f89eea9de58e858eebfed'
|
|
'787b2aad23232c3dcec9ca737ca841f2bfc0375a84fdba6eeb605fc53e78b28c'
|
|
'3b37c244f12f1778d85af398bd27483bece3f5794e31aedabfb9622ed4ae02df'
|
|
'2b2e907d9b2e3ef1f1da241755db2f79433c71e919fe11f0c88261dc027e4fd5'
|
|
'841639befa60ada8e183190c1e30eea919a91e8548c123abe67b165f67db3b00'
|
|
'388df37ef99eba651c08910bbe8244ca9a44074051e3a0128dc90bede45fa449'
|
|
'dc272b9f35e93c97d5498ca9e7678193e3885a03b303b69985dea15c2e97c579'
|
|
'1ff55c21a407eb4193836caf51e45676155854ab43258dab819b675e6bbd357d'
|
|
'c817b9b638c808b2c49bb20462b26637a311d040b4dfeff03be907ed9a0999dc'
|
|
'cf691503f23eec594751f68da47bd96abf2b398144f79a625b0b338fef443406'
|
|
'9bfb7349bcf46792ec57a191355556d698655b9368de744c3f848da5d66cac23'
|
|
'2c7e228997ac3cf2d3ad6f9e373ab298643f3e2620e4e0038816567664f66e0d'
|
|
'65f5749461e0de6483fa684577947591a750336f6c2cd74fdd0c128e5ee25f25')
|
|
|
|
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
|
|
|
|
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() {
|
|
for _arch in ${_architectures}; do
|
|
export PKG_CONFIG=/usr/bin/$_arch-pkg-config
|
|
$_arch-cmake-static -G Ninja -B build-$_arch -S $_pkgfqn \
|
|
-DCMAKE_INSTALL_PREFIX:PATH="/usr/$_arch/static" \
|
|
-DFEATURE_static_runtime=ON \
|
|
-DFEATURE_openssl_linked=ON \
|
|
-DFEATURE_pkg_config=ON \
|
|
-DFEATURE_system_pcre2=ON \
|
|
-DFEATURE_system_freetype=ON \
|
|
-DFEATURE_system_harfbuzz=ON \
|
|
-DFEATURE_system_sqlite=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
|
|
VERBOSE=1 cmake --build build-$_arch
|
|
done
|
|
}
|
|
|
|
package() {
|
|
for _arch in ${_architectures}; do
|
|
DESTDIR="$pkgdir" cmake --install build-$_arch
|
|
|
|
install -Dm644 $_pkgfqn/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
|
|
find "$pkgdir/usr/$_arch/static/lib" -type f -name '*.prl' \
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
|
|
|
|
find "$pkgdir/usr/$_arch" -iname '*.exe' -exec $_arch-strip --strip-all {} \;
|
|
find "$pkgdir/usr/$_arch" -iname '*.dll' -exec $_arch-strip --strip-unneeded {} \;
|
|
find "$pkgdir/usr/$_arch" -iname '*.a' -exec $_arch-strip -g {} \;
|
|
[[ -d "$pkgdir/usr/$_arch/static/share/doc" ]] && rm -r "$pkgdir/usr/$_arch/static/share/doc"
|
|
done
|
|
}
|