# -*- 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

PortSystem          1.0
PortGroup           cmake 1.0

name                falcon
version             0.9.6.8
revision            3
categories          lang
maintainers         {snc @nerdling} 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 \
                    path:lib/pkgconfig/gtk+-2.0.pc:gtk2

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

checksums           rmd160  f85470ed461a816da5c1c58602d22a92d4add252 \
                    sha256  f4b00983e7f91a806675d906afd2d51dcee048f12ad3af4b1dadd92059fa44b9

cmake.out_of_source yes
configure.args-append   -DFALCON_BUILD_SDL=OFF -DDISABLE_RPATH=OFF

post-build {
    system -W ${build.dir}/lib "install_name_tool -id ${prefix}/lib/libfalcon_engine.1.dylib libfalcon_engine.1.dylib"
    foreach file [glob ${build.dir}/lib/falcon/*dylib] {
        system -W ${build.dir}/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+)+)