Ports: Update ninja's patches to use git patches

This commit is contained in:
Ali Mohammad Pur 2022-05-16 19:21:55 +04:30 committed by Ali Mohammad Pur
parent 59156d0f0e
commit e16272eacd
Notes: sideshowbarker 2024-07-17 10:48:29 +09:00
6 changed files with 82 additions and 27 deletions

View file

@ -0,0 +1,26 @@
From 035b0bf6e03380778803ed7a8703f58906dc41f5 Mon Sep 17 00:00:00 2001
From: Nico Weber <thakis@chromium.org>
Date: Sun, 21 Jun 2020 18:41:01 -0400
Subject: [PATCH 1/3] Disable crossbuild
(?)
---
configure.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.py b/configure.py
index cded265..134db91 100755
--- a/configure.py
+++ b/configure.py
@@ -687,7 +687,7 @@ n.build('all', 'phony', all_targets)
n.close()
print('wrote %s.' % BUILD_FILENAME)
-if options.bootstrap:
+if options.bootstrap and False:
print('bootstrap complete. rebuilding...')
rebuild_args = []
--
2.36.1

View file

@ -1,8 +1,17 @@
From e73cf241735cdc4f0a51b25baa1ee12b3c418ac5 Mon Sep 17 00:00:00 2001
From: Nico Weber <thakis@chromium.org>
Date: Sun, 21 Jun 2020 18:41:01 -0400
Subject: [PATCH 2/3] Disable load average calculation
---
src/util.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/util.cc b/src/util.cc
index ae94d34..72cf501 100644
index c76f730..5ec2bb8 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -566,11 +566,14 @@ double GetLoadAverage() {
@@ -588,11 +588,14 @@ double GetLoadAverage() {
#else
double GetLoadAverage() {
double loadavg[3] = { 0.0f, 0.0f, 0.0f };
@ -17,3 +26,6 @@ index ae94d34..72cf501 100644
return loadavg[0];
}
#endif // _WIN32
--
2.36.1

View file

@ -0,0 +1,24 @@
From e692da2de8cbe09141e080499e0d7627d1b69b24 Mon Sep 17 00:00:00 2001
From: Nico Weber <thakis@chromium.org>
Date: Sun, 21 Jun 2020 18:41:01 -0400
Subject: [PATCH 3/3] Include unistd.h for stat()
---
src/disk_interface.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/disk_interface.cc b/src/disk_interface.cc
index 49af001..cb1fad5 100644
--- a/src/disk_interface.cc
+++ b/src/disk_interface.cc
@@ -21,6 +21,7 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <unistd.h>
#ifdef _WIN32
#include <sstream>
--
2.36.1

View file

@ -0,0 +1,18 @@
# Patches for ninja on SerenityOS
## `0001-Disable-crossbuild.patch`
Disable crossbuild
(?)
## `0002-Disable-load-average-calculation.patch`
Disable load average calculation
## `0003-Include-unistd.h-for-stat.patch`
Include unistd.h for stat()

View file

@ -1,13 +0,0 @@
diff --git a/configure.py b/configure.py
index a443748..064e9df 100755
--- a/configure.py
+++ b/configure.py
@@ -657,7 +657,7 @@ n.build('all', 'phony', all_targets)
n.close()
print('wrote %s.' % BUILD_FILENAME)
-if options.bootstrap:
+if options.bootstrap and False:
print('bootstrap complete. rebuilding...')
rebuild_args = []

View file

@ -1,12 +0,0 @@
diff --git a/src/disk_interface.cc b/src/disk_interface.cc
index 28530b1..4da9a38 100644
--- a/src/disk_interface.cc
+++ b/src/disk_interface.cc
@@ -21,6 +21,7 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <unistd.h>
#ifdef _WIN32
#include <sstream>