aboutsummaryrefslogtreecommitdiff
path: root/audio/streamripper/Makefile
blob: e46891ba4a31cc02a37d32b01a0b762ea1ff49d6 (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
# New ports collection makefile for:	streamripper
# Date created:		6 Apr 2000
# Whom:			Trevor Johnson
#
# $FreeBSD$
#

PORTNAME=	streamripper
PORTVERSION=	1.62.1
CATEGORIES=	audio
MASTER_SITES=	SF

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Splits SHOUTcast stream into tracks

LIB_DEPENDS=	mad.2:${PORTSDIR}/audio/libmad \
		tre.6:${PORTSDIR}/textproc/libtre

OPTIONS=	FAAD "Include FAAD mpeg4 codec support" on \
		VORBIS "Include Ogg Vorbis codec support" on

USE_GNOME=	gnometarget
USE_ICONV=	yes

GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
		LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS=	--without-included-libmad \
		--without-included-tre \
		--with-included-argv
CFLAGS+=	-DANSI_PROTOTYPES -DHAVE_LANGINFO_CODESET

MAN1=		streamripper.1
PLIST_FILES=	bin/cstreamripper bin/streamripper

.include <bsd.port.pre.mk>

.if defined(WITHOUT_FAAD)
CONFIGURE_ARGS+=	ac_cv_lib_faad_NeAACDecDecode2=no
.else
LIB_DEPENDS+=	faad.0:${PORTSDIR}/audio/faad
.endif

.if defined(WITHOUT_VORBIS)
CONFIGURE_ARGS+=	--without-ogg
.else
LIB_DEPENDS+=	vorbis.4:${PORTSDIR}/audio/libvorbis
.endif

post-patch:
	@${REINPLACE_CMD} -e '/if test/s|==|=|g ; \
		 s|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/cstreamripper ${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/streamripper ${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/streamripper.1 ${MANPREFIX}/man/man1

.include <bsd.port.post.mk>