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

13
externals/vcpkg/ports/folly/FindLZ4.cmake vendored Executable file
View File

@@ -0,0 +1,13 @@
find_path(LZ4_INCLUDE_DIR lz4.h)
find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
include(SelectLibraryConfigurations)
select_library_configurations(LZ4)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
LZ4 DEFAULT_MSG
LZ4_LIBRARY LZ4_INCLUDE_DIR
)

13
externals/vcpkg/ports/folly/FindSnappy.cmake vendored Executable file
View File

@@ -0,0 +1,13 @@
find_path(SNAPPY_INCLUDE_DIR snappy.h)
find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd)
find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy)
include(SelectLibraryConfigurations)
select_library_configurations(SNAPPY)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
SNAPPY DEFAULT_MSG
SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR
)

22
externals/vcpkg/ports/folly/boost-1.70.patch vendored Executable file
View File

@@ -0,0 +1,22 @@
diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp
index 2126ec0..ef82ade 100644
--- a/folly/portability/PThread.cpp
+++ b/folly/portability/PThread.cpp
@@ -20,6 +20,8 @@
#include <boost/thread/exceptions.hpp>
#include <boost/thread/tss.hpp>
#include <boost/version.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/thread/thread_only.hpp>
#include <errno.h>
@@ -691,7 +693,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) {
boost::detail::thread::cleanup_caller_t(),
boost::detail::thread::cleanup_func_t(),
#else
- boost::shared_ptr<boost::detail::tss_cleanup_function>(),
+ 0,0,
#endif
const_cast<void*>(value),
false);

View File

@@ -0,0 +1,34 @@
diff --git a/folly/portability/Windows.h b/folly/portability/Windows.h
index 86fd0f9..ccad11e 100644
--- a/folly/portability/Windows.h
+++ b/folly/portability/Windows.h
@@ -32,24 +32,17 @@
// disabled to ensure all of the normal names get declared properly.
#include <stdio.h>
-#ifndef __STDC__
-/* nolint */
-#define __STDC__ 1
#pragma push_macro("_CRT_DECLARE_NONSTDC_NAMES")
#ifdef _CRT_DECLARE_NONSTDC_NAMES
#undef _CRT_DECLARE_NONSTDC_NAMES
#endif
+
+#include <corecrt.h>
#pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES")
-#undef _CRT_INTERNAL_NONSTDC_NAMES
-#include <direct.h> // @manual nolint
-#include <io.h> // @manual nolint
-#undef __STDC__
+#define _CRT_INTERNAL_NONSTDC_NAMES 0
+#include <direct.h>
+#include <io.h>
#pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES")
-#pragma pop_macro("_CRT_DECLARE_NONSTDC_NAMES")
-#else
-#include <direct.h> // @manual nolint
-#include <io.h> // @manual nolint
-#endif
#if defined(min) || defined(max)
#error Windows.h needs to be included by this header, or else NOMINMAX needs \

View File

@@ -0,0 +1,12 @@
diff --git a/CMake/FollyCompilerMSVC.cmake b/CMake/FollyCompilerMSVC.cmake
index ec2ce1a1d..16deda71c 100644
--- a/CMake/FollyCompilerMSVC.cmake
+++ b/CMake/FollyCompilerMSVC.cmake
@@ -289,6 +289,7 @@ function(apply_folly_compile_options_to_target THETARGET)
# And the extra defines:
target_compile_definitions(${THETARGET}
PUBLIC
+ NOMINMAX
_CRT_NONSTDC_NO_WARNINGS # Don't deprecate posix names of functions.
_CRT_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps.
_SCL_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps.

94
externals/vcpkg/ports/folly/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,94 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
# Required to run build/generate_escape_tables.py et al.
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/folly
REF v2022.03.21.00
SHA512 4e0fda55f007179883af30024fe1d389642159b1b4c915f7ef1a3c1003c8c52e2370f53ffa79d5fa75533d33becfb946d2bcbb2abdc62b9a297f977403d13dd7
HEAD_REF main
PATCHES
reorder-glog-gflags.patch
disable-non-underscore-posix-names.patch
boost-1.70.patch
fix-windows-minmax.patch
)
file(COPY
"${CMAKE_CURRENT_LIST_DIR}/FindLZ4.cmake"
"${CMAKE_CURRENT_LIST_DIR}/FindSnappy.cmake"
DESTINATION "${SOURCE_PATH}/CMake/"
)
file(REMOVE "${SOURCE_PATH}/CMake/FindGFlags.cmake")
if(VCPKG_CRT_LINKAGE STREQUAL static)
set(MSVC_USE_STATIC_RUNTIME ON)
else()
set(MSVC_USE_STATIC_RUNTIME OFF)
endif()
set(FEATURE_OPTIONS)
macro(feature FEATURENAME PACKAGENAME)
if("${FEATURENAME}" IN_LIST FEATURES)
list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=OFF)
else()
list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=ON)
endif()
endmacro()
feature(zlib ZLIB)
feature(bzip2 BZip2)
feature(lzma LibLZMA)
feature(lz4 LZ4)
feature(zstd Zstd)
feature(snappy Snappy)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DMSVC_USE_STATIC_RUNTIME=${MSVC_USE_STATIC_RUNTIME}
-DCMAKE_DISABLE_FIND_PACKAGE_LibDwarf=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Libiberty=ON
-DCMAKE_DISABLE_FIND_PACKAGE_LibAIO=ON
-DLIBAIO_FOUND=OFF
-DLIBURCU_FOUND=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_LibURCU=ON
-DCMAKE_INSTALL_DIR=share/folly
${FEATURE_OPTIONS}
)
vcpkg_cmake_install(ADD_BIN_TO_PATH)
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup()
# Release folly-targets.cmake does not link to the right libraries in debug mode.
# We substitute with generator expressions so that the right libraries are linked for debug and release.
set(FOLLY_TARGETS_CMAKE "${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake")
FILE(READ ${FOLLY_TARGETS_CMAKE} _contents)
string(REPLACE "\${VCPKG_IMPORT_PREFIX}/lib/zlib.lib" "ZLIB::ZLIB" _contents "${_contents}")
STRING(REPLACE "\${VCPKG_IMPORT_PREFIX}/lib/" "\${VCPKG_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
STRING(REPLACE "\${VCPKG_IMPORT_PREFIX}/debug/lib/" "\${VCPKG_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
string(REPLACE "-vc140-mt.lib" "-vc140-mt\$<\$<CONFIG:DEBUG>:-gd>.lib" _contents "${_contents}")
FILE(WRITE ${FOLLY_TARGETS_CMAKE} "${_contents}")
FILE(READ "${CURRENT_PACKAGES_DIR}/share/folly/folly-config.cmake" _contents)
FILE(WRITE "${CURRENT_PACKAGES_DIR}/share/folly/folly-config.cmake"
"include(CMakeFindDependencyMacro)
find_dependency(Threads)
find_dependency(glog CONFIG)
find_dependency(gflags CONFIG REQUIRED)
find_dependency(ZLIB)
${_contents}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_fixup_pkgconfig()

View File

@@ -0,0 +1,28 @@
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
index 92b8ce7..04589ed 100644
--- a/CMake/folly-deps.cmake
+++ b/CMake/folly-deps.cmake
@@ -52,6 +52,11 @@ find_package(DoubleConversion MODULE REQUIRED)
list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY})
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR})
+find_package(Glog CONFIG REQUIRED)
+set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND})
+list(APPEND FOLLY_LINK_LIBRARIES glog::glog)
+list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR})
+
find_package(Gflags MODULE)
set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND})
if(LIBGFLAGS_FOUND)
@@ -61,11 +66,6 @@ if(LIBGFLAGS_FOUND)
set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR})
endif()
-find_package(Glog MODULE)
-set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND})
-list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY})
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR})
-
find_package(LibEvent MODULE REQUIRED)
list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB})
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR})

77
externals/vcpkg/ports/folly/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,77 @@
{
"name": "folly",
"version-string": "2022.03.21.00",
"description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
"homepage": "https://github.com/facebook/folly",
"license": "Apache-2.0",
"supports": "(windows & x64 & !uwp) | (!windows & (x64 | arm64))",
"dependencies": [
"boost-chrono",
"boost-context",
"boost-conversion",
"boost-crc",
"boost-date-time",
"boost-filesystem",
"boost-multi-index",
"boost-program-options",
"boost-regex",
"boost-smart-ptr",
"boost-system",
"boost-thread",
"double-conversion",
"fmt",
"gflags",
"glog",
"libevent",
"openssl",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"zlib"
],
"features": {
"bzip2": {
"description": "Support bzip2 for compression",
"dependencies": [
"bzip2"
]
},
"lz4": {
"description": "Support lz4 for compression",
"dependencies": [
"lz4"
]
},
"lzma": {
"description": "Support LZMA for compression",
"dependencies": [
"liblzma"
]
},
"snappy": {
"description": "Support Snappy for compression",
"dependencies": [
"snappy"
]
},
"zlib": {
"description": "Support zlib for compression",
"dependencies": [
"zlib"
]
},
"zstd": {
"description": "Support zstd for compression",
"dependencies": [
"zstd"
]
}
}
}