yallop / ocaml-ctypes

Library for binding to C libraries using pure OCaml
MIT License
363 stars 95 forks source link

Move conf-pkg-config dependency to ctypes-foreign #631

Closed aantron closed 4 years ago

aantron commented 4 years ago

I tested this by installing Luv, which depends on ctypes, on a system without a pkg-config binary. conf-pkg-config did not get installed.

I saw that pkg-config is also used for something with Xen. I don't know how to best express that as a constraint. However, the Xen-related detection will still work if pkg-config happens to be installed, regardless of conf-pkg-config.

Fixes #630.

yallop commented 4 years ago

I saw that pkg-config is also used for something with Xen. I don't know how to best express that as a constraint. However, the Xen-related detection will still work if pkg-config happens to be installed, regardless of conf-pkg-config.

@talex5, do you have a view on this? I think the Xen code here was your work (#231), but I'm not sure of the current status.

talex5 commented 4 years ago

mirage-xen depends on pkg-config itself, so it would continue to work. Also, this will all get replaced by dune at some point -- looks like #588 moves it to ctypes.foreign already. So, it think this change is OK.

yallop commented 4 years ago

Thank you, @talex5. I'll merge this, then.

@aantron: thank you for the contribution. You're also very welcome to make a corresponding change to the ctypes/ctypes-foreign meta-data in opam-repository if you'd like to avoid the need to pin ctypes before the next release.

aantron commented 4 years ago

Thanks! I'll keep the possibility of making the change to existing releases in mind if anyone reports an issue with having to install pkg-config "in the wild." For now, it's just something I noticed in my own testing.