early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

51
externals/vcpkg/ports/zeromq/fix-arm.patch vendored Executable file
View File

@@ -0,0 +1,51 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd3d8eb..c08cad9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -551,6 +551,8 @@ if(ZMQ_HAVE_WINDOWS)
set(CMAKE_REQUIRED_LIBRARIES "")
# TODO: This not the symbol we're looking for. What is the symbol?
check_library_exists(ws2 fopen "" HAVE_WS2)
+
+ check_cxx_symbol_exists(CryptAcquireContext "windows.h;wincrypt.h" HAVE_ADVAPI32)
else()
check_cxx_symbol_exists(if_nametoindex net/if.h HAVE_IF_NAMETOINDEX)
check_cxx_symbol_exists(SO_PEERCRED sys/socket.h ZMQ_HAVE_SO_PEERCRED)
@@ -1452,6 +1454,10 @@ if(BUILD_SHARED)
elseif(HAVE_WS2)
target_link_libraries(libzmq ws2)
endif()
+
+ if (HAVE_ADVAPI32)
+ target_link_libraries(libzmq advapi32)
+ endif()
if(HAVE_RPCRT4)
target_link_libraries(libzmq rpcrt4)
@@ -1497,6 +1503,10 @@ if(BUILD_STATIC)
elseif(HAVE_WS2)
target_link_libraries(libzmq-static ws2)
endif()
+
+ if (HAVE_ADVAPI32)
+ target_link_libraries(libzmq-static advapi32)
+ endif()
if(HAVE_RPCRT4)
target_link_libraries(libzmq-static rpcrt4)
diff --git a/src/clock.cpp b/src/clock.cpp
index 79522ad..0667c59 100644
--- a/src/clock.cpp
+++ b/src/clock.cpp
@@ -41,8 +41,10 @@
#include <cmnintrin.h>
#else
#include <intrin.h>
-#if defined(_M_ARM) || defined(_M_ARM64)
+#if defined(_M_ARM)
#include <arm_neon.h>
+#elif defined(_M_ARM64)
+#include <arm64_neon.h>
#endif
#endif
#endif

68
externals/vcpkg/ports/zeromq/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,68 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zeromq/libzmq
REF v4.3.4
SHA512 ad828b1ab5a87983285a6b44b08240816ed1c4e2c73306ab1a851bf80df1892b5e2f92064a49fbadc1f4c75043625ace77dd25b64d5d1c2a7d1d61cc916fba0b
PATCHES
fix-arm.patch
zeromq-libzmq-4310-64e6d37ab8.diff # https://patch-diff.githubusercontent.com/raw/zeromq/libzmq/pull/4310.diff
zeromq-libzmq-4311-2b04e0ce47.diff # https://patch-diff.githubusercontent.com/raw/zeromq/libzmq/pull/4311.diff
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
sodium WITH_LIBSODIUM
draft ENABLE_DRAFTS
websockets-sha1 ENABLE_WS
)
set(PLATFORM_OPTIONS)
if(VCPKG_TARGET_IS_MINGW)
set(PLATFORM_OPTIONS "-DCMAKE_SYSTEM_VERSION=6.0")
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DZMQ_BUILD_TESTS=OFF
-DBUILD_STATIC=${BUILD_STATIC}
-DBUILD_SHARED=${BUILD_SHARED}
-DWITH_PERF_TOOL=OFF
-DWITH_DOCS=OFF
-DWITH_NSS=OFF
-DWITH_LIBSODIUM_STATIC=${BUILD_STATIC}
${FEATURE_OPTIONS}
${PLATFORM_OPTIONS}
OPTIONS_DEBUG
"-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
else()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ZeroMQ)
endif()
file(COPY
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
# Handle copyright
file(RENAME "${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/share/zmq")
vcpkg_fixup_pkgconfig()

View File

@@ -0,0 +1,9 @@
_find_package(${ARGS})
if(TARGET libzmq AND NOT TARGET libzmq-static)
add_library(libzmq-static INTERFACE IMPORTED)
set_target_properties(libzmq-static PROPERTIES INTERFACE_LINK_LIBRARIES libzmq)
elseif(TARGET libzmq-static AND NOT TARGET libzmq)
add_library(libzmq INTERFACE IMPORTED)
set_target_properties(libzmq PROPERTIES INTERFACE_LINK_LIBRARIES libzmq-static)
endif()

33
externals/vcpkg/ports/zeromq/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,33 @@
{
"name": "zeromq",
"version": "4.3.4",
"port-version": 5,
"description": "The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products",
"homepage": "https://github.com/zeromq/libzmq",
"license": "LGPL-3.0-only",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"draft": {
"description": "Build and install draft APIs"
},
"sodium": {
"description": "Using libsodium for CURVE security",
"dependencies": [
"libsodium"
]
},
"websockets-sha1": {
"description": "Enable WebSocket transport through builtin sha1 (libzmq#3676)"
}
}
}

View File

@@ -0,0 +1,55 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c983c6698..21bcd414a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,7 @@ include(CheckCSourceCompiles)
include(CheckCSourceRuns)
include(CMakeDependentOption)
include(CheckCXXSymbolExists)
+include(CheckStructHasMember)
include(CheckTypeSize)
include(FindThreads)
include(GNUInstallDirs)
@@ -495,8 +496,12 @@ endif()
if(NOT WIN32)
set(ZMQ_HAVE_IPC 1)
+ set(ZMQ_HAVE_STRUCT_SOCKADDR_UN 1)
else()
check_include_files("winsock2.h;afunix.h" ZMQ_HAVE_IPC)
+ if(ZMQ_HAVE_IPC)
+ check_struct_has_member("struct sockaddr_un" sun_path "winsock2.h;afunix.h" ZMQ_HAVE_STRUCT_SOCKADDR_UN)
+ endif()
endif()
# ##################### BEGIN condition_variable_t selection
diff --git a/builds/cmake/platform.hpp.in b/builds/cmake/platform.hpp.in
index 2d23e8b288..18064362fe 100644
--- a/builds/cmake/platform.hpp.in
+++ b/builds/cmake/platform.hpp.in
@@ -59,6 +59,7 @@
#cmakedefine ZMQ_HAVE_LIBBSD
#cmakedefine ZMQ_HAVE_IPC
+#cmakedefine ZMQ_HAVE_STRUCT_SOCKADDR_UN
#cmakedefine ZMQ_USE_BUILTIN_SHA1
#cmakedefine ZMQ_USE_NSS
diff --git a/src/windows.hpp b/src/windows.hpp
index 11c7581dee..24cce83d11 100644
--- a/src/windows.hpp
+++ b/src/windows.hpp
@@ -98,3 +98,13 @@ static inline int poll (struct pollfd *pfd, unsigned long nfds, int timeout)
#define snprintf(buffer_, count_, format_, ...) \
_snprintf_s (buffer_, count_, _TRUNCATE, format_, __VA_ARGS__)
#endif
+
+// Workaround missing struct sockaddr_un in afunix.h.
+// Fix #3949.
+#if defined(ZMQ_HAVE_IPC) && !defined(ZMQ_HAVE_STRUCT_SOCKADDR_UN)
+struct sockaddr_un
+{
+ ADDRESS_FAMILY sun_family; /* AF_UNIX */
+ char sun_path[108]; /* pathname */
+};
+#endif

View File

@@ -0,0 +1,18 @@
diff --git a/src/windows.hpp b/src/windows.hpp
index 24cce83d11..c6d625188d 100644
--- a/src/windows.hpp
+++ b/src/windows.hpp
@@ -90,7 +90,6 @@ static inline int poll (struct pollfd *pfd, unsigned long nfds, int timeout)
#ifndef AI_NUMERICSERV
#define AI_NUMERICSERV 0x0400
#endif
-#endif
// In MSVC prior to v14, snprintf is not available
// The closest implementation is the _snprintf_s function
@@ -108,3 +107,5 @@ struct sockaddr_un
char sun_path[108]; /* pathname */
};
#endif
+
+#endif