-
Notifications
You must be signed in to change notification settings - Fork 65
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 FreeBSD support #102
Merged
Merged
Add FreeBSD support #102
Changes from all commits
Commits
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ build = "build.rs" | |
|
||
[build-dependencies] | ||
bindgen = "0.69.1" | ||
pkg-config = "0.3.30" |
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
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.
Wasn't
v4l2-sys
to build purely against the kernel bindings?v4l-sys
links againstlibv4l2
. Can you clarify why this is needed here (i.e. does FreeBSD provide fallbacks here?).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.
Location of
linux/videodev2.h
(included inwrapper.h
) is generally speaking indeterminate.It might reside outside of default include location, i.e. not in
/usr/include
.pkg-config
crate provides means to query include directories necessary to locatelibv4l2
header files inpkgconf
database:I don't think changes from this PR affected/changed linking in any way.
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.
It doesn't affect linking, but the question remains why the kernel-only package now relies on
pkg-config
andlib4l2
being available, just to locate standard Linux headers. That should at the very least require a comment otherwise, to explain that thisbuild.rs
is not interested in generating bindings tolibv4l2
.There should be a different/better way that doesn't involve these implicit dependencies. @raymanfx what do you think?
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.
Sorry, I didn't realize the presence of
linux/videodev2.h
header file doesn't depend on the existence oflibv4l2
inpkgconf
database on Linux.I prepared a PR to
limit use ofavoidpkg-config
to FreeBSD onlylibv4l2
dependency added viapkg-config
: #106There 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.
Ah, understood, yeah it should be a Linux UAPI header (https://github.com/torvalds/linux/blob/master/include/uapi/linux/videodev2.h), but maybe FreeBSD provides it as part of the v4l2 package for compatibility? I'm not certain how FreeBSD works, but I think I found it here: https://www.freshports.org/multimedia/v4l_compat