freebsd-ports/Mk/Uses/openal.mk
Tijl Coosemans 60945f0277 Replace USES=libtool:oldver with USES=libtool or USES=libtool:keepla in
the 32 ports that still use it.  Bump PORTREVISION on their dependent
ports except the ones that depend on these:

audio/libogg
audio/libvorbis
devel/pcre
ftp/curl
graphics/jpeg
graphics/libart_lgpl
graphics/tiff
textproc/expat2
textproc/libxslt

In these cases the same trick as in the recent gettext update is used.
The ports install a symlink with the old library version.  When enough
of their dependent ports have had regular updates the remaining ones can
get a PORTREVISION bump and the links can be removed.

Also remove the devel/pcre dependency from USE_GNOME=glib20.  It causes
over 2200 packages to depend on devel/pcre while less than 200 actually
link with it.  The glib20 package still depends on devel/pcre so this
should not make a difference for ports with USE_GNOME=glib20.  Also,
libdata/pkgconfig/glib-2.0.pc lists pcre as a private library so
USE_GNOME=glib20 should not propagate it.

PR:		195724
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2014-12-08 16:48:38 +00:00

86 lines
2.3 KiB
Makefile

# $FreeBSD$
#
# Handle dependency on OpenAL
#
# 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
#
# 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:${PORTSDIR}/audio/openal
_soft_DEPENDS= libopenal.so.1:${PORTSDIR}/audio/openal-soft
_alut_DEPENDS= libalut.so.0:${PORTSDIR}/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}
.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
.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
# 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}
.endfor
.endif