diff options
Diffstat (limited to 'meta/recipes-devtools/cmake')
| -rw-r--r-- | meta/recipes-devtools/cmake/cmake-native_3.6.1.bb | 18 | ||||
| -rw-r--r-- | meta/recipes-devtools/cmake/cmake-native_3.7.2.bb | 37 | ||||
| -rw-r--r-- | meta/recipes-devtools/cmake/cmake.inc | 21 | ||||
| -rw-r--r-- | meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch | 33 | ||||
| -rw-r--r-- | meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | 8 | ||||
| -rw-r--r-- | meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch | 42 | ||||
| -rw-r--r-- | meta/recipes-devtools/cmake/cmake_3.7.2.bb (renamed from meta/recipes-devtools/cmake/cmake_3.6.1.bb) | 18 |
7 files changed, 132 insertions, 45 deletions
diff --git a/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb b/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb deleted file mode 100644 index 33930fbb9c..0000000000 --- a/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb +++ /dev/null @@ -1,18 +0,0 @@ -require cmake.inc -inherit native - -# Using cmake's internal libarchive, so some dependencies are needed -DEPENDS += "bzip2-native zlib-native" - -SRC_URI += "\ - file://cmlibarchive-disable-ext2fs.patch \ -" - -# Disable ccmake since we don't depend on ncurses -CMAKE_EXTRACONF = "\ - -DBUILD_CursesDialog=0 \ - -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ - -DHAVE_SYS_ACL_H=0 \ -" - -do_compile[progress] = "percent" diff --git a/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb b/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb new file mode 100644 index 0000000000..7ad4345efe --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb @@ -0,0 +1,37 @@ +require cmake.inc +inherit native + +DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native" + +SRC_URI += "\ + file://cmlibarchive-disable-ext2fs.patch \ +" + +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" + +# Disable ccmake since we don't depend on ncurses +CMAKE_EXTRACONF = "\ + -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \ + -DBUILD_CursesDialog=0 \ + -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ + -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ + -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ + -DHAVE_SYS_ACL_H=0 \ +" + +do_configure () { + ${S}/configure --verbose --prefix=${prefix} -- ${CMAKE_EXTRACONF} +} + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +do_compile[progress] = "percent" diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc index 1a1896f91a..6c8b36d18d 100644 --- a/meta/recipes-devtools/cmake/cmake.inc +++ b/meta/recipes-devtools/cmake/cmake.inc @@ -6,23 +6,23 @@ HOMEPAGE = "http://www.cmake.org/" BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php" SECTION = "console/utils" LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://Copyright.txt;md5=052f86c15bbde68af55c7f7b340ab639 \ - file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2" +LIC_FILES_CHKSUM = "file://Copyright.txt;md5=7a64bc564202bf7401d9a8ef33c9564d \ + file://Source/cmake.h;beginline=1;endline=3;md5=4494dee184212fc89c469c3acd555a14" -CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}" +CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ file://support-oe-qt4-tools-names.patch \ file://qt4-fail-silent.patch \ + file://avoid-gcc-warnings-with-Wstrict-prototypes.patch \ + file://0001-KWIML-tests-Remove-format-security-from-flags.patch \ " -SRC_URI[md5sum] = "d6dd661380adacdb12f41b926ec99545" -SRC_URI[sha256sum] = "28ee98ec40427d41a45673847db7a905b59ce9243bb866eaf59dce0f58aaef11" +SRC_URI[md5sum] = "79bd7e65cd81ea3aa2619484ad6ff25a" +SRC_URI[sha256sum] = "dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0" UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar" -inherit autotools - # Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable # and possibly missing qmake binary (qtbase-native can be removed from sysroot # e.g. in order to upgrade it, even when there is target qtbase) @@ -45,10 +45,3 @@ do_configure_prepend() { sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/autorcc_depends/CMakeLists.txt } - -# Extra flags to pass to cmake invoked by bootstrap -CMAKE_EXTRACONF = "" - -do_configure () { - ${S}/configure --prefix=${prefix} -- ${CMAKE_EXTRACONF} -} diff --git a/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch b/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch new file mode 100644 index 0000000000..190133ba5c --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch @@ -0,0 +1,33 @@ +From 0941395b146804abcd87004589ff6e7a2953412d Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Thu, 16 Mar 2017 14:39:04 +0200 +Subject: [PATCH] KWIML tests: Remove format-security from flags + +For the tests where "format" is removed from flags, "format-security" +should be removed as well. Otherwise building cmake with +"-Wformat -Wformat-security" fails: + +| cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] + +Upstream-Status: Backport [part of commit f77420cfc9] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + Utilities/KWIML/test/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Utilities/KWIML/test/CMakeLists.txt b/Utilities/KWIML/test/CMakeLists.txt +index 4f6f37b..1bf93bb 100644 +--- a/Utilities/KWIML/test/CMakeLists.txt ++++ b/Utilities/KWIML/test/CMakeLists.txt +@@ -10,7 +10,7 @@ endif() + # Suppress printf/scanf format warnings; we test if the sizes match. + foreach(lang C CXX) + if(KWIML_LANGUAGE_${lang} AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU") +- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format") ++ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format -Wno-format-security") + endif() + endforeach() + +-- +2.1.4 + diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake index 60014bbf2b..6518408c70 100644 --- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake +++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake @@ -3,13 +3,17 @@ set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE ) set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE ) set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE ) set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE ) + set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} ) set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) +set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) -string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT}) -string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) +# Set CMAKE_SYSTEM_PROCESSOR from the sysroot name (assuming processor-distro-os). +if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+") + set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1}) +endif() # Include the toolchain configuration subscripts file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" ) diff --git a/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch b/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch new file mode 100644 index 0000000000..8b8d4802ee --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch @@ -0,0 +1,42 @@ +From 4bc17345c01ea467099e28c7df30c23ace9e7811 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Fri, 14 Oct 2016 16:26:58 -0700 +Subject: [PATCH] CheckFunctionExists.c: avoid gcc warnings with + -Wstrict-prototypes + +Avoid warnings (and therefore build failures etc) if a user happens +to add -Wstrict-prototypes to CFLAGS. + + | $ gcc --version + | gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 + | + | $ gcc -Wstrict-prototypes -Werror -DCHECK_FUNCTION_EXISTS=pthread_create -o foo.o -c Modules/CheckFunctionExists.c + | Modules/CheckFunctionExists.c:7:3: error: function declaration isn't a prototype [-Werror=strict-prototypes] + | CHECK_FUNCTION_EXISTS(); + | ^ + | cc1: all warnings being treated as errors + | + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + Modules/CheckFunctionExists.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c +index 2304000..224e340 100644 +--- a/Modules/CheckFunctionExists.c ++++ b/Modules/CheckFunctionExists.c +@@ -4,7 +4,7 @@ + extern "C" + #endif + char +- CHECK_FUNCTION_EXISTS(); ++ CHECK_FUNCTION_EXISTS(void); + #ifdef __CLASSIC_C__ + int main() + { +-- +1.9.1 + diff --git a/meta/recipes-devtools/cmake/cmake_3.6.1.bb b/meta/recipes-devtools/cmake/cmake_3.7.2.bb index 2f188f0712..f566a48cfb 100644 --- a/meta/recipes-devtools/cmake/cmake_3.6.1.bb +++ b/meta/recipes-devtools/cmake/cmake_3.7.2.bb @@ -10,11 +10,11 @@ SRC_URI_append_class-nativesdk = " \ # Strip ${prefix} from ${docdir}, set result into docdir_stripped python () { - prefix=d.getVar("prefix", True) - docdir=d.getVar("docdir", True) + prefix=d.getVar("prefix") + docdir=d.getVar("docdir") if not docdir.startswith(prefix): - raise bb.build.FuncFailed('docdir must contain prefix as its prefix') + bb.fatal('docdir must contain prefix as its prefix') docdir_stripped = docdir[len(prefix):] if len(docdir_stripped) > 0 and docdir_stripped[0] == '/': @@ -25,16 +25,12 @@ python () { EXTRA_OECMAKE=" \ -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \ - -DCMAKE_USE_SYSTEM_LIBRARY_BZIP2=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_CURL=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_FORM=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_LIBLZMA=1 \ - -DCMAKE_USE_SYSTEM_LIBRARY_ZLIB=1 \ + -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ + -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ + -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ -DKWSYS_CHAR_IS_SIGNED=1 \ -DBUILD_CursesDialog=0 \ - ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \ + -DKWSYS_LFS_WORKS=1 \ " do_install_append_class-nativesdk() { |
