Am 17.07.2017 um 16:38 schrieb Jacob Carlborg:

I'm working on creating a Dub package for DWT. It has quite a few dependencies on system libraries. I would expect that the name of these might be different for different Linux distributions and all packages might not be needed. What's the best way to deal with this? I see three options:

A. Ideally the libraries would be part of the Dub file, this would be the most convenient for the user because the user wouldn't need to specify the libraries in the Dub file for the application. But since it's not known on which Linux distribution the user is running it's not really possible to hardcode a list of libraries

B. Let the user specify the libraries manually in the application Dub file. Not the most convenient approach but will work for all Linux distributions

C. Write a pre build step that will identify the currently running platform and setup the correct libraries based on that. I've done this before (with DStep) so I know it's woking, but it's quite difficult to get correct

Any other ideas, or thoughts on which is the performed method?

/Jacob Carlborg

For many libraries a single entry in "libs" works relatively reliably as
long as pkg-config is available, but as soon as different versions come
into play that gets difficult, too. Maybe something where a list of
alternative library names and/or build settings is supplied can work.

One other idea was to keep a central crowd-sourced (pre-moderated)
database of os/architecture/distribution specific build settings for
each library. This feels like a pretty rough tool to solve the issue,

Related ticket: #52