# $Id: Portfile,v 1.5 2006/01/25 15:17:56 markd Exp $

PortSystem 1.0

name            cgilib
version         0.5
revision		2
categories	    www devel
maintainers     markd@opendarwin.org

description	CGI Library

long_description \
		A simple library whose purpose is to \
		provide an easy to use interface to CGI \
		if you need to write your program in C \
		instead of perl.

homepage        http://www.infodrom.org/projects/cgilib/
platforms	darwin

master_sites    http://www.infodrom.org/projects/cgilib/download/ \
		http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/


checksums       md5 5187ba11b2ec165b6c5b6629087733b0

use_configure	no

pre-build {
		system "touch ${worksrcpath}/malloc.h"
}
build.target	""
build.args      CFLAGS="-O3 -fPIC -I."
post-build {
		system "ranlib ${worksrcpath}/libcgi.a"
}

destroot.args           INSTALL_OPTS_LIB='-m 644 -p'
destroot {
		xinstall -d -m 755 ${destroot}${prefix}/include \
			${destroot}${prefix}/lib ${destroot}${prefix}/man/man3
		eval xinstall -m 644 [glob ${worksrcpath}/*.h] ${destroot}${prefix}/include
		eval xinstall -m 755 [glob ${worksrcpath}/libcgi*] ${destroot}${prefix}/lib
		eval xinstall -m 755 [glob ${worksrcpath}/*.3] ${destroot}${prefix}/man/man3
}

