[extension] Add `(pkg_config ...)` field.
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
As suggested in https://github.com/ocaml/dune/pull/1886 , adding a field for automatically importing pkg_config build flags could be convenient and save quite a few boilerplate for C users.
The idea would be to have a new feature:
(using pkg_config)
which would extend the (library ...) stanza to add a field:
(pkg_config gtk+-3.0 >= 3.18)
Such field should unsugar to something similar to:
(rule
(targets
cflag-gtk+-3.0.sexp
clink-gtk+-3.0.sexp)
(action (run ./dune_config.exe -pkg gtk+-3.0 -version 3.18)))
...
(c_flags (:include cflag-gtk+-3.0.sexp))
(c_library_flags (:include clink-gtk+-3.0.sexp))
where dune_config is the straightforward call to configurator [that could be embedded by dune avoiding the .exe and intermediate file of course]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked pull request 1886 and the current handling of the library stanza and extension syntax. Trace how the proposed pkg_config field could invoke configurator or dune_config.exe and provide C flags. Done means the syntax, generated flags, and version constraint behavior are implemented and covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100