summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch22
-rw-r--r--meta/recipes-devtools/cmake/cmake_2.8.3.bb45
2 files changed, 67 insertions, 0 deletions
diff --git a/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch b/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch
new file mode 100644
index 0000000000..4eb1794e4e
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch
@@ -0,0 +1,22 @@
1cmake: don't run cross-binaries on host machine
2
3When doing the cross build we obviously cannot run those binaries on
4host since they can be binary incompatible.
5
6Upstream-Status: Inappropriate [embedded specific]
7
8Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9
10diff -ru cmake-2.8.2.orig/CMakeLists.txt cmake-2.8.2/CMakeLists.txt
11--- cmake-2.8.2.orig/CMakeLists.txt 2010-07-28 00:48:42.000000000 +0200
12+++ cmake-2.8.2/CMakeLists.txt 2010-07-28 01:05:17.000000000 +0200
13@@ -518,7 +518,8 @@
14
15 # build the remaining subdirectories
16 ADD_SUBDIRECTORY(Source)
17-ADD_SUBDIRECTORY(Utilities)
18+# Come on! Running the cross-binaries on host is not a good idea.
19+#ADD_SUBDIRECTORY(Utilities)
20 ADD_SUBDIRECTORY(Tests)
21
22 # add a test
diff --git a/meta/recipes-devtools/cmake/cmake_2.8.3.bb b/meta/recipes-devtools/cmake/cmake_2.8.3.bb
new file mode 100644
index 0000000000..d1048ed6ce
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake_2.8.3.bb
@@ -0,0 +1,45 @@
1require cmake.inc
2
3inherit cmake
4
5DEPENDS += "curl expat zlib libarchive ncurses"
6
7PR = "${INC_PR}.0"
8
9SRC_URI += "file://dont-run-cross-binaries.patch"
10
11SRC_URI[md5sum] = "a76a44b93acf5e3badda9de111385921"
12SRC_URI[sha256sum] = "689ed02786b5cefa5515c7716784ee82a82e8ece6be5a3d629ac3cc0c05fc288"
13
14# Strip ${prefix} from ${docdir}, set result into docdir_stripped
15python () {
16 prefix=bb.data.getVar("prefix", d, 1)
17 docdir=bb.data.getVar("docdir", d, 1)
18
19 if not docdir.startswith(prefix):
20 raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
21
22 docdir_stripped = docdir[len(prefix):]
23 if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
24 docdir_stripped = docdir_stripped[1:]
25
26 bb.data.setVar("docdir_stripped", docdir_stripped, d)
27}
28
29EXTRA_OECMAKE=" \
30 -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
31 -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
32 -DKWSYS_CHAR_IS_SIGNED=1 \
33 ${@base_contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
34"
35
36# FIXME: Hack due gcc-crosssdk not being able to detect those automatically
37CXXFLAGS_virtclass-nativesdk += " \
38 -I${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/include/c++ \
39 -I${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/include/c++/${TARGET_SYS} \
40 "
41
42FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
43FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
44
45BBCLASSEXTEND = "nativesdk"