aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormyd7349 <myd7349@gmail.com>2019-03-05 02:23:14 +0800
committerVictor Romero <romerosanchezv@gmail.com>2019-03-04 10:23:14 -0800
commitd9f2784e19168ff8eff7556f6b532904b014a0f9 (patch)
tree5d27ec81471bb50da93d77b2369501bb539a35dd
parent8641dfd9dd6d3bf190515822060872a56ee37906 (diff)
downloadvcpkg-d9f2784e19168ff8eff7556f6b532904b014a0f9.tar.gz
vcpkg-d9f2784e19168ff8eff7556f6b532904b014a0f9.zip
[nng] Update to 2019-02-27 (#5501)
-rw-r--r--ports/nng/CONTROL2
-rw-r--r--ports/nng/portfile.cmake24
2 files changed, 23 insertions, 3 deletions
diff --git a/ports/nng/CONTROL b/ports/nng/CONTROL
index de66fb2c6..53de5d384 100644
--- a/ports/nng/CONTROL
+++ b/ports/nng/CONTROL
@@ -1,5 +1,5 @@
Source: nng
-Version: 1.1.0
+Version: 2019-02-27
Description: NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery.
Feature: mbedtls
diff --git a/ports/nng/portfile.cmake b/ports/nng/portfile.cmake
index b16632ff9..006617ca4 100644
--- a/ports/nng/portfile.cmake
+++ b/ports/nng/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nanomsg/nng
- REF v1.1.0
- SHA512 79f8d66cdf1d8f0f50f888edf59b46671ca7439d1da0f25e5f729bd1365b4bc2969c90a377bbd25c41f84eeb231d03fb0bc7c2d5435e3e55f4cf80ae62f9b934
+ REF ddeac617c9914284038241870cb99ae174fb3755
+ SHA512 c45f322dfa3fba42db0561d95546159cc5e0768345d27f0bee53bdb71e77d5892e2e9bea50a625094ebf3c67b0c3fe0a8edea2660ebcb4fd0991fb0602055bc1
HEAD_REF master
)
@@ -34,6 +34,26 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nng)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+vcpkg_replace_string(
+ ${CURRENT_PACKAGES_DIR}/include/nng/nng.h
+ "defined(NNG_SHARED_LIB)"
+ "0 /* defined(NNG_SHARED_LIB) */"
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ vcpkg_replace_string(
+ ${CURRENT_PACKAGES_DIR}/include/nng/nng.h
+ "!defined(NNG_STATIC_LIB)"
+ "1 /* !defined(NNG_STATIC_LIB) */"
+ )
+else()
+ vcpkg_replace_string(
+ ${CURRENT_PACKAGES_DIR}/include/nng/nng.h
+ "!defined(NNG_STATIC_LIB)"
+ "0 /* !defined(NNG_STATIC_LIB) */"
+ )
+endif()
+
# Put the licence file where vcpkg expects it
configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/nng/copyright COPYONLY)