aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIronsDu <irons.du@gmail.com>2017-12-15 15:12:21 +0800
committerIronsDu <irons.du@gmail.com>2017-12-15 15:12:21 +0800
commit19cb7978387ff12edf992d0bfc23706f60a3b5a4 (patch)
tree0bf525442bc3b468cef7b66367b77eeba3e27097
parent839285590a727ee2570856e79424dffeced2c1ed (diff)
downloadvcpkg-19cb7978387ff12edf992d0bfc23706f60a3b5a4.tar.gz
vcpkg-19cb7978387ff12edf992d0bfc23706f60a3b5a4.zip
Added port brynet - A C++ cross platform high performance TCP network library using C++ 11.
-rw-r--r--ports/brynet/CONTROL4
-rw-r--r--ports/brynet/portfile.cmake42
2 files changed, 46 insertions, 0 deletions
diff --git a/ports/brynet/CONTROL b/ports/brynet/CONTROL
new file mode 100644
index 000000000..005d7d02e
--- /dev/null
+++ b/ports/brynet/CONTROL
@@ -0,0 +1,4 @@
+Source: brynet
+Version: 0.9.0
+Description: A C++ cross platform high performance tcp network library, and support SSL/HTTP/Websocket.
+Build-Depends:
diff --git a/ports/brynet/portfile.cmake b/ports/brynet/portfile.cmake
new file mode 100644
index 000000000..4321185d4
--- /dev/null
+++ b/ports/brynet/portfile.cmake
@@ -0,0 +1,42 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Alembic does not support dynamic linkage. Building statically.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+set(BRYNET_VERSION 0.9.0)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/brynet-${BRYNET_VERSION})
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/IronsDu/brynet/archive/v${BRYNET_VERSION}.zip"
+ FILENAME "v${BRYNET_VERSION}.zip"
+ SHA512 a39bdffe6bb9b93bd6f21da0d59b172c2956c5f9366716dff01027f59660ca4d28ee557a42caa93d93047e041438a1de42ed22c67a3c2124d105a63381ac3685
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+vcpkg_install_cmake()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(COPY ${CURRENT_BUILDTREES_DIR}/src/brynet-${BRYNET_VERSION}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brynet)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/brynet/LICENSE ${CURRENT_PACKAGES_DIR}/share/brynet/copyright)
+# Handle copyright
+# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brynet RENAME copyright)