From dd664687288a12902db3804444a0a64d33c18f80 Mon Sep 17 00:00:00 2001 From: Jia Yuan Lo Date: Sun, 14 Apr 2024 09:39:16 +0800 Subject: [PATCH] bump(main/ninja): 1.12.0 --- packages/ninja/build.sh | 8 ++++---- packages/ninja/src-util.cc.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 packages/ninja/src-util.cc.patch diff --git a/packages/ninja/build.sh b/packages/ninja/build.sh index e5dbab5952..8b358398da 100644 --- a/packages/ninja/build.sh +++ b/packages/ninja/build.sh @@ -2,11 +2,11 @@ TERMUX_PKG_HOMEPAGE=https://ninja-build.org TERMUX_PKG_DESCRIPTION="A small build system with a focus on speed" TERMUX_PKG_LICENSE="Apache-2.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION="1.11.1" -TERMUX_PKG_SRCURL=https://github.com/ninja-build/ninja/archive/v${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea +TERMUX_PKG_VERSION="1.12.0" +TERMUX_PKG_SRCURL=https://github.com/ninja-build/ninja/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=8b2c86cd483dc7fcb7975c5ec7329135d210099a89bc7db0590a07b0bbfe49a5 +TERMUX_PKG_DEPENDS="libandroid-spawn, libc++" TERMUX_PKG_AUTO_UPDATE=true -TERMUX_PKG_DEPENDS="libc++, libandroid-spawn" termux_step_pre_configure() { CXXFLAGS+=" $CPPFLAGS" diff --git a/packages/ninja/src-util.cc.patch b/packages/ninja/src-util.cc.patch new file mode 100644 index 0000000000..a08061ebef --- /dev/null +++ b/packages/ninja/src-util.cc.patch @@ -0,0 +1,29 @@ +--- a/src/util.cc ++++ b/src/util.cc +@@ -47,7 +47,7 @@ + #include + #elif defined(_AIX) && !defined(__PASE__) + #include +-#elif defined(linux) || defined(__GLIBC__) ++#elif defined(__linux__) || defined(__GLIBC__) + #include + #include + #include +@@ -589,7 +589,7 @@ + return stripped; + } + +-#if defined(linux) || defined(__GLIBC__) ++#if defined(__linux__) || defined(__GLIBC__) + std::pair readCount(const std::string& path) { + std::ifstream file(path.c_str()); + if (!file.is_open()) +@@ -789,7 +789,7 @@ + #else + int cgroupCount = -1; + int schedCount = -1; +-#if defined(linux) || defined(__GLIBC__) ++#if defined(__linux__) || defined(__GLIBC__) + cgroupCount = ParseCPUFromCGroup(); + #endif + // The number of exposed processors might not represent the actual number of