mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #6501 from lrusak/kodi-dynamic-audio
Kodi: dynamically set KODI_AE_SINK env from build options
This commit is contained in:
commit
a198113353
@ -135,6 +135,11 @@
|
||||
# build with Samba Client support (mounting SAMBA shares with KODI) (yes / no)
|
||||
KODI_SAMBA_SUPPORT="yes"
|
||||
|
||||
# build kodi with alsa support (yes/no)
|
||||
KODI_ALSA_SUPPORT="yes"
|
||||
|
||||
# build kodi with pulseaudio support (yes/no)
|
||||
KODI_PULSEAUDIO_SUPPORT="yes"
|
||||
|
||||
### KODI ADDONS ###
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
KODI_AE_SINK=ALSA+PULSE
|
||||
KODI_AE_SINK=@KODI_AE_SINK@
|
||||
HOME=/storage
|
||||
KODI_TEMP=/storage/.kodi/temp
|
||||
KODI_HOME=/usr/share/kodi/
|
@ -48,14 +48,14 @@ configure_package() {
|
||||
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
|
||||
fi
|
||||
|
||||
if [ "${ALSA_SUPPORT}" = yes ]; then
|
||||
if [ "${KODI_ALSA_SUPPORT}" = yes ]; then
|
||||
PKG_DEPENDS_TARGET+=" alsa-lib"
|
||||
KODI_ALSA="-DENABLE_ALSA=ON"
|
||||
else
|
||||
KODI_ALSA="-DENABLE_ALSA=OFF"
|
||||
fi
|
||||
|
||||
if [ "${PULSEAUDIO_SUPPORT}" = yes ]; then
|
||||
if [ "${KODI_PULSEAUDIO_SUPPORT}" = yes ]; then
|
||||
PKG_DEPENDS_TARGET+=" pulseaudio"
|
||||
KODI_PULSEAUDIO="-DENABLE_PULSEAUDIO=ON"
|
||||
else
|
||||
@ -239,7 +239,9 @@ configure_package() {
|
||||
${KODI_AIRTUNES} \
|
||||
${KODI_OPTICAL} \
|
||||
${KODI_BLURAY} \
|
||||
${KODI_PLAYER}"
|
||||
${KODI_PLAYER} \
|
||||
${KODI_ALSA} \
|
||||
${KODI_PULSEAUDIO}"
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
@ -273,7 +275,16 @@ post_makeinstall_target() {
|
||||
-e "s|@KODI_MAX_SECONDS@|${KODI_MAX_SECONDS:-900}|g" \
|
||||
-i ${INSTALL}/usr/lib/kodi/kodi.sh
|
||||
|
||||
cp ${PKG_DIR}/config/kodi.conf ${INSTALL}/usr/lib/kodi/kodi.conf
|
||||
if [ "${KODI_PULSEAUDIO_SUPPORT}" = "yes" -a "${KODI_ALSA_SUPPORT}" = "yes" ]; then
|
||||
KODI_AE_SINK="ALSA+PULSE"
|
||||
elif [ "${KODI_PULSEAUDIO_SUPPORT}" = "yes" -a "${KODI_ALSA_SUPPORT}" != "yes" ]; then
|
||||
KODI_AE_SINK="PULSE"
|
||||
elif [ "${KODI_PULSEAUDIO_SUPPORT}" != "yes" -a "${KODI_ALSA_SUPPORT}" = "yes" ]; then
|
||||
KODI_AE_SINK="ALSA"
|
||||
fi
|
||||
|
||||
# adjust audio output device to what was built
|
||||
sed "s/@KODI_AE_SINK@/${KODI_AE_SINK}/" ${PKG_DIR}/config/kodi.conf.in > ${INSTALL}/usr/lib/kodi/kodi.conf
|
||||
|
||||
# set default display environment
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
|
@ -17,6 +17,8 @@ PKG_LONGDESC="Root package used to build and create complete image"
|
||||
# Sound support
|
||||
[ "${ALSA_SUPPORT}" = "yes" ] && PKG_DEPENDS_TARGET+=" alsa"
|
||||
|
||||
[ "${PULSEAUDIO_SUPPORT}" = "yes" ] && PKG_DEPENDS_TARGET+=" pulseaudio"
|
||||
|
||||
# Automounter support
|
||||
[ "${UDEVIL}" = "yes" ] && PKG_DEPENDS_TARGET+=" udevil"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user