1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

OPTIONSify.

PR:		ports/89117
Submitted by:	Pawel Wieleba <P.Wieleba@iem.pw.edu.pl>
Approved by:	maintainer
This commit is contained in:
Jean-Yves Lefort 2005-11-22 23:55:38 +00:00
parent 272971d789
commit b5b837e636
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=149125

View File

@ -21,20 +21,12 @@ MLINKS= play.1 rec.1 sox.1 soxmix.1
GNU_CONFIGURE= yes
MAKE_ENV= PLAY_SUPPORT=1
OPTIONS= LAME "Enable mp3 encoding with LAME" off \
MAD "Enable mp3 decoding with MAD" off \
VORBIS "Enable Ogg Vorbis support" off
.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/lib/libmp3lame.so.0)
WITH_LAME= YES
.endif
.if exists(${LOCALBASE}/lib/libmad.so.2)
WITH_MAD= YES
.endif
.if exists(${LOCALBASE}/lib/libvorbis.so.3)
WITH_VORBIS= YES
.endif
.if defined(WITH_VORBIS) || defined(WITH_LAME) || defined(WITH_MAD)
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
@ -62,15 +54,4 @@ LIB_DEPENDS+= mad.2:${PORTSDIR}/audio/libmad
CONFIGURE_ARGS+= --disable-mad
.endif
pre-fetch:
.if !defined(WITH_LAME)
@${ECHO_MSG} "You can enable mp3 encoding by defining WITH_LAME."
.endif
.if !defined(WITH_MAD)
@${ECHO_MSG} "You can enable mp3 decoding by defining WITH_MAD."
.endif
.if !defined(WITH_VORBIS)
@${ECHO_MSG} "You can enable Ogg Vorbis support by defining WITH_VORBIS."
.endif
.include <bsd.port.post.mk>