summaryrefslogtreecommitdiffstats
path: root/audio/libsamplerate/Makefile
blob: 0cc0b3a1dc8ed144346f921b647188a9a31cbadd (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
# Created by: <dmagda+libsamplerate@ee.ryerson.ca>
# $FreeBSD$

PORTNAME=	libsamplerate
PORTVERSION=	0.1.8
PORTREVISION=	4
CATEGORIES=	audio
MASTER_SITES=	http://www.mega-nerd.com/SRC/

MAINTAINER=	multimedia@FreeBSD.org
COMMENT=	Secret Rabbit Code: a Sample Rate Converter for audio

LICENSE=	GPLv2

USES=	pathfix pkgconfig libtool:oldver
USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes

OPTIONS_DEFINE=	CPU_CLIP DOCS EXAMPLES
CPU_CLIP_DESC=	Allow machine-dependent clipping

.include <bsd.port.options.mk>

MAKE_ARGS+=	htmldocdir=${PREFIX}/share/doc/libsamplerate

.if ${PORT_OPTIONS:MCPU_CLIP}
MANUAL_PACKAGE_BUILD=	CPU_CLIP may customize the package for the build machine
.else
CONFIGURE_ARGS+=	--disable-cpu-clip
.endif

.if defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
BUILD_DEPENDS +=	${LOCALBASE}/lib/libfftw3.so:${PORTSDIR}/math/fftw3
.else
CONFIGURE_ARGS+=	--disable-fftw
.endif

.if ${PORT_OPTIONS:MEXAMPLES}
LIB_DEPENDS+=	libsndfile.so:${PORTSDIR}/audio/libsndfile
.elif defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
BUILD_DEPENDS +=	libsndfile>=0:${PORTSDIR}/audio/libsndfile
.else
CONFIGURE_ARGS+=	--disable-sndfile
.endif

post-patch:
.if empty(PORT_OPTIONS:MDOCS)
	@${REINPLACE_CMD} -e '/SUBDIRS =/s/doc //' ${WRKSRC}/Makefile.in
.endif
.if empty(PORT_OPTIONS:MEXAMPLES)
	@${REINPLACE_CMD} -e '/SUBDIRS =/s/examples //' ${WRKSRC}/Makefile.in
.endif

.if defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
check regression-test test: build
	@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} \
	check
.endif

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsamplerate.so.1

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