diff options
| author | Tsukasa Sugiura <t.sugiura0204@gmail.com> | 2017-08-25 14:43:08 +0900 |
|---|---|---|
| committer | Tsukasa Sugiura <t.sugiura0204@gmail.com> | 2017-08-25 15:02:15 +0900 |
| commit | aa9780042275cde17994b67a088d872a1c5babbe (patch) | |
| tree | be8550773becf95d557d0107af6324f0f8bc5cbe | |
| parent | 34bd87c9fcfb1ac9269c75db96852b64ed754d11 (diff) | |
| download | vcpkg-aa9780042275cde17994b67a088d872a1c5babbe.tar.gz vcpkg-aa9780042275cde17994b67a088d872a1c5babbe.zip | |
Add WinPCAP Developer's Pack
Add WinPCAP Developer's Pack
| -rw-r--r-- | ports/winpcap/CONTROL | 3 | ||||
| -rw-r--r-- | ports/winpcap/portfile.cmake | 72 |
2 files changed, 75 insertions, 0 deletions
diff --git a/ports/winpcap/CONTROL b/ports/winpcap/CONTROL new file mode 100644 index 000000000..f37e8223e --- /dev/null +++ b/ports/winpcap/CONTROL @@ -0,0 +1,3 @@ +Source: winpcap +Version: 4.1.2 +Description: WinPcap is the industry-standard tool for link-layer network access in Windows environments. diff --git a/ports/winpcap/portfile.cmake b/ports/winpcap/portfile.cmake new file mode 100644 index 000000000..b156b31ee --- /dev/null +++ b/ports/winpcap/portfile.cmake @@ -0,0 +1,72 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/WpdPack) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip" + FILENAME "WpdPack_4_1_2.zip" + SHA512 7a319dfcda779eb881eca43c83c5570c0e359da30464f981010d31615222b84f758c3a8ea96605e02dc3f0a294c4c36be447d22beb1e58cd40a73deb1ad128f0 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file( + INSTALL + "${SOURCE_PATH}/Include/bittypes.h" + "${SOURCE_PATH}/Include/ip6_misc.h" + "${SOURCE_PATH}/Include/Packet32.h" + "${SOURCE_PATH}/Include/pcap.h" + "${SOURCE_PATH}/Include/pcap-bpf.h" + "${SOURCE_PATH}/Include/pcap-namedb.h" + "${SOURCE_PATH}/Include/remote-ext.h" + "${SOURCE_PATH}/Include/Win32-Extensions.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +file( + INSTALL + "${SOURCE_PATH}/Include/pcap/bluetooth.h" + "${SOURCE_PATH}/Include/pcap/bpf.h" + "${SOURCE_PATH}/Include/pcap/namedb.h" + "${SOURCE_PATH}/Include/pcap/pcap.h" + "${SOURCE_PATH}/Include/pcap/sll.h" + "${SOURCE_PATH}/Include/pcap/usb.h" + "${SOURCE_PATH}/Include/pcap/vlan.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/pcap +) + +set(PCAP_LIBRARY_PATH "${SOURCE_PATH}/Lib") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(PCAP_LIBRARY_PATH "${PCAP_LIBRARY_PATH}/x64") +endif() + +file( + INSTALL + "${PCAP_LIBRARY_PATH}/Packet.lib" + "${PCAP_LIBRARY_PATH}/wpcap.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${PCAP_LIBRARY_PATH}/Packet.lib" + "${PCAP_LIBRARY_PATH}/wpcap.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +# Handle copyright +file(DOWNLOAD "https://www.winpcap.org/misc/copyright.htm" ${SOURCE_PATH}/copyright.htm) +file(INSTALL ${SOURCE_PATH}/copyright.htm DESTINATION ${CURRENT_PACKAGES_DIR}/share/winpcap RENAME copyright) |
