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-02-03 20:42:14 +01:00
|
|
|
pkgname=mingw-w64-qt5-base
|
2024-05-28 21:14:37 +02:00
|
|
|
pkgver=5.15.14+kde+r140
|
2020-05-29 17:30:23 +02:00
|
|
|
pkgrel=1
|
2022-03-07 13:23:02 +01:00
|
|
|
_basever=${pkgver%%+*}
|
2024-05-28 21:14:37 +02:00
|
|
|
_commit=1c13ef067ea3c97342f98039931ea18b3992014f
|
2020-04-17 22:23:16 +02:00
|
|
|
pkgdesc='A cross-platform application and UI framework, native OpenGL backend (mingw-w64)'
|
|
|
|
arch=('i686' 'x86_64')
|
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'
|
2017-06-02 18:20:04 +02:00
|
|
|
'mingw-w64-pcre2')
|
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')
|
2024-03-28 11:58:52 +01:00
|
|
|
sha256sums=('SKIP'
|
2024-05-28 21:14:37 +02:00
|
|
|
'5b9f3f36e05a029181ca72b83683c119adbfba625ad98ba3fb02113d75d35d44'
|
|
|
|
'ccab6d5fdce7809281c05c1b0b8ec65aab6db1112283fc69ba10bb05e664d545'
|
|
|
|
'9d4c8bfde02f7e77ea194f1e1ea724baaf947dcd72adca815559e43070df2938'
|
|
|
|
'b6921b9b00542a4afad0f9f97f36b9d45c619bafa06a93576bed6545aea8dd3b'
|
|
|
|
'd76628f9395f8b7813e058ebbb8b87d380d490d2e2e67d5d59218082330b3a65'
|
|
|
|
'e909ab659266bc65fd14e16231855b3cf209a3a03965f934f5d81771d4a0191d'
|
|
|
|
'06fc346c7299fb31f0cbebb55c3749d533b48e99fd59e8a3ed3c068fcda03a2f'
|
|
|
|
'edd73dc56259afdc8865417974b8956697954aad22844522554fe83c665a3ac8'
|
|
|
|
'41ffca5bd37d020a3edc56c0b9949e466026fb8c8d935defd9e66a71b779934c'
|
|
|
|
'd869ae862fd3251c478e14fdb614185c81e5defb5b00f31161ff5497c66823e2'
|
|
|
|
'7ac6575b691ed70dde02182aec6f81aaad4aca8a041ab594868d113a913c9e41'
|
|
|
|
'0dba86fae79ae7368b504ae7d297359f4448f160a42b20b3857d81d2cde91ab5'
|
|
|
|
'ddce558f74a1cdcb673e9a1e9df75442ea71fc6e2503fc85d779c5d8b948784a'
|
|
|
|
'48ee9c592f17400f37e958a59f3605c97d335dec18537b0d730601bb9787a07b'
|
|
|
|
'7e242c398740eabed1c437498e04744fda8a413ce6e668a2a654741d5900dd42'
|
|
|
|
'7cf8f198fe0348aa5c97c85bfcf868be62fec0fa0148570565c48ef1d91aa0e9'
|
|
|
|
'6ed70651c02399a407ffa4d8e76da46d5765983034d1e0644686f599b865b68f'
|
|
|
|
'9edc35b11aa19b10ddd7ced57b3b0d035755a4c443ba3b6c6755810a0ecd338f'
|
|
|
|
'e4cc92c85debb106bf8ebc899729f8dc17a94a062ffa1c9e6f7fd4cc1c17f91e'
|
|
|
|
'2e9ac0244ca938fc547db038b5d72a31b82e155c84050bf0e3407300bf7eaecb'
|
|
|
|
'a46f82235cfc8a6644b425061a7e923fa4468623974ddf75a46ec45802654cd0'
|
|
|
|
'cdad591ba62797d930b5121eef39fa5e2928c76f28b0c32ab35b10ec04e550e4'
|
|
|
|
'67dec80f21aa819cea23a1b8a267c2724d2fa86e23c69834bc711b381fc03447'
|
|
|
|
'17320ad851fdf1f7282bb2215429aff12617096b0b82dfc689f3832766f5436e'
|
|
|
|
'3cb80c51dda4e79b5480e0417678c751d0f5b762014939593d9f9c1b645080be'
|
|
|
|
'ecc72af327991945a6076790aadd5309aa8ac06891a14ed080fa49632e50b0b0'
|
|
|
|
'efb16ee563478711ca027074494b0cbb1c4f3054028dedd5bcf2b3da91c0797c'
|
|
|
|
'6247074166f5d9a97fb60597b15a80a65cfb2ea5dffc31dcb739cbaa9a95ac62'
|
|
|
|
'29062bf991b8eab0c65a5ecf09f9a69673757653aacb48269033e5ad8d4f652f'
|
|
|
|
'd0d8703d6ec5b960da6a537a3903804ef4366693125b0a31e5cd59954e348888'
|
|
|
|
'422b67821c2cb1025e3a230965ef664eabb05a9c6d623bc67fc0daaa0fd57262'
|
|
|
|
'5be2fe99912d1f905aac9a5c1de48e130a3e364bb97fa47fd81f66f26c7c9296')
|
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+=' -shared'
|
2018-05-23 20:56:49 +02:00
|
|
|
|
2020-04-17 22:23:16 +02:00
|
|
|
# configure shared version to load OpenSSL dynamically
|
|
|
|
qt_configure_args+=' -openssl-runtime'
|
2018-05-23 20:56:49 +02:00
|
|
|
|
2020-04-17 22:23:16 +02:00
|
|
|
qt_configure_args+=' -device-option CROSS_COMPILE_CUSTOM_CONFIG=actually_a_shared_build'
|
2018-05-23 20:56:49 +02:00
|
|
|
|
2020-04-17 22:23:16 +02:00
|
|
|
# override LD_LIBRARY_PATH so libraries for native build tools like libQt5Bootstrap.so are found
|
|
|
|
#export LD_LIBRARY_PATH="$PWD/lib"
|
|
|
|
#export LDFLAGS="-L$PWD/lib"
|
2018-05-23 20:56:49 +02:00
|
|
|
|
|
|
|
msg2 'Build qmake and configure' && ../${_pkgfqn}/configure $qt_configure_args
|
2024-04-02 22:52:13 +02:00
|
|
|
msg2 'Build Qt libraries' && make
|
2018-05-23 20:56:49 +02:00
|
|
|
|
2016-02-03 20:42:14 +01:00
|
|
|
popd
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
for _arch in ${_architectures}; do
|
|
|
|
cd "$srcdir/${_pkgfqn}"
|
2024-04-02 22:52:13 +02:00
|
|
|
make install -C ../build-${_arch} INSTALL_ROOT="${pkgdir}"
|
2016-02-03 20:42:14 +01:00
|
|
|
|
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-03-18 00:53:16 +01: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-03-18 00:53:16 +01: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
|
|
|
# remove DLLs from libdir (DLLs are installed in both bindir and libdir, one copy is sufficient)
|
|
|
|
find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name "*.dll" -exec rm {} \;
|
2020-01-28 21:12:38 +01:00
|
|
|
|
2020-04-17 22:23:16 +02:00
|
|
|
# install missing libQt5BootstrapDBus.a manually
|
|
|
|
cp --target-directory "${pkgdir}/usr/${_arch}/lib" "$srcdir/build-${_arch}/lib/libQt5BootstrapDBus.a"
|
|
|
|
|
|
|
|
# create symlinks for tools
|
|
|
|
mkdir -p "${pkgdir}/usr/bin"
|
|
|
|
for tool in qmake moc rcc uic qdbuscpp2xml qdbusxml2cpp qdoc syncqt.pl; do
|
|
|
|
ln -s "../${_arch}/lib/qt/bin/${tool}" "${pkgdir}/usr/bin/${_arch}-${tool}-qt5"
|
|
|
|
done
|
|
|
|
|
|
|
|
# create qt.conf containing plugin path, see https://github.com/Martchus/PKGBUILDs/issues/109
|
|
|
|
echo "[Paths]
|
2020-01-28 21:12:38 +01:00
|
|
|
Plugins = /usr/${_arch}/lib/qt/plugins" > "${pkgdir}/usr/${_arch}/bin/qt.conf"
|
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
|
|
|
strip --strip-all "${pkgdir}/usr/${_arch}/lib/qt/bin/"*[!.pl]
|
|
|
|
strip --strip-debug "${pkgdir}/usr/${_arch}/lib/libQt5Bootstrap"*.a
|
|
|
|
if [[ $NO_EXECUTABLES ]]; then
|
2018-05-23 20:56:49 +02:00
|
|
|
find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete
|
2016-08-18 01:07:18 +02:00
|
|
|
else
|
2018-05-23 20:56:49 +02:00
|
|
|
find "${pkgdir}/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip --strip-all {} \;
|
2016-07-22 00:53:39 +02:00
|
|
|
fi
|
2020-04-17 22:23:16 +02:00
|
|
|
|
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
|
|
|
|
}
|