# $Id: Portfile 30235 2007-10-22 23:13:37Z jmpp@macports.org $

PortSystem 1.0

name             ferite
version          1.0.2
categories       lang
maintainers      nomaintainer
description      embeddable scripting language
long_description A scripting language designed to be embedded in other \
                 applications, that aims to provide a powerful object \
                 oriented syntax with low memory and cpu overhead.
homepage         http://www.ferite.org/
platforms        darwin
master_sites     sourceforge
checksums        md5 da1feaf5f87e0dfc95c5a9afeafeff9a \
                 sha1 a0ab83b33d28d59fe0ff2b532ebbc42224df3461 \
                 rmd160 3eb8fe2bbd66f188bd7aae92e7e48922e698a3ad

depends_lib      port:pcre \
                 port:libxml2
configure.args   --mandir=${prefix}/share/man

post-patch {
  reinplace "s|LDFLAGS = -lferite -L\${libdir}|LDFLAGS = -L\${libdir}|g" \
            "${worksrcpath}/modules/stream/Makefile.in"
  # as the application is not yet installed, use the utilities in tool/:
  reinplace "s|build_c_api_docs.sh \$(prefix)/bin/|build_c_api_docs.sh ${worksrcpath}/tools/doc/|g" \
            "${worksrcpath}/docs/Makefile.in"
  # ensure the documentation is installed in destroot:
  reinplace "s|\$(prefix)/share/doc/ferite/|${destroot}${prefix}/share/doc/ferite/|g" \
            "${worksrcpath}/docs/Makefile.in"
}
