From owner-svn-ports-head@FreeBSD.ORG Wed Nov 12 11:34:39 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94FDECBB; Wed, 12 Nov 2014 11:34:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AA1722F; Wed, 12 Nov 2014 11:34:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sACBYdHZ021559; Wed, 12 Nov 2014 11:34:39 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sACBYdC2021558; Wed, 12 Nov 2014 11:34:39 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201411121134.sACBYdC2021558@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Wed, 12 Nov 2014 11:34:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r372491 - in head/x11-toolkits/qt5-quick: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 11:34:39 -0000 Author: rakuco Date: Wed Nov 12 11:34:38 2014 New Revision: 372491 URL: https://svnweb.freebsd.org/changeset/ports/372491 QAT: https://qat.redports.org/buildarchive/r372491/ Log: Use a smarter strategy to avoid building src/qml and src/qmldevtools. Simply patching src/src.pro to remove those directories from the build does not work in all cases. If an older version of qt5-quick is installed, their .pri files in mkspecs/modules will be picked up, and in the end when linking programs such as tools/qmltestrunner something like this happens: c++ [...] -Wl,-rpath-link,/usr/local/lib -o ../../bin/qmltestrunner -L${WRKSRC}/lib -lQt5QuickTest [...] The -rpath-link linker option will make ${LOCALBASE}/lib take precedence in directory lookups, so when the newly-built libQt5QuickTest.so asks for libQt5Quick.so in its DT_NEEDED section the older version installed in ${LOCALBASE}/lib will be used instead of the one that has just been built. If the new version has symbols the older one does not (Qt releases are backwards, not forwards, compatible), the build will fail. So instead of patching src/src.pro, we let the configuration process proceed without any patching so that the local .pri files are created in ${WRKSRC}/mkspecs and the Makefiles are created in a way that -rpath-link is not passed to the linker anymore. We only need to symlink the existing libraries built by lang/qt5-qml (this is similar to what we do with qtbase ports to avoid rebuilding tools such as qmake and moc), and then change the Makefiles in src/qml and src/qmldevtools so that nothing gets built. This might even be a solution for other ports that got .pro patches in r372179, since depending on which parts depend on which the same thing could happen in the future. I'm not bumping PORTREVISION because the resulting binaries will not change and this only fixes the build where it was broken before. PR: 194870 Deleted: head/x11-toolkits/qt5-quick/files/ Modified: head/x11-toolkits/qt5-quick/Makefile Modified: head/x11-toolkits/qt5-quick/Makefile ============================================================================== --- head/x11-toolkits/qt5-quick/Makefile Wed Nov 12 10:18:12 2014 (r372490) +++ head/x11-toolkits/qt5-quick/Makefile Wed Nov 12 11:34:38 2014 (r372491) @@ -17,4 +17,23 @@ USE_LDCONFIG= ${PREFIX}/${QT_LIBDIR_REL} QT_DEFINES= ACCESSIBILITY QT_CONFIG= accessibility accessibility-atspi-bridge +# libQt5Qml.so and libQt5QmlDevTools.a come from lang/qt5-qml, so we do not +# want to build them again here. On the other hand, if we just remove qml/ and +# qmldevtools/ from src/src.pro the versions installed in ${LOCALBASE} will be +# picked up and their .pri files will make -Wl,-rpath-link,${LOCALBASE}/lib be +# used when building targets such as tools/qmltestrunner. This causes problems +# when building the port with an older version installed (bug 194870). +# Instead, we let the .pri modules be created in ${WRKSRC}/mkspecs but symlink +# the existing libraries and trick the existing Makefiles into doing nothing +# (it is more future-proof than whitelisting the other directories). +post-configure: + ${LN} -s ${QT_LIBDIR}/libQt5Qml.so \ + ${CONFIGURE_WRKSRC}/lib/libQt5Qml.so + ${LN} -s ${QT_LIBDIR}/libQt5QmlDevTools.a \ + ${CONFIGURE_WRKSRC}/lib/libQt5QmlDevTools.a + ${PRINTF} ".DEFAULT:\n\t@${DO_NADA}" \ + > ${CONFIGURE_WRKSRC}/src/qml/Makefile + ${PRINTF} ".DEFAULT:\n\t@${DO_NADA}" \ + > ${CONFIGURE_WRKSRC}/src/qmldevtools/Makefile + .include