120 lines
5.3 KiB
Bash
120 lines
5.3 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
|
|
_qtver=6.6.0
|
|
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' '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=('039d53312acb5897a9054bd38c9ccbdab72500b71fdccdb3f4f0844b0dd39e0e'
|
|
'8835870bb7600c7f3a844baa3516f5680222944d32a29335c0c4ecb0bdb36156'
|
|
'25d31bfacc0a0b09ee647a6c1ca3a2f58843ac069e7f4eaea799912af185aba4'
|
|
'6671d730d153d7227b41e91d29e617fef1726d29b2858e710fb6cf0ded6b2827'
|
|
'251d6900c4ae8941580bace0a868f7a5c34acb424b85b490d1db16409b2846f4'
|
|
'332593f2152112b44b28dae18f9646a7925185ae3b7f4a4a3ab3d4fe6c9e0976'
|
|
'5123c48b9fb473e68abcef27bb6c973ce781c03b5d6833061bbeee9b8385fd6f'
|
|
'fbc79a9ae583abe8ac237068ece7aafd6ff079d8d55b5da7852c419baf33c222'
|
|
'f3e0958531d404f2a6c8940497a01e6444d96621e8a9f92018a513d831c77439'
|
|
'ed682bc0fabce30e883a5dd191b79ca6f097a03e86ad787a3d4d459529695737'
|
|
'89c3d3eec334c66e90ebf164f82977e7ca2303de378528ef7dc2fdbfc59efdee'
|
|
'15239108e2b6eef485114ad2323feb3ace0c44c19911a4133793ebc1c3772869'
|
|
'2b988b2695f1e82386a2d2bdd61ce6bd0d9ec958d6f93d1006a3e3d71373e997')
|
|
|
|
_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 -G Ninja -B build-$_arch -S $_pkgfqn \
|
|
-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=runtime
|
|
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
|
|
|
|
# Add symlinks of DLLs in usual bin directory
|
|
mkdir -p "$pkgdir/usr/bin" "$pkgdir/usr/$_arch/bin"
|
|
for dll in "$pkgdir"/usr/$_arch/lib/qt6/bin/*.dll; do
|
|
ln -rs "$dll" "$pkgdir/usr/$_arch/bin/${dll##*/}"
|
|
done
|
|
|
|
# Symlinks for backwards compatibility
|
|
for qmake; do
|
|
ln -rs "$pkgdir"/usr/$_arch/lib/qt6/bin/$_b "$pkgdir"/usr/bin/$_arch-$_b-qt6
|
|
done
|
|
|
|
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
|
|
find "$pkgdir/usr/$_arch/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/share/doc" ]] && rm -r "$pkgdir/usr/$_arch/share/doc"
|
|
done
|
|
}
|