Portfile

# $Id: Portfile 23053 2007-03-23 20:35:47Z pipping@macports.org $
PortSystem 1.0
name gnuregex
version 0.12
revision 2
categories sysutils
maintainers mij@macports.org
description GNU regex library
homepage http://www.gnu.org/directory/regex.html
platforms darwin

long_description $description

master_sites gnu:regex

distname regex-${version}
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
}