# $Id: Portfile,v 1.2 2004/01/14 21:57:08 toby Exp $

PortSystem 1.0
name             ucblogo
version          5.3
distname         ${name}
extract.suffix   .tar.Z
categories       lang
maintainers      toby@opendarwin.org
platforms        darwin
description      Berkeley Logo
long_description \
    Berkeley Logo is a free Logo interpreter.
homepage         http://http.cs.berkeley.edu/~bh/
master_sites     ftp://ftp.cs.berkeley.edu/pub/ucblogo/ \
                 http://http.cs.berkeley.edu/~bh/downloads/
checksums        md5 e0e5f44c1f14c40ae87185a3a63d7681

post-configure {
    reinplace "s|gmake|make|g" "${worksrcpath}/makefile"
    reinplace "s|LIBLOC        = \$\(prefix\)/lib/logo|LIBLOC = \$\(prefix\)/share/logo|" "${worksrcpath}/makefile"

    reinplace "s|INFODIR	      = \$\(prefix\)/info|INFODIR = \$\(prefix\)/share/info|" "${worksrcpath}/emacs/makefile"
}

pre-destroot {
    reinplace "s|prefix = ${prefix}|prefix = ${destroot}${prefix}|" "${worksrcpath}/makefile"
}
