PortSystem 1.0

name			id3v2
version			0.1.12
revision                1
categories		audio
maintainers		nomaintainer
license			LGPL-2.1

description		ID3v2 editing tool
long_description A command line editor for ID3v2 tags, based on id3lib. \
				Written by Myers Carpenter.
homepage		http://id3v2.sourceforge.net/
platforms		darwin
master_sites	sourceforge

checksums		sha1    8f42153b2f53098c221da2e8fe42170e727cd9ad \
				rmd160  084f90bea49cc8fb93acb5f78bb55602c5358ac5

if {${os.platform} eq "darwin" && ${os.major} >= 22} {
    depends_build-append port:groff
}

depends_lib		port:id3lib

variant universal {}

use_configure	no

pre-build {
	# The distfile contains compiled Linux objects and binaries.
	system "cd ${worksrcpath} && make clean"
}

set cxx_stdlibflags {}
if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} ne ""} {
    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}

build.args		CXX="${configure.cxx} [get_canonical_archflags] ${cxx_stdlibflags}" \
				PREFIX=${prefix}

destroot.args	PREFIX=${destroot}${prefix}

livecheck.type	regex
livecheck.url	http://sourceforge.net/projects/${name}/files/
livecheck.regex	/${name}-(\[0-9.\]+)${extract.suffix}
