Skip to content

Commit

Permalink
[libpcap] Fix incorrect library name in libpcap.pc of non-windows bui…
Browse files Browse the repository at this point in the history
…ld (#30398)

* [libpcap] Fix incorrect library name in libpcap.pc of non-windows build

* update version
  • Loading branch information
LilyWangLL committed Mar 25, 2023
1 parent 2e1322f commit 5dfb5ff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ports/libpcap/install-pc-on-msvc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ index b83fbbd..2f675d1 100644
-# 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()
+if(MSVC AND NOT BUILD_SHARED_LIBS)
+ set(PACKAGE_NAME ${LIBRARY_NAME}_static)
+else()
+ set(PACKAGE_NAME ${LIBRARY_NAME})
+endif()
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
Expand Down
3 changes: 2 additions & 1 deletion ports/libpcap/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "libpcap",
"version-semver": "1.10.1",
"port-version": 2,
"port-version": 3,
"description": "A portable C/C++ library for network traffic capture",
"homepage": "https://www.tcpdump.org/",
"license": "BSD-3-Clause",
"supports": "!uwp",
"dependencies": [
{
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4286,7 +4286,7 @@
},
"libpcap": {
"baseline": "1.10.1",
"port-version": 2
"port-version": 3
},
"libpff": {
"baseline": "2021-11-14",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libpcap.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6cf3667c0320e2ff5d92d45e91b07fb3bf2fe05e",
"version-semver": "1.10.1",
"port-version": 3
},
{
"git-tree": "b21dafcbcbd4a428b3800a6a686a473db8625ca6",
"version-semver": "1.10.1",
Expand Down

0 comments on commit 5dfb5ff

Please sign in to comment.