aboutsummaryrefslogtreecommitdiffstats
path: root/tools/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cmake')
-rw-r--r--tools/cmake/Makefile28
-rw-r--r--tools/cmake/patches/100-disable_qt_tests.patch31
-rw-r--r--tools/cmake/patches/110-freebsd-compat.patch42
3 files changed, 101 insertions, 0 deletions
diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile
new file mode 100644
index 0000000..b71f1af
--- /dev/null
+++ b/tools/cmake/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cmake
+PKG_VERSION:=3.3.2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.cmake.org/files/v3.3/ \
+ https://fossies.org/linux/misc/
+PKG_MD5SUM:=5febbd11bcaac854a27eebaf4a124be2
+
+HOST_BUILD_PARALLEL:=1
+HOST_CONFIGURE_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_CONFIGURE_VARS :=
+
+HOST_CONFIGURE_ARGS := \
+ --prefix=$(STAGING_DIR_HOST) \
+ $(if $(MAKE_JOBSERVER),--parallel="$(MAKE_JOBSERVER)")
+
+$(eval $(call HostBuild))
diff --git a/tools/cmake/patches/100-disable_qt_tests.patch b/tools/cmake/patches/100-disable_qt_tests.patch
new file mode 100644
index 0000000..deaa5ae
--- /dev/null
+++ b/tools/cmake/patches/100-disable_qt_tests.patch
@@ -0,0 +1,31 @@
+--- a/Tests/RunCMake/CMakeLists.txt
++++ b/Tests/RunCMake/CMakeLists.txt
+@@ -160,15 +160,6 @@
+ add_RunCMake_test(no_install_prefix)
+ add_RunCMake_test(configure_file)
+
+-find_package(Qt4 QUIET)
+-find_package(Qt5Core QUIET)
+-if (QT4_FOUND AND Qt5Core_FOUND AND NOT Qt5Core_VERSION VERSION_LESS 5.1.0)
+- add_RunCMake_test(IncompatibleQt)
+-endif()
+-if (QT4_FOUND)
+- add_RunCMake_test(ObsoleteQtMacros -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE})
+-endif()
+-
+ find_package(PkgConfig QUIET)
+ if(PKG_CONFIG_FOUND)
+ add_RunCMake_test(FindPkgConfig)
+--- a/Tests/CMakeLists.txt
++++ b/Tests/CMakeLists.txt
+@@ -358,10 +358,6 @@
+
+ list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX})
+
+- if(NOT QT4_FOUND)
+- find_package(Qt4 QUIET)
+- endif()
+-
+ if(QT4_FOUND)
+ # test whether the Qt4 which has been found works, on some machines
+ # which run nightly builds there were errors like "wrong file format"
diff --git a/tools/cmake/patches/110-freebsd-compat.patch b/tools/cmake/patches/110-freebsd-compat.patch
new file mode 100644
index 0000000..9133db5
--- /dev/null
+++ b/tools/cmake/patches/110-freebsd-compat.patch
@@ -0,0 +1,42 @@
+From 6eab64c3adc7a38c322cd4d9a1a1881f2d49cb9c Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
+Date: Tue, 15 Oct 2013 00:10:56 +0300
+Subject: [PATCH] SystemInformation: Include backtrace-related headers on
+ FreeBSD
+
+This was probably broken for a long while, but the problem was not apparent
+because the check for execinfo.h would fail by default because
+-I/usr/local/include was not being passed to the compiler when making the
+checks for the header's existence.
+
+Now that very recent FreeBSD versions (ie. 10-CURRENT) have NetBSD's
+libexecinfo in base (and it is thus installed into /usr), the
+backtrace-related checks would pass, but the required headers were not being
+included in SystemInformation.cxx.
+
+Change-Id: I3b91ed7ac0e6878035aee202b3336c536cc6d2ff
+---
+ Source/kwsys/SystemInformation.cxx | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
+index 7c31f3a..2672730 100644
+--- a/Source/kwsys/SystemInformation.cxx
++++ b/Source/kwsys/SystemInformation.cxx
+@@ -91,6 +91,15 @@ typedef int siginfo_t;
+ # include <ifaddrs.h>
+ # define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
+ # endif
++# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
++# include <execinfo.h>
++# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
++# include <cxxabi.h>
++# endif
++# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
++# include <dlfcn.h>
++# endif
++# endif
+ #endif
+
+ #if defined(__OpenBSD__) || defined(__NetBSD__)
+