Ports: Regenerate the CMake port patches

This commit is contained in:
Ali Mohammad Pur 2022-01-12 23:15:00 +03:30 committed by Ali Mohammad Pur
parent a906ff5884
commit f81e28039b
12 changed files with 208 additions and 82 deletions

View file

@ -1,7 +1,8 @@
From b36d25744e2db7989352ad48e00f4c7e87ed65c2 Mon Sep 17 00:00:00 2001
From b0ae5bb3a030450d9102a67b3695738a65531606 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Fri, 24 Dec 2021 05:13:08 +0330
Subject: [PATCH] cmnghttp2: check for HAVE_SIZEOF_SSIZE_T and not HAVE_SSIZE_T
Subject: [PATCH 1/7] cmnghttp2: check for HAVE_SIZEOF_SSIZE_T and not
HAVE_SSIZE_T
The `check_size_type(ssize_t SIZEOF_SSIZE_T` call in cmcurl (referenced
by the comment above, which also references some other variables that
@ -11,6 +12,11 @@ The HAVE_SSIZE_T variable *does* get defined, but via the
`CHECK_SIZE_TYPE(ssize_t SSIZE_T)` call in cmlibarchive, which gets
configured *after* cmnghttp2, and so the first configure leads to an
invalid cmnghttp2/config.h file.
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issues(s) with our side of things
- [ ] Hack
---
Utilities/cmnghttp2/CMakeLists.txt | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

View file

@ -1,15 +1,21 @@
From 6db96fa8e9a0519894326d0a64b72313a5879fd9 Mon Sep 17 00:00:00 2001
From b113080ce2b9538c16433df1a4074aa4ab538a22 Mon Sep 17 00:00:00 2001
From: AnotherTest <ali.mpfard@gmail.com>
Date: Fri, 12 Feb 2021 13:42:50 +0330
Subject: [PATCH 10/11] don't use siginfo
Subject: [PATCH 2/7] kwsys: Don't use siginfo
We don't support SIGINFO. This patch removes uses of SIGINFO.
- [X] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [ ] Hack
---
Source/kwsys/ProcessUNIX.c | 2 +-
Source/kwsys/SystemInformation.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index a24b773..cbf137b 100644
index a8a15ddb..5530814a 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -105,7 +105,7 @@ static inline void kwsysProcess_usleep(unsigned int msec)
@ -22,10 +28,10 @@ index a24b773..cbf137b 100644
#endif
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 1384dbe..18f03fb 100644
index f2bf85f6..ac2ac4a3 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -990,7 +990,7 @@ int GetFieldsFromCommand(const char* command, const char** fieldNames,
@@ -992,7 +992,7 @@ int GetFieldsFromCommand(const char* command, const char** fieldNames,
#endif
// ****************************************************************************
@ -34,7 +40,7 @@ index 1384dbe..18f03fb 100644
void StacktraceSignalHandler(int sigNo, siginfo_t* sigInfo,
void* /*sigContext*/)
{
@@ -3965,7 +3965,7 @@ when set print stack trace in response to common signals.
@@ -4043,7 +4043,7 @@ when set print stack trace in response to common signals.
*/
void SystemInformationImplementation::SetStackTraceOnError(int enable)
{
@ -44,5 +50,5 @@ index 1384dbe..18f03fb 100644
static struct sigaction saABRTOrig;
static struct sigaction saSEGVOrig;
--
2.30.1
2.34.1

View file

@ -0,0 +1,38 @@
From aaa210d6039aa02ff3bc7998d39c6befa791cfdd Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Wed, 12 Jan 2022 22:15:37 +0330
Subject: [PATCH 3/7] /bin/bash
This patch swaps out /bin/sh for /bin/bash in two scripts that need it.
- [X] Local?
- [ ] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
---
bootstrap | 2 +-
configure | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bootstrap b/bootstrap
index a487375a..8db931d1 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
diff --git a/configure b/configure
index 11622160..0e6fc25d 100755
--- a/configure
+++ b/configure
@@ -1,3 +1,3 @@
-#!/bin/sh
+#!/bin/bash
cmake_source_dir=`cd "\`dirname \"$0\"\`";pwd`
exec "${cmake_source_dir}/bootstrap" "$@"
--
2.34.1

View file

@ -1,6 +1,24 @@
diff -urp /dev/null a/Modules/Platform/SerenityOS.cmake
--- /dev/null 2021-02-11 00:46:13.390326124 +0330
+++ a/Modules/Platform/SerenityOS.cmake 2021-02-12 16:31:38.421786222 +0330
From e32762d8f7393337786d11d77a71843c80a23b0e Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Wed, 12 Jan 2022 22:17:47 +0330
Subject: [PATCH 4/7] Platform/SerenityOS
This patch adds the SerenityOS platform config file to CMake.
- [ ] Local?
- [X] Should be merged to upstream? If we want to have cmake support serenity out of the box.
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
---
Modules/Platform/SerenityOS.cmake | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 Modules/Platform/SerenityOS.cmake
diff --git a/Modules/Platform/SerenityOS.cmake b/Modules/Platform/SerenityOS.cmake
new file mode 100644
index 00000000..952ff61a
--- /dev/null
+++ b/Modules/Platform/SerenityOS.cmake
@@ -0,0 +1,25 @@
+set(CMAKE_DL_LIBS "-ldl")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
@ -27,3 +45,6 @@ diff -urp /dev/null a/Modules/Platform/SerenityOS.cmake
+unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
+
+include(Platform/UnixPaths)
--
2.34.1

View file

@ -0,0 +1,30 @@
From ac1f5e51b8069e98a593a0f5ad25fdcd0328eca8 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Wed, 12 Jan 2022 22:18:02 +0330
Subject: [PATCH 5/7] cmcurl: Include unistd
Everyone gets this wrong. most platforms are very lax with these includes, but we're not one of them.
- [X] Local?
- [ ] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
---
Utilities/cmcurl/include/curl/multi.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/Utilities/cmcurl/include/curl/multi.h b/Utilities/cmcurl/include/curl/multi.h
index 37f9829b..4a2b94fa 100644
--- a/Utilities/cmcurl/include/curl/multi.h
+++ b/Utilities/cmcurl/include/curl/multi.h
@@ -47,6 +47,7 @@
* but with this warning attached.
*/
#include "curl.h"
+#include <unistd.h>
#ifdef __cplusplus
extern "C" {
--
2.34.1

View file

@ -0,0 +1,30 @@
From 33e8e0bcf0b8d66267083c656c1f4d55b817dc68 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Wed, 12 Jan 2022 22:18:23 +0330
Subject: [PATCH 6/7] cmcurl: Use struct stat and include sys/stat.h
For unknown reasons, curl_setup_once.h does not include sys/stat.h. this patch includes sys/stat.h.
- [ ] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [X] Hack
---
Utilities/cmcurl/lib/curl_setup.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/Utilities/cmcurl/lib/curl_setup.h b/Utilities/cmcurl/lib/curl_setup.h
index 554dcc1e..dfb7859e 100644
--- a/Utilities/cmcurl/lib/curl_setup.h
+++ b/Utilities/cmcurl/lib/curl_setup.h
@@ -403,6 +403,7 @@
#endif
#ifndef struct_stat
+# include <sys/stat.h>
# define struct_stat struct stat
#endif
--
2.34.1

View file

@ -0,0 +1,32 @@
From fefbff0df0bdf95bf61e13feac2552af13f877ff Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Wed, 12 Jan 2022 22:18:57 +0330
Subject: [PATCH 7/7] CMake: Disable tests
We don't care about building tests for now, and it makes the compilation much faster.
- [ ] Local?
- [ ] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
---
CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fdfe456a..00c122ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -718,7 +718,8 @@ endif()
include(Source/CMakeVersion.cmake)
# Include the standard Dart testing module
-enable_testing()
+# enable_testing()
+set(BUILD_TESTING 0)
include (${CMAKE_ROOT}/Modules/Dart.cmake)
# Set up test-time configuration.
--
2.34.1

View file

@ -1,17 +0,0 @@
diff -urp a/bootstrap b/bootstrap
--- a/bootstrap 2021-02-12 16:01:09.075367557 +0330
+++ b/bootstrap 2021-02-12 15:59:27.811749370 +0330
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
diff -urp a/configure b/configure
--- a/configure 2021-02-12 16:02:00.042148704 +0330
+++ b/configure 2021-02-12 16:02:07.035496388 +0330
@@ -1,3 +1,3 @@
-#!/bin/sh
+#!/bin/bash
cmake_source_dir=`cd "\`dirname \"$0\"\`";pwd`
exec "${cmake_source_dir}/bootstrap" "$@"

View file

@ -1,10 +0,0 @@
--- a/Utilities/cmcurl/include/curl/multi.h 2021-02-12 21:03:08.726002327 +0330
+++ b/Utilities/cmcurl/include/curl/multi.h 2021-02-12 21:03:12.015764990 +0330
@@ -47,6 +47,7 @@
* but with this warning attached.
*/
#include "curl.h"
+#include <unistd.h>
#ifdef __cplusplus
extern "C" {

View file

@ -1,12 +0,0 @@
diff --git a/Utilities/cmcurl/lib/curl_setup.h b/Utilities/cmcurl/lib/curl_setup.h
index 45a093f..e621db3 100644
--- a/Utilities/cmcurl/lib/curl_setup.h
+++ b/Utilities/cmcurl/lib/curl_setup.h
@@ -380,6 +380,7 @@
#endif
#ifndef struct_stat
+# include <sys/stat.h>
# define struct_stat struct stat
#endif

View file

@ -1,14 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d860d4..343db6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -710,7 +710,8 @@ endif()
include(Source/CMakeVersion.cmake)
# Include the standard Dart testing module
-enable_testing()
+# enable_testing()
+set(BUILD_TESTING 0)
include (${CMAKE_ROOT}/Modules/Dart.cmake)
# Set up test-time configuration.

View file

@ -1,70 +1,86 @@
# Patches for CMake (and submodules) on SerenityOS
# Patches for cmake on SerenityOS
## `0001-cmnghttp2-check-for-HAVE_SIZEOF_SSIZE_T-and-not-HAVE.patch`
Fixes an issue where the first configure of cmake would generate an invalid config.h file somewhere, leading to the first run of `./package.sh` failing due to what `0016-conflicting-0.patch` and `0017-conflicting-1.patch` attempt to fix.
cmnghttp2: check for HAVE_SIZEOF_SSIZE_T and not HAVE_SSIZE_T
The `check_size_type(ssize_t SIZEOF_SSIZE_T` call in cmcurl (referenced
by the comment above, which also references some other variables that
no longer seem to be used) defines HAVE_SIZEOF_SSIZE_T and not
HAVE_SSIZE_T.
The HAVE_SSIZE_T variable *does* get defined, but via the
`CHECK_SIZE_TYPE(ssize_t SSIZE_T)` call in cmlibarchive, which gets
configured *after* cmnghttp2, and so the first configure leads to an
invalid cmnghttp2/config.h file.
### Status
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issues(s) with our side of things
- [ ] Hack
## `0010-don-t-use-siginfo.patch`
## `0002-kwsys-Don-t-use-siginfo.patch`
kwsys: Don't use siginfo
We don't support SIGINFO. This patch removes uses of SIGINFO.
### Status
- [X] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [ ] Hack
## `0012-bin-bash.patch`
## `0003-bin-bash.patch`
This patch swaps out `/bin/sh` for `/bin/bash` in two scripts that need it.
/bin/bash
This patch swaps out /bin/sh for /bin/bash in two scripts that need it.
### Status
- [X] Local?
- [ ] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
## `0013-platform-serenityos.patch`
## `0004-Platform-SerenityOS.patch`
Platform/SerenityOS
This patch adds the SerenityOS platform config file to CMake.
### Status
- [ ] Local?
- [X] Should be merged to upstream? If we want to have cmake support serenity out of the box.
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
## `0014-cmcurl-include-unistd.patch`
## `0005-cmcurl-Include-unistd.patch`
cmcurl: Include unistd
Everyone gets this wrong. most platforms are very lax with these includes, but we're not one of them.
### Status
- [X] Local?
- [ ] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
## `0026-curl-struct-stat.patch`
## `0006-cmcurl-Use-struct-stat-and-include-sys-stat.h.patch`
For unknown reasons, `curl_setup_once.h` does not include `sys/stat.h`. this patch includes `sys/stat.h`.
cmcurl: Use struct stat and include sys/stat.h
For unknown reasons, curl_setup_once.h does not include sys/stat.h. this patch includes sys/stat.h.
### Status
- [ ] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [X] Hack
## `0028-cmake-disable-tests.patch`
## `0007-CMake-Disable-tests.patch`
CMake: Disable tests
We don't care about building tests for now, and it makes the compilation much faster.
### Status
- [ ] Local?
- [ ] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack