From a99c8dfccde6cc70c333cc454cca669dc93025d9 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Mon, 17 Mar 2025 22:58:20 +0100 Subject: [PATCH] Allow using system ninja - Packages which build fortran parts, should use ninja-fortran --- ninja-fortran.sh | 18 ++++++++++++++++++ ninja.sh | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 ninja-fortran.sh diff --git a/ninja-fortran.sh b/ninja-fortran.sh new file mode 100644 index 0000000000..c0e59118b2 --- /dev/null +++ b/ninja-fortran.sh @@ -0,0 +1,18 @@ +package: ninja-fortran +version: "fortran-%(short_hash)s" +tag: "v1.11.1.g95dee.kitware.jobserver-1" +source: https://github.com/Kitware/ninja +build_requires: + - "GCC-Toolchain:(?!osx)" + - "CMake" + - alibuild-recipe-tools +--- +#!/bin/bash +cmake -Bbuild-cmake $SOURCEDIR +cmake --build build-cmake + +mkdir -p $INSTALLROOT/bin +cp build-cmake/ninja "$INSTALLROOT/bin" + +mkdir -p "$INSTALLROOT/etc/modulefiles" +alibuild-generate-module --bin >"$INSTALLROOT/etc/modulefiles/$PKGNAME" diff --git a/ninja.sh b/ninja.sh index b872587175..a21a89c05c 100644 --- a/ninja.sh +++ b/ninja.sh @@ -6,6 +6,9 @@ build_requires: - "GCC-Toolchain:(?!osx)" - "CMake" - alibuild-recipe-tools +prefer_system: .* +prefer_system_check: | + type ninja --- #!/bin/bash cmake -Bbuild-cmake "$SOURCEDIR"