PortSystem 1.0

name			clog
version			20030825
categories		devel
license			MIT
platforms		darwin
maintainers		nomaintainer
description		cLog is a cross-platform C logging library.
long_description	cLog is a cross-platform C logging library. It is designed \
					to log to files and can also log to a callback function.

homepage		http://www.webgroupmedia.com/software/
master_sites	${homepage}
distname		clog_${version}
checksums		md5 6561e54a243a715f41549cdbbe28cb06
patchfiles		patch-Makefile

worksrcdir		clog

use_configure	no

build.target
build.args		PREFIX=${prefix}
use_parallel_build	no

test.run		yes
test.target		test
post-test	{
	system "cd ${workpath}/build && ./test_clog && test -f test.log"
}

destroot	{
	xinstall -m 644 ${worksrcpath}/clog.h ${destroot}${prefix}/include
	xinstall -m 644 -W ${workpath}/build libclog.a libclog.1.0.dylib \
		${destroot}${prefix}/lib/
	system "cd ${destroot}${prefix}/lib/ \
		&& ln -s libclog.1.0.dylib libclog.1.dylib \
		&& ln -s libclog.1.0.dylib libclog.dylib"
}
