mirror of https://github.com/microsoft/vcpkg.git
[picohttpparser] Add new port, devendor from [cinatra] (#51743)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
2f04408a99
commit
14da8d976f
|
|
@ -0,0 +1,27 @@
|
|||
From dfdd983a4daed8a12c0283e579d8d2e31a2504fc Mon Sep 17 00:00:00 2001
|
||||
From: vcpkg <patch@vcpkg>
|
||||
Date: Wed, 13 May 2026 15:05:10 -0700
|
||||
Subject: [PATCH] Use unique include guard for vendored picohttpparser
|
||||
|
||||
---
|
||||
include/cinatra/picohttpparser.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/cinatra/picohttpparser.h b/include/cinatra/picohttpparser.h
|
||||
index 30e3b45..dc26bb4 100644
|
||||
--- a/include/cinatra/picohttpparser.h
|
||||
+++ b/include/cinatra/picohttpparser.h
|
||||
@@ -24,8 +24,8 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
-#ifndef picohttpparser_h
|
||||
-#define picohttpparser_h
|
||||
+#ifndef cinatra_picohttpparser_h
|
||||
+#define cinatra_picohttpparser_h
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
--
|
||||
2.54.0.windows.1
|
||||
|
||||
|
|
@ -5,6 +5,8 @@ vcpkg_from_github(
|
|||
REF ${VERSION}
|
||||
SHA512 dfc58ab01ea962f007e8922a4614b3017f4e6da03d5f79edf3b8ee2750a23803b20fc905ffb1600ee7d2440339b84543c61ddae58e13a587d357db8372baf510
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-picohttpparser-include-guard.patch
|
||||
)
|
||||
|
||||
# Install Cinatra’s headers
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "cinatra",
|
||||
"version": "1.0.0",
|
||||
"port-version": 1,
|
||||
"description": "Cinatra is a high performance HTTP framework with modern C++ features.",
|
||||
"homepage": "https://github.com/qicosmos/cinatra",
|
||||
"license": "MIT",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
cmake_minimum_required(VERSION 3.14)
|
||||
project(picohttpparser C)
|
||||
|
||||
add_library(picohttpparser picohttpparser.c)
|
||||
|
||||
target_include_directories(picohttpparser
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
install(TARGETS picohttpparser
|
||||
EXPORT unofficial-picohttpparser-config
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
install(FILES picohttpparser.h DESTINATION include)
|
||||
|
||||
install(EXPORT unofficial-picohttpparser-config
|
||||
FILE unofficial-picohttpparser-config.cmake
|
||||
NAMESPACE unofficial::picohttpparser::
|
||||
DESTINATION share/unofficial-picohttpparser
|
||||
)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO h2o/picohttpparser
|
||||
REF f4d94b48b31e0abae029ebeafcfd9ca0680ede58
|
||||
SHA512 7d94d107572c0fcf138636fb0693e87b8302adf08265d6361763384d428f979d9c1f5a627ffa8ad2ee855ec29d3b5c39ee8fba63b5e757830c3bad266940cf54
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-picohttpparser)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/picohttpparser.h")
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
picohttpparser provides CMake targets:
|
||||
|
||||
find_package(unofficial-picohttpparser CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE unofficial::picohttpparser::picohttpparser)
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "picohttpparser",
|
||||
"version-date": "2026-04-06",
|
||||
"description": "Tiny, primitive, fast HTTP request/response parser",
|
||||
"homepage": "https://github.com/h2o/picohttpparser",
|
||||
"license": "MIT OR Artistic-2.0",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1746,7 +1746,7 @@
|
|||
},
|
||||
"cinatra": {
|
||||
"baseline": "1.0.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"cista": {
|
||||
"baseline": "0.16",
|
||||
|
|
@ -7732,6 +7732,10 @@
|
|||
"baseline": "2.9.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"picohttpparser": {
|
||||
"baseline": "2026-04-06",
|
||||
"port-version": 0
|
||||
},
|
||||
"picojson": {
|
||||
"baseline": "1.3.0",
|
||||
"port-version": 3
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "89f5d9ea7ec5934de0cc2a2ce16c236988e26450",
|
||||
"version": "1.0.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "69d3ae25fd17ae739b6f5cff68a5a12249090182",
|
||||
"version": "1.0.0",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "696c1ab34b006932dbe48891f1d46e64e06bef4d",
|
||||
"version-date": "2026-04-06",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue