blob: 968d003b2d9819875dac6257981f1bf515471822 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001# Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved
2# Released under the MIT license (see packages/COPYING)
3
4SUMMARY = "Cross-platform, open-source make system"
5HOMEPAGE = "http://www.cmake.org/"
6BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
7SECTION = "console/utils"
8LICENSE = "BSD"
9LIC_FILES_CHKSUM = "file://Copyright.txt;md5=3ba5a6c34481652ce573e5c4e1d707e4 \
10 file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
11
12CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
13
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050014SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015 file://support-oe-qt4-tools-names.patch \
16 file://qt4-fail-silent.patch \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050017 file://0001-Add-NIOS2-CPU-support.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018 "
19
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050020SRC_URI[md5sum] = "4cb3ff35b2472aae70f542116d616e63"
21SRC_URI[sha256sum] = "b73f8c1029611df7ed81796bf5ca8ba0ef41c6761132340c73ffe42704f980fa"
22
23UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024
25inherit autotools
26
27# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
28# and possibly missing qmake binary (qtbase-native can be removed from sysroot
29# e.g. in order to upgrade it, even when there is target qtbase)
30
31# Fixes errors like this in cmake(-native).do_configure:
32#| -- Performing Test run_pic_test - Success
33#| CMake Error at tmp-eglibc/sysroots/qemuarm/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
34#| The imported target "Qt5::Core" references the file
35#|
36#| "/qmake"
37#|
38#| but this file does not exist. Possible reasons include:
39
40do_configure_prepend() {
41 sed -i 's/^find_package(Qt5Core QUIET)$/#find_package(Qt5Core QUIET)/g' ${S}/Tests/RunCMake/CMakeLists.txt
42 sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/CMakeLists.txt
43 sed -i 's/^ find_package(Qt5Widgets QUIET NO_MODULE)/# find_package(Qt5Widgets QUIET NO_MODULE)/g' ${S}/Tests/CMakeLists.txt
44 sed -i 's/^find_package(Qt5Widgets QUIET)/#find_package(Qt5Widgets QUIET)/g' ${S}/Source/QtDialog/CMakeLists.txt
45 sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutoUicInterface/CMakeLists.txt
46 sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt
47 sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
48}
49
50# Extra flags to pass to cmake invoked by bootstrap
51CMAKE_EXTRACONF = ""
52
53do_configure () {
54 ${S}/configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
55}