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.3
|
|
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=('df2f4a230be4ea04f9798f2c19ab1413a3b8ec6a80bef359f50284235307b546'
|
|
'68344c1cda8c873d36b71812911755ddff662ba7942968f48f7ce88f2f859ebf'
|
|
'8bc42c40c78c5d2e0c2afde8a7c19b551b34e0392c063a2550d685ad1718cc2f'
|
|
'd95e7b893a7cc85c4c0dc8ef75f52698e63feb0fb595c131537891001fe819d1'
|
|
'764425399d6c5d4e747a7fd1ca017cb81595b4ff3d5a9ef5f1cc9ee754b0cf8d'
|
|
'8a26939c9873ca1b503e92d458dcfe81f461d376969f20c5e150ba27e589cea2'
|
|
'3aab02efb4a2b9a2e0612bbbcd34f630f4233156c9ac38fcffe5d3df776f6f58'
|
|
'ede2d77a5f9a6d2d03986f955fe6b88d758e5bdef8fe7dfbb811aa01e17a817a'
|
|
'cbca7329e53729317a9e2640c38b93870e28c28cc02811bf09e9924f2e6e3d66'
|
|
'18a38365eed7ccd6f0c1f45681962fa89657e0b81ef374676e7568452394c5bc'
|
|
'd1546c87c032675d1b5461084825f60c019850cc87790b1d4af3cd8fda34639e'
|
|
'25507311ff4d1fa7567cb9dc119412238f4c1dee20f08a67edb77f6f4eb49f1d'
|
|
'028671c47f9f373d7f0514255e5246e4efb1f49489dbc7df0c8331a7ffc4c54a')
|
|
|
|
_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
|
|
}
|