From e16272eacd05dd608583ebfa226c77a26d8cfbcb Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 16 May 2022 19:21:55 +0430 Subject: [PATCH] Ports: Update ninja's patches to use git patches --- .../patches/0001-Disable-crossbuild.patch | 26 +++++++++++++++++++ ...02-Disable-load-average-calculation.patch} | 16 ++++++++++-- .../0003-Include-unistd.h-for-stat.patch | 24 +++++++++++++++++ Ports/ninja/patches/ReadMe.md | 18 +++++++++++++ Ports/ninja/patches/crossbuild.patch | 13 ---------- Ports/ninja/patches/unistd-for-stat.patch | 12 --------- 6 files changed, 82 insertions(+), 27 deletions(-) create mode 100644 Ports/ninja/patches/0001-Disable-crossbuild.patch rename Ports/ninja/patches/{loadavg.patch => 0002-Disable-load-average-calculation.patch} (56%) create mode 100644 Ports/ninja/patches/0003-Include-unistd.h-for-stat.patch create mode 100644 Ports/ninja/patches/ReadMe.md delete mode 100644 Ports/ninja/patches/crossbuild.patch delete mode 100644 Ports/ninja/patches/unistd-for-stat.patch diff --git a/Ports/ninja/patches/0001-Disable-crossbuild.patch b/Ports/ninja/patches/0001-Disable-crossbuild.patch new file mode 100644 index 00000000000..b91554c1f13 --- /dev/null +++ b/Ports/ninja/patches/0001-Disable-crossbuild.patch @@ -0,0 +1,26 @@ +From 035b0bf6e03380778803ed7a8703f58906dc41f5 Mon Sep 17 00:00:00 2001 +From: Nico Weber +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 + diff --git a/Ports/ninja/patches/loadavg.patch b/Ports/ninja/patches/0002-Disable-load-average-calculation.patch similarity index 56% rename from Ports/ninja/patches/loadavg.patch rename to Ports/ninja/patches/0002-Disable-load-average-calculation.patch index cdecfc8a7c1..2ed9edb1ac4 100644 --- a/Ports/ninja/patches/loadavg.patch +++ b/Ports/ninja/patches/0002-Disable-load-average-calculation.patch @@ -1,8 +1,17 @@ +From e73cf241735cdc4f0a51b25baa1ee12b3c418ac5 Mon Sep 17 00:00:00 2001 +From: Nico Weber +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 + diff --git a/Ports/ninja/patches/0003-Include-unistd.h-for-stat.patch b/Ports/ninja/patches/0003-Include-unistd.h-for-stat.patch new file mode 100644 index 00000000000..87976c1f292 --- /dev/null +++ b/Ports/ninja/patches/0003-Include-unistd.h-for-stat.patch @@ -0,0 +1,24 @@ +From e692da2de8cbe09141e080499e0d7627d1b69b24 Mon Sep 17 00:00:00 2001 +From: Nico Weber +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 + #include + #include ++#include + + #ifdef _WIN32 + #include +-- +2.36.1 + diff --git a/Ports/ninja/patches/ReadMe.md b/Ports/ninja/patches/ReadMe.md new file mode 100644 index 00000000000..7e03663c1ca --- /dev/null +++ b/Ports/ninja/patches/ReadMe.md @@ -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() + + diff --git a/Ports/ninja/patches/crossbuild.patch b/Ports/ninja/patches/crossbuild.patch deleted file mode 100644 index 7efd5865c81..00000000000 --- a/Ports/ninja/patches/crossbuild.patch +++ /dev/null @@ -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 = [] diff --git a/Ports/ninja/patches/unistd-for-stat.patch b/Ports/ninja/patches/unistd-for-stat.patch deleted file mode 100644 index 6616b989ccf..00000000000 --- a/Ports/ninja/patches/unistd-for-stat.patch +++ /dev/null @@ -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 - #include - #include -+#include - - #ifdef _WIN32 - #include