aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorithewei <ithewei@163.com>2021-03-02 08:07:58 +0800
committerGitHub <noreply@github.com>2021-03-01 16:07:58 -0800
commit8e31229c72fe2d8f2bebc42820a6978d2e8affcb (patch)
tree4bb06eb75f5cbcc23e7140a68537d86c5224956f
parentb554d3ad08824800c72776af5e2ad9d6533815f9 (diff)
downloadvcpkg-8e31229c72fe2d8f2bebc42820a6978d2e8affcb.tar.gz
vcpkg-8e31229c72fe2d8f2bebc42820a6978d2e8affcb.zip
[libhv] Add new port (#16460)
* [libhv] Add new port * vcpkg format-manifest ports/libhv/vcpkg.json * vcpkg x-add-version libhv * libhv:arm64-windows arm-uwp x64-uwp:fail * [libhv]: -DBUILD_EXAMPLES=OFF -DBUILD_UNITTEST=OFF * vcpkg x-add-version --overwrite-version libhv * [libhv]: update version and supports format * [libhv]: update versions * [libhv] vcpkg_fail_port_install(ON_ARCH arm ON_TARGET uwp) * [libhv] update versions * [libhv] Only build one flavor Co-authored-by: hewei.it <hewei.it@bytedance.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
-rw-r--r--ports/libhv/portfile.cmake28
-rw-r--r--ports/libhv/vcpkg.json7
-rw-r--r--versions/baseline.json4
-rw-r--r--versions/l-/libhv.json9
4 files changed, 48 insertions, 0 deletions
diff --git a/ports/libhv/portfile.cmake b/ports/libhv/portfile.cmake
new file mode 100644
index 000000000..8f25101c0
--- /dev/null
+++ b/ports/libhv/portfile.cmake
@@ -0,0 +1,28 @@
+vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ithewei/libhv
+ REF v1.0.0
+ SHA512 49d9e93444667ff143048abc05f88aab23ec5c543c58d0494bac9c29ac8216760220f19828bde6b84a5864bc8c5ec280ee4a72cc5ba888a4f02734240243cb07
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_EXAMPLES=OFF
+ -DBUILD_UNITTEST=OFF
+ -DBUILD_STATIC=${BUILD_STATIC}
+ -DBUILD_SHARED=${BUILD_SHARED}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/libhv/vcpkg.json b/ports/libhv/vcpkg.json
new file mode 100644
index 000000000..adfef8d20
--- /dev/null
+++ b/ports/libhv/vcpkg.json
@@ -0,0 +1,7 @@
+{
+ "name": "libhv",
+ "version": "1.0.0",
+ "description": "Libhv is a C/C++ network library similar to libevent/libuv.",
+ "homepage": "https://github.com/ithewei/libhv",
+ "supports": "!(arm | uwp)"
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index aa63a9622..aa207cb15 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3072,6 +3072,10 @@
"baseline": "2020.08.30",
"port-version": 0
},
+ "libhv": {
+ "baseline": "1.0.0",
+ "port-version": 0
+ },
"libhydrogen": {
"baseline": "2019-08-11",
"port-version": 0
diff --git a/versions/l-/libhv.json b/versions/l-/libhv.json
new file mode 100644
index 000000000..bf02f8121
--- /dev/null
+++ b/versions/l-/libhv.json
@@ -0,0 +1,9 @@
+{
+ "versions": [
+ {
+ "git-tree": "53457f5b0cce060b81f86072bde37a9607fe38a8",
+ "version": "1.0.0",
+ "port-version": 0
+ }
+ ]
+}