aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/cmake
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-19 18:42:54 +0900
committerOphestra <cat@gensokyo.uk>2026-05-19 18:42:54 +0900
commit6e8bfa6c4c963ff6c7d417a1cc703e4504e1fb9d (patch)
treeab6fbdeddaff07226edf4c5e3e81b3aa0fbff41e /internal/rosa/package/cmake
parenta770d62b9be4306846b7e1d8c0c94968be175f58 (diff)
internal/rosa/package: migrate cmake
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/package/cmake')
-rw-r--r--internal/rosa/package/cmake/bootstrap-test-no-openssl.patch13
-rw-r--r--internal/rosa/package/cmake/disable-broken-tests-musl.patch41
-rw-r--r--internal/rosa/package/cmake/package.az45
3 files changed, 99 insertions, 0 deletions
diff --git a/internal/rosa/package/cmake/bootstrap-test-no-openssl.patch b/internal/rosa/package/cmake/bootstrap-test-no-openssl.patch
new file mode 100644
index 00000000..a156fb8e
--- /dev/null
+++ b/internal/rosa/package/cmake/bootstrap-test-no-openssl.patch
@@ -0,0 +1,13 @@
+diff --git a/Tests/BootstrapTest.cmake b/Tests/BootstrapTest.cmake
+index 137de78bc1..b4da52e664 100644
+--- a/Tests/BootstrapTest.cmake
++++ b/Tests/BootstrapTest.cmake
+@@ -9,7 +9,7 @@ if(NOT nproc EQUAL 0)
+ endif()
+ message(STATUS "running bootstrap: ${bootstrap} ${ninja_arg} ${parallel_arg}")
+ execute_process(
+- COMMAND ${bootstrap} ${ninja_arg} ${parallel_arg}
++ COMMAND ${bootstrap} ${ninja_arg} ${parallel_arg} -- -DCMAKE_USE_OPENSSL=OFF
+ WORKING_DIRECTORY "${bin_dir}"
+ RESULT_VARIABLE result
+ )
diff --git a/internal/rosa/package/cmake/disable-broken-tests-musl.patch b/internal/rosa/package/cmake/disable-broken-tests-musl.patch
new file mode 100644
index 00000000..33d9c4fd
--- /dev/null
+++ b/internal/rosa/package/cmake/disable-broken-tests-musl.patch
@@ -0,0 +1,41 @@
+diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
+index 2ead810437..f85cbb8b1c 100644
+--- a/Tests/CMakeLists.txt
++++ b/Tests/CMakeLists.txt
+@@ -384,7 +384,6 @@ if(BUILD_TESTING)
+ add_subdirectory(CMakeLib)
+ endif()
+ add_subdirectory(CMakeOnly)
+- add_subdirectory(RunCMake)
+
+ add_subdirectory(FindPackageModeMakefileTest)
+
+@@ -528,9 +527,6 @@ if(BUILD_TESTING)
+ -DCMake_TEST_CUDA:BOOL=${CMake_TEST_CUDA}
+ -DCMake_INSTALL_NAME_TOOL_BUG:BOOL=${CMake_INSTALL_NAME_TOOL_BUG}
+ )
+- ADD_TEST_MACRO(ExportImport ExportImport)
+- set_property(TEST ExportImport APPEND
+- PROPERTY LABELS "CUDA")
+ ADD_TEST_MACRO(Unset Unset)
+ ADD_TEST_MACRO(PolicyScope PolicyScope)
+ ADD_TEST_MACRO(EmptyLibrary EmptyLibrary)
+@@ -624,7 +620,6 @@ if(BUILD_TESTING)
+ # run test for BundleUtilities on supported platforms/compilers
+ if((MSVC OR
+ MINGW OR
+- CMAKE_SYSTEM_NAME MATCHES "Linux" OR
+ CMAKE_SYSTEM_NAME MATCHES "Darwin")
+ AND NOT CMAKE_GENERATOR STREQUAL "Watcom WMake")
+
+@@ -3095,10 +3090,6 @@ if(BUILD_TESTING)
+ "${CMake_SOURCE_DIR}/Tests/CTestTestFdSetSize/test.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/test.cmake"
+ @ONLY ESCAPE_QUOTES)
+- add_test(CTestTestFdSetSize ${CMAKE_CTEST_COMMAND}
+- -S "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/test.cmake" -j20 -V --timeout 120
+- --output-log "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/testOutput.log"
+- )
+
+ if(CMAKE_TESTS_CDASH_SERVER)
+ set(regex "^([^:]+)://([^/]+)(.*)$")
diff --git a/internal/rosa/package/cmake/package.az b/internal/rosa/package/cmake/package.az
new file mode 100644
index 00000000..8b3e6d8e
--- /dev/null
+++ b/internal/rosa/package/cmake/package.az
@@ -0,0 +1,45 @@
+package cmake {
+ description = "cross-platform, open-source build system";
+ website = "https://cmake.org";
+ anitya = 306;
+
+ version* = "4.3.2";
+ source = remoteGitHubRelease {
+ suffix = "Kitware/CMake";
+ tag = "v"+version;
+ name = "cmake-"+version+".tar.gz";
+ checksum = "6QylwRVKletndTSkZTV2YBRwgd_9rUVgav_QW23HpjUgV21AVYZOUOal8tdBDmO7";
+ compress = gzip;
+ };
+ patches = [
+ "bootstrap-test-no-openssl.patch",
+ "disable-broken-tests-musl.patch",
+ ];
+
+ // test suite expects writable source tree
+ writable = true;
+
+ // expected to be writable in the copy made during bootstrap
+ chmod = true;
+
+ exec = make {
+ omitDefaults = true;
+
+ configureName = "/usr/src/cmake/bootstrap";
+ configure = {
+ "prefix": "/system";
+ "parallel": jobsE;
+ "--";
+ "-DCMAKE_USE_OPENSSL": "OFF";
+ "-DCMake_TEST_NO_NETWORK": "ON";
+ };
+
+ check = [
+ "CTEST_OUTPUT_ON_FAILURE=1",
+ "CTEST_PARALLEL_LEVEL=128",
+ "test",
+ ];
+ };
+
+ inputs = [ kernel-headers ];
+}