Fix broken/conflicting symlinks in mingw-w64-qt6 packages

See https://github.com/Martchus/PKGBUILDs/issues/147
This commit is contained in:
Martchus 2022-09-26 21:06:11 +02:00
parent 4c3293e7c8
commit 692ce04279
6 changed files with 8 additions and 28 deletions

View File

@ -6,7 +6,7 @@
pkgname=mingw-w64-qt6-activeqt-static pkgname=mingw-w64-qt6-activeqt-static
_qtver=6.3.2 _qtver=6.3.2
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(any) arch=(any)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)

View File

@ -6,7 +6,7 @@
pkgname=mingw-w64-qt6-activeqt pkgname=mingw-w64-qt6-activeqt
_qtver=6.3.2 _qtver=6.3.2
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(any) arch=(any)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)
@ -51,16 +51,6 @@ package() {
for _arch in ${_architectures}; do for _arch in ${_architectures}; do
DESTDIR="$pkgdir" cmake --install build-$_arch DESTDIR="$pkgdir" cmake --install build-$_arch
# Add symlinks of DLLs in usual bin directory
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
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir/usr/$_arch/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 '*.exe' -exec $_arch-strip --strip-all {} \;
find "$pkgdir/usr/$_arch" -iname '*.dll' -exec $_arch-strip --strip-unneeded {} \; find "$pkgdir/usr/$_arch" -iname '*.dll' -exec $_arch-strip --strip-unneeded {} \;
find "$pkgdir/usr/$_arch" -iname '*.a' -exec $_arch-strip -g {} \; find "$pkgdir/usr/$_arch" -iname '*.a' -exec $_arch-strip -g {} \;

View File

@ -1,8 +1,8 @@
% layout 'mingw-w64-qt6-module'; % layout 'mingw-w64-qt6-module', no_libs => 1;
\ \
_qtver=6.3.2 _qtver=6.3.2
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(any) arch=(any)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)

View File

@ -6,7 +6,7 @@
pkgname=mingw-w64-qt6-imageformats-static pkgname=mingw-w64-qt6-imageformats-static
_qtver=6.3.2 _qtver=6.3.2
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(any) arch=(any)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)

View File

@ -6,7 +6,7 @@
pkgname=mingw-w64-qt6-imageformats pkgname=mingw-w64-qt6-imageformats
_qtver=6.3.2 _qtver=6.3.2
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(any) arch=(any)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)
@ -37,16 +37,6 @@ package() {
for _arch in ${_architectures}; do for _arch in ${_architectures}; do
DESTDIR="$pkgdir" cmake --install build-$_arch DESTDIR="$pkgdir" cmake --install build-$_arch
# Add symlinks of DLLs in usual bin directory
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
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir/usr/$_arch/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 '*.exe' -exec $_arch-strip --strip-all {} \;
find "$pkgdir/usr/$_arch" -iname '*.dll' -exec $_arch-strip --strip-unneeded {} \; find "$pkgdir/usr/$_arch" -iname '*.dll' -exec $_arch-strip --strip-unneeded {} \;
find "$pkgdir/usr/$_arch" -iname '*.a' -exec $_arch-strip -g {} \; find "$pkgdir/usr/$_arch" -iname '*.a' -exec $_arch-strip -g {} \;

View File

@ -1,8 +1,8 @@
% layout 'mingw-w64-qt6-module'; % layout 'mingw-w64-qt6-module', no_libs => 1;
\ \
_qtver=6.3.2 _qtver=6.3.2
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(any) arch=(any)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)