From d72aa5b4195d9957386aba7fbb362059e935a8f2 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Sat, 3 Oct 2020 19:23:22 +0000 Subject: [PATCH] Add missing LD_PRELOAD= environment variable to the virtual_oss rc.d . PR: 250046 Approved by: pi (implicit) --- audio/virtual_oss/Makefile | 6 +++++- audio/virtual_oss/files/virtual_oss.in | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/audio/virtual_oss/Makefile b/audio/virtual_oss/Makefile index 4aaeb43e9afe..b83f516ddca6 100644 --- a/audio/virtual_oss/Makefile +++ b/audio/virtual_oss/Makefile @@ -3,7 +3,7 @@ PORTNAME= virtual_oss PORTVERSION= 1.2.6 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio MASTER_SITES= http://www.selasky.org/hans_petter/distfiles/ \ http://home.selasky.org/distfiles/ @@ -18,6 +18,8 @@ LIB_DEPENDS= libsamplerate.so:audio/libsamplerate USES= tar:bzip2 uidfix USE_RC_SUBR= virtual_oss +SUB_LIST+= LIBSAMPLERATE="${LOCALBASE}/lib/libsamplerate.so:" + OPTIONS_DEFINE= BLUETOOTH BT_SPEAKER DEBUG EQUALIZER HTTPD OPTIONS_DEFAULT=BLUETOOTH EQUALIZER @@ -38,6 +40,8 @@ EQUALIZER_MAKE_ARGS= HAVE_EQUALIZER="YES" EQUALIZER_LIB_DEPENDS= libfftw3.so:math/fftw3 EQUALIZER_PLIST_FILES= sbin/virtual_equalizer \ man/man8/virtual_equalizer.8.gz +EQUALIZER_SUB_LIST= LIBFFTW3="${LOCALBASE}/lib/libfftw3.so:" +EQUALIZER_SUB_LIST_OFF= LIBFFTW3="" HTTPD_DESC= Build with HTTP server support HTTPD_MAKE_ARGS= HAVE_HTTPD="YES" diff --git a/audio/virtual_oss/files/virtual_oss.in b/audio/virtual_oss/files/virtual_oss.in index e9e398cb6056..1831be612190 100644 --- a/audio/virtual_oss/files/virtual_oss.in +++ b/audio/virtual_oss/files/virtual_oss.in @@ -56,11 +56,17 @@ load_rc_config $name : ${virtual_oss_dsp:="$virtual_oss_default_args"} : ${virtual_oss_delay:=1} -command="%%PREFIX%%/sbin/${name}" +command=virtual_oss command_args="-B" pidpath="/var/run/${name}" +virtual_oss() +{ + # When running early we need to pre-load some libraries + env LD_PRELOAD=%%LIBFFTW3%%%%LIBSAMPLERATE%% %%PREFIX%%/sbin/virtual_oss $* +} + virtual_oss_precmd() { /usr/bin/install -d -m 0755 -o root ${pidpath}