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/llhttp | |
Diffstat (limited to 'vcpkg/ports/llhttp')
| -rw-r--r-- | vcpkg/ports/llhttp/fix-usage.patch | 15 | ||||
| -rw-r--r-- | vcpkg/ports/llhttp/portfile.cmake | 31 | ||||
| -rw-r--r-- | vcpkg/ports/llhttp/vcpkg.json | 17 |
3 files changed, 63 insertions, 0 deletions
diff --git a/vcpkg/ports/llhttp/fix-usage.patch b/vcpkg/ports/llhttp/fix-usage.patch new file mode 100644 index 0000000..3118ea1 --- /dev/null +++ b/vcpkg/ports/llhttp/fix-usage.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bdef288..72555c6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -77,6 +77,10 @@ function(config_library target)
+ NAMESPACE llhttp::
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/llhttp
+ )
++ target_include_directories(${target}
++ PRIVATE include ${CMAKE_CURRENT_BINARY_DIR}
++ INTERFACE $<INSTALL_INTERFACE:include>
++ )
+ endfunction(config_library target)
+
+ if(BUILD_SHARED_LIBS)
diff --git a/vcpkg/ports/llhttp/portfile.cmake b/vcpkg/ports/llhttp/portfile.cmake new file mode 100644 index 0000000..b679523 --- /dev/null +++ b/vcpkg/ports/llhttp/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO nodejs/llhttp
+ REF refs/tags/release/v${VERSION}
+ SHA512 7e6f5427b4b6d778ecefff892db78894ef4fd22a79e9c1f2c24d38d603d885755bdc8b0e8202b47c8bc209d3caf45a7293214617390a7a9c33bffbaab59fe5da + PATCHES
+ fix-usage.patch
+)
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LLHTTP_BUILD_STATIC)
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LLHTTP_BUILD_SHARED)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ DISABLE_PARALLEL_CONFIGURE
+ OPTIONS
+ -DBUILD_SHARED_LIBS=${LLHTTP_BUILD_SHARED}
+ -DBUILD_STATIC_LIBS=${LLHTTP_BUILD_STATIC}
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(
+ CONFIG_PATH "/lib/cmake/${PORT}"
+)
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE-MIT")
+
+vcpkg_fixup_pkgconfig()
diff --git a/vcpkg/ports/llhttp/vcpkg.json b/vcpkg/ports/llhttp/vcpkg.json new file mode 100644 index 0000000..e857c2b --- /dev/null +++ b/vcpkg/ports/llhttp/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "llhttp", + "version": "9.2.1", + "description": "Port of http_parser to llparse.", + "homepage": "https://github.com/nodejs/llhttp", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |