ports/devel/qt5-linguisttools/files/patch-src_linguist_linguist.pro
Tobias C. Berner f3c180c343 Update Qt5 to 5.7.1, and unify the Qt4 and Qt5 ports some more
* Update Qt5 to 5.7.1
* Move Qt4 binaries to lib/qt4/bin
* Move Qt5 libraries to lib/qt5/lib
  By moving the libraries we should finally be able to get rid of the inplace
  upgrade bug (see ports bugs 194088, 195105 and 198720):  when Qt5's libraries
  were lying in /usr/local/lib, which would often get added by pkgconfig to the
  linker paths via dependencies, the already installed libraries were linked
  against, instead of the ones that were being built. This forced us to make
  sure, that -L${WRKSRC}/lib was always coming before -L/usr/local/lib in the
  linker flags. With this change this should no longer be the case.
* Rename some ports to match the rest (foo-qtX -> qtX-foo)
* Depend on new port misc/qtchooser [see UPDATING & CHANGES]

There are several new Qt5 ports which all have been created by Marie Loise Nolden
<nolden@kde.org>. Thanks again.

PR:		216797
Exp-Run by:	antoine
Reviewed by:	rakuco, mat, groot_kde.org
Approved by:	rakuco (mentor)
Differential Revision:	https://reviews.freebsd.org/D9213
2017-02-18 19:48:05 +00:00

41 lines
2.3 KiB
Prolog

As we moved the libraries of Qt5 from /usr/local/lib to /usr/local/lib/qt5 the
cmake files would get installed into /usr/local/lib/qt5/cmake. This howeever is
not really convenient for use with other applications depending on Qt via cmake.
For ports we could modify cmake.mk to always append /usr/local/lib/qt5 to the
search path. This would however still break applications outside of the ports
tree that users want to compile via cmake. An other option would be to patch
devel/cmake to add /usr/local/lib/qt5/cmake to the default search paths.
We chose the third option. To patch qmake's internal cmake generation function
to fix up the paths so that cmake files still land in the the "correct" location
in /usr/local/lib/cmake -- as this seemed to be the least intrusive method.
--- src/linguist/linguist.pro.orig 2016-06-03 17:47:52 UTC
+++ src/linguist/linguist.pro
@@ -17,7 +17,7 @@ CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPa
contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
-!contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
+!contains(CMAKE_LIB_DIR,"^\\.\\./.*")|freebsd {
CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
# We need to go up another two levels because the CMake files are
# installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
@@ -27,7 +27,7 @@ CMAKE_LIB_DIR = $$cmakeRelativePath($$[Q
}
CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
+contains(CMAKE_BIN_DIR, "^\\.\\./.*")|freebsd {
CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
CMAKE_BIN_DIR_IS_ABSOLUTE = True
}
@@ -45,6 +45,6 @@ cmake_linguist_macros_file.CONFIG = verb
QMAKE_SUBSTITUTES += cmake_linguist_config_file cmake_linguist_config_version_file cmake_linguist_macros_file
cmake_linguist_tools_files.files += $$cmake_linguist_config_file.output $$cmake_linguist_config_version_file.output $$cmake_linguist_macros_file.output
-cmake_linguist_tools_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5LinguistTools
+cmake_linguist_tools_files.path = $$[QT_INSTALL_PREFIX]/lib/cmake/Qt5LinguistTools
cmake_linguist_tools_files.CONFIG = no_check_exists
INSTALLS += cmake_linguist_tools_files