a project to simplify installation of open source software
on Mac OS X and Darwin
# $Id: Portfile 22215 2007-02-22 06:56:13Z gwright@macports.org $
PortSystem 1.0
name logtalk
version 2.29.4
categories lang
maintainers pmoura@mac.com
platforms darwin freebsd linux
description Logtalk - Open source object-oriented extension to Prolog
long_description \
Logtalk is an open source object-oriented extension to the \
Prolog programming language. Integrating logic programming \
with object-oriented and event-driven programming, it is \
compatible with most Prolog compilers. It supports both \
prototypes and classes. In addition, it supports component- \
based programming through category-based composition.
homepage http://logtalk.org/
master_sites ${homepage}/files/
checksums md5 5976a1c35541f4cb1aa5fcdc30980071
distname lgt2294
extract.suffix .tgz
configure {}
build {}
destroot {
system "mkdir ${destroot}${prefix}/share/${distname}"
cd ${destroot}${prefix}/share/${distname}
system "cp -R ${workpath}/${worksrcdir}/* ."
system "chmod -R go-w,a+r ."
system "chmod a+x scripts/*.sh"
system "chmod a-x scripts/*.js"
system "chmod a+x scripts/linux/*.sh"
system "chmod a+x scripts/macosx/postflight"
system "chmod a+x xml/*.sh"
system "chmod a-x xml/*.js"
}
post-destroot {
cd ${destroot}/${prefix}/share
system "ln -sf ${distname} logtalk"
cd ../bin
system "ln -sf ../share/logtalk/scripts/cplgtdirs.sh cplgtdirs"
system "ln -sf ../share/logtalk/xml/lgt2xml.sh lgt2xml"
system "ln -sf ../share/logtalk/xml/lgt2html.sh lgt2html"
system "ln -sf ../share/logtalk/xml/lgt2pdf.sh lgt2pdf"
system "export LOGTALKHOME=../share/logtalk; ../share/logtalk/scripts/make_bplgt.sh ${destroot}/${prefix}"
system "export LOGTALKHOME=../share/logtalk; ../share/logtalk/scripts/make_ciaolgt.sh ${destroot}/${prefix}"
system "export LOGTALKHOME=../share/logtalk; ../share/logtalk/scripts/make_eclipselgt.sh ${destroot}/${prefix}"
system "export LOGTALKHOME=../share/logtalk; ../share/logtalk/scripts/make_gplgt.sh ${destroot}/${prefix}"
system "export LOGTALKHOME=../share/logtalk; ../share/logtalk/scripts/make_plclgt.sh ${destroot}/${prefix}"
system "export LOGTALKHOME=../share/logtalk; ../share/logtalk/scripts/make_sicstuslgt.sh ${destroot}/${prefix}"
system "export LOGTALKHOME=../share/logtalk; ../share/logtalk/scripts/make_swilgt.sh ${destroot}/${prefix}"
system "export LOGTALKHOME=../share/logtalk; ../share/logtalk/scripts/make_xsblgt.sh ${destroot}/${prefix}"
system "export LOGTALKHOME=../share/logtalk; ../share/logtalk/scripts/make_yaplgt.sh ${destroot}/${prefix}"
}
post-pkg {
set resources ${workpath}/${name}-${version}.pkg/Contents/Resources/
file copy -force -- ${destroot}/${prefix}/share/logtalk/scripts/macosx/License.html ${resources}
file copy -force -- ${destroot}/${prefix}/share/logtalk/scripts/macosx/ReadMe.html ${resources}
file copy -force -- ${destroot}/${prefix}/share/logtalk/scripts/macosx/Welcome.html ${resources}
file copy -force -- ${destroot}/${prefix}/share/logtalk/scripts/macosx/postflight ${resources}
}
post-activate {
ui_msg "****************************************************************************"
ui_msg "* Integration scripts have been created for running Logtalk with selected"
ui_msg "* back-end Prolog compilers (which must be properly installed for running"
ui_msg "* the scripts!):"
ui_msg "*"
ui_msg "* B-Prolog: bplgt"
ui_msg "* CIAO: ciaolgt"
ui_msg "* ECLiPSe: eclipselgt"
ui_msg "* GNU Prolog: gplgt"
ui_msg "* K-Prolog: plclgt"
ui_msg "* SICStus Prolog: sicstuslgt"
ui_msg "* SWI-Prolog: swilgt"
ui_msg "* XSB: xsblgt"
ui_msg "* YAP: yaplgt"
ui_msg "*"
ui_msg "* Remember to set the environment variable LOGTALKHOME to the path to"
ui_msg "* the Logtalk distribution: ${prefix}/share/logtalk"
ui_msg "* and the environment variable LOGTALKUSER to your local configuration"
ui_msg "* directory (usually ~/logtalk), which you can create by running the"
ui_msg "* command cplgtdirs. See the file \$LOGTALKHOME/CUSTOMIZE.TXT for details"
ui_msg "* on how to customize your working environment."
ui_msg "****************************************************************************"
}