-
Notifications
You must be signed in to change notification settings - Fork 139
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
Use the BinDeps BSDPkg provider for building on FreeBSD #424
Conversation
@@ -34,6 +34,10 @@ if is_apple() | |||
provides(Homebrew.HB, "homebrew/science/hdf5", hdf5, os=:Darwin) | |||
end | |||
|
|||
if Sys.KERNEL === :FreeBSD |
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.
why not use is_bsd()
?
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.
is_bsd()
is true for any BSD-based system, including macOS, OpenBSD, DragonFly, etc. The BSDPkg
provider only applies to FreeBSD.
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.
Oh right. I'm guessing it will probably make sense to introduce a Sys.isfreebsd()
function at some point after your PR.
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.
Yeah, I've considered adding that. There are really only a few places where it would be useful, but it would be good to have it for consistency with the other functions for the cases where it is useful. Kinda odd to see Sys.KERNEL
amongst the is*
functions, which is likely why you pointed this out to begin with. 🙂
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.
Actually, do we really need the if
statement here... I think this can just be put in the is_linux()
branch and let BinDeps
find a provider.
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.
We actually don't need any of these branches, I was just matching style in this PR.
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.
FreeBSD isn't is_linux
though
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.
Maybe it's best to just remove the is_linux
branch and put these all together.
The provider uses the FreeBSD Ports Collection to install the HDF5 library system-wide, as is done with Apt et al. on Linux. The Autotools-based
BuildProcess
fails on FreeBSD.