ports: Add cmake port

This commit is contained in:
Bananymous 2025-07-30 23:50:29 +03:00
parent 08ed405a5b
commit f82390424b
2 changed files with 39 additions and 0 deletions

27
ports/cmake/build.sh Executable file
View File

@ -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/
}

View File

@ -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