# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0

name             sox
conflicts        play
version          14.4.2
revision            7
checksums           rmd160  738ac41a07f74f66e27cd642f786cc5815ca87ff \
                    sha256  81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c \
                    size    935449

categories       audio
maintainers      nomaintainer
license          GPL-2+

description      the Swiss Army knife of audio manipulation
long_description \
	SoX (also known as Sound eXchange) translates sound samples between \
	different file formats, and optionally applies various sound \
	effects. SoX is intended as the Swiss Army knife of sound processing \
	tools. It doesn't do anything very well, but sooner or later it \
	comes in very handy.

homepage            https://sox.sourceforge.net
master_sites     sourceforge:project/sox/sox/${version}
use_bzip2        yes

depends_build       path:bin/pkg-config:pkgconfig

patchfiles          curl.patch \
                    yosemite-libtool.patch \
                    warnings.patch

platform darwin 11 {
	# System grep fails: "grep: Regular expression too big"
	depends_build-append	\
		port:grep
}

depends_lib	\
		port:flac		\
		port:lame		\
		port:libgsm		\
		port:libiconv		\
		port:libid3tag		\
		port:libmad		\
		port:libmagic		\
		port:libogg		\
		port:libopus		\
		port:libpng		\
		port:libsndfile		\
		port:libvorbis		\
		port:opusfile		\
		port:twolame		\
		port:wavpack		\
		port:zlib

configure.args	\
		--enable-largefile	\
		--disable-silent-libtool\
		--disable-silent-rules	\
		--disable-openmp	\
		--enable-symlinks	\
		--without-libltdl	\
		--with-distro=macosx

# additional formats
configure.args-append \
		--with-magic		\
		--with-png		\
		--without-ladspa	\
		--with-mad		\
		--with-id3tag		\
		--with-lame		\
		--with-twolame		\
		--with-oggvorbis	\
		--with-opus		\
		--with-flac		\
		--without-amrwb		\
		--without-amrnb		\
		--with-wavpack		\
		--with-sndfile		\
		--with-mp3		\
		--with-gsm		\
		--with-lpc10

# output drivers
configure.args-append \
		--with-coreaudio	\
		--without-sndio		\
		--without-alsa		\
		--without-ao		\
		--without-pulseaudio	\
		--without-waveaudio	\
		--without-oss		\
		--without-sunaudio
