From ac153c23da9e5e448e0944e25ca758b7a354862d Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Fri, 28 Oct 2016 19:36:21 +0200 Subject: [PATCH] qt5: yet another fix for leaking $wrksrc I really hope this is the last fix for this kind of issues. --- srcpkgs/qt5/template | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index 2fa734541bb..54afd6189dd 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -1,7 +1,7 @@ # Template file for 'qt5' pkgname=qt5 version=5.6.2 -revision=4 +revision=5 wrksrc="qt-everywhere-opensource-src-${version}" homepage="http://qt.io/" short_desc="A cross-platform application and UI framework (QT5)" @@ -39,6 +39,19 @@ if [ -n "$CROSS_BUILD" ]; then hostmakedepends+=" zlib-devel icu-devel wayland-devel" fi +_cleanup_wrksrc_leak() { + # Remove QMAKE_PRL_BUILD_DIR from *.prl files because it is the internal builddir + find ${PKGDESTDIR} -iname "*.prl" -exec sed -i "{}" -e "/^QMAKE_PRL_BUILD_DIR/d" \; + # Replace ${wrksrc}/qtbase/host with /usr/lib/qt5 and the temporary mkspec + # devices/void-${XBPS_CROSS_TRIPLET}-g++ with linux-g++ + find ${PKGDESTDIR} -iname "*.cmake" -o -iname "*.pc" -exec sed -i "{}" \ + -e "s;${wrksrc}/qtbase/host;/usr/lib/qt5;g" \ + -e "s;devices/void-${XBPS_CROSS_TRIPLET}-g++;linux-g++;g" \; + # Replace ${wrksrc}/qtbase with the final /usr/lib/qt5 in project include files + find ${PKGDESTDIR} -iname "*.pri" -exec sed -i "{}" \ + -e "s;${wrksrc}/qtbase;/usr/lib/qt5;g" \; +} + _move_examples() { local dest=${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/qt5-examples-${version} if [ -d ${PKGDESTDIR}/usr/share/qt5/examples ]; then @@ -83,11 +96,7 @@ _install_devel() { rm -rf ${PKGDESTDIR}/usr/lib/qt5/libexec rm -rf ${PKGDESTDIR}/usr/lib/qt5/plugins rm -f ${PKGDESTDIR}/usr/lib/*.so.* - # Remove QMAKE_PRL_BUILD_DIR from *.prl files because it is the internal builddir - find ${PKGDESTDIR} -iname "*.prl" -exec sed -i "{}" -e "/^QMAKE_PRL_BUILD_DIR/d" \; - find ${PKGDESTDIR} -iname "*.cmake" -exec sed -i "{}" \ - -e "s;${wrksrc}/qtbase/host/;/usr/lib/qt5/;g" \ - -e "s;devices/void-${XBPS_CROSS_TRIPLET}-g++;linux-g++;g" \; + _cleanup_wrksrc_leak } _create_config() { @@ -706,11 +715,7 @@ qt5-devel_package() { vmove usr/lib/*.prl vmove usr/lib/cmake vmove usr/lib/pkgconfig - # Remove QMAKE_PRL_BUILD_DIR from *.prl files because it is the internal builddir - find ${PKGDESTDIR} -iname "*.prl" -exec sed -i "{}" -e "/^QMAKE_PRL_BUILD_DIR/d" \; - find ${PKGDESTDIR} -iname "*.cmake" -exec sed -i "{}" \ - -e "s;${wrksrc}/qtbase/host/;/usr/lib/qt5/;g" \ - -e "s;devices/void-${XBPS_CROSS_TRIPLET}-g++;linux-g++;g" \; + _cleanup_wrksrc_leak } }