From 923149da444c7caa524a61880942a600c4c9e0bc Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 24 Oct 2026 02:43:42 +0900 Subject: internal/rosa: bootstrap cmake in two steps This enables cross-compilation via the standard CMake helper. Signed-off-by: Ophestra --- internal/rosa/package/cmake/package.az | 51 ++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 15 deletions(-) (limited to 'internal/rosa/package/cmake') diff --git a/internal/rosa/package/cmake/package.az b/internal/rosa/package/cmake/package.az index bd67abb8..2048b9c7 100644 --- a/internal/rosa/package/cmake/package.az +++ b/internal/rosa/package/cmake/package.az @@ -1,10 +1,9 @@ -package cmake { - description = "cross-platform, open-source build system"; - website = "https://cmake.org"; - anitya = 306; +package cmake-source { + description = "CMake source tree"; + exclude = true; version# = "4.4.4"; - source = remoteGitHubRelease { + output = remoteGitHubRelease { suffix = "Kitware/CMake"; tag = "v"+version; name = "cmake-"+version+".tar.gz"; @@ -12,31 +11,53 @@ package cmake { compress = gzip; }; patches = [ "disable-broken-tests-musl.patch" ]; +} - // test suite expects writable source tree - writable = true; +package cmake-early { + description = "minimal CMake bootstrap build"; + exclude = true; + source = cmake-source; // expected to be writable in the copy made during bootstrap + writable = true; chmod = true; exec = make { defaults = false; - configureName = "/usr/src/cmake/bootstrap"; + configureName = "/usr/src/cmake-early/bootstrap"; configure = { "prefix": "/system"; "parallel": jobsE; "--"; "-DCMAKE_USE_OPENSSL": "OFF"; - "-DCMake_TEST_NO_NETWORK": "ON"; - "-DCMake_TEST_BOOTSTRAP": "OFF"; }; - check = [ - "CTEST_OUTPUT_ON_FAILURE=1", - "CTEST_PARALLEL_LEVEL=128", - "test", - ]; + // tested in full build + check = nil; + }; + + inputs = [ kernel-headers ]; +} + +package cmake { + description = "cross-platform, open-source build system"; + website = "https://cmake.org"; + anitya = 306; + source = cmake-source; + + // test suite expects writable source tree + writable = true; + chmod = true; + + exec = cmake { + early = true; + make = true; + cache = { + "CMAKE_USE_OPENSSL": "OFF"; + "CMake_TEST_NO_NETWORK": "ON"; + "CMake_TEST_BOOTSTRAP": "OFF"; + }; }; inputs = [ kernel-headers ]; -- cgit v1.3.1