audio/openal-soft: Cleanup options

- Drop bogus FLUIDSYNTH option (MIDI support was removed in 1.17.0)
- The sndio backend is missing capture support.  This can lead to crashes
  when there is no usable fallback backend available.  As a workaround
  always enable the OSS backend when the sndio backend is wanted.
- Prioritize sndio over OSS when it's enabled which should
  make it unnecessary to fiddle with config files when building
  with both SNDIO and OSS.
- Turn off dynamically loading backend libs via dlopen
- Correct lib depends
- Update pkg-descr
- Take maintainership
This commit is contained in:
Tobias Kortkamp 2018-06-21 06:32:16 +00:00
parent e3ba5463c7
commit 50346552a3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=472956
4 changed files with 84 additions and 64 deletions

View File

@ -2,11 +2,11 @@
PORTNAME= openal-soft
PORTVERSION= 1.18.2
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://kcat.strangesoft.net/openal-releases/
MAINTAINER= ports@FreeBSD.org
MAINTAINER= tobik@FreeBSD.org
COMMENT= Software implementation of the OpenAL specification
LICENSE= LGPL20+
@ -14,55 +14,47 @@ LICENSE_FILE= ${WRKSRC}/COPYING
CONFLICTS= openal-200[0-9]*
USES= tar:bzip2 cmake compiler:c11
USES= cmake:outsource compiler:c11 tar:bzip2
USE_LDCONFIG= yes
LLD_UNSAFE= yes
CMAKE_ARGS= -DSHARE_INSTALL_DIR:STRING=${ETCDIR} \
-DALSOFT_REQUIRE_OSS:BOOL=OFF \
-DALSOFT_REQUIRE_JACK:BOOL=OFF \
-DALSOFT_REQUIRE_SOLARIS:BOOL=OFF \
-DALSOFT_REQUIRE_SNDIO:BOOL=OFF \
-DALSOFT_REQUIRE_QSA:BOOL=OFF \
-DALSOFT_BACKEND_ALSA:BOOL=OFF \
-DALSOFT_BACKEND_WAVE:BOOL=ON \
-DALSOFT_EXAMPLES:BOOL=OFF \
-DALSOFT_UTILS:BOOL=ON
CMAKE_ARGS= -DCMAKE_INSTALL_DATADIR:STRING="${PREFIX}/etc"
CMAKE_OFF= ALSOFT_BACKEND_ALSA \
ALSOFT_DLOPEN \
ALSOFT_EXAMPLES \
ALSOFT_REQUIRE_SOLARIS \
ALSOFT_REQUIRE_QSA
CMAKE_ON= ALSOFT_BACKEND_WAVE \
ALSOFT_UTILS
LDFLAGS+= -Wl,--as-needed # do not link with librt and libdl
OPTIONS_DEFINE= EXAMPLES FLUIDSYNTH CONFIG OSS JACK PORTAUDIO \
PULSEAUDIO SNDIO
OPTIONS_DEFINE= EXAMPLES CONFIG JACK OSS PORTAUDIO PULSEAUDIO SNDIO
OPTIONS_DEFAULT= OSS
OPTIONS_SUB= yes
CONFIG_DESC= Install configuration utility (needs Qt 4.x)
#ALSA_CMAKE_ON= -DALSOFT_REQUIRE_ALSA:BOOL=ON
#ALSA_CMAKE_OFF= -DALSOFT_BACKEND_ALSA:BOOL=OFF
#ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
CONFIG_CMAKE_ON= -DALSOFT_NO_CONFIG_UTIL:BOOL=OFF
CONFIG_CMAKE_OFF= -DALSOFT_NO_CONFIG_UTIL:BOOL=ON
CONFIG_CMAKE_BOOL_OFF= ALSOFT_NO_CONFIG_UTIL
CONFIG_CMAKE_ON= -DALSOFT_NO_QT5:BOOL=ON
CONFIG_USE= QT4=corelib,gui,qmake_build,moc_build,rcc_build,uic_build
FLUIDSYNTH_CMAKE_ON= -DALSOFT_REQUIRE_FLUIDSYNTH:BOOL=ON
FLUIDSYNTH_CMAKE_OFF= -DALSOFT_MIDI_FLUIDSYNTH:BOOL=OFF
FLUIDSYNTH_LIB_DEPENDS= libfluidsynth.so:audio/fluidsynth
OSS_CMAKE_ON= -DALSOFT_REQUIRE_OSS:BOOL=ON
OSS_CMAKE_OFF= -DALSOFT_BACKEND_OSS:BOOL=OFF
JACK_CMAKE_ON= -DALSOFT_REQUIRE_JACK:BOOL=ON
JACK_CMAKE_OFF= -DALSOFT_BACKEND_JACK:BOOL=OFF
JACK_CMAKE_BOOL= ALSOFT_REQUIRE_JACK ALSOFT_BACKEND_JACK
JACK_LIB_DEPENDS= libjack.so:audio/jack
PORTAUDIO_CMAKE_ON= -DALSOFT_REQUIRE_PORTAUDIO:BOOL=ON
PORTAUDIO_CMAKE_OFF= -DALSOFT_BACKEND_PORTAUDIO:BOOL=OFF
OSS_CMAKE_BOOL= ALSOFT_REQUIRE_OSS ALSOFT_BACKEND_OSS
PORTAUDIO_CMAKE_BOOL= ALSOFT_REQUIRE_PORTAUDIO ALSOFT_BACKEND_PORTAUDIO
PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio
PULSEAUDIO_CMAKE_ON= -DALSOFT_REQUIRE_PULSEAUDIO:BOOL=ON
PULSEAUDIO_CMAKE_OFF= -DALSOFT_BACKEND_PULSEAUDIO:BOOL=OFF
PULSEAUDIO_LIB_DEPENDS= libpulse-simple.so:audio/pulseaudio
SNDIO_CMAKE_ON= -DALSOFT_REQUIRE_SNDIO:BOOL=ON
SNDIO_CMAKE_OFF= -DALSOFT_BACKEND_SNDIO:BOOL=OFF
PULSEAUDIO_CMAKE_BOOL= ALSOFT_REQUIRE_PULSEAUDIO ALSOFT_BACKEND_PULSEAUDIO
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
SNDIO_CMAKE_BOOL= ALSOFT_REQUIRE_SNDIO ALSOFT_BACKEND_SNDIO
SNDIO_IMPLIES= OSS # provide fallback for missing sndio capture support
SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio
post-patch:
@${REINPLACE_CMD} 's|/etc/openal|${ETCDIR}|' \
${WRKSRC}/Alc/alcConfig.c
@${REINPLACE_CMD} 's|$${CMAKE_INSTALL_DATADIR}/openal|${ETCDIR}|' \
${WRKSRC}/CMakeLists.txt
post-install-EXAMPLES-on:
(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . \

View File

@ -0,0 +1,22 @@
Prefer sndio over OSS when it's enabled.
--- Alc/ALc.c.orig 2018-06-21 02:27:21 UTC
+++ Alc/ALc.c
@@ -69,14 +69,14 @@ static struct BackendInfo BackendList[] = {
#ifdef HAVE_COREAUDIO
{ "core", ALCcoreAudioBackendFactory_getFactory },
#endif
-#ifdef HAVE_OSS
- { "oss", ALCossBackendFactory_getFactory },
-#endif
#ifdef HAVE_SOLARIS
{ "solaris", ALCsolarisBackendFactory_getFactory },
#endif
#ifdef HAVE_SNDIO
{ "sndio", ALCsndioBackendFactory_getFactory },
+#endif
+#ifdef HAVE_OSS
+ { "oss", ALCossBackendFactory_getFactory },
#endif
#ifdef HAVE_QSA
{ "qsa", ALCqsaBackendFactory_getFactory },

View File

@ -1,22 +1,29 @@
--- CMakeLists.txt.orig 2017-07-30 05:09:21 UTC
--- CMakeLists.txt.orig 2017-09-24 13:41:50 UTC
+++ CMakeLists.txt
@@ -646,10 +646,6 @@ int main()
CHECK_SYMBOL_EXISTS(pthread_mutex_timedlock pthread.h HAVE_PTHREAD_MUTEX_TIMEDLOCK)
- CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_LIBRT)
- IF(HAVE_LIBRT)
- SET(EXTRA_LIBS rt ${EXTRA_LIBS})
- ENDIF()
ENDIF()
# Check for a 64-bit type
@@ -1322,7 +1318,7 @@ IF(ALSOFT_INSTALL)
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/AL
@@ -1381,7 +1381,7 @@ endif()
# Install alsoft.conf configuration file
IF(ALSOFT_CONFIG)
INSTALL(FILES alsoftrc.sample
- DESTINATION ${CMAKE_INSTALL_DATADIR}/openal
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/openal-soft
)
INSTALL(FILES "${OpenAL_BINARY_DIR}/openal.pc"
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+ DESTINATION "libdata/pkgconfig")
IF(TARGET soft_oal)
INSTALL(TARGETS soft_oal
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
MESSAGE(STATUS "Installing sample configuration")
MESSAGE(STATUS "")
@@ -1391,7 +1391,7 @@ ENDIF()
IF(ALSOFT_HRTF_DEFS)
INSTALL(FILES hrtf/default-44100.mhr
hrtf/default-48000.mhr
- DESTINATION ${CMAKE_INSTALL_DATADIR}/openal/hrtf
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/openal-soft/hrtf
)
MESSAGE(STATUS "Installing HRTF definitions")
MESSAGE(STATUS "")
@@ -1405,7 +1405,7 @@ IF(ALSOFT_AMBDEC_PRESETS)
presets/rectangle.ambdec
presets/square.ambdec
presets/presets.txt
- DESTINATION ${CMAKE_INSTALL_DATADIR}/openal/presets
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/openal-soft/presets
)
MESSAGE(STATUS "Installing AmbDec presets")
MESSAGE(STATUS "")

View File

@ -1,10 +1,9 @@
OpenAL Soft is a software implementation of the OpenAL 3D audio API and an
alternative to the somewhat outdated reference implementation.
As stated on the website, OpenAL provides capabilities for playing audio in a
virtual 3d environment. Distance attenuation, doppler shift, and directional
sound emitters are among the features handled by the API. More advanced
effects, including air absorption, low-pass filters, and reverb, are
available through the EFX extension. It also facilitates streaming audio,
multi-channel buffers, and audio capture.
OpenAL Soft is a software implementation of the OpenAL 3D audio
API. OpenAL provides capabilities for playing audio in a virtual
3D environment. Distance attenuation, doppler shift, and directional
sound emitters are among the features handled by the API. More
advanced effects, including air absorption, low-pass filters, and
reverb, are available through the EFX extension. It also facilitates
streaming audio, multi-channel buffers, and audio capture.
WWW: http://kcat.strangesoft.net/openal.html