mirror of
https://github.com/microsoft/vcpkg.git
synced 2026-01-18 01:11:23 +01:00
[folly,proxygen,snappy,fbthrift,cachelib] Fix integration (#44686)
This commit is contained in:
@@ -24,6 +24,7 @@ vcpkg_cmake_configure(
|
||||
OPTIONS
|
||||
-DBUILD_TESTS=OFF
|
||||
-DCMAKE_INSTALL_DIR=share/cachelib
|
||||
-DVCPKG_LOCK_FIND_PACKAGE_uring=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "cachelib",
|
||||
"version-string": "2025.03.31.00",
|
||||
"port-version": 1,
|
||||
"description": "Pluggable caching engine to build and scale high performance cache services.",
|
||||
"homepage": "https://github.com/facebook/CacheLib",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
13
ports/fbthrift/folly-has-liburing.diff
Normal file
13
ports/fbthrift/folly-has-liburing.diff
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/thrift/lib/cpp2/security/SSLUtil.cpp b/thrift/lib/cpp2/security/SSLUtil.cpp
|
||||
index 52a15b6..515e5b5 100644
|
||||
--- a/thrift/lib/cpp2/security/SSLUtil.cpp
|
||||
+++ b/thrift/lib/cpp2/security/SSLUtil.cpp
|
||||
@@ -133,7 +133,7 @@ folly::AsyncSocketTransport::UniquePtr moveToPlaintext(FizzSocket* fizzSock) {
|
||||
|
||||
auto sock = fizzSock->template getUnderlyingTransport<folly::AsyncSocket>();
|
||||
folly::AsyncSocketTransport::UniquePtr plaintextTransport;
|
||||
-#if defined(__linux__) && __has_include(<liburing.h>)
|
||||
+#if defined(__linux__) && FOLLY_HAS_LIBURING
|
||||
if (!sock &&
|
||||
fizzSock->template getUnderlyingTransport<folly::AsyncIoUringSocket>()) {
|
||||
// `AsyncFdSocket` currently lacks uring support, so hardcode `AsyncSocket`
|
||||
@@ -7,6 +7,7 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
fix-deps.patch
|
||||
fix-test.patch
|
||||
folly-has-liburing.diff
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/thrift/cmake/FindGMock.cmake")
|
||||
@@ -92,5 +93,4 @@ endif()
|
||||
# Only used internally and removed in master
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftTargets.cmake" "LOCATION_HH=\\\"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/thrift/compiler/location.hh\\\"" "" IGNORE_UNCHANGED)
|
||||
|
||||
# Handle copyright
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "fbthrift",
|
||||
"version-string": "2025.03.31.00",
|
||||
"port-version": 1,
|
||||
"description": "Facebook's branch of Apache Thrift, including a new C++ server.",
|
||||
"homepage": "https://github.com/facebook/fbthrift",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/CMake/folly-config.cmake.in b/CMake/folly-config.cmake.in
|
||||
index 0b96f0a..34f5b53 100644
|
||||
index 0b96f0a..d5a200f 100644
|
||||
--- a/CMake/folly-config.cmake.in
|
||||
+++ b/CMake/folly-config.cmake.in
|
||||
@@ -29,10 +29,31 @@ endif()
|
||||
@@ -9,25 +9,25 @@ index 0b96f0a..34f5b53 100644
|
||||
-find_dependency(fmt)
|
||||
+find_dependency(fmt CONFIG)
|
||||
+find_dependency(double-conversion CONFIG)
|
||||
+find_dependency(glog CONFIG)
|
||||
+find_dependency(gflags CONFIG)
|
||||
+find_dependency(Libevent CONFIG)
|
||||
+find_dependency(FastFloat CONFIG)
|
||||
+if (NOT @CMAKE_DISABLE_FIND_PACKAGE_Zstd@)
|
||||
+ find_dependency(zstd CONFIG)
|
||||
+set(z_vcpkg_folly_gflags_backup ${GFLAGS_USE_TARGET_NAMESPACE})
|
||||
+set(GFLAGS_USE_TARGET_NAMESPACE ON)
|
||||
+find_dependency(gflags CONFIG)
|
||||
+set(GFLAGS_USE_TARGET_NAMESPACE ${z_vcpkg_folly_gflags_backup})
|
||||
+find_dependency(glog CONFIG)
|
||||
+find_dependency(Libevent CONFIG)
|
||||
+find_dependency(ZLIB)
|
||||
+if("@VCPKG_LOCK_FIND_PACKAGE_LZ4@")
|
||||
+ find_dependency(lz4 CONFIG)
|
||||
+endif()
|
||||
+if (@CMAKE_REQUIRE_FIND_PACKAGE_ZLIB@)
|
||||
+ find_dependency(ZLIB MODULE)
|
||||
+if("@VCPKG_LOCK_FIND_PACKAGE_ZSTD@")
|
||||
+ find_dependency(zstd CONFIG)
|
||||
+endif()
|
||||
+find_dependency(OpenSSL MODULE)
|
||||
+if (NOT @CMAKE_DISABLE_FIND_PACKAGE_unofficial-sodium@)
|
||||
+ find_dependency(unofficial-sodium CONFIG)
|
||||
+if("@VCPKG_LOCK_FIND_PACKAGE_SNAPPY@")
|
||||
+ find_dependency(Snappy CONFIG)
|
||||
+endif()
|
||||
+if (NOT @CMAKE_DISABLE_FIND_PACKAGE_Snappy@)
|
||||
+ find_dependency(Snappy CONFIG)
|
||||
+endif()
|
||||
+if (NOT @CMAKE_DISABLE_FIND_PACKAGE_LZ4@)
|
||||
+ find_dependency(lz4 CONFIG)
|
||||
+if("@VCPKG_LOCK_FIND_PACKAGE_LIBSODIUM@")
|
||||
+ find_dependency(unofficial-sodium CONFIG)
|
||||
+endif()
|
||||
|
||||
set(Boost_USE_STATIC_LIBS "@FOLLY_BOOST_LINK_STATIC@")
|
||||
@@ -36,8 +36,22 @@ index 0b96f0a..34f5b53 100644
|
||||
COMPONENTS
|
||||
context
|
||||
filesystem
|
||||
diff --git a/CMake/folly-config.h.cmake b/CMake/folly-config.h.cmake
|
||||
index 9a309fb..7e6e05f 100644
|
||||
--- a/CMake/folly-config.h.cmake
|
||||
+++ b/CMake/folly-config.h.cmake
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
+#cmakedefine01 FOLLY_HAS_LIBURING
|
||||
+#cmakedefine01 FOLLY_HAS_LIBAIO
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
#include <TargetConditionals.h> // @manual
|
||||
#endif
|
||||
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
|
||||
index 6ce4c67..701bb55 100644
|
||||
index 6ce4c67..a347cf0 100644
|
||||
--- a/CMake/folly-deps.cmake
|
||||
+++ b/CMake/folly-deps.cmake
|
||||
@@ -35,7 +35,7 @@ else()
|
||||
@@ -49,179 +63,163 @@ index 6ce4c67..701bb55 100644
|
||||
COMPONENTS
|
||||
context
|
||||
filesystem
|
||||
@@ -45,40 +45,41 @@ find_package(Boost 1.51.0 MODULE
|
||||
@@ -45,17 +45,21 @@ find_package(Boost 1.51.0 MODULE
|
||||
thread
|
||||
REQUIRED
|
||||
)
|
||||
+set(Boost_LIBRARIES Boost::boost Boost::context Boost::filesystem Boost::program_options Boost::regex Boost::system Boost::thread)
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES})
|
||||
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
|
||||
-
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
|
||||
|
||||
-find_package(DoubleConversion MODULE REQUIRED)
|
||||
-list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY})
|
||||
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR})
|
||||
-
|
||||
+find_package(double-conversion CONFIG REQUIRED)
|
||||
+set(DOUBLE_CONVERSION_LIBRARY double-conversion::double-conversion)
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY})
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR})
|
||||
|
||||
-find_package(FastFloat MODULE REQUIRED)
|
||||
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${FASTFLOAT_INCLUDE_DIR})
|
||||
-
|
||||
-find_package(Gflags MODULE)
|
||||
-set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND})
|
||||
-if(LIBGFLAGS_FOUND)
|
||||
- list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY})
|
||||
- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR})
|
||||
- set(FOLLY_LIBGFLAGS_LIBRARY ${LIBGFLAGS_LIBRARY})
|
||||
- set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR})
|
||||
+
|
||||
+
|
||||
+find_package(double-conversion CONFIG REQUIRED)
|
||||
+list(APPEND FOLLY_LINK_LIBRARIES double-conversion::double-conversion)
|
||||
+
|
||||
+find_package(FastFloat CONFIG REQUIRED)
|
||||
+list(APPEND FOLLY_LINK_LIBRARIES FastFloat::fast_float)
|
||||
+
|
||||
+find_package(gflags CONFIG)
|
||||
+if(TARGET gflags::gflags)
|
||||
+ set(FOLLY_HAVE_LIBGFLAGS 1)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES gflags::gflags)
|
||||
+ set(FOLLY_LIBGFLAGS_LIBRARY gflags::gflags)
|
||||
|
||||
-find_package(Gflags MODULE)
|
||||
+set(GFLAGS_USE_TARGET_NAMESPACE ON)
|
||||
+find_package(LIBGFLAGS NAMES gflags REQUIRED)
|
||||
+set(LIBGFLAGS_LIBRARY gflags::gflags)
|
||||
set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND})
|
||||
if(LIBGFLAGS_FOUND)
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY})
|
||||
@@ -64,16 +68,22 @@ 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(glog CONFIG REQUIRED)
|
||||
+set(FOLLY_HAVE_LIBGLOG 1)
|
||||
+list(APPEND FOLLY_LINK_LIBRARIES glog::glog)
|
||||
+find_package(GLOG NAMES glog REQUIRED)
|
||||
+set(GLOG_LIBRARY glog::glog)
|
||||
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})
|
||||
+find_package(Libevent CONFIG REQUIRED)
|
||||
+list(APPEND FOLLY_LINK_LIBRARIES libevent::core libevent::extra)
|
||||
+find_package(LIBEVENT NAMES Libevent REQUIRED)
|
||||
+set(LIBEVENT_LIB libevent::core libevent::extra)
|
||||
+if(NOT WIN32)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES libevent::pthreads)
|
||||
+ list(APPEND LIBEVENT_LIB libevent::pthreads)
|
||||
+endif()
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB})
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR})
|
||||
|
||||
-find_package(ZLIB MODULE)
|
||||
-set(FOLLY_HAVE_LIBZ ${ZLIB_FOUND})
|
||||
-if (ZLIB_FOUND)
|
||||
- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRS})
|
||||
- list(APPEND FOLLY_LINK_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
- list(APPEND CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
+if (CMAKE_REQUIRE_FIND_PACKAGE_ZLIB)
|
||||
+ find_package(ZLIB MODULE REQUIRED)
|
||||
+ set(FOLLY_HAVE_LIBZ ${ZLIB_FOUND})
|
||||
+ if (ZLIB_FOUND)
|
||||
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRS})
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
find_package(OpenSSL 1.1.1 MODULE REQUIRED)
|
||||
@@ -106,25 +107,29 @@ if (LIBLZMA_FOUND)
|
||||
find_package(ZLIB MODULE)
|
||||
+set(ZLIB_LIBRARIES ZLIB::ZLIB) # consistent with proxygen
|
||||
set(FOLLY_HAVE_LIBZ ${ZLIB_FOUND})
|
||||
if (ZLIB_FOUND)
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRS})
|
||||
@@ -106,21 +116,24 @@ if (LIBLZMA_FOUND)
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
endif()
|
||||
|
||||
-find_package(LZ4 MODULE)
|
||||
-set(FOLLY_HAVE_LIBLZ4 ${LZ4_FOUND})
|
||||
-if (LZ4_FOUND)
|
||||
- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIR})
|
||||
- list(APPEND FOLLY_LINK_LIBRARIES ${LZ4_LIBRARY})
|
||||
+if(NOT CMAKE_DISABLE_FIND_PACKAGE_LZ4)
|
||||
+ find_package(lz4 CONFIG)
|
||||
+ if(TARGET lz4::lz4)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES lz4::lz4)
|
||||
+ endif()
|
||||
+find_package(LZ4 NAMES lz4)
|
||||
+set(LZ4_LIBRARY lz4::lz4)
|
||||
set(FOLLY_HAVE_LIBLZ4 ${LZ4_FOUND})
|
||||
if (LZ4_FOUND)
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIR})
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LZ4_LIBRARY})
|
||||
endif()
|
||||
|
||||
-find_package(Zstd MODULE)
|
||||
-set(FOLLY_HAVE_LIBZSTD ${ZSTD_FOUND})
|
||||
-if(ZSTD_FOUND)
|
||||
- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR})
|
||||
- list(APPEND FOLLY_LINK_LIBRARIES ${ZSTD_LIBRARY})
|
||||
+if(NOT CMAKE_DISABLE_FIND_PACKAGE_Zstd)
|
||||
+ find_package(zstd CONFIG)
|
||||
+ if(TARGET zstd::libzstd_shared )
|
||||
+ set(FOLLY_HAVE_LIBZSTD 1)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES zstd::libzstd_shared)
|
||||
+ elseif( TARGET zstd::libzstd_static )
|
||||
+ set(FOLLY_HAVE_LIBZSTD 1)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES zstd::libzstd_static)
|
||||
+ endif()
|
||||
+find_package(ZSTD NAMES zstd)
|
||||
+set(ZSTD_LIBRARY zstd::libzstd)
|
||||
set(FOLLY_HAVE_LIBZSTD ${ZSTD_FOUND})
|
||||
if(ZSTD_FOUND)
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR})
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${ZSTD_LIBRARY})
|
||||
endif()
|
||||
|
||||
-find_package(Snappy MODULE)
|
||||
-set(FOLLY_HAVE_LIBSNAPPY ${SNAPPY_FOUND})
|
||||
-if (SNAPPY_FOUND)
|
||||
- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${SNAPPY_INCLUDE_DIR})
|
||||
- list(APPEND FOLLY_LINK_LIBRARIES ${SNAPPY_LIBRARY})
|
||||
+if(NOT CMAKE_DISABLE_FIND_PACKAGE_Snappy)
|
||||
+ find_package(Snappy CONFIG)
|
||||
+ if(TARGET Snappy::snappy)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES Snappy::snappy)
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
find_package(LibDwarf)
|
||||
@@ -135,17 +140,24 @@ find_package(Libiberty)
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LIBIBERTY_LIBRARIES})
|
||||
+find_package(SNAPPY NAMES Snappy)
|
||||
+set(SNAPPY_LIBRARY Snappy::snappy)
|
||||
set(FOLLY_HAVE_LIBSNAPPY ${SNAPPY_FOUND})
|
||||
if (SNAPPY_FOUND)
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${SNAPPY_INCLUDE_DIR})
|
||||
@@ -136,14 +149,19 @@ list(APPEND FOLLY_LINK_LIBRARIES ${LIBIBERTY_LIBRARIES})
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBIBERTY_INCLUDE_DIRS})
|
||||
|
||||
-find_package(LibAIO)
|
||||
-list(APPEND FOLLY_LINK_LIBRARIES ${LIBAIO_LIBRARIES})
|
||||
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBAIO_INCLUDE_DIRS})
|
||||
+if(WITH_libaio)
|
||||
+ find_package(LibAIO)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBAIO_LIBRARIES})
|
||||
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBAIO_INCLUDE_DIRS})
|
||||
+endif()
|
||||
find_package(LibAIO)
|
||||
+set(FOLLY_HAS_LIBAIO ${VCPKG_LOCK_FIND_PACKAGE_LibAIO})
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LIBAIO_LIBRARIES})
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBAIO_INCLUDE_DIRS})
|
||||
|
||||
-find_package(LibUring)
|
||||
-list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES})
|
||||
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS})
|
||||
+if(WITH_liburing)
|
||||
+ find_package(LibUring)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES})
|
||||
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS})
|
||||
+endif()
|
||||
find_package(LibUring)
|
||||
+set(FOLLY_HAS_LIBURING ${VCPKG_LOCK_FIND_LibUring})
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES})
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS})
|
||||
|
||||
-find_package(Libsodium)
|
||||
-list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES})
|
||||
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS})
|
||||
+if(NOT CMAKE_DISABLE_FIND_PACKAGE_unofficial-sodium)
|
||||
+ find_package(unofficial-sodium CONFIG)
|
||||
+ if(TARGET unofficial-sodium::sodium)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES unofficial-sodium::sodium)
|
||||
+ endif()
|
||||
+find_package(LIBSODIUM NAMES unofficial-sodium)
|
||||
+if(LIBSODIUM_FOUND)
|
||||
+ set(LIBSODIUM_LIBRARIES unofficial-sodium::sodium)
|
||||
+endif()
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES})
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
@@ -156,10 +168,10 @@ if (PYTHON_EXTENSIONS)
|
||||
endif ()
|
||||
|
||||
find_package(LibUnwind)
|
||||
-list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})
|
||||
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS})
|
||||
@@ -160,6 +178,8 @@ list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS})
|
||||
if (LIBUNWIND_FOUND)
|
||||
set(FOLLY_HAVE_LIBUNWIND ON)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})
|
||||
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS})
|
||||
+ list(REMOVE_ITEM FOLLY_LINK_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
endif()
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
list(APPEND FOLLY_LINK_LIBRARIES "execinfo")
|
||||
@@ -310,11 +322,7 @@ endif()
|
||||
diff --git a/folly/io/async/AsyncIO.cpp b/folly/io/async/AsyncIO.cpp
|
||||
index 93cda44..ac090bb 100644
|
||||
--- a/folly/io/async/AsyncIO.cpp
|
||||
+++ b/folly/io/async/AsyncIO.cpp
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <sys/eventfd.h>
|
||||
#endif
|
||||
|
||||
add_library(folly_deps INTERFACE)
|
||||
-#if __has_include(<libaio.h>)
|
||||
+#if FOLLY_HAS_LIBAIO
|
||||
|
||||
-find_package(fmt CONFIG)
|
||||
-if (NOT DEFINED fmt_CONFIG)
|
||||
- # Fallback on a normal search on the current system
|
||||
- find_package(Fmt MODULE REQUIRED)
|
||||
-endif()
|
||||
+find_package(fmt CONFIG REQUIRED)
|
||||
target_link_libraries(folly_deps INTERFACE fmt::fmt)
|
||||
// debugging helpers
|
||||
namespace {
|
||||
diff --git a/folly/io/async/AsyncIO.h b/folly/io/async/AsyncIO.h
|
||||
index b1a6f52..ba84609 100644
|
||||
--- a/folly/io/async/AsyncIO.h
|
||||
+++ b/folly/io/async/AsyncIO.h
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
list(REMOVE_DUPLICATES FOLLY_INCLUDE_DIRECTORIES)
|
||||
#include <folly/experimental/io/AsyncBase.h>
|
||||
|
||||
-#if __has_include(<libaio.h>)
|
||||
+#if FOLLY_HAS_LIBAIO
|
||||
|
||||
#include <libaio.h>
|
||||
|
||||
diff --git a/folly/io/async/Liburing.h b/folly/io/async/Liburing.h
|
||||
index 8e81aaa..c7f4a67 100644
|
||||
--- a/folly/io/async/Liburing.h
|
||||
+++ b/folly/io/async/Liburing.h
|
||||
@@ -17,7 +17,5 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(__linux__) && __has_include(<liburing.h>)
|
||||
-#define FOLLY_HAS_LIBURING 1
|
||||
#else
|
||||
-#define FOLLY_HAS_LIBURING 0
|
||||
#endif
|
||||
diff --git a/folly/io/async/SimpleAsyncIO.cpp b/folly/io/async/SimpleAsyncIO.cpp
|
||||
index 807a2be..551a003 100644
|
||||
--- a/folly/io/async/SimpleAsyncIO.cpp
|
||||
+++ b/folly/io/async/SimpleAsyncIO.cpp
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
namespace folly {
|
||||
|
||||
-#if __has_include(<libaio.h>)
|
||||
+#if FOLLY_HAS_LIBAIO
|
||||
static constexpr bool has_aio = true;
|
||||
using aio_type = AsyncIO;
|
||||
#else
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
|
||||
index e41c128..5117a65 100644
|
||||
--- a/CMake/folly-deps.cmake
|
||||
+++ b/CMake/folly-deps.cmake
|
||||
@@ -157,6 +157,7 @@ if(WITH_liburing)
|
||||
find_package(LibUring)
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES})
|
||||
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS})
|
||||
+ add_compile_options(-DFOLLY_WITH_LIBURING)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_DISABLE_FIND_PACKAGE_unofficial-sodium)
|
||||
diff --git a/folly/io/async/Liburing.h b/folly/io/async/Liburing.h
|
||||
index 8e81aaa..bb6060e 100644
|
||||
--- a/folly/io/async/Liburing.h
|
||||
+++ b/folly/io/async/Liburing.h
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
-#if defined(__linux__) && __has_include(<liburing.h>)
|
||||
+#if defined(__linux__) && __has_include(<liburing.h>) && defined FOLLY_WITH_LIBURING
|
||||
#define FOLLY_HAS_LIBURING 1
|
||||
#else
|
||||
#define FOLLY_HAS_LIBURING 0
|
||||
@@ -1,31 +0,0 @@
|
||||
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
|
||||
index 701bb55..e41c128 100644
|
||||
--- a/CMake/folly-deps.cmake
|
||||
+++ b/CMake/folly-deps.cmake
|
||||
@@ -100,6 +100,13 @@ if (BZIP2_FOUND)
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${BZIP2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
+find_package(LibUnwind)
|
||||
+if (LIBUNWIND_FOUND)
|
||||
+ set(FOLLY_HAVE_LIBUNWIND ON)
|
||||
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})
|
||||
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS})
|
||||
+endif()
|
||||
+
|
||||
find_package(LibLZMA MODULE)
|
||||
set(FOLLY_HAVE_LIBLZMA ${LIBLZMA_FOUND})
|
||||
if (LIBLZMA_FOUND)
|
||||
@@ -167,12 +174,6 @@ if (PYTHON_EXTENSIONS)
|
||||
find_package(Cython 0.26 REQUIRED)
|
||||
endif ()
|
||||
|
||||
-find_package(LibUnwind)
|
||||
-if (LIBUNWIND_FOUND)
|
||||
- set(FOLLY_HAVE_LIBUNWIND ON)
|
||||
- list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})
|
||||
- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS})
|
||||
-endif()
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
list(APPEND FOLLY_LINK_LIBRARIES "execinfo")
|
||||
endif ()
|
||||
@@ -1,12 +0,0 @@
|
||||
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.
|
||||
@@ -1,9 +1,6 @@
|
||||
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}")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
@@ -12,15 +9,11 @@ vcpkg_from_github(
|
||||
SHA512 c5ac6133e6161c8c2244feee30b4924df85a8b3586eb42aede6c0092a3ef6fd1fa5acac407fa7d21585bf9d856bbdb95c87ee1cdc7880ded97e0026b4a4948f6
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
fix-windows-minmax.patch
|
||||
fix-deps.patch
|
||||
disable-uninitialized-resize-on-new-stl.patch
|
||||
fix-unistd-include.patch
|
||||
fix-libunwind.patch
|
||||
fix-absolute-dir.patch
|
||||
fix-has-include.patch
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/CMake/FindFastFloat.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/CMake/FindFmt.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/CMake/FindLibsodium.cmake")
|
||||
@@ -35,58 +28,40 @@ file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindLibEvent.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindSodium.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindZstd.cmake")
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
||||
set(MSVC_USE_STATIC_RUNTIME ON)
|
||||
else()
|
||||
set(MSVC_USE_STATIC_RUNTIME OFF)
|
||||
endif()
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_RUNTIME)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
"liburing" WITH_liburing
|
||||
"libaio" WITH_libaio
|
||||
INVERTED_FEATURES
|
||||
"bzip2" CMAKE_DISABLE_FIND_PACKAGE_BZip2
|
||||
"lz4" CMAKE_DISABLE_FIND_PACKAGE_LZ4
|
||||
"zstd" CMAKE_DISABLE_FIND_PACKAGE_Zstd
|
||||
"snappy" CMAKE_DISABLE_FIND_PACKAGE_Snappy
|
||||
"libsodium" CMAKE_DISABLE_FIND_PACKAGE_unofficial-sodium
|
||||
"bzip2" VCPKG_LOCK_FIND_PACKAGE_BZip2
|
||||
"libaio" VCPKG_LOCK_FIND_PACKAGE_LibAIO
|
||||
"libsodium" VCPKG_LOCK_FIND_PACKAGE_LIBSODIUM
|
||||
"liburing" VCPKG_LOCK_FIND_PACKAGE_LibUring
|
||||
"lz4" VCPKG_LOCK_FIND_PACKAGE_LZ4
|
||||
"snappy" VCPKG_LOCK_FIND_PACKAGE_SNAPPY
|
||||
"zstd" VCPKG_LOCK_FIND_PACKAGE_ZSTD
|
||||
)
|
||||
|
||||
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_INSTALL_DIR=share/folly
|
||||
-DCMAKE_REQUIRE_FIND_PACKAGE_ZLIB=ON
|
||||
-DCMAKE_POLICY_DEFAULT_CMP0167=NEW
|
||||
-DVCPKG_LOCK_FIND_PACKAGE_fmt=ON
|
||||
-DVCPKG_LOCK_FIND_PACKAGE_LibDwarf=OFF
|
||||
-DVCPKG_LOCK_FIND_PACKAGE_Libiberty=OFF
|
||||
-DVCPKG_LOCK_FIND_PACKAGE_LibUnwind=${VCPKG_TARGET_IS_LINUX}
|
||||
-DVCPKG_LOCK_FIND_PACKAGE_ZLIB=ON
|
||||
${FEATURE_OPTIONS}
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
MSVC_USE_STATIC_RUNTIME
|
||||
)
|
||||
|
||||
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
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(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Handle copyright
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
set(FOLLY_PREV_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
_find_package(${ARGS})
|
||||
|
||||
set(CMAKE_MODULE_PATH ${FOLLY_PREV_MODULE_PATH})
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "folly",
|
||||
"version-string": "2025.03.31.00",
|
||||
"port-version": 1,
|
||||
"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",
|
||||
@@ -83,7 +84,12 @@
|
||||
"snappy": {
|
||||
"description": "Support Snappy for compression",
|
||||
"dependencies": [
|
||||
"snappy"
|
||||
{
|
||||
"name": "snappy",
|
||||
"features": [
|
||||
"rtti"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"zstd": {
|
||||
|
||||
@@ -1,54 +1,37 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 112b36b..30e466a 100644
|
||||
index dde1bcd..f72165b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -69,7 +69,10 @@ endif()
|
||||
find_package(fmt REQUIRED)
|
||||
find_package(folly REQUIRED)
|
||||
find_package(wangle REQUIRED)
|
||||
@@ -71,11 +71,11 @@ endif()
|
||||
#
|
||||
# IMPORTANT: If you change this, make the analogous update in:
|
||||
# cmake/proxygen-config.cmake.in
|
||||
-find_package(fmt REQUIRED)
|
||||
-find_package(folly REQUIRED)
|
||||
-find_package(wangle REQUIRED)
|
||||
-find_package(mvfst REQUIRED)
|
||||
-find_package(Zstd REQUIRED)
|
||||
+find_package(fmt CONFIG REQUIRED)
|
||||
+find_package(folly CONFIG REQUIRED)
|
||||
+find_package(wangle CONFIG REQUIRED)
|
||||
+find_package(mvfst CONFIG REQUIRED)
|
||||
find_package(zstd CONFIG REQUIRED)
|
||||
+find_package(zstd CONFIG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
@@ -124,27 +127,8 @@ SET(GFLAG_DEPENDENCIES "")
|
||||
find_package(Threads)
|
||||
@@ -130,6 +130,7 @@ SET(GFLAG_DEPENDENCIES "")
|
||||
SET(PROXYGEN_EXTRA_LINK_LIBRARIES "")
|
||||
SET(PROXYGEN_EXTRA_INCLUDE_DIRECTORIES "")
|
||||
|
||||
-find_package(gflags CONFIG QUIET)
|
||||
-if (gflags_FOUND)
|
||||
- message("module path: ${CMAKE_MODULE_PATH}")
|
||||
- message(STATUS "Found gflags from package config")
|
||||
- if (TARGET gflags-shared)
|
||||
- list(APPEND GFLAG_DEPENDENCIES gflags-shared)
|
||||
- elseif (TARGET gflags)
|
||||
- list(APPEND GFLAG_DEPENDENCIES gflags)
|
||||
- else()
|
||||
- message(FATAL_ERROR
|
||||
- "Unable to determine the target name for the GFlags package.")
|
||||
- endif()
|
||||
- list(APPEND CMAKE_REQUIRED_LIBRARIES ${GFLAGS_LIBRARIES})
|
||||
- list(APPEND CMAKE_REQUIRED_INCLUDES ${GFLAGS_INCLUDE_DIR})
|
||||
-else()
|
||||
- find_package(Gflags REQUIRED MODULE)
|
||||
- list(APPEND PROXYGEN_EXTRA_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY})
|
||||
- list(APPEND PROXYGEN_EXTRA_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR})
|
||||
- list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBGFLAGS_LIBRARY})
|
||||
- list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR})
|
||||
-endif()
|
||||
+find_package(gflags CONFIG REQUIRED)
|
||||
+list(APPEND CMAKE_REQUIRED_LIBRARIES gflags::gflags)
|
||||
|
||||
include(ProxygenTest)
|
||||
|
||||
+set(GFLAGS_USE_TARGET_NAMESPACE ON)
|
||||
find_package(gflags CONFIG QUIET)
|
||||
if (gflags_FOUND)
|
||||
message("module path: ${CMAKE_MODULE_PATH}")
|
||||
diff --git a/cmake/proxygen-config.cmake.in b/cmake/proxygen-config.cmake.in
|
||||
index c79875d..0e002b9 100644
|
||||
index 6849b0a..1d2cad2 100644
|
||||
--- a/cmake/proxygen-config.cmake.in
|
||||
+++ b/cmake/proxygen-config.cmake.in
|
||||
@@ -17,17 +17,18 @@
|
||||
@@ -17,17 +17,21 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
@@ -62,7 +45,10 @@ index c79875d..0e002b9 100644
|
||||
+find_dependency(wangle CONFIG)
|
||||
+find_dependency(mvfst CONFIG)
|
||||
+find_dependency(fizz CONFIG)
|
||||
+set(z_vcpkg_proxygen_gflags_backup ${GFLAGS_USE_TARGET_NAMESPACE})
|
||||
+set(GFLAGS_USE_TARGET_NAMESPACE ON)
|
||||
+find_dependency(gflags CONFIG)
|
||||
+set(GFLAGS_USE_TARGET_NAMESPACE ${z_vcpkg_proxygen_gflags_backup})
|
||||
# For now, anything that depends on Proxygen has to copy its FindZstd.cmake
|
||||
# and issue a `find_package(Zstd)`. Uncommenting this won't work because
|
||||
# this Zstd module exposes a library called `zstd`. The right fix is
|
||||
@@ -73,3 +59,20 @@ index c79875d..0e002b9 100644
|
||||
find_dependency(ZLIB)
|
||||
find_dependency(OpenSSL)
|
||||
find_dependency(Threads)
|
||||
diff --git a/proxygen/lib/CMakeLists.txt b/proxygen/lib/CMakeLists.txt
|
||||
index 74a0284..71039e7 100644
|
||||
--- a/proxygen/lib/CMakeLists.txt
|
||||
+++ b/proxygen/lib/CMakeLists.txt
|
||||
@@ -250,10 +250,10 @@ target_link_libraries(
|
||||
Folly::folly
|
||||
fizz::fizz
|
||||
wangle::wangle
|
||||
- zstd
|
||||
+ zstd::libzstd
|
||||
Boost::boost
|
||||
Boost::iostreams
|
||||
- -lz
|
||||
+ ZLIB::ZLIB
|
||||
${HTTP3_DEPEND_LIBS}
|
||||
)
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9bf6ec1..112b36b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -70,7 +70,7 @@ find_package(fmt REQUIRED)
|
||||
find_package(folly REQUIRED)
|
||||
find_package(wangle REQUIRED)
|
||||
find_package(mvfst REQUIRED)
|
||||
-find_package(Zstd REQUIRED)
|
||||
+find_package(zstd CONFIG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(Threads)
|
||||
diff --git a/proxygen/lib/CMakeLists.txt b/proxygen/lib/CMakeLists.txt
|
||||
index ac5005f..fa403ab 100644
|
||||
--- a/proxygen/lib/CMakeLists.txt
|
||||
+++ b/proxygen/lib/CMakeLists.txt
|
||||
@@ -236,10 +236,10 @@ target_link_libraries(
|
||||
Folly::folly
|
||||
fizz::fizz
|
||||
wangle::wangle
|
||||
- zstd
|
||||
+ $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>
|
||||
Boost::boost
|
||||
Boost::iostreams
|
||||
- -lz
|
||||
+ ZLIB::ZLIB
|
||||
${HTTP3_DEPEND_LIBS}
|
||||
)
|
||||
|
||||
13
ports/proxygen/folly-has-liburing.diff
Normal file
13
ports/proxygen/folly-has-liburing.diff
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/proxygen/lib/services/WorkerThread.cpp b/proxygen/lib/services/WorkerThread.cpp
|
||||
index 3c422db..c4a05fa 100644
|
||||
--- a/proxygen/lib/services/WorkerThread.cpp
|
||||
+++ b/proxygen/lib/services/WorkerThread.cpp
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <glog/logging.h>
|
||||
#include <signal.h>
|
||||
|
||||
-#if !FOLLY_MOBILE && __has_include(<liburing.h>)
|
||||
+#if !FOLLY_MOBILE && FOLLY_HAS_LIBURING
|
||||
|
||||
DEFINE_int32(pwt_io_uring_capacity, -1, "io_uring backend capacity");
|
||||
DEFINE_int32(pwt_io_uring_max_submit, 128, "io_uring backend max submit");
|
||||
@@ -6,31 +6,28 @@ vcpkg_from_github(
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
remove-register.patch
|
||||
fix-zstd-zlib-dependency.patch
|
||||
folly-has-liburing.diff
|
||||
fix-dependency.patch
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_PATH "${PYTHON3}" DIRECTORY)
|
||||
vcpkg_add_to_path(${PYTHON3_PATH})
|
||||
|
||||
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
"-DPROXYGEN_PYTHON=${PYTHON3}"
|
||||
-DVCPKG_LOCK_FIND_PACKAGE_gflags=ON
|
||||
-DCMAKE_INSTALL_DIR=share/proxygen
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_cmake_config_fixup()
|
||||
|
||||
vcpkg_copy_tools(TOOL_NAMES hq proxygen_curl proxygen_echo proxygen_h3datagram_client proxygen_httperf2 proxygen_proxy proxygen_push proxygen_static AUTO_CLEAN)
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/proxygen)
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "proxygen",
|
||||
"version-string": "2025.03.31.00",
|
||||
"port-version": 1,
|
||||
"description": "It comprises the core C++ HTTP abstractions used at Facebook.",
|
||||
"homepage": "https://github.com/facebook/proxygen",
|
||||
"license": "BSD-3-Clause",
|
||||
|
||||
@@ -7,12 +7,19 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
no-werror.patch
|
||||
pkgconfig.diff
|
||||
rtti.diff
|
||||
)
|
||||
file(COPY "${CURRENT_PORT_DIR}/snappy.pc.in" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS options
|
||||
FEATURES
|
||||
rtti SNAPPY_WITH_RTTI
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${options}
|
||||
-DSNAPPY_BUILD_TESTS=OFF
|
||||
-DSNAPPY_BUILD_BENCHMARKS=OFF
|
||||
|
||||
|
||||
27
ports/snappy/rtti.diff
Normal file
27
ports/snappy/rtti.diff
Normal file
@@ -0,0 +1,27 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cd71a47..d92aed0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -53,8 +53,10 @@ if(MSVC)
|
||||
add_definitions(-D_HAS_EXCEPTIONS=0)
|
||||
|
||||
# Disable RTTI.
|
||||
+ if(NOT SNAPPY_WITH_RTTI)
|
||||
string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
|
||||
+ endif()
|
||||
else(MSVC)
|
||||
# Use -Wall for clang and gcc.
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
|
||||
@@ -82,9 +84,11 @@ else(MSVC)
|
||||
string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
||||
|
||||
+ if(NOT SNAPPY_WITH_RTTI)
|
||||
# Disable RTTI.
|
||||
string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
|
||||
+ endif()
|
||||
endif(MSVC)
|
||||
|
||||
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "snappy",
|
||||
"version": "1.2.2",
|
||||
"port-version": 1,
|
||||
"description": "A fast compressor/decompressor.",
|
||||
"homepage": "https://github.com/google/snappy",
|
||||
"license": null,
|
||||
@@ -13,5 +14,10 @@
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"rtti": {
|
||||
"description": "Build with dynamic typeinfo."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -821,7 +821,6 @@ popsift:x64-windows-release=fail
|
||||
popsift:x64-windows-static-md=fail
|
||||
popsift:x64-windows-static=fail
|
||||
popsift:x64-windows=fail
|
||||
proxygen:x64-linux=fail
|
||||
python2:arm-neon-android=fail
|
||||
python2:arm64-android=fail
|
||||
python2:x64-android=fail
|
||||
|
||||
1
scripts/test_ports/vcpkg-ci-folly/portfile.cmake
Normal file
1
scripts/test_ports/vcpkg-ci-folly/portfile.cmake
Normal file
@@ -0,0 +1 @@
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
42
scripts/test_ports/vcpkg-ci-folly/vcpkg.json
Normal file
42
scripts/test_ports/vcpkg-ci-folly/vcpkg.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "vcpkg-ci-folly",
|
||||
"version-string": "ci",
|
||||
"description": "Port to force features of folly within CI",
|
||||
"homepage": "https://github.com/microsoft/vcpkg",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "folly",
|
||||
"default-features": false
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"all"
|
||||
],
|
||||
"features": {
|
||||
"all": {
|
||||
"description": "Test all features",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "folly",
|
||||
"features": [
|
||||
"bzip2",
|
||||
{
|
||||
"name": "libaio",
|
||||
"platform": "linux"
|
||||
},
|
||||
"libsodium",
|
||||
{
|
||||
"name": "liburing",
|
||||
"platform": "linux"
|
||||
},
|
||||
"lz4",
|
||||
"lzma",
|
||||
"snappy",
|
||||
"zstd"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1494,7 +1494,7 @@
|
||||
},
|
||||
"cachelib": {
|
||||
"baseline": "2025.03.31.00",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"caf": {
|
||||
"baseline": "1.0.2",
|
||||
@@ -2758,7 +2758,7 @@
|
||||
},
|
||||
"fbthrift": {
|
||||
"baseline": "2025.03.31.00",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"fcl": {
|
||||
"baseline": "0.7.0",
|
||||
@@ -2898,7 +2898,7 @@
|
||||
},
|
||||
"folly": {
|
||||
"baseline": "2025.03.31.00",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"font-chef": {
|
||||
"baseline": "1.1.0",
|
||||
@@ -7414,7 +7414,7 @@
|
||||
},
|
||||
"proxygen": {
|
||||
"baseline": "2025.03.31.00",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"psimd": {
|
||||
"baseline": "2021-02-21",
|
||||
@@ -8670,7 +8670,7 @@
|
||||
},
|
||||
"snappy": {
|
||||
"baseline": "1.2.2",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"snitch": {
|
||||
"baseline": "1.2.5",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "5c4fcce07bd96e909e8948da811a6ae44ee0abfb",
|
||||
"version-string": "2025.03.31.00",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "9ee8e9dc695a700e1fd730486cc9ea4d316512e9",
|
||||
"version-string": "2025.03.31.00",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2823034b22f0379f77b87a41e5a86508b13481f0",
|
||||
"version-string": "2025.03.31.00",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "4c9ef4f9e1fa4a142002757d5f517916c697ca37",
|
||||
"version-string": "2025.03.31.00",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "bd372942cd477403c4df85d991dedd83ab5996d9",
|
||||
"version-string": "2025.03.31.00",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "4efcd3d0f6a67269983a285fa6e41aee0a50763b",
|
||||
"version-string": "2025.03.31.00",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "c9f2141a88196660b076210f9434e701ad3e41f6",
|
||||
"version-string": "2025.03.31.00",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "688c838faded0647d292a79d3976c6c107e6fa50",
|
||||
"version-string": "2025.03.31.00",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b493c37dddc115546ae73cc86106acd93d9916c5",
|
||||
"version": "1.2.2",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "94c3957b07adbed73603330f9f3a7212f911b339",
|
||||
"version": "1.2.2",
|
||||
|
||||
Reference in New Issue
Block a user