From c353ab281208b5696bd60132671d180cdb87ca29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=90=E9=9B=81=E5=8D=97=E9=A3=9B?= Date: Thu, 1 Dec 2022 03:03:11 +0800 Subject: [PATCH] [llhttp] add new port (#28042) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add new ports llhttp * update llhttp baseline * Update ports/llhttp/vcpkg.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/llhttp/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * update llhttp version * Update ports/llhttp/vcpkg.json Co-authored-by: Mengna Li <95600143+Adela0814@users.noreply.github.com> * remove extra blank line * update llhttp version Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Mengna Li <95600143+Adela0814@users.noreply.github.com> --- ports/llhttp/portfile.cmake | 25 +++++++++++++++++++++++++ ports/llhttp/vcpkg.json | 17 +++++++++++++++++ versions/baseline.json | 4 ++++ versions/l-/llhttp.json | 9 +++++++++ 4 files changed, 55 insertions(+) create mode 100644 ports/llhttp/portfile.cmake create mode 100644 ports/llhttp/vcpkg.json create mode 100644 versions/l-/llhttp.json diff --git a/ports/llhttp/portfile.cmake b/ports/llhttp/portfile.cmake new file mode 100644 index 0000000000..a11788b991 --- /dev/null +++ b/ports/llhttp/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nodejs/llhttp + REF refs/tags/release/v8.1.0 + SHA512 3b79555f734a6a200a790f04f10be6d3ce5bd999c027a43c0900bb408e7d64be38fe4bbe9f15e57e389f07ba26b8089fc6ba5eef3b497742484f0719e92e9722 +) +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") diff --git a/ports/llhttp/vcpkg.json b/ports/llhttp/vcpkg.json new file mode 100644 index 0000000000..b8fe03ab08 --- /dev/null +++ b/ports/llhttp/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "llhttp", + "version": "8.1.0", + "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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index db562df26a..473849ecb8 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4580,6 +4580,10 @@ "baseline": "2019-08-15", "port-version": 2 }, + "llhttp": { + "baseline": "8.1.0", + "port-version": 0 + }, "llvm": { "baseline": "14.0.4", "port-version": 0 diff --git a/versions/l-/llhttp.json b/versions/l-/llhttp.json new file mode 100644 index 0000000000..628e34cf22 --- /dev/null +++ b/versions/l-/llhttp.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "39acd6919332902cf5fc9a9eb83e57f8eb548139", + "version": "8.1.0", + "port-version": 0 + } + ] +}