-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
pcapplusplus: add version v22.11 #14712
Merged
conan-center-bot
merged 15 commits into
conan-io:master
from
seladb:pcapplusplus-v22.11-2
Jan 25, 2023
Merged
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4b13e20
Update recipe to PcapPlusPlus v22.11
seladb fbecbf8
Add `test_v1_package`
seladb b69ccfa
Fix typo
seladb ddca22d
Add sources for 22.11
seladb a0aa6fe
Trigger CI
seladb e23b3bc
Address comment in CMakeLists
seladb 4a0959d
Remove `test_package.cpp` from `test_v1_package`
seladb 1de5980
Try fixing the bin path
seladb 5481ba4
Merge branch 'master' into pcapplusplus-v22.11-2
seladb 838fd3b
Apply changes suggested by @prince-chrismc
seladb 53527b1
Fix bin folder
seladb f198e4f
Fix test_v1_package bin dir
seladb b61d178
Revert bin location change
seladb 12a70c5
Simplify test package
uilianries 63c894f
Merge pull request #2 from uilianries/pcapplusplus-v22.11-2
seladb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ | ||
${CMAKE_CURRENT_BINARY_DIR}/test_package/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from conan import ConanFile | ||
from conan.tools.build import can_run | ||
from conans import CMake | ||
import os | ||
import shutil | ||
|
||
|
||
class PcapplusplusTestConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
if can_run(self) and self.settings.os == "Windows": | ||
self.requires("libpcap/1.10.1") | ||
|
||
def configure(self): | ||
if can_run(self) and self.settings.os == "Windows": | ||
self.options["libpcap"].shared = True | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if can_run(self): | ||
if self.settings.os == "Windows": | ||
# Use libpcap DLL as a replacement for npcap DLL | ||
# It will not provide all the functions | ||
# but it will cover enough to check that what we compiled is correct | ||
shutil.copy( | ||
os.path.join(self.deps_cpp_info['libpcap'].bin_paths[0], "pcap.dll"), | ||
os.path.join("bin", "wpcap.dll") | ||
) | ||
bin_path = os.path.join("bin", "test_package") | ||
pcap_file_path = os.path.join(self.source_folder, "1_packet.pcap") | ||
self.run(f"{bin_path} {pcap_file_path}", run_environment=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ versions: | |
folder: all | ||
"22.05": | ||
folder: all | ||
"22.11": | ||
folder: all |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there might have been some confusion, this has not been migrated so the "old" way should still be used AFAIK
I would try with as it previously was using