[kde-freebsd] [SVN Commit] branches/qt-5.3/QT

Raphael Kubo da Costa rakuco at FreeBSD.org
Wed Oct 22 20:57:59 UTC 2014


SVN commit 10435 by rakuco:

Stop explicitly passing ${LOCALBASE} to the compiler.

qmake's behavior has changed in Qt 5, and the paths set in QMAKE_INCDIR and
QMAKE_LIBDIR in the mkspecs are passed before any others, such as the ones
in the build directory themselves.

In practice, this means that we end up with linker calls like this:

  c++ -o libfoo.so foo.o bar.o -L/usr/local/lib -L/wrkdir/build/lib
      -lQt5Gui -lQt5Core

So if one already has Qt installed in the system, the older, already present
version of the libraries in /usr/local/lib will be used instead of the
newly-built ones in /wrkdir/build/lib.

QTBUG-40825 discusses this behavior upstream, but there has been no
agreement on a solution yet.

For now, the solution adopted is to make the compiler and the linker aware
of those paths but only try them last after all others, and this is achieved
by setting the CPATH and LIBRARY_PATH environment variables when qmake is
being used.

In addition to setting them in CONFIGURE_ENV and MAKE_ENV, we also need to
stop changing QMAKE_INCDIR and QMAKE_LIBDIR as well as filter those paths
from the pkg-config calls qtbase's configure script makes.

PR:		194088



 M  +13 -0     Mk/Uses/qmake.mk  
 M  +10 -0     Mk/bsd.qt.mk  
 M  +1 -5      devel/qmake5/files/patch-mkspecs__common__freebsd.conf  
 M  +181 -2    devel/qt5/files/extrapatch-configure  




More information about the kde-freebsd mailing list