# $Id: Portfile 110804 2013-09-06 16:15:55Z jmr@macports.org $

PortSystem 1.0

name             mp3_check
version          1.98
categories       audio
license          GPL-2
maintainers      nomaintainer
description      mp3 format validator
long_description \
	mp3_check helps to identify in explicit detail MP3s \
	that do not correctly follow the MP3 format. It also \
	looks for invalid frame headers, missing frames, etc., \
	and generates useful statistics. This can be useful \
	when building a high-quality mp3 archive...
homepage         http://mp3check.sourceforge.net/
platforms        darwin
master_sites     sourceforge:mp3check
checksums        md5 d10e3d7d434af17cc036b752a816e492

patch {
	reinplace "s| -Werror||" ${worksrcpath}/Makefile
}

use_configure    no

configure.cflags-append -std=gnu89
build.env        CC="${configure.cc}" \
                 CFLAGS="${configure.cflags} ${configure.cc_archflags}"

destroot {
	xinstall -m 555 ${worksrcpath}/mp3_check \
		${destroot}${prefix}/bin

	xinstall -d ${destroot}${prefix}/share/doc/mp3_check

	foreach file {FOR_TESTING GOALS MILESTONE MILESTONE.INTRO MY_NOTES NOTES README THANKYOU TODO WISHLIST} {
		xinstall -m 444 ${worksrcpath}/${file} ${destroot}${prefix}/share/doc/mp3_check
	}
}
