Portfile

PortSystem 1.0

name mozart
version 1.3.2
revision 1
categories lang
platforms darwin
maintainers nomaintainer@macports.org
homepage http://www.mozart-oz.org
description Mozart-Oz multiparadigms programming language.
long_description The Mozart system is a development platform focused on open \
distributed computing and constraint-based inferrence. \
The system provides excellent support for logic and \
constraint programming, making it an excellent choice \
for implementing multi-agent systems. The language has \
recently been popularized by the book "Concepts, \
Techniques, and Models of Computer Progamming."

depends_build port:gmp port:zlib port:gdbm
depends_lib path:${prefix}/bin/emacs:emacs

master_sites http://www.mozart-oz.org/download/mozart-ftp/store/1.3.2-2006-06-15-tar
distfiles mozart-1.3.2.20060615-src.tar.gz
checksums md5 b84fb3932eca573e6b8d5d1b26379371

patchfiles patch-share-bin-oz.in

worksrcdir mozart-1.3.2.20060615
configure.args --prefix=${prefix}/mozart --with-inc-dir=${prefix}/include --with-lib-dir=${prefix}/lib

build.target
destroot.args PREFIX=${destroot}${prefix}/mozart
post-destroot {
cd ${destroot}${prefix}

delete mozart/doc
delete mozart/cache/x-oz/doc

xinstall -m 0644 ${filespath}/README.DarwinPorts mozart

xinstall -d man/man1
foreach x [glob ${worksrcpath}/doc/man/*.1] { system "ln $x man/man1" }

reinplace "s|^# OZHOME=.*|OZHOME=${prefix}/mozart|" mozart/bin/oz
xinstall -d bin
foreach x [glob -type {x} mozart/bin/*] { system "ln $x bin" }
}

files