ninja: move to dev-build

gentoo moved from dev-util
This commit is contained in:
Jerome Duval
2024-02-09 16:02:38 +01:00
parent dbfd2a2aaa
commit 898533d01c
2 changed files with 0 additions and 0 deletions

View File

@@ -1,75 +0,0 @@
SUMMARY="A small build system similar to make"
DESCRIPTION="Ninja is a small build system with a focus on speed. It differs \
from other build systems in two major respects: it is designed to have its \
input files generated by a higher-level build system, and it is designed to \
run builds as fast as possible.
Ninja's low-level approach makes it perfect for embedding into more featureful \
build systems. Via gyp it can build Chrome and v8 and node.js etc.; via CMake \
it can build LLVM, KDE, Blender, etc."
HOMEPAGE="https://ninja-build.org/"
COPYRIGHT="2012-2019 Google Inc."
LICENSE="Apache v2"
REVISION="2"
SOURCE_URI="https://github.com/ninja-build/ninja/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea"
PATCHES="ninja-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
fi
PROVIDES="
ninja$secondaryArchSuffix = $portVersion
cmd:ninja = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= r1~alpha4_pm_hrev51418-1
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:as$secondaryArchSuffix
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:make
"
PROVIDES_zsh="
ninja${secondaryArchSuffix}_zsh = $portVersion
"
REQUIRES_zsh="
ninja$secondaryArchSuffix == $portVersion base
cmd:zsh >= 5.0
"
BUILD()
{
cmake -DCMAKE_BUILD_TYPE="Release" -Bbuild $cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$commandBinDir .
cd build
make $jobArgs
}
INSTALL()
{
cd build
make install
# build our zsh completion package
mkdir -p $dataDir/zsh/site-functions
cp -af $sourceDir/misc/zsh-completion $dataDir/zsh/site-functions/_ninja
packageEntries zsh $dataDir
}
TEST()
{
build/ninja_test
}

View File

@@ -1,56 +0,0 @@
From eaf2054190c9841dc5bf27a0a508e7ad4d36e157 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Sat, 16 Sep 2017 12:25:48 +0200
Subject: Add minimal Haiku support; based on Adrien's patch.
diff --git a/src/util.cc b/src/util.cc
index ef5f103..a6471d7 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -727,7 +727,7 @@ int GetProcessorCount() {
#endif
}
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(__HAIKU__)
static double CalculateProcessorLoad(uint64_t idle_ticks, uint64_t total_ticks)
{
static uint64_t previous_idle_ticks = 0;
--
2.30.2
From cd6610b3ba4981ee7a844a8148758940745ad9a8 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 16 Sep 2017 12:48:42 +0200
Subject: GetLoadAvg to be implemented for Haiku
diff --git a/src/util.cc b/src/util.cc
index a6471d7..55735f6 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -727,7 +727,7 @@ int GetProcessorCount() {
#endif
}
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(__HAIKU__)
+#if defined(_WIN32) || defined(__CYGWIN__)
static double CalculateProcessorLoad(uint64_t idle_ticks, uint64_t total_ticks)
{
static uint64_t previous_idle_ticks = 0;
@@ -818,6 +818,10 @@ double GetLoadAverage() {
double GetLoadAverage() {
return -0.0f;
}
+#elif defined(__HAIKU__)
+double GetLoadAverage() {
+ return -0.0f;
+}
#else
double GetLoadAverage() {
double loadavg[3] = { 0.0f, 0.0f, 0.0f };
--
2.30.2