summaryrefslogtreecommitdiffstats
path: root/audio/sox/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'audio/sox/Makefile')
-rw-r--r--audio/sox/Makefile57
1 files changed, 50 insertions, 7 deletions
diff --git a/audio/sox/Makefile b/audio/sox/Makefile
index c49ece1..b16d02e 100644
--- a/audio/sox/Makefile
+++ b/audio/sox/Makefile
@@ -6,25 +6,68 @@
#
PORTNAME= sox
-PORTVERSION= 12.17.3
-PORTREVISION= 1
+PORTVERSION= 12.17.4
+PORTREVISION= 0
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= sox
-MAINTAINER= dnelson@emsphone.com
+MAINTAINER= dnelson@allantgroup.com
COMMENT= SOund eXchange - universal sound sample translator
MAN1= sox.1 play.1 soxexam.1
MLINKS= play.1 rec.1 sox.1 soxmix.1
GNU_CONFIGURE= yes
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/lib/libmp3lame.so.0)
+WITH_LAME= YES
+.endif
+
+.if exists(${LOCALBASE}/lib/libmad.so.1)
+WITH_MAD= YES
+.endif
+
+.if exists(${LOCALBASE}/lib/libvorbis.so.2)
+WITH_VORBIS= YES
+.endif
+
+.if defined(WITH_VORBIS) || defined(WITH_LAME) || defined(WITH_MAD)
+CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+.endif
+
.if defined(WITH_VORBIS)
-CONFIGURE_ARGS+= --with-ogg-vorbisinc=${LOCALBASE}/include \
- --with-ogg-vorbislib=${LOCALBASE}/lib
+CONFIGURE_ARGS+= --enable-ogg-vorbis
LIB_DEPENDS+= vorbis.2:${PORTSDIR}/audio/libvorbis
.else
-CONFIGURE_ARGS+= --with-ogg-vorbisinc=no
+CONFIGURE_ARGS+= --disable-ogg-vorbis
+.endif
+
+.if defined(WITH_LAME)
+CONFIGURE_ARGS+= --enable-lame
+LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame
+.else
+CONFIGURE_ARGS+= --disable-lame
+.endif
+
+.if defined(WITH_MAD)
+CONFIGURE_ARGS+= --enable-mad
+LIB_DEPENDS+= mad.1:${PORTSDIR}/audio/mad
+.else
+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.mk>
+.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud