summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2019-04-30 16:24:55 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2019-04-30 16:24:55 +0000
commitece971a5cda35e6db52fce312014260f4875052e (patch)
tree93ba47cc259e196213cf072e3eb6c4a0f9e96232 /Mk
parentemulators/mame: revert r500456 and reapply with fixes (diff)
Mk/Uses/openal.mk: Drop support for the OpenAL Sample Implementation
Prepare for audio/openal removal. PR: 236971 Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D19766
Notes
Notes: svn path=/head/; revision=500502
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/openal.mk74
1 files changed, 9 insertions, 65 deletions
diff --git a/Mk/Uses/openal.mk b/Mk/Uses/openal.mk
index f07051141cab..de53860cf93a 100644
--- a/Mk/Uses/openal.mk
+++ b/Mk/Uses/openal.mk
@@ -4,83 +4,27 @@
#
# Feature: openal
# Usage: USES=openal or USES=openal:ARGS
-# Valid ARGS: al, soft (default), si, alut
-#
-# User-specified OpenAL wish:
-# Usage: WANT_OPENAL=ARG
-# Valid ARG: soft (default), si
+# Valid ARGS: al, soft (default), alut
#
# MAINTAINER: portmgr@FreeBSD.org
.if !defined(_INCLUDE_USES_OPENAL_MK)
_INCLUDE_USES_OPENAL_MK= yes
-_valid_ARGS= al si soft alut
-
-_si_DEPENDS= libopenal.so.0:audio/openal
-_soft_DEPENDS= libopenal.so.1:audio/openal-soft
-_alut_DEPENDS= libalut.so.0:audio/freealut
-
-_OPENAL_LIBS= si soft
-_DEFAULT_OPENAL= soft
-
-.if exists(${LOCALBASE}/lib/libopenal.a)
-_HAVE_OPENAL= si
-.elif exists(${LOCALBASE}/bin/openal-info)
-_HAVE_OPENAL= soft
-.endif
-
-# Be friendly
.if empty(openal_ARGS)
-openal_ARGS= ${_DEFAULT_OPENAL}
+openal_ARGS= soft
.endif
-# Sanity checks
-.if defined(WANT_OPENAL) && defined(_HAVE_OPENAL) && ${_HAVE_OPENAL} != ${WANT_OPENAL}
-IGNORE= OpenAL mismatch: ${_HAVE_OPENAL} is installed, but ${WANT_OPENAL} desired
+.if !empty(openal_ARGS:Nal:Nsoft:Nalut)
+IGNORE= has unknown USES=openal arguments: ${openal_ARGS:Nal:Nsoft:Nalut}
.endif
-.for _arg in ${openal_ARGS}
-. if ! ${_valid_ARGS:M${_arg}}
-IGNORE= Incorrect 'USES+= openal:${openal_ARGS}' usage: argument [${_arg}] is not recognized
-. endif
-. if ${_OPENAL_LIBS:M${_arg}} && ${openal_ARGS:Mal}
-IGNORE= Incorrect 'USES+= openal:${openal_ARGS}' usage: argument [${_arg}] cannot be used together with al
-. endif
-. if ${_OPENAL_LIBS:M${_arg}} && defined(_HAVE_OPENAL) && ${_HAVE_OPENAL} != ${_arg}
-IGNORE= OpenAL mismatch: port wants to use ${_arg} while you have ${_HAVE_OPENAL}
-. endif
-. if ${_OPENAL_LIBS:M${_arg}} && defined(WANT_OPENAL) && ${WANT_OPENAL} != ${_arg}
-IGNORE= OpenAL mismatch: port wants to use ${_arg} while you wish to use ${WANT_OPENAL}
-. endif
-. if ${_OPENAL_LIBS:M${_arg}}
-. for _carg in ${_OPENAL_LIBS:N${_arg}}
-. if ${openal_ARGS:M${_carg}}
-IGNORE= Incorrect 'USES+= openal:${openal_ARGS}' usage: arguments [${_arg}] and [${_carg}] cannot be used together
-. endif
-. endfor
-. endif
-.endfor
+_OPENAL_al_DEPENDS= libopenal.so.1:audio/openal-soft
+_OPENAL_soft_DEPENDS= libopenal.so.1:audio/openal-soft
+_OPENAL_alut_DEPENDS= libalut.so.0:audio/freealut
-# Proceed
-_USE_OPENAL=
-
-.if ${openal_ARGS:Mal}
-.if defined(_HAVE_OPENAL)
-_USE_OPENAL= ${_HAVE_OPENAL}
-.elif defined(WANT_OPENAL)
-_USE_OPENAL= ${WANT_OPENAL}
-.else
-_USE_OPENAL= ${_DEFAULT_OPENAL}
-.endif
-.endif
-
-.for _arg in ${openal_ARGS:Nal}
-_USE_OPENAL+= ${_arg}
-.endfor
-
-.for _arg in ${_USE_OPENAL}
-LIB_DEPENDS+= ${_${_arg}_DEPENDS}
+.for _arg in ${openal_ARGS}
+LIB_DEPENDS+= ${_OPENAL_${_arg}_DEPENDS}
.endfor
.endif