Package: dh-dlopenlibdeps
Version: 0.20
Severity: wishlist
If a package has a dlopen note for a library (let's say libSDL3.so.0,
package libsdl3-0) and a versioned Build-Depends on the corresponding
-dev package (in this case libsdl3-dev >= 3.2.12 or similar), it would
be nice if dh-dlopenlibdeps could automatically generate a similarly
versioned dependency on the library package (Depends: libsdl3-0 (>=
3.2.12), or a similar Recommends or Suggests).
This follows the same reasoning as the similar feature in
dpkg-shlibdeps: if the maintainer of the dependent package has added a
versioned B-D, then it seems safe to assume that they want at least that
version of the library at runtime, usually because they need a
particular feature from it.
This could be implemented by:
1. map SONAME to package (done already)
2. map package name to .symbols file
3. read the .symbols file to find the Build-Depends-Package(s) for
that SONAME, if any
4. read d/control to find the minimum version of the B-D-P, if any
5. apply that minimum version to the generated dependency
sdl2-compat (>= 2.32.70+git20260719~), which I'll upload to experimental
soon, could act as a test-case for this.
smcv