Add mingw-w64-qt6-base (alpha)

This commit is contained in:
Martchus 2020-10-07 18:30:59 +02:00
parent ad6ea17ef2
commit 87c7401193
8 changed files with 490 additions and 0 deletions

54
brotli/mingw-w64/PKGBUILD Normal file
View File

@ -0,0 +1,54 @@
# Maintainer of AUR version: drakkan <nicola.murino at gmail dot com>
# This version removes the -R flag from the pkg-config file (required to build Qt 6
# which relies on the pkg-config file).
pkgname=mingw-w64-brotli
_pkgname=brotli
_gitcommit=e61745a6b7add50d380cfd7d3883dd6c62fc2c71
pkgver=1.0.9
pkgrel=2
pkgdesc='Brotli compression library (mingw-w64)'
arch=('any')
license=('MIT')
url='https://github.com/google/brotli'
depends=('mingw-w64-gcc')
makedepends=('mingw-w64-cmake' 'git')
options=('!buildflags' '!strip' 'staticlibs')
source=(${_pkgname}::"git+${url}#commit=${_gitcommit}")
sha512sums=('SKIP')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
pkgver() {
cd ${_pkgname}
git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
for _arch in ${_architectures}; do
cd "$srcdir"/${_pkgname}
mkdir -p build-${_arch} && pushd build-${_arch}
${_arch}-cmake ..
make
popd
done
}
package() {
for _arch in ${_architectures}; do
cd "${srcdir}/${_pkgname}/build-${_arch}"
make DESTDIR="${pkgdir}" install
find "${pkgdir}/usr/${_arch}" -name "*.exe" -exec ${_arch}-strip --strip-all {} \;
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
if [[ $NO_EXECUTABLES ]]; then
find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete
fi
done
for file in "${pkgdir}"/usr/*/lib/pkgconfig/*.pc; do
sed -i 's| -R${libdir}||g' "$file"
done
}
# vim: ts=2 sw=2 et:

View File

@ -0,0 +1,98 @@
# Maintainer: Martchus <martchus@gmx.net>
<%== content_for 'additional_contributors' %>\
# 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.
% if ($patch_files->size) {
# All patches are managed at https://github.com/Martchus/qt<%== $qt_module %>
% }
pkgname=<%= $package_name %>
_qtver=6.0.0-alpha
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-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="qt<%== $qt_module %>-everywhere-src-${_qtver}"
source=("https://download.qt.io/development_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"\
<%== include 'fragments/source_file_list', relevant_files => $patch_files %>)
sha256sums=('<%== $qt_module_sha256 %>'\
<%== include 'fragments/sha256_list', relevant_files => $patch_files %>)
_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 \\
-DQT_HOST_PATH=/usr \\
-DQT_HOST_PATH=/usr \\
-DFEATURE_pkg_config=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=runtime \\
-DVulkan_LIBRARY="/usr/$_arch/lib/libvulkan.dll.a" \\
-DVulkan_INCLUDE_DIR="/usr/$_arch/include" \\
-DMySQL_LIBRARIES="/usr/$_arch/lib/libmariadb.dll.a" \\
-DMySQL_INCLUDE_DIRS="/usr/$_arch/include/mariadb"
VERBOSE=1 cmake --build build-$_arch
done
}
package() {
for _arch in ${_architectures}; do
DESTDIR="$pkgdir" cmake --install build-$_arch
install -Dm644 $_pkgfqn/LICENSE* -t "$pkgdir"/usr/$_arch/share/licenses/$pkgname
# Symlinks for backwards compatibility
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
for qmake; do
ln -rs "$pkgdir"/usr/$_arch/lib/qt6/bin/$_b "$pkgdir"/usr/bin/$_arch-$_b-qt6
done
$_arch-strip --strip-unneeded "$pkgdir"/usr/$_arch/bin/*.dll
$_arch-strip -g "$pkgdir"/usr/$_arch/lib/*.a
done
}

View File

@ -0,0 +1,104 @@
From b9fa200e7404db3edae936f7975526b78bad556a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Mon, 14 Sep 2020 20:39:52 +0200
Subject: [PATCH 1/3] Use CMake's default import library suffix
Change-Id: I371abd37c85bd8edf338c16b149dbcaa872a85bd
---
cmake/QtPriHelpers.cmake | 8 +++++++-
cmake/QtPrlHelpers.cmake | 8 +++++++-
cmake/QtTargetHelpers.cmake | 2 --
mkspecs/common/g++-win32.conf | 1 +
mkspecs/features/create_cmake.prf | 5 +++--
5 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake
index 007acc95dd..8dd7ca63d2 100644
--- a/cmake/QtPriHelpers.cmake
+++ b/cmake/QtPriHelpers.cmake
@@ -293,11 +293,17 @@ QT.${config_module_name}_private.disabled_features = ${disabled_private_features
qt_path_join(private_pri_file_path "${target_path}" "${private_pri_file_name}")
list(APPEND pri_files "${private_pri_file_path}")
- set(library_prefixes ${CMAKE_SHARED_LIBRARY_PREFIX} ${CMAKE_STATIC_LIBRARY_PREFIX})
+ set(library_prefixes
+ ${CMAKE_SHARED_LIBRARY_PREFIX}
+ ${CMAKE_IMPORT_LIBRARY_PREFIX}
+ ${CMAKE_STATIC_LIBRARY_PREFIX})
set(library_suffixes
${CMAKE_SHARED_LIBRARY_SUFFIX}
+ ${CMAKE_CMAKE_IMPORT_LIBRARY_SUFFIX}
${CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES}
${CMAKE_STATIC_LIBRARY_SUFFIX})
+ list(REMOVE_DUPLICATES library_prefixes)
+ list(REMOVE_DUPLICATES library_suffixes)
add_custom_command(
OUTPUT "${private_pri_file_path}"
DEPENDS ${inputs}
diff --git a/cmake/QtPrlHelpers.cmake b/cmake/QtPrlHelpers.cmake
index 7977afd030..7488d5f959 100644
--- a/cmake/QtPrlHelpers.cmake
+++ b/cmake/QtPrlHelpers.cmake
@@ -248,11 +248,17 @@ QMAKE_PRL_VERSION = ${PROJECT_VERSION}
CONTENT
"FINAL_PRL_FILE_PATH = ${final_prl_file_path}")
- set(library_prefixes ${CMAKE_SHARED_LIBRARY_PREFIX} ${CMAKE_STATIC_LIBRARY_PREFIX})
+ set(library_prefixes
+ ${CMAKE_SHARED_LIBRARY_PREFIX}
+ ${CMAKE_IMPORT_LIBRARY_PREFIX}
+ ${CMAKE_STATIC_LIBRARY_PREFIX})
set(library_suffixes
${CMAKE_SHARED_LIBRARY_SUFFIX}
+ ${CMAKE_CMAKE_IMPORT_LIBRARY_SUFFIX}
${CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES}
${CMAKE_STATIC_LIBRARY_SUFFIX})
+ list(REMOVE_DUPLICATES library_prefixes)
+ list(REMOVE_DUPLICATES library_suffixes)
if(QT_GENERATOR_IS_MULTI_CONFIG)
set(configs ${CMAKE_CONFIGURATION_TYPES})
diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake
index dd23e8c95b..2213b04cd7 100644
--- a/cmake/QtTargetHelpers.cmake
+++ b/cmake/QtTargetHelpers.cmake
@@ -274,8 +274,6 @@ function(qt_internal_apply_win_prefix_and_suffix target)
# This should cover both MINGW with GCC and CLANG.
if(NOT MSVC)
- set_property(TARGET "${target}" PROPERTY IMPORT_SUFFIX ".a")
-
get_target_property(target_type ${target} TYPE)
if(target_type STREQUAL "STATIC_LIBRARY")
set_property(TARGET "${target}" PROPERTY PREFIX "lib")
diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
index a1e08ed63b..9f3ae47108 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -54,6 +54,7 @@ QMAKE_PREFIX_SHLIB =
QMAKE_EXTENSION_SHLIB = dll
QMAKE_PREFIX_STATICLIB = lib
QMAKE_EXTENSION_STATICLIB = a
+QMAKE_EXTENSION_IMPORTLIB = dll.a
QMAKE_LIB_EXTENSIONS = a dll.a
QMAKE_LIBS =
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 24ed125f12..73ebe453d3 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -332,8 +332,9 @@ mac {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}$${debug_suffix}.a
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
+ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.$${QMAKE_EXTENSION_IMPORTLIB}
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
} else {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}$${debug_suffix}.lib
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
--
2.28.0

View File

@ -0,0 +1,110 @@
From 029abc25e2a00675868ae89c4251564a4fa81fa5 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Mon, 14 Sep 2020 20:49:14 +0200
Subject: [PATCH 2/3] Rename qtmain to qt6main to make Qt 6 co-installable with
previous versions
Change-Id: Ic750ae711673e3ff246fcff0c54ab71644a3041e
---
mkspecs/common/g++-win32.conf | 2 +-
mkspecs/common/msvc-desktop.conf | 2 +-
mkspecs/features/create_cmake.prf | 8 ++++----
mkspecs/features/win32/windows.prf | 4 ++--
src/winmain/CMakeLists.txt | 2 +-
src/winmain/winmain.pro | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
index 9f3ae47108..3623645155 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -64,7 +64,7 @@ QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2_DEBUG = -lgdi32 -luser32
QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
-QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
+QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqt6main
QMAKE_IDL = midl
QMAKE_LIB = $${CROSS_COMPILE}ar -rc
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index a5993287ed..92dd730c39 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -105,7 +105,7 @@ QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2 = gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2_DEBUG = gdi32.lib user32.lib
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-QMAKE_LIBS_QT_ENTRY = -lqtmain
+QMAKE_LIBS_QT_ENTRY = -lqt6main
QMAKE_IDL = midl
QMAKE_LIB = lib /NOLOGO
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 73ebe453d3..98f32e1f04 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -329,15 +329,15 @@ mac {
}
mingw {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}$${debug_suffix}.a
- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt6main$${QT_LIBINFIX}$${debug_suffix}.a
+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt6main$${QT_LIBINFIX}.a
isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.$${QMAKE_EXTENSION_IMPORTLIB}
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
} else {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}$${debug_suffix}.lib
- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt6main$${QT_LIBINFIX}$${debug_suffix}.lib
+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt6main$${QT_LIBINFIX}.lib
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
index 272170d428..d5314247db 100644
--- a/mkspecs/features/win32/windows.prf
+++ b/mkspecs/features/win32/windows.prf
@@ -5,8 +5,8 @@ contains(TEMPLATE, ".*app") {
mingw:DEFINES += QT_NEEDS_QMAIN
qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
- isEqual(entryLib, -lqtmain) {
- lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
+ isEqual(entryLib, -lqt6main) {
+ lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qt6main$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
PRE_TARGETDEPS += $$lib
QMAKE_LIBS += $$lib
} else {
diff --git a/src/winmain/CMakeLists.txt b/src/winmain/CMakeLists.txt
index 1a74a1e3ae..e2482f16e0 100644
--- a/src/winmain/CMakeLists.txt
+++ b/src/winmain/CMakeLists.txt
@@ -20,7 +20,7 @@ if (MSVC)
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
-set_property(TARGET WinMain PROPERTY OUTPUT_NAME qtmain)
+set_property(TARGET WinMain PROPERTY OUTPUT_NAME qt6main)
qt_internal_extend_target(WinMain CONDITION
SOURCES qtmain_win.cpp
diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
index 19ce9ffa82..cbbeea7323 100644
--- a/src/winmain/winmain.pro
+++ b/src/winmain/winmain.pro
@@ -2,7 +2,7 @@
!win32:error("$$_FILE_ is intended only for Windows!")
TEMPLATE = lib
-TARGET = qtmain
+TARGET = qt6main
DESTDIR = $$QT.core.libs
CONFIG += static
--
2.28.0

View File

@ -0,0 +1,23 @@
From 2e121479348d9c6151e191d58f631faa4fc0cad6 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 7 Oct 2020 12:13:37 +0200
Subject: [PATCH 3/3] Fix finding D-Bus
Change-Id: Ie21eb9cbc6b1b5d9c8b34eea46f54718e5926986
---
cmake/FindWrapDBus1.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmake/FindWrapDBus1.cmake b/cmake/FindWrapDBus1.cmake
index e227d224e0..4982e7c8ae 100644
--- a/cmake/FindWrapDBus1.cmake
+++ b/cmake/FindWrapDBus1.cmake
@@ -45,3 +45,4 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(WrapDBus1 REQUIRED_VARS
DBus1_LIBRARY DBus1_INCLUDE_DIR WrapDBus1_FOUND
VERSION_VAR DBus1_VERSION)
+set_property(TARGET dbus-1 PROPERTY IMPORTED_IMPLIB ${DBus1_LIBRARY})
\ No newline at end of file
--
2.28.0

View File

@ -0,0 +1,99 @@
# 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.0.0-alpha
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-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/development_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
'0001-Use-CMake-s-default-import-library-suffix.patch'
'0002-Rename-qtmain-to-qt6main-to-make-Qt-6-co-installable.patch'
'0003-Fix-finding-D-Bus.patch')
sha256sums=('1816c4490d3f1f6c6ae3f57a3ec9dff4e8bcab2951786cb0f457847c7ab0e8fa'
'43a19aaaf39d9e5fbce15657f216b5bd343b4be3eeffcb888dcb0d00a011d744'
'74871688a19acd6e254852485c07a1bceb0ce8ae67274d44227528c25e913b37'
'969c980eb3d8e9dc06063def818172e443e87b0511e5a6c95a84a1b5f4a5f841')
_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 \
-DQT_HOST_PATH=/usr \
-DQT_HOST_PATH=/usr \
-DFEATURE_pkg_config=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=runtime \
-DVulkan_LIBRARY="/usr/$_arch/lib/libvulkan.dll.a" \
-DVulkan_INCLUDE_DIR="/usr/$_arch/include" \
-DMySQL_LIBRARIES="/usr/$_arch/lib/libmariadb.dll.a" \
-DMySQL_INCLUDE_DIRS="/usr/$_arch/include/mariadb"
VERBOSE=1 cmake --build build-$_arch
done
}
package() {
for _arch in ${_architectures}; do
DESTDIR="$pkgdir" cmake --install build-$_arch
install -Dm644 $_pkgfqn/LICENSE* -t "$pkgdir"/usr/$_arch/share/licenses/$pkgname
# Symlinks for backwards compatibility
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
for qmake; do
ln -rs "$pkgdir"/usr/$_arch/lib/qt6/bin/$_b "$pkgdir"/usr/bin/$_arch-$_b-qt6
done
$_arch-strip --strip-unneeded "$pkgdir"/usr/$_arch/bin/*.dll
$_arch-strip -g "$pkgdir"/usr/$_arch/lib/*.a
done
}

View File

@ -0,0 +1 @@
% layout 'mingw-w64-qt6-base';

View File

@ -0,0 +1 @@
1816c4490d3f1f6c6ae3f57a3ec9dff4e8bcab2951786cb0f457847c7ab0e8fa