# $MidnightBSD: trunk/audio/soundtouch/Makefile 19426 2015-06-10 02:00:35Z laffer1 $

PORTNAME=	soundtouch
PORTVERSION=	1.8.0
CATEGORIES=	audio
MASTER_SITES=	http://www.surina.net/soundtouch/

MAINTAINER=	ports@MidnightBSD.org
COMMENT=	Open-source audio processing library

LICENSE=	lgpl2.1

WRKSRC=		${WRKDIR}/${PORTNAME}

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--disable-silent-rules
USE_LDCONFIG=	yes

USES=			autoreconf libtool pathfix
USE_AUTOTOOLS=		libtoolize
PATHFIX_MAKEFILEIN=	Makefile.am

OPTIONS_DEFINE=	INTEGER_SAMPLES DOCS
OPTIONS_DEFINE_amd64=	SSE
OPTIONS_DEFINE_i386=	SSE

INTEGER_SAMPLES_DESC=	Use integer sample format
INTEGER_SAMPLES_CONFIGURE_ENABLE=	integer-samples
SSE_CONFIGURE_ENABLE=	x86-optimizations

post-patch:
	@${REINPLACE_CMD} -e \
		'/^pkgdoc_DATA/s|COPYING.TXT||' \
		${WRKSRC}/Makefile.am
	@${REINPLACE_CMD} -e \
		's|^INCLUDES|AM_CPPFLAGS| ; \
		 s|$$(prefix)/doc|$$(datadir)/doc|' \
		${WRKSRC}/config/am_include.mk
.for i in SoundStretch SoundTouch
	@${REINPLACE_CMD} -e \
		's|-O[0-9]||;s|-fcheck-new||' \
		${WRKSRC}/source/${i}/Makefile.am
.endfor

.include <bsd.port.mk>
