aboutsummaryrefslogtreecommitdiff
path: root/depends/patches
diff options
context:
space:
mode:
Diffstat (limited to 'depends/patches')
-rw-r--r--depends/patches/expat/cmake_minimum.patch13
-rw-r--r--depends/patches/libevent/cmake_fixups.patch35
-rw-r--r--depends/patches/libevent/fix_mingw_link.patch25
-rw-r--r--depends/patches/qt/darwin_no_libm.patch17
-rw-r--r--depends/patches/qt/dont_hardcode_pwd.patch14
-rw-r--r--depends/patches/qt/qt.pro4
-rw-r--r--depends/patches/zeromq/builtin_sha1.patch17
-rw-r--r--depends/patches/zeromq/cacheline_undefined.patch15
-rw-r--r--depends/patches/zeromq/cmake_minimum.patch18
-rw-r--r--depends/patches/zeromq/fix_have_windows.patch54
-rw-r--r--depends/patches/zeromq/fix_mingw_link.patch31
-rw-r--r--depends/patches/zeromq/macos_mktemp_check.patch16
-rw-r--r--depends/patches/zeromq/no_librt.patch54
-rw-r--r--depends/patches/zeromq/openbsd_kqueue_headers.patch24
14 files changed, 326 insertions, 11 deletions
diff --git a/depends/patches/expat/cmake_minimum.patch b/depends/patches/expat/cmake_minimum.patch
new file mode 100644
index 0000000000..a849a82a33
--- /dev/null
+++ b/depends/patches/expat/cmake_minimum.patch
@@ -0,0 +1,13 @@
+build: set minimum required CMake to 3.16
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,7 +33,7 @@
+ # Unlike most of Expat,
+ # this file is copyrighted under the BSD-license for buildsystem files of KDE.
+
+-cmake_minimum_required(VERSION 3.1.3)
++cmake_minimum_required(VERSION 3.16)
+
+ # This allows controlling documented build time switches
+ # when Expat is pulled in using the add_subdirectory function, e.g.
diff --git a/depends/patches/libevent/cmake_fixups.patch b/depends/patches/libevent/cmake_fixups.patch
new file mode 100644
index 0000000000..d80c1a9489
--- /dev/null
+++ b/depends/patches/libevent/cmake_fixups.patch
@@ -0,0 +1,35 @@
+cmake: set minimum version to 3.5
+
+Fix generated pkg-config files, see
+https://github.com/libevent/libevent/pull/1165.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -19,7 +19,7 @@
+ # start libevent.sln
+ #
+
+-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
++cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+
+ if (POLICY CMP0054)
+ cmake_policy(SET CMP0054 NEW)
+diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake
+index 04f5837e..d8ea42c4 100644
+--- a/cmake/AddEventLibrary.cmake
++++ b/cmake/AddEventLibrary.cmake
+@@ -20,12 +20,12 @@ macro(generate_pkgconfig LIB_NAME)
+
+ set(LIBS "")
+ foreach (LIB ${LIB_PLATFORM})
+- set(LIBS "${LIBS} -L${LIB}")
++ set(LIBS "${LIBS} -l${LIB}")
+ endforeach()
+
+ set(OPENSSL_LIBS "")
+ foreach(LIB ${OPENSSL_LIBRARIES})
+- set(OPENSSL_LIBS "${OPENSSL_LIBS} -L${LIB}")
++ set(OPENSSL_LIBS "${OPENSSL_LIBS} -l${LIB}")
+ endforeach()
+
+ configure_file("lib${LIB_NAME}.pc.in" "lib${LIB_NAME}.pc" @ONLY)
diff --git a/depends/patches/libevent/fix_mingw_link.patch b/depends/patches/libevent/fix_mingw_link.patch
new file mode 100644
index 0000000000..41cbd463c9
--- /dev/null
+++ b/depends/patches/libevent/fix_mingw_link.patch
@@ -0,0 +1,25 @@
+commit d108099913c5fdbe518f3f4d711f248f8522bd10
+Author: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
+Date: Mon Apr 22 06:39:35 2024 +0100
+
+ build: Add `Iphlpapi` to `Libs.private` in `*.pc` files on Windows
+
+ It has been required since https://github.com/libevent/libevent/pull/923
+ at least for the `if_nametoindex` call.
+
+ See https://github.com/libevent/libevent/pull/1622.
+
+
+diff --git a/configure.ac b/configure.ac
+index d00e063a..cd1fce37 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -906,7 +906,7 @@ if(WIN32)
+ list(APPEND HDR_PRIVATE WIN32-Code/getopt.h)
+
+ set(EVENT__DNS_USE_FTIME_FOR_ID 1)
+- set(LIB_PLATFORM ws2_32 shell32 advapi32)
++ set(LIB_PLATFORM ws2_32 shell32 advapi32 iphlpapi)
+ add_definitions(
+ -D_CRT_SECURE_NO_WARNINGS
+ -D_CRT_NONSTDC_NO_DEPRECATE)
diff --git a/depends/patches/qt/darwin_no_libm.patch b/depends/patches/qt/darwin_no_libm.patch
new file mode 100644
index 0000000000..38a94beeb7
--- /dev/null
+++ b/depends/patches/qt/darwin_no_libm.patch
@@ -0,0 +1,17 @@
+build: remove explicit -lm link from qttools
+
+This causes issues with at least the macOS cross build, and shouldn't
+actually be required anywhere else. GCC with libstdc++ will already get libm.
+
+--- a/qtbase/src/corelib/tools/tools.pri
++++ b/qtbase/src/corelib/tools/tools.pri
+@@ -111,9 +111,6 @@ qtConfig(easingcurve) {
+ tools/qtimeline.cpp
+ }
+
+-# Note: libm should be present by default becaue this is C++
+-unix:!macx-icc:!vxworks:!haiku:!integrity:!wasm: LIBS_PRIVATE += -lm
+-
+ TR_EXCLUDE += ../3rdparty/*
+
+ # MIPS DSP
diff --git a/depends/patches/qt/dont_hardcode_pwd.patch b/depends/patches/qt/dont_hardcode_pwd.patch
index a74e9cb098..f6955b2f20 100644
--- a/depends/patches/qt/dont_hardcode_pwd.patch
+++ b/depends/patches/qt/dont_hardcode_pwd.patch
@@ -1,13 +1,13 @@
-commit 0e953866fc4672486e29e1ba6d83b4207e7b2f0b
-Author: fanquake <fanquake@gmail.com>
-Date: Tue Aug 18 15:09:06 2020 +0800
+Do not assume FHS in scripts
- Don't hardcode pwd path
+On systems that do not follow the Filesystem Hierarchy Standard, such as
+guix, the hardcoded `/bin/pwd` will fail to be found so that the script
+will fail.
- Let a man use his builtins if he wants to! Also, removes the unnecessary
- assumption that pwd lives under /bin/pwd.
+Use `pwd`, instead, so that the command can be found through the normal
+path search mechanism.
- See #15581.
+See https://github.com/qt/qtbase/commit/3388de698bfb9bbc456c08f03e83bf3e749df35c.
diff --git a/qtbase/configure b/qtbase/configure
index 08b49a8d..faea5b55 100755
diff --git a/depends/patches/qt/qt.pro b/depends/patches/qt/qt.pro
index 8f2e900a84..6d8b7fdb6a 100644
--- a/depends/patches/qt/qt.pro
+++ b/depends/patches/qt/qt.pro
@@ -3,10 +3,6 @@ cache(, super)
!QTDIR_build: cache(CONFIG, add, $$list(QTDIR_build))
-prl = no_install_prl
-CONFIG += $$prl
-cache(CONFIG, add stash, prl)
-
TEMPLATE = subdirs
SUBDIRS = qtbase qttools qttranslations
diff --git a/depends/patches/zeromq/builtin_sha1.patch b/depends/patches/zeromq/builtin_sha1.patch
new file mode 100644
index 0000000000..5481c9dbdd
--- /dev/null
+++ b/depends/patches/zeromq/builtin_sha1.patch
@@ -0,0 +1,17 @@
+Don't use builtin sha1 if not using ws
+
+The builtin SHA1 (ZMQ_USE_BUILTIN_SHA1) is only used in the websocket
+engine (ws_engine.cpp).
+Upstreamed in https://github.com/zeromq/libzmq/pull/4670.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -234,7 +234,7 @@ if(NOT ZMQ_USE_GNUTLS)
+ endif()
+ endif()
+ endif()
+- if(NOT ZMQ_USE_NSS)
++ if(ENABLE_WS AND NOT ZMQ_USE_NSS)
+ list(APPEND sources ${CMAKE_CURRENT_SOURCE_DIR}/external/sha1/sha1.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/external/sha1/sha1.h)
+ message(STATUS "Using builtin sha1")
diff --git a/depends/patches/zeromq/cacheline_undefined.patch b/depends/patches/zeromq/cacheline_undefined.patch
new file mode 100644
index 0000000000..02bd2a5fe5
--- /dev/null
+++ b/depends/patches/zeromq/cacheline_undefined.patch
@@ -0,0 +1,15 @@
+Use proper STREQUAL instead of EQUAL to compare strings.txt
+
+See: https://github.com/zeromq/libzmq/pull/4711.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -476,7 +476,7 @@ execute_process(
+ if(CACHELINE_SIZE STREQUAL ""
+ OR CACHELINE_SIZE EQUAL 0
+ OR CACHELINE_SIZE EQUAL -1
+- OR CACHELINE_SIZE EQUAL "undefined")
++ OR CACHELINE_SIZE STREQUAL "undefined")
+ set(ZMQ_CACHELINE_SIZE 64)
+ else()
+ set(ZMQ_CACHELINE_SIZE ${CACHELINE_SIZE})
diff --git a/depends/patches/zeromq/cmake_minimum.patch b/depends/patches/zeromq/cmake_minimum.patch
new file mode 100644
index 0000000000..d6b6b5fae7
--- /dev/null
+++ b/depends/patches/zeromq/cmake_minimum.patch
@@ -0,0 +1,18 @@
+Set a more sane cmake_minimum_required.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,12 +1,7 @@
+ # CMake build script for ZeroMQ
++cmake_minimum_required(VERSION 3.16)
+ project(ZeroMQ)
+
+-if(${CMAKE_SYSTEM_NAME} STREQUAL Darwin)
+- cmake_minimum_required(VERSION 3.0.2)
+-else()
+- cmake_minimum_required(VERSION 2.8.12)
+-endif()
+-
+ include(CheckIncludeFiles)
+ include(CheckCCompilerFlag)
+ include(CheckCXXCompilerFlag)
diff --git a/depends/patches/zeromq/fix_have_windows.patch b/depends/patches/zeromq/fix_have_windows.patch
new file mode 100644
index 0000000000..e77ef31adf
--- /dev/null
+++ b/depends/patches/zeromq/fix_have_windows.patch
@@ -0,0 +1,54 @@
+This fixes several instances where _MSC_VER was
+used to determine whether to use afunix.h or not.
+
+See https://github.com/zeromq/libzmq/pull/4678.
+--- a/src/ipc_address.hpp
++++ b/src/ipc_address.hpp
+@@ -7,7 +7,7 @@
+
+ #include <string>
+
+-#if defined _MSC_VER
++#if defined ZMQ_HAVE_WINDOWS
+ #include <afunix.h>
+ #else
+ #include <sys/socket.h>
+diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp
+index 3f988745..ed2a0645 100644
+--- a/src/ipc_connecter.cpp
++++ b/src/ipc_connecter.cpp
+@@ -16,7 +16,7 @@
+ #include "ipc_address.hpp"
+ #include "session_base.hpp"
+
+-#ifdef _MSC_VER
++#if defined ZMQ_HAVE_WINDOWS
+ #include <afunix.h>
+ #else
+ #include <unistd.h>
+diff --git a/src/ipc_listener.cpp b/src/ipc_listener.cpp
+index 50126040..5428579b 100644
+--- a/src/ipc_listener.cpp
++++ b/src/ipc_listener.cpp
+@@ -17,7 +17,7 @@
+ #include "socket_base.hpp"
+ #include "address.hpp"
+
+-#ifdef _MSC_VER
++#ifdef ZMQ_HAVE_WINDOWS
+ #ifdef ZMQ_IOTHREAD_POLLER_USE_SELECT
+ #error On Windows, IPC does not work with POLLER=select, use POLLER=epoll instead, or disable IPC transport
+ #endif
+diff --git a/tests/testutil.cpp b/tests/testutil.cpp
+index bdc80283..6f21e8f6 100644
+--- a/tests/testutil.cpp
++++ b/tests/testutil.cpp
+@@ -7,7 +7,7 @@
+
+ #if defined _WIN32
+ #include "../src/windows.hpp"
+-#if defined _MSC_VER
++#if defined ZMQ_HAVE_WINDOWS
+ #if defined ZMQ_HAVE_IPC
+ #include <direct.h>
+ #include <afunix.h>
diff --git a/depends/patches/zeromq/fix_mingw_link.patch b/depends/patches/zeromq/fix_mingw_link.patch
new file mode 100644
index 0000000000..1434557dc7
--- /dev/null
+++ b/depends/patches/zeromq/fix_mingw_link.patch
@@ -0,0 +1,31 @@
+Fix CMake-generated `libzmq.pc` file
+
+This change mirrors the Autotools-based build system behavior for
+cross-compiling for Windows with static linking.
+
+See https://github.com/zeromq/libzmq/pull/4706.
+
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 03462271..0315e606 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -546,12 +546,18 @@ if(ZMQ_HAVE_WINDOWS)
+ # Cannot use check_library_exists because the symbol is always declared as char(*)(void)
+ set(CMAKE_REQUIRED_LIBRARIES "ws2_32.lib")
+ check_cxx_symbol_exists(WSAStartup "winsock2.h" HAVE_WS2_32)
++ if(HAVE_WS2_32)
++ set(pkg_config_libs_private "${pkg_config_libs_private} -lws2_32")
++ endif()
+
+ set(CMAKE_REQUIRED_LIBRARIES "rpcrt4.lib")
+ check_cxx_symbol_exists(UuidCreateSequential "rpc.h" HAVE_RPCRT4)
+
+ set(CMAKE_REQUIRED_LIBRARIES "iphlpapi.lib")
+ check_cxx_symbol_exists(GetAdaptersAddresses "winsock2.h;iphlpapi.h" HAVE_IPHLAPI)
++ if(HAVE_IPHLAPI)
++ set(pkg_config_libs_private "${pkg_config_libs_private} -liphlpapi")
++ endif()
+ check_cxx_symbol_exists(if_nametoindex "iphlpapi.h" HAVE_IF_NAMETOINDEX)
+
+ set(CMAKE_REQUIRED_LIBRARIES "")
diff --git a/depends/patches/zeromq/macos_mktemp_check.patch b/depends/patches/zeromq/macos_mktemp_check.patch
new file mode 100644
index 0000000000..c703abcd71
--- /dev/null
+++ b/depends/patches/zeromq/macos_mktemp_check.patch
@@ -0,0 +1,16 @@
+build: fix mkdtemp check on macOS
+
+On macOS, mkdtemp is in unistd.h. Fix the CMake check so that is works.
+Upstreamed in https://github.com/zeromq/libzmq/pull/4668.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -599,7 +599,7 @@ if(NOT MSVC)
+
+ check_cxx_symbol_exists(fork unistd.h HAVE_FORK)
+ check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME)
+- check_cxx_symbol_exists(mkdtemp stdlib.h HAVE_MKDTEMP)
++ check_cxx_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP)
+ check_cxx_symbol_exists(accept4 sys/socket.h HAVE_ACCEPT4)
+ check_cxx_symbol_exists(strnlen string.h HAVE_STRNLEN)
+ else()
diff --git a/depends/patches/zeromq/no_librt.patch b/depends/patches/zeromq/no_librt.patch
new file mode 100644
index 0000000000..b63854c95b
--- /dev/null
+++ b/depends/patches/zeromq/no_librt.patch
@@ -0,0 +1,54 @@
+We don't use librt, so don't try and link against it.
+
+Related to: https://github.com/zeromq/libzmq/pull/4702.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 03462271..87ceab3c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -564,13 +564,6 @@ else()
+ check_cxx_symbol_exists(SO_BUSY_POLL sys/socket.h ZMQ_HAVE_BUSY_POLL)
+ endif()
+
+-if(NOT MINGW)
+- find_library(RT_LIBRARY rt)
+- if(RT_LIBRARY)
+- set(pkg_config_libs_private "${pkg_config_libs_private} -lrt")
+- endif()
+-endif()
+-
+ find_package(Threads)
+
+ if(WIN32 AND NOT CYGWIN)
+@@ -588,9 +581,7 @@ if(WIN32 AND NOT CYGWIN)
+ endif()
+
+ if(NOT MSVC)
+- set(CMAKE_REQUIRED_LIBRARIES rt)
+ check_cxx_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME)
+- set(CMAKE_REQUIRED_LIBRARIES)
+
+ check_cxx_symbol_exists(fork unistd.h HAVE_FORK)
+ check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME)
+@@ -1503,10 +1494,6 @@ if(BUILD_SHARED)
+ target_link_libraries(libzmq iphlpapi)
+ endif()
+
+- if(RT_LIBRARY)
+- target_link_libraries(libzmq -lrt)
+- endif()
+-
+ if(norm_FOUND)
+ target_link_libraries(libzmq norm::norm)
+ endif()
+@@ -1553,10 +1540,6 @@ if(BUILD_STATIC)
+ target_link_libraries(libzmq-static iphlpapi)
+ endif()
+
+- if(RT_LIBRARY)
+- target_link_libraries(libzmq-static -lrt)
+- endif()
+-
+ if(CMAKE_SYSTEM_NAME MATCHES "QNX")
+ add_definitions(-DUNITY_EXCLUDE_MATH_H)
+ endif()
diff --git a/depends/patches/zeromq/openbsd_kqueue_headers.patch b/depends/patches/zeromq/openbsd_kqueue_headers.patch
new file mode 100644
index 0000000000..7000e209fe
--- /dev/null
+++ b/depends/patches/zeromq/openbsd_kqueue_headers.patch
@@ -0,0 +1,24 @@
+commit ff231d267370493814f933d151441866bf1e200b
+Author: Min RK <benjaminrk@gmail.com>
+Date: Fri Feb 23 13:21:08 2024 +0100
+
+ Problem: cmake search for kqueue missing headers
+
+ Solution: include sys/types.h and sys/time.h as documented by kqueue
+ and used in autotools
+
+ fixes kqueue detection on openbsd
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f956f3fd..814d5d46 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -380,7 +380,7 @@ endif(WIN32)
+
+ if(NOT MSVC)
+ if(POLLER STREQUAL "")
+- check_cxx_symbol_exists(kqueue sys/event.h HAVE_KQUEUE)
++ check_cxx_symbol_exists(kqueue "sys/types.h;sys/event.h;sys/time.h" HAVE_KQUEUE)
+ if(HAVE_KQUEUE)
+ set(POLLER "kqueue")
+ endif()