aboutsummaryrefslogtreecommitdiffstats
path: root/audio/libsndfile/Makefile
blob: acab7f2c1dc5bdab08ac41ec0b3ac5852627dfb9 (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
# Created by: ijliao
# $FreeBSD$

PORTNAME=   libsndfile
PORTVERSION=    1.0.25
PORTREVISION=   3
CATEGORIES= audio
MASTER_SITES=   http://www.mega-nerd.com/libsndfile/files/

MAINTAINER= multimedia@FreeBSD.org
COMMENT=    Reading and writing files containing sampled sound (like WAV or AIFF)

LICENSE=    LGPL21

USES=       gmake pathfix pkgconfig
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --disable-gcc-pipe \
        --disable-sqlite \
        --disable-alsa \
        --disable-octave
CPPFLAGS+=  -isystem /usr/include -isystem ${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
USE_LDCONFIG=   yes

PORTDOCS=   AUTHORS ChangeLog NEWS README libsndfile.css \
        new_file_type.HOWTO libsndfile.jpg *.html

OPTIONS_DEFINE= CPU_CLIP EXTERNAL DOCS
OPTIONS_DEFAULT=    EXTERNAL
CPU_CLIP_DESC=  Allow machine-dependent clipping
EXTERNAL_DESC=  Enable FLAC and Ogg Vorbis support

.include <bsd.port.options.mk>

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

.if ${PORT_OPTIONS:MEXTERNAL}
LIB_DEPENDS+=   libFLAC.so:${PORTSDIR}/audio/flac \
        libvorbis.so:${PORTSDIR}/audio/libvorbis
.else
CONFIGURE_ARGS+=--disable-external-libs
.endif

post-patch:
    @${REINPLACE_CMD} -e '/^SUBDIRS =/s/ doc / /g' ${WRKSRC}/Makefile.in

check regression-test test: build
    @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} \
    check

post-install:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    @${TAR} -C ${WRKSRC}/doc --exclude "*Makefile*" --exclude "*.in" \
        -cf - . | ${TAR} -C ${STAGEDIR}${DOCSDIR} --unlink -xf -

.include <bsd.port.mk>