blob: a736918c962e404384cf4bc878e1d4194dc6ea58 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# New ports collection makefile for: sox - Sound Exchange
# Date created: 17 Oct 1994
# Whom: torstenb
#
# $FreeBSD$
#
PORTNAME= sox
PORTVERSION= 13.0.0
PORTREVISION= 1
CATEGORIES= audio
MASTER_SITES= SF
MAINTAINER= dnelson@allantgroup.com
COMMENT= SOund eXchange - universal sound sample translator
CONFLICTS= play-[0-9]*
MAN1= sox.1
MAN3= libst.3
MAN7= soxexam.7
MLINKS= sox.1 play.1 sox.1 rec.1
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
# src/Makefile uses ${RM} but never sets it
MAKE_ENV+= RM="rm -f"
OPTIONS= FLAC "Enable libflac" on \
GSM "Use libgsm from ports (else use bundled lib)" on \
LAME "Enable mp3 encoding with LAME" on \
MAD "Enable mp3 decoding with MAD" on \
SNDFILE "Enable libsndfile" on \
VORBIS "Enable Ogg Vorbis support" on
.include <bsd.port.pre.mk>
.if defined(WITH_FLAC) || defined(WITH_GSM) || defined(WITH_LAME) || \
defined(WITH_MAD) || defined(WITH_SNDFILE) || defined(WITH_VORBIS)
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
.endif
.if defined(WITH_VORBIS)
CONFIGURE_ARGS+= --with-ogg-vorbis
LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
.else
CONFIGURE_ARGS+= --without-ogg-vorbis
# Above configure flag does not exist, so workaround with the below line
CONFIGURE_ENV+= ac_cv_header_vorbis_codec_h=no
.endif
.if defined(WITH_SNDFILE)
CONFIGURE_ARGS+= --with-sndfile
LIB_DEPENDS+= sndfile.1:${PORTSDIR}/audio/libsndfile
.else
CONFIGURE_ARGS+= --without-sndfile
.endif
.if defined(WITH_LAME)
CONFIGURE_ARGS+= --with-lame
LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame
.else
CONFIGURE_ARGS+= --without-lame
.endif
.if defined(WITH_FLAC)
CONFIGURE_ARGS+= --with-flac
LIB_DEPENDS+= FLAC.7:${PORTSDIR}/audio/flac
.else
CONFIGURE_ARGS+= --without-flac
.endif
.if defined(WITH_MAD)
CONFIGURE_ARGS+= --with-mad
LIB_DEPENDS+= mad.2:${PORTSDIR}/audio/libmad
.else
CONFIGURE_ARGS+= --without-mad
.endif
.if defined(WITH_GSM)
CONFIGURE_ARGS+= --with-external-gsm
LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm
.else
CONFIGURE_ARGS+= --without-external-gsm
# Above configure flag does not exist, so workaround with the below line
CONFIGURE_ENV+= ac_cv_header_gsm_h=no
.endif
# Tell configure that libgsm's headers are in $LOCALDIR/include
post-patch:
@${REINPLACE_CMD} -Ee 's![[:<:]]gsm/gsm.h!gsm.h!' ${WRKSRC}/configure \
${WRKSRC}/src/gsm.c ${WRKSRC}/src/wav.c
.include <bsd.port.post.mk>
|