early-access version 2853
This commit is contained in:
31
externals/vcpkg/ports/libpcap/add-disable-packet-option.patch
vendored
Executable file
31
externals/vcpkg/ports/libpcap/add-disable-packet-option.patch
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2f675d1..e9d6d96 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -244,6 +244,7 @@ set(SEPTEL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../septel" CACHE PATH "Path to dire
|
||||
option(DISABLE_SNF "Disable Myricom SNF support" OFF)
|
||||
|
||||
option(DISABLE_TC "Disable Riverbed TurboCap support" OFF)
|
||||
+option(DISABLE_PACKET "Disable Packet support" OFF)
|
||||
|
||||
#
|
||||
# Debugging options.
|
||||
@@ -302,7 +303,7 @@ if(WIN32)
|
||||
if(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/../../Common)
|
||||
include_directories(${CMAKE_HOME_DIRECTORY}/../../Common)
|
||||
endif(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/../../Common)
|
||||
-
|
||||
+ if(NOT DISABLE_PACKET)
|
||||
find_package(Packet)
|
||||
if(PACKET_FOUND)
|
||||
set(HAVE_PACKET32 TRUE)
|
||||
@@ -317,7 +318,8 @@ if(WIN32)
|
||||
check_function_exists(PacketGetTimestampModes HAVE_PACKET_GET_TIMESTAMP_MODES)
|
||||
cmake_pop_check_state()
|
||||
endif(PACKET_FOUND)
|
||||
-
|
||||
+ endif()
|
||||
+
|
||||
message(STATUS "checking for Npcap's version.h")
|
||||
check_symbol_exists(WINPCAP_PRODUCT_NAME "${CMAKE_SOURCE_DIR}/../../version.h" HAVE_VERSION_H)
|
||||
if(HAVE_VERSION_H)
|
||||
37
externals/vcpkg/ports/libpcap/install-pc-on-msvc.patch
vendored
Executable file
37
externals/vcpkg/ports/libpcap/install-pc-on-msvc.patch
vendored
Executable file
@@ -0,0 +1,37 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b83fbbd..2f675d1 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2678,9 +2678,12 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap.h DESTINATION include)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-bpf.h DESTINATION include)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-namedb.h DESTINATION include)
|
||||
|
||||
-# On UN*X, and on Windows when not using MSVC, generate libpcap.pc and
|
||||
-# pcap-config and process man pages and arrange that they be installed.
|
||||
-if(NOT MSVC)
|
||||
+# Generate libpcap.pc
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ set(PACKAGE_NAME ${LIBRARY_NAME})
|
||||
+else()
|
||||
+ set(PACKAGE_NAME pcap)
|
||||
+endif()
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix "\${prefix}")
|
||||
set(includedir "\${prefix}/include")
|
||||
@@ -2715,10 +2718,14 @@ if(NOT MSVC)
|
||||
foreach(LIB ${PCAP_LINK_LIBRARIES})
|
||||
set(LIBS "${LIBS} -l${LIB}")
|
||||
endforeach(LIB)
|
||||
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINARY_DIR}/pcap-config @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc @ONLY)
|
||||
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig)
|
||||
+
|
||||
+# On UN*X, and on Windows when not using MSVC, generate libpcap.pc and
|
||||
+# pcap-config and process man pages and arrange that they be installed.
|
||||
+if(NOT MSVC)
|
||||
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINARY_DIR}/pcap-config @ONLY)
|
||||
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin)
|
||||
|
||||
#
|
||||
# Man pages.
|
||||
80
externals/vcpkg/ports/libpcap/portfile.cmake
vendored
Executable file
80
externals/vcpkg/ports/libpcap/portfile.cmake
vendored
Executable file
@@ -0,0 +1,80 @@
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/share/winpcap")
|
||||
message(FATAL_ERROR "FATAL ERROR: winpcap and libpcap are incompatible.")
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_LINUX)
|
||||
message(
|
||||
"libpcap currently requires the following libraries from the system package manager:
|
||||
flex
|
||||
libbison-dev
|
||||
These can be installed on Ubuntu systems via sudo apt install flex libbison-dev"
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO the-tcpdump-group/libpcap
|
||||
REF c7642e2cc0c5bd65754685b160d25dc23c76c6bd #1.10.1
|
||||
SHA512 ed46095863aaee79ca2833d26438f6c837cc3e64acb73efd5a388a11ff7d0d1245d23e5404070a9f2c2c77840c93c09328746761e4481e9a530593a5cbf2ad6f
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
install-pc-on-msvc.patch
|
||||
add-disable-packet-option.patch
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(BISON)
|
||||
get_filename_component(BISON_PATH ${BISON} DIRECTORY)
|
||||
vcpkg_add_to_path(${BISON_PATH})
|
||||
vcpkg_find_acquire_program(FLEX)
|
||||
get_filename_component(FLEX_PATH ${FLEX} DIRECTORY)
|
||||
vcpkg_add_to_path(${FLEX_PATH})
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_STATIC_RT)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DDISABLE_NETMAP=ON
|
||||
-DDISABLE_BLUETOOTH=ON
|
||||
-DDISABLE_DBUS=ON
|
||||
-DDISABLE_RDMA=ON
|
||||
-DDISABLE_DAG=ON
|
||||
-DDISABLE_SEPTEL=ON
|
||||
-DDISABLE_SNF=ON
|
||||
-DDISABLE_TC=ON
|
||||
-DDISABLE_PACKET=ON
|
||||
-DENABLE_REMOTE=OFF
|
||||
-DUSE_STATIC_RT=${USE_STATIC_RT}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
# On Windows 64-bit, libpcap 1.10.1 installs the libraries in a x64 subdirectory of the usual directories
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(libsubdir "x64")
|
||||
file(GLOB_RECURSE FILES_TO_MOVE "${CURRENT_PACKAGES_DIR}/lib/${libsubdir}/*")
|
||||
file(COPY ${FILES_TO_MOVE} DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
||||
file(GLOB_RECURSE FILES_TO_MOVE "${CURRENT_PACKAGES_DIR}/debug/lib/${libsubdir}/*")
|
||||
file(COPY ${FILES_TO_MOVE} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
||||
file(GLOB_RECURSE FILES_TO_MOVE "${CURRENT_PACKAGES_DIR}/bin/${libsubdir}/*")
|
||||
file(COPY ${FILES_TO_MOVE} DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(GLOB_RECURSE FILES_TO_MOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${libsubdir}/*")
|
||||
file(COPY ${FILES_TO_MOVE} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/${libsubdir}"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/${libsubdir}"
|
||||
"${CURRENT_PACKAGES_DIR}/bin/${libsubdir}"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin/${libsubdir}")
|
||||
endif()
|
||||
|
||||
# Even if compiled with BUILD_SHARED_LIBS=ON, pcap also install a pcap_static library
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pcap_static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/pcap_static.lib")
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/share/man")
|
||||
14
externals/vcpkg/ports/libpcap/vcpkg.json
vendored
Executable file
14
externals/vcpkg/ports/libpcap/vcpkg.json
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "libpcap",
|
||||
"version-semver": "1.10.1",
|
||||
"port-version": 1,
|
||||
"description": "A portable C/C++ library for network traffic capture",
|
||||
"homepage": "https://www.tcpdump.org/",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user