Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add winpcap #6196

Merged
merged 3 commits into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions packages/w/winpcap/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package("winpcap")
set_homepage("https://www.winpcap.org/")
set_description("The industry-standard windows packet capture library")

set_urls("https://www.winpcap.org/install/bin/WpdPack_$(version).zip",
{version = function (version) return version:gsub("%.", "_") end})

add_versions("4.1.2", "ea799cf2f26e4afb1892938070fd2b1ca37ce5cf75fec4349247df12b784edbd")

add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})

add_defines("WIN32")

on_install("windows|x86", "windows|x64", function (package)
os.cp("Include/*", package:installdir("include"))
if package:is_arch("x86") or package:is_arch("i386") then
os.cp("Lib/*.lib", package:installdir("lib"))
heheda123123 marked this conversation as resolved.
Show resolved Hide resolved
else
os.cp("Lib/x64/*.lib", package:installdir("lib"))
end
end)

on_test(function (package)
assert(package:has_cfuncs("pcap_findalldevs", {includes = "pcap.h"}))
end)
Loading