diff --git a/ports/cmake/build.sh b/ports/cmake/build.sh new file mode 100755 index 00000000..210308e1 --- /dev/null +++ b/ports/cmake/build.sh @@ -0,0 +1,27 @@ +#!/bin/bash ../install.sh + +NAME='cmake' +VERSION='3.26.6' # NOTE: same version as used by our toolchain +DOWNLOAD_URL="https://github.com/Kitware/CMake/releases/download/v$VERSION/cmake-$VERSION.tar.gz#070b9a2422e666d2c1437e2dab239a236e8a63622d0a8d0ffe9e389613d2b76a" +DEPENDENCIES=('openssl' 'libuv' 'make' 'bash') + +configure() { + $BANAN_CMAKE \ + --toolchain=$BANAN_TOOLCHAIN_DIR/Toolchain.txt \ + -B build -GNinja --fresh \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_USE_OPENSSL=ON \ + -DCMAKE_USE_SYSTEM_LIBUV=ON \ + -DOPENSSL_ROOT_DIR=/usr \ + -DBUILD_TESTING=OFF \ + . || exit 1 +} + +build() { + $BANAN_CMAKE --build build || exit 1 +} + +install() { + $BANAN_CMAKE --install build || exit 1 + cp $BANAN_TOOLCHAIN_DIR/cmake-platform/* $BANAN_SYSROOT/usr/share/cmake-3.26/Modules/Platform/ +} diff --git a/ports/cmake/patches/0001-dont-use-siginfo.patch b/ports/cmake/patches/0001-dont-use-siginfo.patch new file mode 100644 index 00000000..67e389ac --- /dev/null +++ b/ports/cmake/patches/0001-dont-use-siginfo.patch @@ -0,0 +1,12 @@ +diff -ruN cmake-3.26.6/Source/kwsys/ProcessUNIX.c cmake-3.26.6-x86_64/Source/kwsys/ProcessUNIX.c +--- cmake-3.26.6/Source/kwsys/ProcessUNIX.c 2023-11-27 20:48:12.000000000 +0200 ++++ cmake-3.26.6-x86_64/Source/kwsys/ProcessUNIX.c 2025-07-30 21:49:08.783313124 +0300 +@@ -115,7 +115,7 @@ + #endif + + /* Some platforms do not have siginfo on their signal handlers. */ +-#if defined(SA_SIGINFO) && !defined(__BEOS__) ++#if defined(SA_SIGINFO) && !defined(__BEOS__) && !defined(__banan_os__) + # define KWSYSPE_USE_SIGINFO 1 + #endif +