# $OpenBSD$

COMMENT=	"free audio editor"

DISTNAME=	audacity-src-${VERSION}
VERSION=	1.2.3
PKGNAME=	audacity-${VERSION}
CATEGORIES=     audio
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=audacity/}

HOMEPAGE=	http://audacity.sourceforge.net/

MAINTAINER=	Antoine Jacoutot <ajacoutot@lphp.org>

# GPLv2
PERMIT_PACKAGE_CDROM=   yes
PERMIT_PACKAGE_FTP=     yes
PERMIT_DISTFILES_CDROM= yes
PERMIT_DISTFILES_FTP=   yes

WANTLIB=	c m ossaudio pthread stdc++ \
		FLAC++.3.2 ogg.5.2 vorbisenc.2.0 \
		samplerate.1.1

BUILD_DEPENDS=	:zip-*:archivers/zip
LIB_DEPENDS=	wx_gtk.2.4:wxWidgets-gtk-2.4.2:x11/wxWidgets/gtk \
		sndfile.1.11::audio/libsndfile \
		samplerate.1.1::audio/libsamplerate \
		FLAC.4::audio/flac \
		vorbis.0,vorbisfile.1::audio/libvorbis \
		id3tag.2::audio/libid3tag \
		mad.2::audio/libmad

USE_GMAKE=		yes
CONFIGURE_STYLE=	gnu
USE_LIBTOOL=		yes

CONFIGURE_ENV+=		CPPFLAGS="-I${LOCALBASE}/include" \
			CFLAGS="-I${LOCALBASE}/include" \
			LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
			WXCONFIG=${LOCALBASE}/bin/wxgtk-2.4-config
CONFIGURE_ARGS+=	${CONFIGURE_SHARED} \
			--with-id3=system \
			--with-vorbis=system \
			--with-libflac=system \
			--with-libmad=system \
			--with-libsndfile=system \
			--with-libsamplerate=system \
			--with-libresample \
			--with-nyquist \
			--with-ladspa \
			--with-portmixer \
			--with-soundtouch \
			--with-portaudio=v18 \
			--with-help

.include <bsd.port.mk>
