aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libevhtp
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libevhtp
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libevhtp')
-rw-r--r--vcpkg/ports/libevhtp/fix-cmake4.patch16
-rw-r--r--vcpkg/ports/libevhtp/portfile.cmake33
-rw-r--r--vcpkg/ports/libevhtp/vcpkg.json42
3 files changed, 91 insertions, 0 deletions
diff --git a/vcpkg/ports/libevhtp/fix-cmake4.patch b/vcpkg/ports/libevhtp/fix-cmake4.patch
new file mode 100644
index 0000000..1d3fd60
--- /dev/null
+++ b/vcpkg/ports/libevhtp/fix-cmake4.patch
@@ -0,0 +1,16 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 481ddd0e86..a1a806ce99 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -40,7 +40,10 @@ check_type_size("int" SIZEOF_INT)
+ check_type_size("long" SIZEOF_LONG)
+ check_type_size("short" SIZEOF_SHORT)
+
+-test_big_endian(HOST_BIG_ENDIAN)
++set(HOST_BIG_ENDIAN OFF)
++if(CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN")
++ set(HOST_BIG_ENDIAN ON)
++endif()
+
+ check_c_compiler_flag(-std=c99 has_c99)
+
diff --git a/vcpkg/ports/libevhtp/portfile.cmake b/vcpkg/ports/libevhtp/portfile.cmake
new file mode 100644
index 0000000..753e8c0
--- /dev/null
+++ b/vcpkg/ports/libevhtp/portfile.cmake
@@ -0,0 +1,33 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO criticalstack/libevhtp
+ REF e200bfa85bf253e9cfe1c1a9e705fccb176b9171
+ SHA512 d77d6d12dcc2762c8311a04cd3d33c7dfde7b406dbbb544d683e6a3b8e5912ba37a196470bc5aca92b58bd9659fbb396e5a11234b98435534f535046d6dab6eb
+ HEAD_REF master
+ PATCHES
+ fix-cmake4.patch
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ INVERTED_FEATURES
+ openssl EVHTP_DISABLE_SSL
+ thread EVHTP_DISABLE_EVTHR
+ regex EVHTP_DISABLE_REGEX
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS ${FEATURE_OPTIONS}
+)
+
+vcpkg_cmake_install()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
+
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+vcpkg_fixup_pkgconfig()
diff --git a/vcpkg/ports/libevhtp/vcpkg.json b/vcpkg/ports/libevhtp/vcpkg.json
new file mode 100644
index 0000000..c65e4eb
--- /dev/null
+++ b/vcpkg/ports/libevhtp/vcpkg.json
@@ -0,0 +1,42 @@
+{
+ "name": "libevhtp",
+ "version": "1.2.18",
+ "port-version": 6,
+ "description": "Libevhtp was created as a replacement API for Libevent's current HTTP API.",
+ "homepage": "https://github.com/criticalstack/libevhtp",
+ "supports": "!windows",
+ "dependencies": [
+ "libevent",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "openssl": {
+ "description": "Support SSL for libevhtp",
+ "dependencies": [
+ {
+ "name": "libevent",
+ "features": [
+ "openssl"
+ ]
+ },
+ "openssl"
+ ]
+ },
+ "regex": {
+ "description": "Support oniguruma for libevhtp",
+ "dependencies": [
+ "oniguruma"
+ ]
+ },
+ "thread": {
+ "description": "Support thread for libevhtp"
+ }
+ }
+}