aboutsummaryrefslogtreecommitdiff
path: root/ports/restbed
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2019-11-22 09:47:40 -0800
committerGitHub <noreply@github.com>2019-11-22 09:47:40 -0800
commit45f4b820e5743b89bca3508ba2028cdd5d8bbd17 (patch)
treef874a8c4a7392309bdbb86447288597ec0a4a281 /ports/restbed
parent62d67d3bf8eeff1afa8009041fd08b8822676b7b (diff)
parent8831e8f25f1ff6546ee4a5291b91d599421637b3 (diff)
downloadvcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.tar.gz
vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.zip
Merge branch 'master' into vcpkg_nuget
Diffstat (limited to 'ports/restbed')
-rw-r--r--ports/restbed/CONTROL8
-rw-r--r--ports/restbed/add_openssl_support.patch37
-rw-r--r--ports/restbed/portfile.cmake12
3 files changed, 53 insertions, 4 deletions
diff --git a/ports/restbed/CONTROL b/ports/restbed/CONTROL
index d0eab13ce..7259f92c6 100644
--- a/ports/restbed/CONTROL
+++ b/ports/restbed/CONTROL
@@ -1,4 +1,8 @@
Source: restbed
-Version: 4.16-07-28-2018
+Version: 4.16-07-28-2018-2
Description: Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++11 applications.
-Build-Depends: asio \ No newline at end of file
+Build-Depends: asio
+
+Feature: openssl
+Build-Depends: openssl
+Description: Secure over the wire communication allowing you to transmit private data online.
diff --git a/ports/restbed/add_openssl_support.patch b/ports/restbed/add_openssl_support.patch
new file mode 100644
index 000000000..72d4dc406
--- /dev/null
+++ b/ports/restbed/add_openssl_support.patch
@@ -0,0 +1,37 @@
+diff --git a/cmake/Findopenssl.cmake b/cmake/Findopenssl.cmake
+index 8db9799..626ff55 100644
+--- a/cmake/Findopenssl.cmake
++++ b/cmake/Findopenssl.cmake
+@@ -1,24 +1,7 @@
+-find_library( ssl_LIBRARY_STATIC libssl.a ssleay32.lib HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" )
+-find_library( crypto_LIBRARY_STATIC libcrypto.a libeay32.lib HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" )
+-
+-find_library( ssl_LIBRARY_SHARED libssl.so libssl.dylib ssleay32.dll HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" )
+-find_library( crypto_LIBRARY_SHARED libcrypto.so libcrypto.dylib libeay32.dll HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" )
+-
+-find_path( ssl_INCLUDE openssl/ssl.h HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/inc32" "${PROJECT_SOURCE_DIR}/dependency/openssl/include" "/usr/local/opt/openssl/include" "/usr/include" "/usr/local/include" "/opt/local/include" )
+-
+-if ( ssl_LIBRARY_STATIC AND ssl_LIBRARY_SHARED AND crypto_LIBRARY_STATIC AND crypto_LIBRARY_SHARED )
+- set( OPENSSL_FOUND TRUE )
+- add_definitions( -DBUILD_SSL=TRUE )
+-
+- if ( APPLE AND BUILD_SSL )
+- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" )
+- endif( )
+-
+- message( STATUS "Found OpenSSL include at: ${ssl_INCLUDE}" )
+- message( STATUS "Found OpenSSL library at: ${ssl_LIBRARY_STATIC}" )
+- message( STATUS "Found OpenSSL library at: ${ssl_LIBRARY_SHARED}" )
+- message( STATUS "Found Crypto library at: ${crypto_LIBRARY_STATIC}" )
+- message( STATUS "Found Crypto library at: ${crypto_LIBRARY_SHARED}" )
+-else ( )
+- message( FATAL_ERROR "Failed to locate OpenSSL dependency. see restbed/dependency/openssl; ./config shared; make all" )
+-endif ( )
++if (BUILD_SSL)
++ set( OPENSSL_FOUND TRUE )
++ add_definitions( -DBUILD_SSL=TRUE )
++ if ( APPLE AND BUILD_SSL )
++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" )
++ endif( )
++endif()
+\ No newline at end of file
diff --git a/ports/restbed/portfile.cmake b/ports/restbed/portfile.cmake
index 60f1247d8..5c653bd4f 100644
--- a/ports/restbed/portfile.cmake
+++ b/ports/restbed/portfile.cmake
@@ -2,20 +2,28 @@ include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+set(USE_OPENSSL OFF)
+if("openssl" IN_LIST FEATURES)
+ set(ADDITIONAL_PATCH "add_openssl_support.patch")
+ set(USE_OPENSSL ON)
+endif()
+
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Corvusoft/restbed
REF 0f8af8d8ed183a88e208adeb22da0080d5d74d1e
SHA512 f0175a10c88f1ad4f16c8e4cff7ceea7b80c56b0724b59791c23e91f1ecf146dfdbda9e9238d31a35f21d8cdcc413b586cc633725dd0ba87de6b599a7087916f
HEAD_REF master
- PATCHES cmake.patch
+ PATCHES
+ cmake.patch
+ ${ADDITIONAL_PATCH}
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
- -DBUILD_SSL=OFF
+ -DBUILD_SSL=${USE_OPENSSL}
-DDISABLE_TESTS=ON
)