# -*- 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
# $Id: Portfile 134318 2015-03-22 06:42:51Z ionic@macports.org $

PortSystem 1.0

name             mp3_check
version          1.98
revision         1
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 755 ${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
	}
}
