aboutsummaryrefslogtreecommitdiff
path: root/ports/libpcap/install-pc-on-msvc.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/install-pc-on-msvc.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/install-pc-on-msvc.patch')
-rw-r--r--ports/libpcap/install-pc-on-msvc.patch97
1 files changed, 97 insertions, 0 deletions
diff --git a/ports/libpcap/install-pc-on-msvc.patch b/ports/libpcap/install-pc-on-msvc.patch
new file mode 100644
index 000000000..f2cd64b44
--- /dev/null
+++ b/ports/libpcap/install-pc-on-msvc.patch
@@ -0,0 +1,97 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 55b93f1..3fe9979 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2355,48 +2355,54 @@ 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
++# 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")
++set(libdir "\${exec_prefix}/lib")
++if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR
++ CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR
++ CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR
++ CMAKE_SYSTEM_NAME STREQUAL "DragonFly BSD" OR
++ CMAKE_SYSTEM_NAME STREQUAL "Linux" OR
++ CMAKE_SYSTEM_NAME STREQUAL "OSF1")
++ #
++ # Platforms where the linker is the GNU linker
++ # or accepts command-line arguments like
++ # those the GNU linker accepts.
++ #
++ set(V_RPATH_OPT "-Wl,-rpath,")
++elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*")
++ #
++ # SunOS 5.x.
++ #
++ # XXX - this assumes GCC is using the Sun linker,
++ # rather than the GNU linker.
++ #
++ set(V_RPATH_OPT "-Wl,-R,")
++else()
++ #
++ # No option needed to set the RPATH.
++ #
++ set(V_RPATH_OPT "")
++endif()
++set(LIBS "")
++foreach(LIB ${PCAP_LINK_LIBRARIES})
++ set(LIBS "${LIBS} -l${LIB}")
++endforeach(LIB)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc @ONLY)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig)
++
++# On UN*X, and on Windows when not using MSVC, generate
+ # pcap-config and process man pages and arrange that they be installed.
+ if(NOT MSVC)
+- set(prefix ${CMAKE_INSTALL_PREFIX})
+- set(exec_prefix "\${prefix}")
+- set(includedir "\${prefix}/include")
+- set(libdir "\${exec_prefix}/lib")
+- if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR
+- CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR
+- CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR
+- CMAKE_SYSTEM_NAME STREQUAL "DragonFly BSD" OR
+- CMAKE_SYSTEM_NAME STREQUAL "Linux" OR
+- CMAKE_SYSTEM_NAME STREQUAL "OSF1")
+- #
+- # Platforms where the linker is the GNU linker
+- # or accepts command-line arguments like
+- # those the GNU linker accepts.
+- #
+- set(V_RPATH_OPT "-Wl,-rpath,")
+- elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*")
+- #
+- # SunOS 5.x.
+- #
+- # XXX - this assumes GCC is using the Sun linker,
+- # rather than the GNU linker.
+- #
+- set(V_RPATH_OPT "-Wl,-R,")
+- else()
+- #
+- # No option needed to set the RPATH.
+- #
+- set(V_RPATH_OPT "")
+- endif()
+- set(LIBS "")
+- 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)
+-
+ #
+ # Man pages.
+ #