# $Id: Portfile,v 1.15 2006/01/25 09:01:46 olegb Exp $

PortSystem 1.0
name		openjade
version		1.3.2
revision	1
categories	textproc
maintainers	kevin@opendarwin.org
description	James Clark's implementation of DSSSL
homepage	http://openjade.sourceforge.net/
platforms	darwin freebsd

long_description OpenJade is an implementation of ISO/IEC 10179:1996 \
		 standard DSSSL language.

master_sites     sourceforge

checksums	md5 7df692e3186109cc00db6825b777201e

patchfiles	patch-Makefile.lib.in patch-Makefile.prog.in patch-ltmain.sh \
		patch-configure

depends_lib	lib:libosp.3:opensp
depends_run	bin:mkcatalog:mkcatalog

configure.args	--enable-http --enable-html --enable-mif \
		--disable-dependency-tracking \
		--enable-default-catalog=${prefix}/share/sgml/catalog \
		--datadir=${prefix}/share/sgml/openjade

configure.env	LDFLAGS="-L${prefix}/lib" LIBS="-L${prefix}/lib" CC=gcc-3.3 CXX=g++-3.3 \
		CXXFLAGS="-I${prefix}/include -fno-rtti" 
		#CXXFLAGS="-I${prefix}/include -no-cpp-precomp -fno-common -fno-rtti" 

post-configure	{ reinplace "s|^#pragma implementation||g" ${worksrcpath}/grove/Node.cxx
		  reinplace "s|^#pragma implementation||g" ${worksrcpath}/msggen.pl
		  reinplace "s|^#pragma implementation||g" ${worksrcpath}/spgrove/GroveApp.cxx
		  reinplace "s|^#pragma implementation||g" ${worksrcpath}/style/MessageModule.cxx
		  reinplace "s|^#pragma interface||g" ${worksrcpath}/generic/EventGenerator.h
		  reinplace "s|^#pragma interface||g" ${worksrcpath}/generic/ParserEventGeneratorKit.h
		  reinplace "s|^#pragma interface||g" ${worksrcpath}/generic/SGMLApplication.h
		  reinplace "s|^#pragma interface||g" ${worksrcpath}/grove/Node.h
		  reinplace "s|^#pragma interface||g" ${worksrcpath}/msggen.pl
		  reinplace "s|^#pragma interface||g" ${worksrcpath}/spgrove/GroveApp.h
		  reinplace "s|CXX=|CXX=g++-3.3|g" ${worksrcpath}/libtool
}

destroot.target	install install-man

post-destroot	{ system "install -d -m 755 ${destroot}${prefix}/share/sgml/openjade"
		  system "install -m 644 ${worksrcpath}/dsssl/* ${destroot}${prefix}/share/sgml/openjade" }
