initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
From 68d3b1dfbbd2f54bf81986d1d733deaf66658b15 Mon Sep 17 00:00:00 2001
|
||||
From: Davide Viti <zinosat@tiscali.it>
|
||||
Date: Thu, 14 Jul 2016 10:14:59 +0100
|
||||
Subject: [PATCH] rename cmake rootfile
|
||||
|
||||
ctest fails on the target, because it cannot find CMake.cmake inside
|
||||
CMAKE_DATA_DIR (typically set to "/usr/share/cmake-3.0"): all *.cmake
|
||||
files are removed at build time via the target-finalize rule.
|
||||
|
||||
This buildroot-specific patch makes sure ctest looks also for
|
||||
"Modules/CMake.cmake.ctest" before complaining
|
||||
|
||||
[Vincent: tweak patch for 3.6.3]
|
||||
[James: tweak patch for 3.15.4]
|
||||
|
||||
Signed-off-by: Davide Viti <zinosat@tiscali.it>
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
|
||||
---
|
||||
Source/cmake.cxx | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
|
||||
index 3772f09985..c317e4af38 100644
|
||||
--- a/Source/cmake.cxx
|
||||
+++ b/Source/cmake.cxx
|
||||
@@ -1009,7 +1009,12 @@ int cmake::AddCMakePaths()
|
||||
"Path to cpack program executable.", cmStateEnums::INTERNAL);
|
||||
#endif
|
||||
if (!cmSystemTools::FileExists(
|
||||
- (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake"))) {
|
||||
+ (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake")) &&
|
||||
+ !cmSystemTools::FileExists(
|
||||
+ (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake.ctest")
|
||||
+ )
|
||||
+ )
|
||||
+ {
|
||||
// couldn't find modules
|
||||
cmSystemTools::Error(
|
||||
"Could not find CMAKE_ROOT !!!\n"
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
config BR2_PACKAGE_CMAKE_ARCH_SUPPORTS
|
||||
bool
|
||||
default y
|
||||
depends on BR2_arm || BR2_armeb || BR2_aarch64 || \
|
||||
BR2_m68k || BR2_mips || BR2_mips64 || \
|
||||
BR2_mipsel || BR2_mips64el || BR2_powerpc || \
|
||||
BR2_powerpc64 || BR2_powerpc64le || BR2_sparc || \
|
||||
BR2_i386 || BR2_x86_64 || BR2_xtensa || \
|
||||
BR2_s390x
|
||||
|
||||
config BR2_PACKAGE_CMAKE
|
||||
bool
|
||||
|
||||
config BR2_PACKAGE_CMAKE_CTEST
|
||||
bool "ctest"
|
||||
depends on BR2_PACKAGE_CMAKE_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # from jsoncpp
|
||||
depends on BR2_USE_WCHAR # libarchive
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
|
||||
depends on BR2_USE_MMU # libuv
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
|
||||
select BR2_PACKAGE_CMAKE
|
||||
select BR2_PACKAGE_ZLIB
|
||||
select BR2_PACKAGE_JSONCPP
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBARCHIVE
|
||||
select BR2_PACKAGE_EXPAT
|
||||
select BR2_PACKAGE_BZIP2
|
||||
select BR2_PACKAGE_XZ
|
||||
select BR2_PACKAGE_LIBUV
|
||||
select BR2_PACKAGE_RHASH
|
||||
help
|
||||
CTest is a testing tool distributed as a part of CMake. It
|
||||
can be used to automate updating (using CVS for example),
|
||||
configuring, building, testing, performing memory checking,
|
||||
performing coverage, and submitting results to a CDash or
|
||||
Dart dashboard system.
|
||||
|
||||
http://www.cmake.org/
|
||||
|
||||
comment "ctest needs a toolchain w/ C++, wchar, dynamic library, gcc >= 4.7, NPTL"
|
||||
depends on BR2_PACKAGE_CMAKE_ARCH_SUPPORTS
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
|
||||
BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
@@ -0,0 +1,11 @@
|
||||
config BR2_PACKAGE_HOST_CMAKE
|
||||
bool "host cmake"
|
||||
help
|
||||
CMake is an open-source, cross-platform family of tools
|
||||
designed to build, test and package software. CMake is used
|
||||
to control the software compilation process using simple
|
||||
platform and compiler independent configuration files, and
|
||||
generate native makefiles and workspaces that can be used in
|
||||
the compiler environment of your choice.
|
||||
|
||||
http://www.cmake.org/
|
||||
@@ -0,0 +1,5 @@
|
||||
# From https://cmake.org/files/v3.16/cmake-3.16.9-SHA-256.txt
|
||||
sha256 1708361827a5a0de37d55f5c9698004c035abb1de6120a376d5d59a81630191f cmake-3.16.9.tar.gz
|
||||
|
||||
# Locally calculated
|
||||
sha256 dc628fb936a5d229296d42083f9a8218aa32204c016919e784404c9ec58776e9 Copyright.txt
|
||||
@@ -0,0 +1,87 @@
|
||||
################################################################################
|
||||
#
|
||||
# cmake
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CMAKE_VERSION_MAJOR = 3.16
|
||||
CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).9
|
||||
CMAKE_SITE = https://cmake.org/files/v$(CMAKE_VERSION_MAJOR)
|
||||
CMAKE_LICENSE = BSD-3-Clause
|
||||
CMAKE_LICENSE_FILES = Copyright.txt
|
||||
CMAKE_CPE_ID_VENDOR = cmake_project
|
||||
# Tool download MITM attack warning if using npm package to install cmake
|
||||
CMAKE_IGNORE_CVES = CVE-2016-10642
|
||||
|
||||
# CMake is a particular package:
|
||||
# * CMake can be built using the generic infrastructure or the cmake one.
|
||||
# Since Buildroot has no requirement regarding the host system cmake
|
||||
# program presence, it uses the generic infrastructure to build the
|
||||
# host-cmake package, then the (target-)cmake package can be built
|
||||
# using the cmake infrastructure;
|
||||
# * CMake bundles its dependencies within its sources. This is the
|
||||
# reason why the host-cmake package has no dependencies:, whereas
|
||||
# the (target-)cmake package has a lot of dependencies, using only
|
||||
# the system-wide libraries instead of rebuilding and statically
|
||||
# linking with the ones bundled into the CMake sources.
|
||||
|
||||
CMAKE_DEPENDENCIES = zlib jsoncpp libcurl libarchive expat bzip2 xz libuv rhash
|
||||
|
||||
CMAKE_CONF_OPTS = \
|
||||
-DKWSYS_LFS_WORKS=TRUE \
|
||||
-DKWSYS_CHAR_IS_SIGNED=TRUE \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
|
||||
-DCTEST_USE_XMLRPC=OFF \
|
||||
-DBUILD_CursesDialog=OFF
|
||||
|
||||
# Get rid of -I* options from $(HOST_CPPFLAGS) to prevent that a
|
||||
# header available in $(HOST_DIR)/include is used instead of a
|
||||
# CMake internal header, e.g. lzma* headers of the xz package
|
||||
HOST_CMAKE_CFLAGS = $(shell echo $(HOST_CFLAGS) | sed -r "s%$(HOST_CPPFLAGS)%%")
|
||||
HOST_CMAKE_CXXFLAGS = $(shell echo $(HOST_CXXFLAGS) | sed -r "s%$(HOST_CPPFLAGS)%%")
|
||||
|
||||
define HOST_CMAKE_CONFIGURE_CMDS
|
||||
(cd $(@D); \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(HOST_CMAKE_CFLAGS)" \
|
||||
./bootstrap --prefix=$(HOST_DIR) \
|
||||
--parallel=$(PARALLEL_JOBS) -- \
|
||||
-DCMAKE_C_FLAGS="$(HOST_CMAKE_CFLAGS)" \
|
||||
-DCMAKE_CXX_FLAGS="$(HOST_CMAKE_CXXFLAGS)" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)" \
|
||||
-DCMAKE_USE_OPENSSL:BOOL=OFF \
|
||||
-DBUILD_CursesDialog=OFF \
|
||||
)
|
||||
endef
|
||||
|
||||
define HOST_CMAKE_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
define HOST_CMAKE_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install/fast
|
||||
endef
|
||||
|
||||
define CMAKE_REMOVE_EXTRA_DATA
|
||||
rm $(TARGET_DIR)/usr/bin/{cmake,cpack}
|
||||
rm -fr $(TARGET_DIR)/usr/share/cmake-$(CMAKE_VERSION_MAJOR)/{completions,editors}
|
||||
rm -fr $(TARGET_DIR)/usr/share/cmake-$(CMAKE_VERSION_MAJOR)/{Help,include}
|
||||
endef
|
||||
|
||||
define CMAKE_INSTALL_CTEST_CFG_FILE
|
||||
$(INSTALL) -m 0644 -D $(@D)/Modules/CMake.cmake \
|
||||
$(TARGET_DIR)/usr/share/cmake-$(CMAKE_VERSION_MAJOR)/Modules/CMake.cmake.ctest
|
||||
endef
|
||||
|
||||
CMAKE_POST_INSTALL_TARGET_HOOKS += CMAKE_REMOVE_EXTRA_DATA
|
||||
CMAKE_POST_INSTALL_TARGET_HOOKS += CMAKE_INSTALL_CTEST_CFG_FILE
|
||||
|
||||
define CMAKE_INSTALL_TARGET_CMDS
|
||||
(cd $(@D); \
|
||||
$(HOST_MAKE_ENV) DESTDIR=$(TARGET_DIR) \
|
||||
cmake -P cmake_install.cmake \
|
||||
)
|
||||
endef
|
||||
|
||||
$(eval $(cmake-package))
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user