diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 60bf780341d..5e8d48bba10 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -32,7 +32,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`chester`](chester/) | Chester Gameboy Emulator | | https://github.com/veikkos/chester | | [`citron`](citron/) | Citron Programming Language | 0.0.9.3 | https://github.com/alimpfard/citron | | [`ClassiCube`](ClassiCube/) | ClassiCube | 1.3.3 | https://github.com/UnknownShadow200/ClassiCube | -| [`cmake`](cmake/) | CMake | 3.23.2 | https://cmake.org/ | +| [`cmake`](cmake/) | CMake | 3.25.1 | https://cmake.org/ | | [`cmatrix`](cmatrix/) | cmatrix | 3112b12 | https://github.com/abishekvashok/cmatrix | | [`composer`](composer/) | Composer | 2.4.3 | https://getcomposer.org/ | | [`coreutils`](coreutils/) | GNU core utilities | 9.1 | https://www.gnu.org/software/coreutils/ | diff --git a/Ports/cmake/package.sh b/Ports/cmake/package.sh index 95cc54d46b9..2b42066ab48 100755 --- a/Ports/cmake/package.sh +++ b/Ports/cmake/package.sh @@ -1,11 +1,25 @@ #!/usr/bin/env -S bash ../.port_include.sh -port=cmake -version=3.23.2 -useconfigure=true -files="https://github.com/Kitware/CMake/releases/download/v$version/cmake-$version.tar.gz cmake-$version.tar.gz f316b40053466f9a416adf981efda41b160ca859e97f6a484b447ea299ff26aa" -auth_type=sha256 -depends=("bash" "make" "sed" "ncurses" "libuv" "openssl") -configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" "-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=1" "-DCMAKE_USE_OPENSSL=ON" "-GNinja") +port='cmake' +version='3.25.1' +useconfigure='true' +files="https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}.tar.gz cmake-${version}.tar.gz 1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8" +auth_type='sha256' +depends=( + 'bash' + 'make' + 'sed' + 'ncurses' + 'libuv' + 'openssl' +) + +configopts=( + "-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" + "-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=1" + "-DCMAKE_USE_OPENSSL=ON" + "-DBUILD_TESTING=OFF" + "-GNinja" +) configure() { run cmake "${configopts[@]}" . diff --git a/Ports/cmake/patches/0003-cmcurl-Include-unistd.patch b/Ports/cmake/patches/0001-cmcurl-Include-unistd.patch similarity index 87% rename from Ports/cmake/patches/0003-cmcurl-Include-unistd.patch rename to Ports/cmake/patches/0001-cmcurl-Include-unistd.patch index 13dd06a6f8e..7aa0e130c37 100644 --- a/Ports/cmake/patches/0003-cmcurl-Include-unistd.patch +++ b/Ports/cmake/patches/0001-cmcurl-Include-unistd.patch @@ -14,10 +14,10 @@ Everyone gets this wrong. Most platforms are very lax with these includes, but w 1 file changed, 1 insertion(+) diff --git a/Utilities/cmcurl/include/curl/multi.h b/Utilities/cmcurl/include/curl/multi.h -index 91cd95d3..9940748f 100644 +index 2f3ec37a7685a98f59bfae180cd37cf342b99194..154f3c28ea955fdef3d3c9cd605a9d99de07773d 100644 --- a/Utilities/cmcurl/include/curl/multi.h +++ b/Utilities/cmcurl/include/curl/multi.h -@@ -47,6 +47,7 @@ +@@ -49,6 +49,7 @@ * but with this warning attached. */ #include "curl.h" diff --git a/Ports/cmake/patches/0001-kwsys-Don-t-use-siginfo.patch b/Ports/cmake/patches/0001-kwsys-Don-t-use-siginfo.patch deleted file mode 100644 index 04071214557..00000000000 --- a/Ports/cmake/patches/0001-kwsys-Don-t-use-siginfo.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AnotherTest -Date: Fri, 12 Feb 2021 13:42:50 +0330 -Subject: [PATCH] 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 19bf982d..1ece4310 100644 ---- a/Source/kwsys/ProcessUNIX.c -+++ b/Source/kwsys/ProcessUNIX.c -@@ -111,7 +111,7 @@ static inline void kwsysProcess_usleep(unsigned int msec) - #endif - - /* Some platforms do not have siginfo on their signal handlers. */ --#if defined(SA_SIGINFO) && !defined(__BEOS__) -+#if defined(SA_SIGINFO) && !defined(__BEOS__) && !defined(__serenity__) - # define KWSYSPE_USE_SIGINFO 1 - #endif - -diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx -index e6cc48f2..17fbd547 100644 ---- a/Source/kwsys/SystemInformation.cxx -+++ b/Source/kwsys/SystemInformation.cxx -@@ -992,7 +992,7 @@ int GetFieldsFromCommand(const char* command, const char** fieldNames, - #endif - - // **************************************************************************** --#if !defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) -+#if !defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__serenity__) - void StacktraceSignalHandler(int sigNo, siginfo_t* sigInfo, - void* /*sigContext*/) - { -@@ -4051,7 +4051,7 @@ when set print stack trace in response to common signals. - */ - void SystemInformationImplementation::SetStackTraceOnError(int enable) - { --#if !defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) -+#if !defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__serenity__) - static int saOrigValid = 0; - static struct sigaction saABRTOrig; - static struct sigaction saSEGVOrig; diff --git a/Ports/cmake/patches/0002-SerenityOS-Add-Platform-module.patch b/Ports/cmake/patches/0002-SerenityOS-Add-Platform-module.patch deleted file mode 100644 index 2a043b1c6e1..00000000000 --- a/Ports/cmake/patches/0002-SerenityOS-Add-Platform-module.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Andrew Kaster -Date: Sun, 2 Jan 2022 23:19:40 -0700 -Subject: [PATCH] SerenityOS: Add Platform module ---- - Modules/Platform/SerenityOS-Clang-ASM.cmake | 2 ++ - Modules/Platform/SerenityOS-Clang-C.cmake | 2 ++ - Modules/Platform/SerenityOS-Clang-CXX.cmake | 2 ++ - Modules/Platform/SerenityOS-GNU-ASM.cmake | 2 ++ - Modules/Platform/SerenityOS-GNU-C.cmake | 2 ++ - Modules/Platform/SerenityOS-GNU-CXX.cmake | 2 ++ - Modules/Platform/SerenityOS-GNU.cmake | 24 +++++++++++++++++++++ - Modules/Platform/SerenityOS.cmake | 12 +++++++++++ - 8 files changed, 48 insertions(+) - create mode 100644 Modules/Platform/SerenityOS-Clang-ASM.cmake - create mode 100644 Modules/Platform/SerenityOS-Clang-C.cmake - create mode 100644 Modules/Platform/SerenityOS-Clang-CXX.cmake - create mode 100644 Modules/Platform/SerenityOS-GNU-ASM.cmake - create mode 100644 Modules/Platform/SerenityOS-GNU-C.cmake - create mode 100644 Modules/Platform/SerenityOS-GNU-CXX.cmake - create mode 100644 Modules/Platform/SerenityOS-GNU.cmake - create mode 100644 Modules/Platform/SerenityOS.cmake - -diff --git a/Modules/Platform/SerenityOS-Clang-ASM.cmake b/Modules/Platform/SerenityOS-Clang-ASM.cmake -new file mode 100644 -index 00000000..ba1e18cf ---- /dev/null -+++ b/Modules/Platform/SerenityOS-Clang-ASM.cmake -@@ -0,0 +1,2 @@ -+include(Platform/SerenityOS-GNU) -+__serenity_compiler_gnu(ASM) -diff --git a/Modules/Platform/SerenityOS-Clang-C.cmake b/Modules/Platform/SerenityOS-Clang-C.cmake -new file mode 100644 -index 00000000..791a1978 ---- /dev/null -+++ b/Modules/Platform/SerenityOS-Clang-C.cmake -@@ -0,0 +1,2 @@ -+include(Platform/SerenityOS-GNU) -+__serenity_compiler_gnu(C) -diff --git a/Modules/Platform/SerenityOS-Clang-CXX.cmake b/Modules/Platform/SerenityOS-Clang-CXX.cmake -new file mode 100644 -index 00000000..084e319f ---- /dev/null -+++ b/Modules/Platform/SerenityOS-Clang-CXX.cmake -@@ -0,0 +1,2 @@ -+include(Platform/SerenityOS-GNU) -+__serenity_compiler_gnu(CXX) -diff --git a/Modules/Platform/SerenityOS-GNU-ASM.cmake b/Modules/Platform/SerenityOS-GNU-ASM.cmake -new file mode 100644 -index 00000000..ba1e18cf ---- /dev/null -+++ b/Modules/Platform/SerenityOS-GNU-ASM.cmake -@@ -0,0 +1,2 @@ -+include(Platform/SerenityOS-GNU) -+__serenity_compiler_gnu(ASM) -diff --git a/Modules/Platform/SerenityOS-GNU-C.cmake b/Modules/Platform/SerenityOS-GNU-C.cmake -new file mode 100644 -index 00000000..791a1978 ---- /dev/null -+++ b/Modules/Platform/SerenityOS-GNU-C.cmake -@@ -0,0 +1,2 @@ -+include(Platform/SerenityOS-GNU) -+__serenity_compiler_gnu(C) -diff --git a/Modules/Platform/SerenityOS-GNU-CXX.cmake b/Modules/Platform/SerenityOS-GNU-CXX.cmake -new file mode 100644 -index 00000000..084e319f ---- /dev/null -+++ b/Modules/Platform/SerenityOS-GNU-CXX.cmake -@@ -0,0 +1,2 @@ -+include(Platform/SerenityOS-GNU) -+__serenity_compiler_gnu(CXX) -diff --git a/Modules/Platform/SerenityOS-GNU.cmake b/Modules/Platform/SerenityOS-GNU.cmake -new file mode 100644 -index 00000000..ed39477a ---- /dev/null -+++ b/Modules/Platform/SerenityOS-GNU.cmake -@@ -0,0 +1,24 @@ -+# This module is shared by multiple languages; use include blocker. -+include_guard() -+ -+set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,separate-code,-z,max-page-size=0x1000") -+ -+macro(__serenity_compiler_gnu lang) -+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-rpath,") -+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") -+ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_${lang}_FLAG "-Wl,-rpath-link,") -+ set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-soname,") -+ set(CMAKE_EXE_EXPORTS_${lang}_FLAG "-Wl,--export-dynamic") -+ -+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared -Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,separate-code") -+ -+ # Initialize link type selection flags. These flags are used when -+ # building a shared library, shared module, or executable that links -+ # to other libraries to select whether to use the static or shared -+ # versions of the libraries. -+ foreach(type SHARED_LIBRARY SHARED_MODULE EXE) -+ set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic") -+ set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic") -+ endforeach() -+ -+endmacro() -diff --git a/Modules/Platform/SerenityOS.cmake b/Modules/Platform/SerenityOS.cmake -new file mode 100644 -index 00000000..541620c2 ---- /dev/null -+++ b/Modules/Platform/SerenityOS.cmake -@@ -0,0 +1,12 @@ -+ -+set(SERENITYOS 1) -+ -+set(CMAKE_DL_LIBS "-ldl") -+set(CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN "\$ORIGIN") -+set(CMAKE_SHARED_LIBRARY_SUFFIX ".so") -+ -+# Shared libraries with no builtin soname may not be linked safely by -+# specifying the file path. -+set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1) -+ -+include(Platform/UnixPaths) diff --git a/Ports/cmake/patches/0004-cmcurl-Use-struct-stat-and-include-sys-stat.h.patch b/Ports/cmake/patches/0002-cmcurl-Use-struct-stat-and-include-sys-stat.h.patch similarity index 86% rename from Ports/cmake/patches/0004-cmcurl-Use-struct-stat-and-include-sys-stat.h.patch rename to Ports/cmake/patches/0002-cmcurl-Use-struct-stat-and-include-sys-stat.h.patch index d40621b1d16..f60860b08cc 100644 --- a/Ports/cmake/patches/0004-cmcurl-Use-struct-stat-and-include-sys-stat.h.patch +++ b/Ports/cmake/patches/0002-cmcurl-Use-struct-stat-and-include-sys-stat.h.patch @@ -14,10 +14,10 @@ For unknown reasons, curl_setup_once.h does not include sys/stat.h. This patch i 1 file changed, 1 insertion(+) diff --git a/Utilities/cmcurl/lib/curl_setup.h b/Utilities/cmcurl/lib/curl_setup.h -index 7421b670..b06c19d8 100644 +index c3ad25f999859dabc1c0c7846339c73aaafabded..0b6579aa7e64f7a0857fbbd47c39e9a991d1e72f 100644 --- a/Utilities/cmcurl/lib/curl_setup.h +++ b/Utilities/cmcurl/lib/curl_setup.h -@@ -403,6 +403,7 @@ +@@ -415,6 +415,7 @@ #endif #ifndef struct_stat diff --git a/Ports/cmake/patches/0005-CMake-Disable-tests.patch b/Ports/cmake/patches/0005-CMake-Disable-tests.patch deleted file mode 100644 index f55b2b0f5ad..00000000000 --- a/Ports/cmake/patches/0005-CMake-Disable-tests.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ali Mohammad Pur -Date: Wed, 12 Jan 2022 22:18:57 +0330 -Subject: [PATCH] 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 b2ab30e1..24127b09 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -733,7 +733,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. diff --git a/Ports/cmake/patches/ReadMe.md b/Ports/cmake/patches/ReadMe.md index 6f368c7a17a..bdb6c618fc3 100644 --- a/Ports/cmake/patches/ReadMe.md +++ b/Ports/cmake/patches/ReadMe.md @@ -1,21 +1,6 @@ # Patches for cmake on SerenityOS -## `0001-kwsys-Don-t-use-siginfo.patch` - -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 - -## `0002-SerenityOS-Add-Platform-module.patch` - -SerenityOS: Add Platform module - -## `0003-cmcurl-Include-unistd.patch` +## `0001-cmcurl-Include-unistd.patch` cmcurl: Include unistd @@ -26,7 +11,7 @@ Everyone gets this wrong. Most platforms are very lax with these includes, but w - [ ] Resolves issue(s) with our side of things - [ ] Hack -## `0004-cmcurl-Use-struct-stat-and-include-sys-stat.h.patch` +## `0002-cmcurl-Use-struct-stat-and-include-sys-stat.h.patch` cmcurl: Use struct stat and include sys/stat.h @@ -37,14 +22,3 @@ For unknown reasons, curl_setup_once.h does not include sys/stat.h. This patch i - [X] Resolves issue(s) with our side of things - [X] Hack -## `0005-CMake-Disable-tests.patch` - -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 -