From d07d3f7da27d90c7d93956c94f295992ee3ce85a Mon Sep 17 00:00:00 2001 From: Jia Yue Hua <3423893+jiayuehua@users.noreply.github.com> Date: Sat, 21 Oct 2023 00:55:00 +0800 Subject: [PATCH] [libpcap] update to 1.10.4 (#34622) * [libpcap] update to 1.10.4 * [libpcap] update to 1.10.4 * [libpcap] update * [libpcap] update --- ports/libpcap/add-disable-packet-option.patch | 16 +++++++--------- ports/libpcap/install-pc-on-msvc.patch | 14 +++++++------- ports/libpcap/portfile.cmake | 4 ++-- ports/libpcap/vcpkg.json | 3 +-- versions/baseline.json | 4 ++-- versions/l-/libpcap.json | 5 +++++ 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/ports/libpcap/add-disable-packet-option.patch b/ports/libpcap/add-disable-packet-option.patch index 9d89a550596e13..8cec80674ec8f5 100644 --- a/ports/libpcap/add-disable-packet-option.patch +++ b/ports/libpcap/add-disable-packet-option.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2f675d1..e9d6d96 100644 +index 650be01..7565e58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -244,6 +244,7 @@ set(SEPTEL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../septel" CACHE PATH "Path to dire +@@ -521,6 +521,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) @@ -10,22 +10,20 @@ index 2f675d1..e9d6d96 100644 # # Debugging options. -@@ -302,7 +303,7 @@ if(WIN32) +@@ -579,7 +580,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) + if(Packet_FOUND) set(HAVE_PACKET32 TRUE) -@@ -317,7 +318,8 @@ if(WIN32) +@@ -594,6 +595,7 @@ if(WIN32) check_function_exists(PacketGetTimestampModes HAVE_PACKET_GET_TIMESTAMP_MODES) cmake_pop_check_state() - endif(PACKET_FOUND) -- + 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) diff --git a/ports/libpcap/install-pc-on-msvc.patch b/ports/libpcap/install-pc-on-msvc.patch index 0f07f6d435ecdf..2cc9513ac7d241 100644 --- a/ports/libpcap/install-pc-on-msvc.patch +++ b/ports/libpcap/install-pc-on-msvc.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index b83fbbd..2f675d1 100644 +index 58c5159..650be01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -2678,9 +2678,12 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap.h DESTINATION include) +@@ -3238,9 +3238,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) @@ -18,20 +18,20 @@ index b83fbbd..2f675d1 100644 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) +@@ -3308,10 +3311,14 @@ if(NOT MSVC) + set(RPATH "") + endif() + endif() - 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. diff --git a/ports/libpcap/portfile.cmake b/ports/libpcap/portfile.cmake index 4d1823bcb5f091..0971d9cb0859a0 100644 --- a/ports/libpcap/portfile.cmake +++ b/ports/libpcap/portfile.cmake @@ -14,8 +14,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO the-tcpdump-group/libpcap - REF c7642e2cc0c5bd65754685b160d25dc23c76c6bd #1.10.1 - SHA512 ed46095863aaee79ca2833d26438f6c837cc3e64acb73efd5a388a11ff7d0d1245d23e5404070a9f2c2c77840c93c09328746761e4481e9a530593a5cbf2ad6f + REF "libpcap-${VERSION}" + SHA512 7352ff4d5bded916c0802e4a846fcb6b26e3ea8025dbbf58543abd9d9f6e8f7f5d60e03bcadb222d20434b7e052f663a560d7487af4b81fba74cf5aea040d733 HEAD_REF master PATCHES install-pc-on-msvc.patch diff --git a/ports/libpcap/vcpkg.json b/ports/libpcap/vcpkg.json index eaff7e2ced396e..d6d90f679beb3c 100644 --- a/ports/libpcap/vcpkg.json +++ b/ports/libpcap/vcpkg.json @@ -1,7 +1,6 @@ { "name": "libpcap", - "version-semver": "1.10.1", - "port-version": 3, + "version-semver": "1.10.4", "description": "A portable C/C++ library for network traffic capture", "homepage": "https://www.tcpdump.org/", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index 43abfde737f1ac..37cedb74d67779 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4553,8 +4553,8 @@ "port-version": 4 }, "libpcap": { - "baseline": "1.10.1", - "port-version": 3 + "baseline": "1.10.4", + "port-version": 0 }, "libpff": { "baseline": "2021-11-14", diff --git a/versions/l-/libpcap.json b/versions/l-/libpcap.json index 48295baaf347a4..9c0712eb3f8841 100644 --- a/versions/l-/libpcap.json +++ b/versions/l-/libpcap.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3af367bec0a2e0049f723ffb3654d262e775ac45", + "version-semver": "1.10.4", + "port-version": 0 + }, { "git-tree": "6cf3667c0320e2ff5d92d45e91b07fb3bf2fe05e", "version-semver": "1.10.1",