Portfile

# $Id: Portfile 21581 2007-01-29 18:25:17Z gwright@macports.org $

PortSystem 1.0
name gprolog
version 1.3.0

categories lang
maintainers pmoura@mac.com
platforms darwin
description GNU Prolog compiler

long_description \
GNU Prolog is a free Prolog compiler with constraint \
solving over finite domains developed by Daniel Diaz. \
GNU Prolog accepts Prolog+constraint programs and \
produces native binaries (like gcc does from a C \
source). The obtained executable is then stand-alone. \
The size of this executable can be quite small since \
GNU Prolog can avoid linking the code of most unused \
built-in predicates. The performance of GNU Prolog is \
very encouraging (comparable to commercial systems). \
Beside native-code compilation, GNU Prolog offers a \
classical interactive interpreter (top-level) with a \
debugger.

homepage http://gprolog.inria.fr/
master_sites http://www.gprolog.org/

checksums md5 950736db26248f6ed942191ec6c441e9

distname ${name}-${version}
worksrcdir ${name}-${version}/src

configure.args \
--prefix=${destroot}/${prefix} \
--with-install-dir=${prefix}/lib/${name}-${version} \
--with-examples-dir=${prefix}/share/${name}-${version} \
--with-doc-dir=${prefix}/share/${name}-${version}

post-destroot {
cd ${destroot}${prefix}/bin

file delete fd2c
file delete gplc
file delete gprolog
file delete hexgplc
file delete ma2asm
file delete pl2wam
file delete wam2ma

system "ln -s ../lib/${name}-${version}/bin/fd2c fd2c"
system "ln -s ../lib/${name}-${version}/bin/gplc gplc"
system "ln -s ../lib/${name}-${version}/bin/gprolog gprolog"
system "ln -s ../lib/${name}-${version}/bin/hexgplc hexgplc"
system "ln -s ../lib/${name}-${version}/bin/ma2asm ma2asm"
system "ln -s ../lib/${name}-${version}/bin/pl2wam pl2wam"
system "ln -s ../lib/${name}-${version}/bin/wam2ma wam2ma"

file delete -force ${destroot}${prefix}/var
}


post-pkg {
set resources ${workpath}/${name}-${version}.pkg/Contents/Resources/
file copy -force -- ${workpath}/${name}-${version}/COPYING ${resources}/License.txt
file copy -force -- ${workpath}/${name}-${version}/README ${resources}/ReadMe.txt
}