aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-03-21 00:40:37 -0700
committerRobert Schumacher <roschuma@microsoft.com>2018-03-21 00:40:37 -0700
commitb676c460435442250bbecd407f0ff289dbd289a6 (patch)
treed1a48b6c57e20dee0ba7efdf4adb4d198bb526a3
parentd5e433f03bf5220ef075489c18f5d1522fda1a4d (diff)
downloadvcpkg-b676c460435442250bbecd407f0ff289dbd289a6.tar.gz
vcpkg-b676c460435442250bbecd407f0ff289dbd289a6.zip
[nanomsg] Initial commit of 1.1.2
-rw-r--r--ports/nanomsg/CONTROL4
-rw-r--r--ports/nanomsg/portfile.cmake38
2 files changed, 42 insertions, 0 deletions
diff --git a/ports/nanomsg/CONTROL b/ports/nanomsg/CONTROL
new file mode 100644
index 000000000..c39df5e95
--- /dev/null
+++ b/ports/nanomsg/CONTROL
@@ -0,0 +1,4 @@
+Source: nanomsg
+Version: 1.1.2
+Description: a simple high-performance implementation of several "scalability protocols".
+ These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket.
diff --git a/ports/nanomsg/portfile.cmake b/ports/nanomsg/portfile.cmake
new file mode 100644
index 000000000..a869baea4
--- /dev/null
+++ b/ports/nanomsg/portfile.cmake
@@ -0,0 +1,38 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO nanomsg/nanomsg
+ REF 1.1.2
+ SHA512 f95ce24b34c25d139cf3de46585f6354e0311a9d5e7135ad71df62b8bb5df26f81a58b9773c39c320df2d0e97cd2905a8576f9f00b0a4d33774f1b610271cee5
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" NN_STATIC_LIB)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE
+ -DNN_STATIC_LIB=${NN_STATIC_LIB}
+ -DNN_TESTS=OFF
+ -DNN_TOOLS=OFF
+ -DNN_ENABLE_DOC=OFF
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(READ ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h _contents)
+ string(REPLACE "defined(NN_STATIC_LIB)" "1" _contents "${_contents}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h "${_contents}")
+endif()
+
+file(INSTALL
+ ${SOURCE_PATH}/COPYING
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanomsg RENAME copyright)
+
+vcpkg_copy_pdbs()