diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/proxygen | |
Diffstat (limited to 'vcpkg/ports/proxygen')
| -rw-r--r-- | vcpkg/ports/proxygen/fix-dependency.patch | 78 | ||||
| -rw-r--r-- | vcpkg/ports/proxygen/folly-has-liburing.diff | 13 | ||||
| -rw-r--r-- | vcpkg/ports/proxygen/portfile.cmake | 33 | ||||
| -rw-r--r-- | vcpkg/ports/proxygen/remove-register.patch | 12 | ||||
| -rw-r--r-- | vcpkg/ports/proxygen/vcpkg.json | 38 |
5 files changed, 174 insertions, 0 deletions
diff --git a/vcpkg/ports/proxygen/fix-dependency.patch b/vcpkg/ports/proxygen/fix-dependency.patch new file mode 100644 index 0000000..8f709b4 --- /dev/null +++ b/vcpkg/ports/proxygen/fix-dependency.patch @@ -0,0 +1,78 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dde1bcd..f72165b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -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(ZLIB REQUIRED) + find_package(OpenSSL REQUIRED) + find_package(Threads) +@@ -130,6 +130,7 @@ SET(GFLAG_DEPENDENCIES "") + SET(PROXYGEN_EXTRA_LINK_LIBRARIES "") + SET(PROXYGEN_EXTRA_INCLUDE_DIRECTORIES "") + ++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 6849b0a..1d2cad2 100644 +--- a/cmake/proxygen-config.cmake.in ++++ b/cmake/proxygen-config.cmake.in +@@ -17,17 +17,21 @@ + @PACKAGE_INIT@ + + include(CMakeFindDependencyMacro) +-find_dependency(fmt) +-find_dependency(folly) +-find_dependency(wangle) +-find_dependency(mvfst) +-find_dependency(Fizz) ++find_dependency(fmt CONFIG) ++find_dependency(folly CONFIG) ++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 + # discussed on D24686032. + # +-# find_dependency(Zstd) ++find_dependency(zstd CONFIG) + 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} + ) + diff --git a/vcpkg/ports/proxygen/folly-has-liburing.diff b/vcpkg/ports/proxygen/folly-has-liburing.diff new file mode 100644 index 0000000..610a977 --- /dev/null +++ b/vcpkg/ports/proxygen/folly-has-liburing.diff @@ -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"); diff --git a/vcpkg/ports/proxygen/portfile.cmake b/vcpkg/ports/proxygen/portfile.cmake new file mode 100644 index 0000000..2bbb5cf --- /dev/null +++ b/vcpkg/ports/proxygen/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO facebook/proxygen
+ REF "v${VERSION}"
+ SHA512 7b122317ebd9d781df9568cfb991483e19ed2b8e2a76e5a12af7399e3a656b269e813784c65b490c6b45b9a0aa5658f4f0a5a64ed4fa5ade100b73fb3a9e6e8e
+ HEAD_REF main
+ PATCHES
+ remove-register.patch
+ folly-has-liburing.diff
+ fix-dependency.patch
+)
+
+vcpkg_find_acquire_program(PYTHON3)
+
+vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
+
+vcpkg_cmake_configure(
+ 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)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/proxygen/remove-register.patch b/vcpkg/ports/proxygen/remove-register.patch new file mode 100644 index 0000000..7b7bd91 --- /dev/null +++ b/vcpkg/ports/proxygen/remove-register.patch @@ -0,0 +1,12 @@ +diff --git a/proxygen/lib/utils/gen_perfect_hash_table.sh b/proxygen/lib/utils/gen_perfect_hash_table.sh +index 8de2871..bf40ba1 100755 +--- a/proxygen/lib/utils/gen_perfect_hash_table.sh ++++ b/proxygen/lib/utils/gen_perfect_hash_table.sh +@@ -32,6 +32,7 @@ function generate_perfect_hash_table { + # Generate output source file. + LC_ALL=C sort -u ${1?} | awk "${6?}" - "${5?}" | \ + ${8:-gperf} -m5 -D --output-file="${7?}" ++ perl -p -i -e "s/register//g" "${7?}" + + # Here we delete one of the comment lines gperf adds to the top of the file. + # i.e. /* Command-line: .../gperf -m5 --output-file=... */ diff --git a/vcpkg/ports/proxygen/vcpkg.json b/vcpkg/ports/proxygen/vcpkg.json new file mode 100644 index 0000000..f47de33 --- /dev/null +++ b/vcpkg/ports/proxygen/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "proxygen", + "version-string": "2025.05.19.00", + "description": "It comprises the core C++ HTTP abstractions used at Facebook.", + "homepage": "https://github.com/facebook/proxygen", + "license": "BSD-3-Clause", + "supports": "!windows", + "dependencies": [ + "boost-context", + "boost-date-time", + "boost-filesystem", + "boost-iostreams", + "boost-program-options", + "boost-regex", + "boost-system", + "boost-thread", + "fizz", + "folly", + "gflags", + { + "name": "gperf", + "host": true + }, + "mvfst", + "openssl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "wangle", + "zlib", + "zstd" + ] +} |