# $Id: Portfile,v 1.6 2006/02/14 23:02:08 pguyot Exp $

PortSystem			1.0
name				libmatroska
version				0.8.0
categories			multimedia
maintainers			pguyot@kallisys.net
description			Matroska is an extensible open standard audio/video container format.
long_description	\
					Matroska is an extensible open standard audio/video container \
					format. This library is there to support this format and has \
					been written by the Matroska project team.
				
homepage			http://www.matroska.org/
platforms			darwin
master_sites		http://dl.matroska.org/downloads/${name}/
checksums			md5 ee822ea811e5db25de87c3662c53953a \
					sha1 7725d874dbf37ec7c41115804f091fa1554c6338 \
					rmd160 e2fb6dcad7157373a271273a1a3ffc4428da9744
use_bzip2			yes

depends_lib			lib:libebml.a:libebml

post-extract {
	cd "${worksrcpath}/make"
	system "cp -R linux darwin"
}

configure			{}

build.dir			${worksrcpath}/make/darwin
build.args			prefix=${prefix} \
					LIBEBML_INCLUDE_DIR=${prefix}/include \
					LIBEBML_LIB_DIR=${prefix}/lib

test.run			yes
test.cmd			./test6 && ./test8 && ./test9
test.target

# We need -p for install because ld will ask for ranlib if the modification date changes.
destroot.args		INSTALL_OPTS_LIB='-m 644 -p'
destroot.destdir	prefix=${destroot}${prefix}
