early-access version 2853
This commit is contained in:
13
externals/vcpkg/ports/libtins/find-pcap_static.patch
vendored
Executable file
13
externals/vcpkg/ports/libtins/find-pcap_static.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/Modules/FindPCAP.cmake b/cmake/Modules/FindPCAP.cmake
|
||||
index 388b30b..f5264c3 100644
|
||||
--- a/cmake/Modules/FindPCAP.cmake
|
||||
+++ b/cmake/Modules/FindPCAP.cmake
|
||||
@@ -38,7 +38,7 @@ if (${CMAKE_SIZEOF_VOID_P} EQUAL 8 AND WIN32)
|
||||
endif ()
|
||||
|
||||
find_library(PCAP_LIBRARY
|
||||
- NAMES pcap wpcap
|
||||
+ NAMES pcap wpcap pcap_static NAMES_PER_DIR
|
||||
HINTS ${HINT_DIR}
|
||||
)
|
||||
|
||||
36
externals/vcpkg/ports/libtins/fix-source-writes.patch
vendored
Executable file
36
externals/vcpkg/ports/libtins/fix-source-writes.patch
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1e13def..eda8d68 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -228,8 +228,9 @@ ENDIF(DOXYGEN_FOUND)
|
||||
# Configuration file
|
||||
CONFIGURE_FILE(
|
||||
"${PROJECT_SOURCE_DIR}/include/tins/config.h.in"
|
||||
- "${PROJECT_SOURCE_DIR}/include/tins/config.h"
|
||||
+ "${PROJECT_BINARY_DIR}/include/tins/config.h"
|
||||
)
|
||||
+INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/include")
|
||||
|
||||
IF (NOT CMAKE_INSTALL_LIBDIR)
|
||||
SET(CMAKE_INSTALL_LIBDIR lib)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index e07772e..94bc8bf 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -82,7 +82,7 @@ set(HEADERS
|
||||
${LIBTINS_INCLUDE_DIR}/tins/handshake_capturer.h
|
||||
${LIBTINS_INCLUDE_DIR}/tins/stp.h
|
||||
${LIBTINS_INCLUDE_DIR}/tins/pppoe.h
|
||||
- ${LIBTINS_INCLUDE_DIR}/tins/config.h
|
||||
+ ${PROJECT_BINARY_DIR}/include/tins/config.h
|
||||
${LIBTINS_INCLUDE_DIR}/tins/constants.h
|
||||
${LIBTINS_INCLUDE_DIR}/tins/crypto.h
|
||||
${LIBTINS_INCLUDE_DIR}/tins/cxxstd.h
|
||||
@@ -229,6 +229,7 @@ MACRO(INSTALL_HEADERS_WITH_DIRECTORY HEADER_LIST)
|
||||
FOREACH(HEADER ${HEADERS})
|
||||
# Extract directory name and remove leading '../'
|
||||
get_filename_component(DIR ${HEADER} PATH)
|
||||
+ string(REPLACE "${PROJECT_BINARY_DIR}/" "" DIR ${DIR})
|
||||
STRING(REGEX REPLACE "^\\.\\.\\/" "" DIR ${DIR})
|
||||
INSTALL(FILES ${HEADER} DESTINATION ${DIR})
|
||||
ENDFOREACH(HEADER)
|
||||
48
externals/vcpkg/ports/libtins/portfile.cmake
vendored
Executable file
48
externals/vcpkg/ports/libtins/portfile.cmake
vendored
Executable file
@@ -0,0 +1,48 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mfontanini/libtins
|
||||
REF v4.3
|
||||
SHA512 29d606004fe9a440c9a53eede42fd5c6dbd049677d2cca2c5cfd26311ee2ca4c64ca3e665fbc81efd5bfab5577a5181ed0754c617e139317d9ae0cabba05aff7
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-source-writes.patch
|
||||
find-pcap_static.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTINS_BUILD_SHARED)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DLIBTINS_BUILD_SHARED=${LIBTINS_BUILD_SHARED}
|
||||
-DLIBTINS_ENABLE_CXX11=1
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=1
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
|
||||
else()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libtins)
|
||||
endif()
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/libtins/libtinsConfig.cmake" "set(LIBTINS_INCLUDE_DIRS \"${SOURCE_PATH}/include\")" [[
|
||||
get_filename_component(LIBTINS_CMAKE_DIR "${LIBTINS_CMAKE_DIR}" PATH)
|
||||
get_filename_component(LIBTINS_CMAKE_DIR "${LIBTINS_CMAKE_DIR}" PATH)
|
||||
set(LIBTINS_INCLUDE_DIRS "${LIBTINS_CMAKE_DIR}/include")
|
||||
]])
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/libtins/libtinsConfig.cmake" "\${LIBTINS_CMAKE_DIR}/libtinsTargets.cmake" "\${CMAKE_CURRENT_LIST_DIR}/libtinsTargets.cmake")
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/tins/macros.h" "!defined(TINS_STATIC)" "1")
|
||||
else()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/tins/macros.h" "!defined(TINS_STATIC)" "0")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libtins" RENAME copyright)
|
||||
22
externals/vcpkg/ports/libtins/vcpkg.json
vendored
Executable file
22
externals/vcpkg/ports/libtins/vcpkg.json
vendored
Executable file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "libtins",
|
||||
"version": "4.3",
|
||||
"port-version": 6,
|
||||
"description": "High-level, multiplatform C++ network packet sniffing and crafting library",
|
||||
"license": "BSD-2-Clause",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"boost-any",
|
||||
"boost-icl",
|
||||
"libpcap",
|
||||
"openssl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user