diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-03-21 02:32:35 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-03-21 09:50:10 -0700 |
| commit | da9c2e79a544e341fd9488695f5e369f3356323e (patch) | |
| tree | c903add0c4ded34a991b2b3808e5101c550c61ac | |
| parent | 43c804a59eebd466835d79ce61628668f0f5b7ee (diff) | |
| download | vcpkg-da9c2e79a544e341fd9488695f5e369f3356323e.tar.gz vcpkg-da9c2e79a544e341fd9488695f5e369f3356323e.zip | |
[openvpn3][tap-windows6] Initial commit
| -rw-r--r-- | ports/asio/CONTROL | 3 | ||||
| -rw-r--r-- | ports/openvpn3/CMakeLists.txt | 26 | ||||
| -rw-r--r-- | ports/openvpn3/CONTROL | 4 | ||||
| -rw-r--r-- | ports/openvpn3/portfile.cmake | 37 | ||||
| -rw-r--r-- | ports/tap-windows6/CONTROL | 3 | ||||
| -rw-r--r-- | ports/tap-windows6/portfile.cmake | 15 |
6 files changed, 87 insertions, 1 deletions
diff --git a/ports/asio/CONTROL b/ports/asio/CONTROL index d2ed48569..cd9914052 100644 --- a/ports/asio/CONTROL +++ b/ports/asio/CONTROL @@ -1,3 +1,4 @@ Source: asio
-Version: 1.12.0
+Version: 1.12.0-1
+Build-Depends: boost-config, boost-throw-exception, boost-utility, boost-date-time
Description: Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.
diff --git a/ports/openvpn3/CMakeLists.txt b/ports/openvpn3/CMakeLists.txt new file mode 100644 index 000000000..fcbe85794 --- /dev/null +++ b/ports/openvpn3/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.0)
+project(openvpncli CXX)
+
+find_path(ASIO_HPP asio.hpp)
+find_library(MBEDTLS_LIB mbedtls)
+find_library(MBEDCRYPTO_LIB mbedcrypto)
+find_library(MBEDX509_LIB mbedx509)
+
+include_directories(. ${ASIO_HPP})
+
+add_definitions(-DNOMINMAX -DUSE_ASIO -DUSE_MBEDTLS)
+
+add_library(ovpncli client/ovpncli.cpp)
+target_link_libraries(ovpncli PRIVATE Iphlpapi.lib ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB} ${MBEDX509_LIB})
+
+install(
+ TARGETS ovpncli
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(BUILD_TOOL)
+ add_executable(cli test/ovpncli/cli.cpp)
+ target_link_libraries(cli PRIVATE ovpncli)
+endif()
diff --git a/ports/openvpn3/CONTROL b/ports/openvpn3/CONTROL new file mode 100644 index 000000000..09264a192 --- /dev/null +++ b/ports/openvpn3/CONTROL @@ -0,0 +1,4 @@ +Source: openvpn3 +Version: 2018-03-21 +Build-Depends: asio, tap-windows6 (windows), mbedtls +Description: a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch. diff --git a/ports/openvpn3/portfile.cmake b/ports/openvpn3/portfile.cmake new file mode 100644 index 000000000..aede361dd --- /dev/null +++ b/ports/openvpn3/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +set(VCPKG_LIBRARY_LINKAGE static) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenVPN/openvpn3 + REF 3d5dd9ee3b4182032044d775de5401fc6a7a63ae + SHA512 6a8ed20662efa576c57f38fb9579c5808f745d44e8cd6a84055bec10a58ede5d27e207a842f79ac6a2f7d986494fbd2415f9d59e2b23bd38e45c68546a227697 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(COPY ${SOURCE_PATH}/openvpn DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +file(COPY ${SOURCE_PATH}/client/ovpncli.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/openvpn/) + +file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/openvpn/*) +foreach(HEADER IN LISTS HEADERS) + file(READ "${HEADER}" _contents) + string(REPLACE "defined(USE_ASIO)" "1" _contents "${_contents}") + string(REPLACE "#ifdef USE_ASIO\n" "#if 1\n" _contents "${_contents}") + string(REPLACE "defined(USE_MBEDTLS)" "1" _contents "${_contents}") + string(REPLACE "#ifdef USE_MBEDTLS\n" "#if 1\n" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +file(INSTALL + ${SOURCE_PATH}/COPYRIGHT.AGPLV3 + DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvpn3 RENAME copyright) diff --git a/ports/tap-windows6/CONTROL b/ports/tap-windows6/CONTROL new file mode 100644 index 000000000..744247c32 --- /dev/null +++ b/ports/tap-windows6/CONTROL @@ -0,0 +1,3 @@ +Source: tap-windows6 +Version: 9.21.2-0e30f5c +Description: an NDIS 6 implementation of the TAP-Windows driver, used by OpenVPN and other apps. Note: This package only contains the headers for the driver.
\ No newline at end of file diff --git a/ports/tap-windows6/portfile.cmake b/ports/tap-windows6/portfile.cmake new file mode 100644 index 000000000..4e2725d1e --- /dev/null +++ b/ports/tap-windows6/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenVPN/tap-windows6 + REF 0e30f5c13b3c7b0bdd60da915350f653e4c14d92 + SHA512 88edecccd4818091f7d70b66f3dfa07146f010a064829dc971abdd0c180ce1f72db9d8f3a1c9f5b4fb3f31e7afe3eadbd7d6f7d711f698e723441d30beaf9e30 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/src/tap-windows.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL + ${SOURCE_PATH}/COPYRIGHT.MIT + DESTINATION ${CURRENT_PACKAGES_DIR}/share/tap-windows6 RENAME copyright) |
