# $Id: Portfile,v 1.6 2005/01/07 18:00:02 rshaw Exp $
PortSystem 1.0
name		gnuregex
version		0.12
revision	2
categories	sysutils
maintainers	mij@opendarwin.org
description	GNU regex library
homepage	http://www.gnu.org/directory/regex.html
platforms	darwin

long_description $description

master_sites	gnu:regex

distname	regex-${portversion}
checksums	md5  6c25ca10e71adeede101e7646e796ebd

build.args	subdirs=test
post-build	{ 
		set command "libtool -lSystem -dynamic -install_name ${prefix}/lib/libgnuregex.dylib -o libgnuregex.dylib regex.o" 
		ui_info "$command"
		system "cd ${worksrcpath} && $command"
}

test.run	yes
test.args	${build.args}
test.target	check

destroot	{ 
		xinstall -m 755 -d ${destroot}${prefix}/include
		xinstall -m 644 ${worksrcpath}/regex.h ${destroot}${prefix}/include/gnuregex.h
		xinstall -m 755 ${worksrcpath}/libgnuregex.dylib ${destroot}${prefix}/lib
}
