# $Id: Portfile,v 1.22 2006/07/16 06:23:35 yves Exp $

PortSystem 1.0
name			openmotif
version			2.3.0-20060106
categories		x11
maintainers		darwinports@opendarwin.org
description		The Open Motif toolkit for X11
long_description	\
                This is The Open Group's full version of Motif based on \
				the original OSF sources.
platforms		darwin
homepage		http://www.motifzone.net/
master_sites	ftp://ftp.ics.com/pub/Products/Motif/om2.3/
checksums		md5 e236a4397ea2253f11bee88a5c88f23c
fetch.use_epsv  no

depends_build	lib:libX11.6:XFree86
depends_lib		port:jpeg port:libpng port:Xft2 port:expat port:fontconfig \
				port:freetype port:libiconv port:xrender port:zlib

worksrcdir		${name}-2.3.0

post-patch {
	reinplace "s;recipient's;recipients;" ${worksrcpath}/tools/wml/motif.wml
	reinplace "s|iconv_open|libiconv_open|g" ${worksrcpath}/configure
	reinplace "s|LDFLAGS = -version-info @CURRENT@:@REVISION@:@AGE@|LDFLAGS = -version-info @CURRENT@:@REVISION@:@AGE@ @LDFLAGS@|" \
		  ${worksrcpath}/lib/Xm/Makefile.in
}

configure.args	--mandir=${prefix}/share/man
configure.env	CFLAGS=-I${prefix}/include CPPFLAGS=-I${prefix}/include \
				LDFLAGS=-L${prefix}/lib

build.env	LANG=C

platform darwin 7 {
    patchfiles-append patch-XmRenderTI.h
}

platform darwin 8 {
	configure.env-append CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}

