diff options
author | Cody P Schafer <dev@codyps.com> | 2015-07-09 15:56:05 -0400 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-10-15 17:10:36 +0200 |
commit | 1fdc9a3f313308a43f33ff756050df26a5c862ed (patch) | |
tree | aec31ad1cfcf6877dd6c910f8f5ed3ca8b33c72c | |
parent | 51b4620392aa9041d8512549bfa554bea368c5ea (diff) | |
download | meta-qt5-1fdc9a3f313308a43f33ff756050df26a5c862ed.tar.gz |
qttools: fix cmake usage of linguist tools
Without this, Qt5LinguistTools/Qt5LinguistToolsConfig.cmake would
attempt to locate lrelease and lupdate under prefix, even while we were
cross-compiling and prefix points at the native system's root dirs.
Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r-- | classes/qmake5_paths.bbclass | 1 | ||||
-rw-r--r-- | recipes-qt/qt5/qttools/0004-linguist-tools-cmake-allow-overriding-the-location-f.patch | 63 | ||||
-rw-r--r-- | recipes-qt/qt5/qttools_git.bb | 1 |
3 files changed, 65 insertions, 0 deletions
diff --git a/classes/qmake5_paths.bbclass b/classes/qmake5_paths.bbclass index 6f2c25f3..e1101a9c 100644 --- a/classes/qmake5_paths.bbclass +++ b/classes/qmake5_paths.bbclass | |||
@@ -28,6 +28,7 @@ OE_QMAKE_PATH_SETTINGS = "${sysconfdir}" | |||
28 | OE_QMAKE_PATH_EXAMPLES = "${datadir}/examples" | 28 | OE_QMAKE_PATH_EXAMPLES = "${datadir}/examples" |
29 | OE_QMAKE_PATH_TESTS = "${datadir}/tests" | 29 | OE_QMAKE_PATH_TESTS = "${datadir}/tests" |
30 | OE_QMAKE_PATH_HOST_PREFIX = "" | 30 | OE_QMAKE_PATH_HOST_PREFIX = "" |
31 | OE_QMAKE_PATH_HOST_PREFIX_class-target = "${STAGING_DIR_NATIVE}" | ||
31 | OE_QMAKE_PATH_HOST_BINS = "${bindir}${QT_DIR_NAME}" | 32 | OE_QMAKE_PATH_HOST_BINS = "${bindir}${QT_DIR_NAME}" |
32 | OE_QMAKE_PATH_HOST_DATA = "${QMAKE_MKSPEC_PATH_TARGET}" | 33 | OE_QMAKE_PATH_HOST_DATA = "${QMAKE_MKSPEC_PATH_TARGET}" |
33 | OE_QMAKE_PATH_HOST_LIBS = "${STAGING_LIBDIR}" | 34 | OE_QMAKE_PATH_HOST_LIBS = "${STAGING_LIBDIR}" |
diff --git a/recipes-qt/qt5/qttools/0004-linguist-tools-cmake-allow-overriding-the-location-f.patch b/recipes-qt/qt5/qttools/0004-linguist-tools-cmake-allow-overriding-the-location-f.patch new file mode 100644 index 00000000..ae96384d --- /dev/null +++ b/recipes-qt/qt5/qttools/0004-linguist-tools-cmake-allow-overriding-the-location-f.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | From b105af5084ec1ee51c1428769b881c260f01d4d5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cody P Schafer <dev@codyps.com> | ||
3 | Date: Thu, 9 Jul 2015 11:28:19 -0400 | ||
4 | Subject: [PATCH] linguist-tools cmake: allow overriding the location for | ||
5 | lupdate and lrelease | ||
6 | |||
7 | --- | ||
8 | src/linguist/Qt5LinguistToolsConfig.cmake.in | 15 +++------------ | ||
9 | 1 file changed, 3 insertions(+), 12 deletions(-) | ||
10 | |||
11 | diff --git a/src/linguist/Qt5LinguistToolsConfig.cmake.in b/src/linguist/Qt5LinguistToolsConfig.cmake.in | ||
12 | index 4318b16..2e3b70f 100644 | ||
13 | --- a/src/linguist/Qt5LinguistToolsConfig.cmake.in | ||
14 | +++ b/src/linguist/Qt5LinguistToolsConfig.cmake.in | ||
15 | @@ -26,6 +26,9 @@ get_filename_component(_qt5_linguisttools_install_prefix \"${CMAKE_CURRENT_LIST_ | ||
16 | !!ELSE | ||
17 | set(_qt5_linguisttools_install_prefix \"$$[QT_INSTALL_PREFIX]\") | ||
18 | !!ENDIF | ||
19 | +if (OE_QMAKE_PATH_HOST_PREFIX) | ||
20 | + set(_qt5_linguisttools_install_prefix \"${OE_QMAKE_PATH_HOST_PREFIX}\") | ||
21 | +endif() | ||
22 | |||
23 | macro(_qt5_LinguistTools_check_file_exists file) | ||
24 | if(NOT EXISTS \"${file}\" ) | ||
25 | @@ -44,11 +47,7 @@ endmacro() | ||
26 | if (NOT TARGET Qt5::lrelease) | ||
27 | add_executable(Qt5::lrelease IMPORTED) | ||
28 | |||
29 | -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
30 | set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") | ||
31 | -!!ELSE | ||
32 | - set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") | ||
33 | -!!ENDIF | ||
34 | _qt5_LinguistTools_check_file_exists(${imported_location}) | ||
35 | |||
36 | set_target_properties(Qt5::lrelease PROPERTIES | ||
37 | @@ -59,11 +58,7 @@ endif() | ||
38 | if (NOT TARGET Qt5::lupdate) | ||
39 | add_executable(Qt5::lupdate IMPORTED) | ||
40 | |||
41 | -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
42 | set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") | ||
43 | -!!ELSE | ||
44 | - set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") | ||
45 | -!!ENDIF | ||
46 | _qt5_LinguistTools_check_file_exists(${imported_location}) | ||
47 | |||
48 | set_target_properties(Qt5::lupdate PROPERTIES | ||
49 | @@ -74,11 +69,7 @@ endif() | ||
50 | if (NOT TARGET Qt5::lconvert) | ||
51 | add_executable(Qt5::lconvert IMPORTED) | ||
52 | |||
53 | -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
54 | set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") | ||
55 | -!!ELSE | ||
56 | - set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") | ||
57 | -!!ENDIF | ||
58 | _qt5_LinguistTools_check_file_exists(${imported_location}) | ||
59 | |||
60 | set_target_properties(Qt5::lconvert PROPERTIES | ||
61 | -- | ||
62 | 2.4.5 | ||
63 | |||
diff --git a/recipes-qt/qt5/qttools_git.bb b/recipes-qt/qt5/qttools_git.bb index 6aa478a2..ff95b859 100644 --- a/recipes-qt/qt5/qttools_git.bb +++ b/recipes-qt/qt5/qttools_git.bb | |||
@@ -17,6 +17,7 @@ SRC_URI += " \ | |||
17 | file://0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch \ | 17 | file://0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch \ |
18 | file://0002-assistant-help-fix-linking-of-dependent-libraries.patch \ | 18 | file://0002-assistant-help-fix-linking-of-dependent-libraries.patch \ |
19 | file://0003-add-noqtwebkit-configuration.patch \ | 19 | file://0003-add-noqtwebkit-configuration.patch \ |
20 | file://0004-linguist-tools-cmake-allow-overriding-the-location-f.patch \ | ||
20 | " | 21 | " |
21 | 22 | ||
22 | FILES_${PN}-tools += "${datadir}${QT_DIR_NAME}/phrasebooks" | 23 | FILES_${PN}-tools += "${datadir}${QT_DIR_NAME}/phrasebooks" |