2016-02-03 20:42:14 +01:00
|
|
|
# Maintainer: Martchus <martchus@gmx.net>
|
|
|
|
# Contributor: ant32 <antreimer@gmail.com>
|
|
|
|
# Contributor: Filip Brcic <brcha@gna.org>
|
|
|
|
# Contributor: jellysheep <max.mail@dameweb.de>
|
|
|
|
|
2018-03-17 17:08:22 +01:00
|
|
|
# BEFORE COMMENTING OR REPORING ISSUES, PLEASE READ THE FILE `README.md` IN THIS REPOSITORY.
|
|
|
|
# ALSO HAVE A LOOK AT THE COMMENTS IN THE AUR.
|
|
|
|
|
2016-03-25 21:43:59 +01:00
|
|
|
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
|
|
|
|
# you also find the URL of a binary repository.
|
|
|
|
|
2020-06-18 23:42:42 +02:00
|
|
|
# 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.
|
|
|
|
|
2016-09-19 22:18:45 +02:00
|
|
|
# All patches are managed at https://github.com/Martchus/qtbase
|
|
|
|
|
2020-04-17 22:23:16 +02:00
|
|
|
_qt_module=qtbase
|
2016-06-19 15:18:37 +02:00
|
|
|
pkgname=mingw-w64-qt5-base-static
|
2024-01-04 16:09:11 +01:00
|
|
|
pkgver=5.15.12+kde+r147
|
2020-05-29 17:30:23 +02:00
|
|
|
pkgrel=1
|
2022-03-07 13:23:02 +01:00
|
|
|
_basever=${pkgver%%+*}
|
2024-01-04 16:09:11 +01:00
|
|
|
_commit=8907dedc858cc344d770a2e826d6acc516429540
|
2020-04-17 22:23:16 +02:00
|
|
|
pkgdesc='A cross-platform application and UI framework, native OpenGL backend (mingw-w64)'
|
|
|
|
arch=('any')
|
2016-07-22 00:53:39 +02:00
|
|
|
url='https://www.qt.io/'
|
|
|
|
license=('GPL3' 'LGPL3' 'FDL' 'custom')
|
|
|
|
depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
|
2017-12-08 19:49:53 +01:00
|
|
|
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz'
|
2023-04-10 18:43:52 +02:00
|
|
|
'mingw-w64-pcre2' 'mingw-w64-zstd')
|
2020-04-17 22:23:16 +02:00
|
|
|
depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers
|
2019-06-14 19:09:09 +02:00
|
|
|
optdepends=('mingw-w64-mesa: use LLVMpipe software rasterizer for Qt Quick'
|
|
|
|
'mingw-w64-postgresql: PostgreSQL support'
|
|
|
|
'mingw-w64-mariadb-connector-c: MySQL support')
|
|
|
|
makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c'
|
2021-04-13 12:24:25 +02:00
|
|
|
'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment' 'git')
|
2020-04-17 22:23:16 +02:00
|
|
|
groups=('mingw-w64-qt5')
|
2017-01-23 21:37:13 +01:00
|
|
|
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
|
2021-04-13 12:24:25 +02:00
|
|
|
_pkgfqn=${_qt_module}
|
|
|
|
source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit
|
2018-03-17 17:08:22 +01:00
|
|
|
'0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch'
|
2017-01-23 21:37:13 +01:00
|
|
|
'0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch'
|
2019-06-14 19:09:09 +02:00
|
|
|
'0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch'
|
|
|
|
'0004-Make-sure-.pc-files-are-installed-correctly.patch'
|
|
|
|
'0005-Don-t-add-resource-files-to-LIBS-parameter.patch'
|
|
|
|
'0006-Prevent-debug-library-names-in-pkg-config-files.patch'
|
|
|
|
'0007-Fix-linking-against-shared-static-libpng.patch'
|
|
|
|
'0008-Fix-linking-against-static-D-Bus.patch'
|
|
|
|
'0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch'
|
|
|
|
'0010-Fix-linking-against-static-freetype2.patch'
|
|
|
|
'0011-Fix-linking-against-static-harfbuzz.patch'
|
|
|
|
'0012-Fix-linking-against-static-pcre.patch'
|
|
|
|
'0013-Fix-linking-against-shared-static-MariaDB.patch'
|
|
|
|
'0014-Fix-linking-against-shared-static-PostgreSQL.patch'
|
|
|
|
'0015-Rename-qtmain-to-qt5main.patch'
|
|
|
|
'0016-Enable-rpath-for-build-tools.patch'
|
|
|
|
'0017-Use-system-zlib-for-build-tools.patch'
|
|
|
|
'0018-Merge-shared-and-static-library-trees.patch'
|
|
|
|
'0019-Use-.dll.a-as-import-lib-extension.patch'
|
|
|
|
'0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch'
|
|
|
|
'0021-Allow-usage-of-static-version-with-CMake.patch'
|
|
|
|
'0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch'
|
|
|
|
'0023-Use-correct-pkg-config-static-flag.patch'
|
|
|
|
'0024-Fix-macro-invoking-moc-rcc-and-uic.patch'
|
|
|
|
'0025-Ignore-errors-about-missing-feature-static.patch'
|
|
|
|
'0026-Enable-and-fix-use-of-iconv.patch'
|
|
|
|
'0027-Ignore-failing-pkg-config-test.patch'
|
|
|
|
'0028-Prevent-qmake-from-messing-static-lib-dependencies.patch'
|
|
|
|
'0029-Hardcode-linker-flags-for-platform-plugins.patch'
|
|
|
|
'0030-Fix-linking-against-static-plugins-with-qmake.patch'
|
2021-05-31 23:55:59 +02:00
|
|
|
'0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch'
|
2022-09-09 19:02:45 +02:00
|
|
|
'0032-Fix-crashes-in-rasterization-code-using-setjmp.patch')
|
2021-04-13 12:24:25 +02:00
|
|
|
sha256sums=('SKIP'
|
2024-01-04 16:09:11 +01:00
|
|
|
'0d3a7d9bc5cf33ae658c08121fa1022f35e23f8c6893905adc5e804fe22e8424'
|
|
|
|
'1a1bc731cadeeca2aa15f5fa7ee3028af0ed573524e2e9465d543244e5d191a2'
|
|
|
|
'd516f67da137597b73e57550370a1ae9ab61d9b508df1904e877c45d40fb89f9'
|
|
|
|
'ac96a111c8e688d3d022464046c9ed26a86051ed522bea4e9f4cc5304ab7f62d'
|
|
|
|
'94fcf59fe0d5f9ef8e243f7535c60a0c2a4da6bef02245ba041055b63aa8865c'
|
|
|
|
'4fd5d561d0ff39f7f507815913ba1f4214100ad13bc19b36c9c404ed0ca1c744'
|
|
|
|
'95366d1549f2962ecd736f0be394a9bbdfd2ed6cc0943db644a15ef6068e0b35'
|
|
|
|
'f6e0fe4d39e0366528b5af90b8382e35527f6be3e0ade891ab2198094da49b50'
|
|
|
|
'f0b1e105934fa5827ded09cbae4cdbc953d6cefdd78b5d5a45ac9c7afa764381'
|
|
|
|
'654833448e8257047df0d2a265d6e83420c89a16deba986a9b671e3f63d875ac'
|
|
|
|
'dc4edf78179b4fad3c4bc0c80ddfa702e8a12bf24897bc3539666ef382532b64'
|
|
|
|
'669aaf2c17b98fe2d7bf398f15ab57a93e160348c9bbebc92cc78c682ad02aab'
|
|
|
|
'30b161914af53569059ad6925583422746a6fe9fad808d6c47368e1f0b4470c7'
|
|
|
|
'13f1135bc73004f76b733cc492bd498366728eb08a2d4569ae2aca7dbdc98921'
|
|
|
|
'1f2551b84862b70f2fc4b6f9d1799dd70ecb390a8036d13275a8cf1d66b30819'
|
|
|
|
'4f9e0b6bde13cc513d2644ac2d269ca40dd79c4eab533877c8b0b3ac390c4d8d'
|
|
|
|
'0a408ccfce3d17f9250fa5c48787c6360815aab020c8dcb85aabe783b006b31a'
|
|
|
|
'cb2290ce99328cc3d8d0719bb4ed592607b44ef673d3e19b158b5da28460cc57'
|
|
|
|
'82b7d6b0055cd36712019699b24d5e96a22527a4698e61c929f17ce252b9e5e0'
|
|
|
|
'359461702bd2b08d5564100c30b7abdecb0e816b70878311c3b3d8d7e45750b5'
|
|
|
|
'1afd01891758f848ccf74000898c2b231f469d87842c1b1186672081469d24b4'
|
|
|
|
'09d751f1e810ac2d8a77022b543774cff5f8f6170113f179e3d0e4eea390a5a1'
|
|
|
|
'4aca829c0f62a2de0ebb441297ef7be55003a87e00b64ff0ea7cf0982caf5ab7'
|
|
|
|
'7f54ed748287927cb7fb2ce80d402cdfe54ac1cbc8b4af0f1e13f50d89b93d08'
|
|
|
|
'4a155467584f365bb08b8cc3f5adb72a04ba12663e478b3f3f01f9e1063e9a57'
|
|
|
|
'351ff1bbb696ecf80fa136ff8a2c5e2accd9940e3694df37ebf563307550302c'
|
|
|
|
'5377d91e26d0106cfd8b26cfae25b826ac0100c5ffa2be580a8210fff59d1924'
|
|
|
|
'799fd36a34fb0ee2c1b9254a6e5960a537a3aa9051a823ae6c67d842857450c8'
|
|
|
|
'07c3edb88c336716152e827f66bbc20e8e6d925efe994811cf57046299bc8691'
|
|
|
|
'7087c054a93f4e22c23d4bf2c0b51ec104aa8d38a3a4d780dc1be8c360efaf4f'
|
|
|
|
'64b13f24a392fff62782afb93d2b361249148739fcbaec8d4aa91412572028e4'
|
|
|
|
'e421c682f4215bbe3383e4ac7b0ea6390d9bee46faf9d25ff7e4959ce890c680')
|
2016-07-22 00:53:39 +02:00
|
|
|
|
|
|
|
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
|
|
|
|
|
2021-04-13 12:24:25 +02:00
|
|
|
pkgver() {
|
|
|
|
cd $_pkgfqn
|
2022-03-07 13:23:02 +01:00
|
|
|
echo "$_basever+kde+r"`git rev-list --count v$_basever-lts-lgpl..$_commit`
|
2021-04-13 12:24:25 +02:00
|
|
|
}
|
|
|
|
|
2016-02-03 20:42:14 +01:00
|
|
|
prepare() {
|
|
|
|
cd "${srcdir}/${_pkgfqn}"
|
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# apply patches; further descriptions can be found in patch files itself
|
2016-09-19 22:18:45 +02:00
|
|
|
for patch in "$srcdir/"*.patch; do
|
2018-06-11 20:26:28 +02:00
|
|
|
msg2 "Applying patch $patch"
|
2016-09-19 22:18:45 +02:00
|
|
|
patch -p1 -i "$patch"
|
|
|
|
done
|
2016-02-03 20:42:14 +01:00
|
|
|
|
2019-12-13 01:00:48 +01:00
|
|
|
# clear buildflags ('!buildflags' only effects build() but not prepare())
|
|
|
|
unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH
|
|
|
|
|
2019-12-06 15:09:51 +01:00
|
|
|
# build qmake using mingw-w64 {C,CXX,LD}FLAGS
|
2019-12-13 01:00:48 +01:00
|
|
|
# * This also sets default {C,CXX,LD}FLAGS for projects built using qmake.
|
2019-12-06 15:09:51 +01:00
|
|
|
source mingw-env
|
2018-12-30 23:49:46 +01:00
|
|
|
sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*=\).*$|\1 ${CFLAGS}|" \
|
2019-02-02 18:18:25 +01:00
|
|
|
-e "s|^\(QMAKE_CXXFLAGS_RELEASE.*=\).*$|\1 ${CXXFLAGS}|" \
|
2018-12-30 23:49:46 +01:00
|
|
|
-e "s|^\(QMAKE_LFLAGS_RELEASE.*=\).*$|\1 ${LDFLAGS}|" \
|
2019-12-13 01:00:48 +01:00
|
|
|
mkspecs/common/gcc-base.conf \
|
|
|
|
mkspecs/common/g++-win32.conf
|
2019-02-02 18:18:25 +01:00
|
|
|
sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*=\).*$|\1|" \
|
2018-12-30 23:49:46 +01:00
|
|
|
mkspecs/common/g++-unix.conf
|
2016-02-03 20:42:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "${srcdir}/${_pkgfqn}"
|
|
|
|
|
|
|
|
for _arch in ${_architectures}; do
|
2018-05-23 20:56:49 +02:00
|
|
|
# define general configure arguments
|
2016-09-04 16:38:05 +02:00
|
|
|
local qt_configure_args="\
|
2018-05-23 20:56:49 +02:00
|
|
|
-xplatform win32-g++ \
|
2016-02-03 20:42:14 +01:00
|
|
|
-optimized-qmake \
|
|
|
|
-verbose \
|
|
|
|
-opensource \
|
|
|
|
-confirm-license \
|
|
|
|
-force-pkg-config \
|
|
|
|
-force-debug-info \
|
|
|
|
-system-zlib \
|
|
|
|
-system-libpng \
|
|
|
|
-system-libjpeg \
|
|
|
|
-system-sqlite \
|
2016-09-03 18:31:00 +02:00
|
|
|
-system-freetype \
|
2016-02-03 20:42:14 +01:00
|
|
|
-system-harfbuzz \
|
2016-09-03 18:31:00 +02:00
|
|
|
-system-pcre \
|
2016-02-03 20:42:14 +01:00
|
|
|
-no-fontconfig \
|
2017-01-23 21:37:13 +01:00
|
|
|
-sql-mysql \
|
|
|
|
-sql-psql \
|
|
|
|
-sql-sqlite \
|
2016-02-03 20:42:14 +01:00
|
|
|
-dbus-linked \
|
|
|
|
-no-glib \
|
|
|
|
-no-icu \
|
2017-01-23 21:37:13 +01:00
|
|
|
-iconv \
|
2016-02-03 20:42:14 +01:00
|
|
|
-nomake examples \
|
|
|
|
-make tools \
|
|
|
|
-hostprefix /usr/${_arch} \
|
|
|
|
-hostdatadir /usr/${_arch}/lib/qt \
|
|
|
|
-hostbindir /usr/${_arch}/lib/qt/bin \
|
|
|
|
-prefix /usr/${_arch} \
|
|
|
|
-bindir /usr/${_arch}/bin \
|
|
|
|
-archdatadir /usr/${_arch}/lib/qt \
|
|
|
|
-datadir /usr/${_arch}/share/qt \
|
|
|
|
-docdir /usr/${_arch}/share/doc/qt \
|
|
|
|
-examplesdir /usr/${_arch}/share/qt/examples \
|
|
|
|
-headerdir /usr/${_arch}/include/qt \
|
|
|
|
-libdir /usr/${_arch}/lib \
|
|
|
|
-plugindir /usr/${_arch}/lib/qt/plugins \
|
|
|
|
-sysconfdir /usr/${_arch}/etc \
|
|
|
|
-translationdir /usr/${_arch}/share/qt/translations \
|
2016-09-17 16:23:20 +02:00
|
|
|
-device-option CROSS_COMPILE=${_arch}- \
|
2018-05-23 20:56:49 +02:00
|
|
|
-device-option CROSS_COMPILE_PREFIX=/usr/${_arch}"
|
2016-03-23 21:01:33 +01:00
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# allows using ccache despite the use of pre-compile header (sloppiness must be set to pch_defines,time_macros in ccache config for this)
|
|
|
|
qt_configure_args+=' -device-option CROSS_COMPILE_CFLAGS=-fpch-preprocess'
|
2018-12-30 23:49:46 +01:00
|
|
|
qt_configure_args+=' -device-option CROSS_COMPILE_CXXFLAGS=-fpch-preprocess'
|
2016-02-03 20:42:14 +01:00
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# add include directory of freetype2 and dbus manually (pkg-config detection in qmake doesn't work which is currently ignored via a patch)
|
|
|
|
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2 dbus-1 | sed -e "s/-I\/usr\/${_arch}\/include //g")"
|
|
|
|
# note: The sed is required to prevent -isystem /usr/${_arch}/include (qmake will turn -I into -isystem) which would lead to
|
|
|
|
# the same issue as here: https://github.com/Martchus/tageditor/issues/22#issuecomment-330899141
|
|
|
|
|
|
|
|
# enable debug build if MINGW_W64_QT_DEBUG_BUILD is set (could be set in eg. /etc/makepkg.config if debug build is wanted)
|
2017-06-30 22:27:38 +02:00
|
|
|
[[ $MINGW_W64_QT_DEBUG_BUILD ]] \
|
|
|
|
&& qt_configure_args+=' -debug-and-release' \
|
|
|
|
|| qt_configure_args+=' -release'
|
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# configure usage of ANGLE/OpenGL
|
2020-04-17 22:23:16 +02:00
|
|
|
msg2 'Using native OpenGL backend'
|
|
|
|
qt_configure_args+=' -opengl desktop'
|
2016-02-03 20:42:14 +01:00
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# add include directory of MariaDB
|
2017-01-23 21:37:13 +01:00
|
|
|
qt_configure_args+=" -I/usr/${_arch}/include/mariadb"
|
2016-02-03 20:42:14 +01:00
|
|
|
|
2019-06-14 19:09:09 +02:00
|
|
|
# add include directory for Vulkan
|
|
|
|
export VULKAN_SDK=/usr/${_arch}
|
|
|
|
|
2017-12-08 19:49:53 +01:00
|
|
|
msg2 'Configure and build qmake'
|
2016-06-17 23:55:59 +02:00
|
|
|
mkdir -p ../build-${_arch} && pushd ../build-${_arch}
|
2020-04-17 22:23:16 +02:00
|
|
|
qt_configure_args+=' -static'
|
2018-05-23 20:56:49 +02:00
|
|
|
|
2020-04-17 22:23:16 +02:00
|
|
|
# configure static version to use linked OpenSSL
|
|
|
|
qt_configure_args+=' -openssl-linked'
|
|
|
|
export OPENSSL_LIBS="/usr/${_arch}/lib/libssl.a /usr/${_arch}/lib/libcrypto.a -lws2_32 -lgdi32 -lcrypt32 -ldnsapi -liphlpapi"
|
2018-05-23 20:56:49 +02:00
|
|
|
|
|
|
|
msg2 'Build qmake and configure' && ../${_pkgfqn}/configure $qt_configure_args
|
|
|
|
msg2 'Build Qt libraries' && make
|
|
|
|
|
2016-02-03 20:42:14 +01:00
|
|
|
popd
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
for _arch in ${_architectures}; do
|
|
|
|
cd "$srcdir/${_pkgfqn}"
|
|
|
|
make install -C ../build-${_arch} INSTALL_ROOT="${pkgdir}"
|
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE
|
2018-02-15 00:14:36 +01:00
|
|
|
pushd "$srcdir/build-${_arch}/lib"
|
2018-05-23 20:56:49 +02:00
|
|
|
find -iname '*.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} +
|
2018-02-15 00:14:36 +01:00
|
|
|
popd
|
|
|
|
pushd "$srcdir/build-${_arch}/plugins"
|
2018-05-23 20:56:49 +02:00
|
|
|
find -iname '*.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} +
|
2018-02-15 00:14:36 +01:00
|
|
|
popd
|
|
|
|
|
2020-04-17 22:23:16 +02:00
|
|
|
# The static release contains only the static libs itself but relies on the
|
|
|
|
# shared release for the bootstrap library and tools (qmake, uic, ...).
|
|
|
|
|
|
|
|
# drop Qt5Bootstrap and libraries which are only provided as static lib
|
|
|
|
# and hence already present in shared build (such as Qt5OpenGLExtensions)
|
|
|
|
rm -f \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}qt5main* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5AccessibilitySupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5DeviceDiscoverySupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5EdidSupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5EventDispatcherSupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5FbSupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5FontDatabaseSupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformCompositorSupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5ThemeSupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5OpenGLExtensions* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformSupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5WindowsUIAutomationSupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5VulkanSupport* \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/"libQt5Bootstrap* \
|
|
|
|
rm -r \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5AccessibilitySupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5DeviceDiscoverySupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5EdidSupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5EventDispatcherSupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5FbSupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5FontDatabaseSupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5PlatformCompositorSupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5ThemeSupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5OpenGLExtensions*" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5WindowsUIAutomationSupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5VulkanSupport" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5Bootstrap" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5BootstrapDBus"
|
|
|
|
|
|
|
|
# ensure config files don't conflict with shared version
|
|
|
|
pushd "${pkgdir}/usr/${_arch}/lib/cmake"
|
|
|
|
for cmake_dir in $(find . ! -path . -type d ! -name 'Static*'); do
|
|
|
|
mkdir -p "./Static${cmake_dir:2}";
|
|
|
|
mv "${cmake_dir}/"* "./Static${cmake_dir:2}";
|
|
|
|
rm -r "${cmake_dir}"
|
|
|
|
done
|
|
|
|
rm -r "./StaticQt5OpenGLExtensions"
|
|
|
|
popd
|
|
|
|
rm "${pkgdir}/usr/${_arch}/lib/pkgconfig/StaticQt5OpenGLExtensions.pc"
|
2020-05-29 17:30:23 +02:00
|
|
|
rm "${pkgdir}/usr/${_arch}/lib/metatypes/"*
|
2020-01-28 21:12:38 +01:00
|
|
|
|
2020-04-17 22:23:16 +02:00
|
|
|
# create links to static plugins in lib directory
|
|
|
|
pushd "${pkgdir}/usr/${_arch}/lib/" && ln -s "./qt/plugins/"*/*.a . && popd
|
|
|
|
|
|
|
|
# keep a couple pri files not found in base
|
|
|
|
mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/qdevice.static.pri" "${pkgdir}/usr/${_arch}"
|
|
|
|
mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules/qt_plugin_"*.pri "${pkgdir}/usr/${_arch}"
|
|
|
|
|
|
|
|
# fix bad library order for static CMake builds caused by Qt5Gui.static.prl
|
|
|
|
sed -i -e "s|-lfreetype;|-lfreetype;-lharfbuzz;-lfreetype;-lbz2;|" \
|
|
|
|
-e "s| -lz;| |" \
|
|
|
|
"${pkgdir}/usr/${_arch}/lib/Qt5Gui.static.prl"
|
|
|
|
|
|
|
|
# delete duplicate files that are in the base package
|
|
|
|
rm -fR "${pkgdir}/usr/${_arch}/"{include,share}
|
|
|
|
rm -fR "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}
|
|
|
|
|
|
|
|
# move pri files back
|
|
|
|
mkdir -p "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
|
|
|
|
mv "${pkgdir}/usr/${_arch}/qdevice.static.pri" "${pkgdir}/usr/${_arch}/lib/qt/mkspecs"
|
|
|
|
mv "${pkgdir}/usr/${_arch}/"*.pri "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
|
2016-02-03 20:42:14 +01:00
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# drop QMAKE_PRL_BUILD_DIR because reference the build dir
|
2018-02-15 00:14:36 +01:00
|
|
|
find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
|
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# remove doc
|
2016-02-03 20:42:14 +01:00
|
|
|
rm -rf "${pkgdir}/usr/${_arch}/share/doc"
|
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# remove prl files for debug version
|
|
|
|
if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then
|
|
|
|
for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do
|
|
|
|
[ -f "${file%d*}${file##*d}" ] && rm "${file}";
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2019-09-08 01:42:15 +02:00
|
|
|
# remove '.static.prl' files
|
|
|
|
find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete
|
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
# replace library path in *.prl files so it points to the installed location and not the build directory
|
|
|
|
find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:${PWD%/*}/build-${_arch}/lib:/usr/${_arch}/lib:g" {} \;
|
|
|
|
|
|
|
|
# strip binaries, remove unuseful files
|
2020-04-17 22:23:16 +02:00
|
|
|
find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete
|
|
|
|
|
2018-05-23 20:56:49 +02:00
|
|
|
find "${pkgdir}/usr/${_arch}" \( -name '*.bat' -o -name '*.def' -o -name '*.exp' \) -delete
|
|
|
|
find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
|
|
|
|
find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \;
|
2016-02-03 20:42:14 +01:00
|
|
|
done
|
|
|
|
}
|