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

libpcap: expose the with-snf option for recipes #23361

Merged
merged 10 commits into from
Apr 30, 2024
6 changes: 6 additions & 0 deletions recipes/libpcap/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ class LibPcapConan(ConanFile):
"shared": [True, False],
"fPIC": [True, False],
"enable_libusb": [True, False],
"with_snf": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
"enable_libusb": False,
"with_snf": False,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"with_snf": False,
"with_snf": False,

https://github.com/the-tcpdump-group/libpcap/blob/libpcap-1.10.4/CMakeLists.txt#L521
It's enabled by default, but I'm fine accepting the opposite, because it's private product.

}

# TODO: Add dbus-glib when available
Expand Down Expand Up @@ -114,7 +116,9 @@ def generate(self):
"--disable-packet-ring",
"--disable-dbus",
"--disable-rdma",
f"--with-snf={yes_no(self.options.get_safe('with_snf'))}",
])

if cross_building(self):
target_os = "linux" if self.settings.os == "Linux" else "null"
tc.configure_args.append(f"--with-pcap={target_os}")
Expand Down Expand Up @@ -171,3 +175,5 @@ def package_info(self):
self.cpp_info.libs = [f"pcap{suffix}"]
if self.settings.os == "Windows":
self.cpp_info.system_libs = ["ws2_32"]
if self.options.get_safe("with_snf"):
self.cpp_info.system_libs.append("snf")
Loading