early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

42
externals/vcpkg/ports/openvpn3/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 3.5)
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})
if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
endif()
add_definitions(-DNOMINMAX -DUSE_ASIO -DUSE_MBEDTLS -D_WIN32_WINNT=0x0600)
if(LINUX)
add_compile_options(-include bits/endian.h)
endif()
add_library(ovpncli client/ovpncli.cpp)
target_link_libraries(ovpncli PRIVATE Iphlpapi.lib Wininet.lib Setupapi.lib Cfgmgr32.lib Rpcrt4.lib Fwpuclnt.lib Wtsapi32.lib ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB} ${MBEDX509_LIB})
target_include_directories(ovpncli PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
install(
TARGETS ovpncli
EXPORT unofficial-openvpnConfig
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
INSTALL(EXPORT unofficial-openvpnConfig
NAMESPACE unofficial::openvpn3::
DESTINATION share/unofficial-openvpn
)
if(BUILD_TOOL)
add_executable(cli test/ovpncli/cli.cpp)
target_compile_definitions(cli PRIVATE -DTAP_WIN_COMPONENT_ID=tap0901)
target_link_libraries(cli PRIVATE ovpncli)
endif()

37
externals/vcpkg/ports/openvpn3/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,37 @@
set(VCPKG_LIBRARY_LINKAGE static)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OpenVPN/openvpn3
REF release/3.7
SHA512 de95bd2b1a01179aa81e1612be175540c2486b856f66880372d09966655bbbadd71d874ed49b032566dde2896207bc76298c5cfcf73e86272c04d5aaa977d660
HEAD_REF master
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
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()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-openvpn CONFIG_PATH share/unofficial-openvpn)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL
"${SOURCE_PATH}/COPYRIGHT.AGPLV3"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

24
externals/vcpkg/ports/openvpn3/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,24 @@
{
"name": "openvpn3",
"version": "3.7.0",
"port-version": 1,
"description": "a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch.",
"homepage": "https://openvpn.net",
"license": "AGPL-3.0",
"dependencies": [
"asio",
"mbedtls",
{
"name": "tap-windows6",
"platform": "windows"
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}