summaryrefslogtreecommitdiffstats
path: root/audio/audiere/Makefile
blob: 84a5e51b980db056ba8ca9680f83be7819ae3fa5 (plain)
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
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
# $FreeBSD$

PORTNAME=	audiere
PORTVERSION=	1.9.4
PORTREVISION=	5
CATEGORIES=	audio
MASTER_SITES=	SF

MAINTAINER=	amdmi3@FreeBSD.org
COMMENT=	High-level audio API

GNU_CONFIGURE=	yes
USES=		gmake libtool
WANT_WX=	yes
USE_AUTOTOOLS=	autoconf
INSTALL_TARGET=	install-strip
USE_LDCONFIG=	yes

CONFIGURE_ENV=	PTHREAD_LIBS="-pthread"
CPPFLAGS+=	-I${LOCALBASE}/include/speex -I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

PORTDOCS=	changelog.txt cvs.txt dependencies.txt faq.txt glossary.txt \
		license.txt overview.txt readme.txt release-howto.txt \
		tutorial.txt

CONFIGURE_REPLACES='s|wx_config|no_&|'

OPTIONS_DEFINE=		DUMB CDAUDIO VORBIS SPEEX DOCS
OPTIONS_DEFAULT=	DUMB CDAUDIO VORBIS SPEEX

DUMB_DESC=	DUMB support
CDAUDIO_DESC=	libcdaudio support

.include <bsd.port.options.mk>

# Broken with recent FLAC
#.if !defined(WITHOUT_FLAC)
#LIB_DEPENDS+=	FLAC:${PORTSDIR}/audio/flac
#.else
CONFIGURE_REPLACES+='/AC_CHECK_LIB/ s|FLAC|no_&|'
#.endif

.if ${PORT_OPTIONS:MDUMB}
BUILD_DEPENDS+=	${LOCALBASE}/lib/libdumb.a:${PORTSDIR}/audio/dumb
.else
CONFIGURE_REPLACES+='/AC_CHECK_LIB/ s|dumb|no_&|'
.endif

.if ${PORT_OPTIONS:MCDAUDIO}
LIB_DEPENDS+=	libcdaudio.so:${PORTSDIR}/audio/libcdaudio
.else
CONFIGURE_REPLACES+='/AC_CHECK_LIB/ s|cdaudio|no_&|'
.endif

# since dumb is a static lib and it depends on ogg, we should
# link audiere with ogg as well
.if ${PORT_OPTIONS:MVORBIS} || ${PORT_OPTIONS:MDUMB}
LIB_DEPENDS+=	libvorbis.so:${PORTSDIR}/audio/libvorbis \
		libogg.so:${PORTSDIR}/audio/libogg
.else
CONFIGURE_REPLACES+='/AC_CHECK_HEADER/ s|vorbis|no_&|'
.endif

.if ${PORT_OPTIONS:MSPEEX}
LIB_DEPENDS+=	libspeex.so:${PORTSDIR}/audio/speex
.else
CONFIGURE_REPLACES+='/AC_CHECK_HEADER/ s|speex|no_&|'
.endif

post-patch:
	@${REINPLACE_CMD} ${CONFIGURE_REPLACES:C/.*/-e &/} \
		-e 's|-lpthread|-pthread|' \
		${WRKSRC}/configure.in

post-install:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${PORTDOCS}
	${INSTALL_DATA} ${WRKSRC}/doc/${f} ${STAGEDIR}${DOCSDIR}
.endfor

.include <bsd.port.mk>
OpenPOWER on IntegriCloud