pulse: Add libpulse path to rpath

We are linking against PulseAudio’s libpulse,
which adds its soname to DT_NEEDED but we are expecting
to actually use our shim with the same soname from LIBPULSE_PATH
(forced by adding the path to LD_LIBRARY_PATH).

Package managers like Nix will detect that we are linking against
PulseAudio’s libpulse and mark it as a runtime dependency by adding
its path to DT_RUNPATH entry so that it can be easily found
by the loader. LD_LIBRARY_PATH will take precedence but it will still
pull PulseAudio into the system’s closure.
This commit is contained in:
Jan Tojnar 2020-10-23 04:57:05 +02:00
parent f3dda8e57b
commit 2e3556fa12
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -85,6 +85,7 @@ pipewire_pulse_mainloop_glib = shared_library('pulse-mainloop-glib',
include_directories : [configinc], include_directories : [configinc],
dependencies : [pipewire_dep, pulseaudio_dep, mathlib, glib_dep], dependencies : [pipewire_dep, pulseaudio_dep, mathlib, glib_dep],
install : true, install : true,
install_rpath : libpulse_path_dlopen,
install_dir : libpulse_path, install_dir : libpulse_path,
) )
@ -97,5 +98,6 @@ pipewire_pulse_simple = shared_library('pulse-simple',
include_directories : [configinc], include_directories : [configinc],
dependencies : [pipewire_dep, pulseaudio_dep, mathlib, glib_dep], dependencies : [pipewire_dep, pulseaudio_dep, mathlib, glib_dep],
install : true, install : true,
install_rpath : libpulse_path_dlopen,
install_dir : libpulse_path, install_dir : libpulse_path,
) )