aboutsummaryrefslogtreecommitdiff
path: root/ports/libpcap/add-disable-packet-option.patch
diff options
context:
space:
mode:
authorSilvio Traversaro <silvio.traversaro@iit.it>2020-06-12 08:13:23 +0200
committerGitHub <noreply@github.com>2020-06-11 23:13:23 -0700
commit310f4df34f154e1e2cd0502a717baf6ccbe29549 (patch)
treedbbf01f44946a684801b1a460e91d7a0a6b66ebe /ports/libpcap/add-disable-packet-option.patch
parent50deb3eceb64f387249a6513b51190137dfd7352 (diff)
downloadvcpkg-310f4df34f154e1e2cd0502a717baf6ccbe29549.tar.gz
vcpkg-310f4df34f154e1e2cd0502a717baf6ccbe29549.zip
[libpcap] Enable compilation of libpcap port on x86-windows and x64-windows (#10731)
* Enable compilation of libpcap port on x86-windows and x64-windows As winpcap and libpcap install the same headers, this two port have been marked as not not compatible, and cannot be installed together. * Update ci.baseline.txt * Add libcrafter failing ports to ci.baseline.txt
Diffstat (limited to 'ports/libpcap/add-disable-packet-option.patch')
-rw-r--r--ports/libpcap/add-disable-packet-option.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/ports/libpcap/add-disable-packet-option.patch b/ports/libpcap/add-disable-packet-option.patch
new file mode 100644
index 000000000..842176a55
--- /dev/null
+++ b/ports/libpcap/add-disable-packet-option.patch
@@ -0,0 +1,47 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3fe9979..23783d3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -161,6 +161,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.
+@@ -220,19 +221,21 @@ if(WIN32)
+ include_directories(${CMAKE_HOME_DIRECTORY}/../../Common)
+ endif(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/../../Common)
+
+- find_package(Packet)
+- if(PACKET_FOUND)
+- set(HAVE_PACKET32 TRUE)
+- include_directories(${PACKET_INCLUDE_DIRS})
+- #
+- # Check whether we have the NPcap PacketIsLoopbackAdapter()
+- # function.
+- #
+- cmake_push_check_state()
+- set(CMAKE_REQUIRED_LIBRARIES ${PACKET_LIBRARIES})
+- check_function_exists(PacketIsLoopbackAdapter HAVE_PACKET_IS_LOOPBACK_ADAPTER)
+- cmake_pop_check_state()
+- endif(PACKET_FOUND)
++ if(NOT DISABLE_PACKET)
++ find_package(Packet)
++ if(PACKET_FOUND)
++ set(HAVE_PACKET32 TRUE)
++ include_directories(${PACKET_INCLUDE_DIRS})
++ #
++ # Check whether we have the NPcap PacketIsLoopbackAdapter()
++ # function.
++ #
++ cmake_push_check_state()
++ set(CMAKE_REQUIRED_LIBRARIES ${PACKET_LIBRARIES})
++ check_function_exists(PacketIsLoopbackAdapter HAVE_PACKET_IS_LOOPBACK_ADAPTER)
++ cmake_pop_check_state()
++ endif(PACKET_FOUND)
++ endif()
+
+ message(STATUS "checking for Npcap's version.h")
+ check_symbol_exists(WINPCAP_PRODUCT_NAME "../../version.h" HAVE_VERSION_H)