# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 89291 2012-01-23 14:34:07Z snc@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0

name                falcon
version             0.9.6.8
revision            1
categories          lang
maintainers         snc openmaintainer
license             {GPL-2 FPLL-1.1}
description         simple, fast and powerful programming language, easy to \
                    learn and to feel comfortable with, and a scripting engine \
                    ready to empower mission-critical multithreaded applications.
long_description    Falcon provides six integrated programming paradigms: \
                    procedural, object oriented, prototype oriented, functional, \
                    tabular and message oriented. And you don't have to master \
                    all of them\; you just need to pick the ingredients you \
                    prefer, and let the code to follow your inspiration.

homepage            http://www.falconpl.org
platforms           darwin
depends_lib-append  port:curl \
                    port:freetype \
                    port:gtk2

master_sites        ${homepage}/project_dl/_official_rel/
distname            Falcon-${version}
extract.suffix      .tgz

checksums           rmd160  f85470ed461a816da5c1c58602d22a92d4add252 \
                    sha256  f4b00983e7f91a806675d906afd2d51dcee048f12ad3af4b1dadd92059fa44b9

configure.args-append   -DFALCON_BUILD_SDL=OFF

post-build {
    system -W ${worksrcpath}/lib "install_name_tool -id ${prefix}/lib/libfalcon_engine.1.dylib libfalcon_engine.1.dylib"
    foreach file [glob ${worksrcpath}/lib/falcon/*dylib] {
        system -W ${worksrcpath}/lib/falcon "install_name_tool -change libfalcon_engine.1.dylib ${prefix}/lib/libfalcon_engine.1.dylib $file"
    }
}

livecheck.type      regex
livecheck.url       ${homepage}/index.ftd?page_id=official_download
livecheck.regex     Falcon-(\\d+(\\.\\d+)+)
