PKGBUILDs/qt5-virtualkeyboard/mingw-w64/PKGBUILD.sh.ep
Martchus 5f239b49a5 Add separate packages for static Qt 5 modules (mingw-w64)
The static Qt modules in the base repository are already packaged as a
separate package (mingw-w64-qt5-base-static). This change applies the same
separation to Qt modules found in further repositories. That means it is no
longer required to build a static version of Qt if only shared libraries
are required.

Note that there's no static variant for mingw-w64-qt5-activeqt because this
module ends up being built as a static library anyways. There is also no
static version of mingw-w64-qt5-translations because it does not contain
any libraries.
2020-09-13 13:21:21 +02:00

30 lines
1.5 KiB
Plaintext

% layout 'mingw-w64-qt5-module';
\
#_fix_deps_of_static_3rdparty_libs='s:\(-L\/.*\/lib.*\.a\) \(\/.*\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\2\3\4 \1 \5:g' # -L is used (pre Qt 5.13)
_fix_deps_of_static_3rdparty_libs='s:\(LIBS *= *\)\(.*\)\(\/build\/.*\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\1 \3\4\5 \2 \6:g' # absolute paths are used (Qt 5.13 and above)
pkgver=5.15.0
pkgrel=1
arch=('any')
pkgdesc="Virtual keyboard framework (translations, mingw-w64)"
depends=('mingw-w64-pkg-config' <%== qt5deps qw(declarative svg) %>)
makedepends=('mingw-w64-gcc')
license=('GPL3')
\
% content_for build_config_before_make => begin
# fix dependency order for libqtopenwnn and other static 3rdparty libraries which depend Qt5Core and hence need
# it subsequent on the linker line
# (Not sure why qmake isn't smart enough to put it in the right order itself. It also appears that in Qt 5.12
# the order is messed in a different way than in Qt 5.11. Now it also seems to update the Makefile again unless
# touched to a date in the future.)
make qmake_all
find . \( -type f -name 'Makefile*' -o -name '*.prl' \) -exec sed -i "$_fix_deps_of_static_3rdparty_libs" {} \; -exec touch -d 300101 {} \;
% end
\
% content_for package_config_after_install => begin
# apply the fix for the dependency order like in build
find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "$_fix_deps_of_static_3rdparty_libs" {} \;
% end