# $Id: Portfile 47230 2009-02-23 23:00:23Z alakazam@macports.org $

PortSystem      1.0

name            fltk
version         1.1.9
categories      aqua devel
platforms       macosx
maintainers     alakazam openmaintainer
description     Fast Light Tool Kit

long_description \
    FLTK (pronounced fulltick) \
    is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), \
    Microsoft Windows, and Mac OS X. \
    FLTK provides modern GUI functionality without the bloat \
    and supports 3D graphics via OpenGL and \
    its built-in GLUT emulation. \
    \
    FLTK is designed to be small and modular enough to be \
    statically linked, but works fine as a shared library. \
    FLTK also includes an excellent UI builder called FLUID \
    that can be used to create applications in minutes.

homepage        http://www.fltk.org/
master_sites    http://ftp.easysw.com/pub/fltk/${version}/
worksrcdir      ${name}-${version}
distname        ${worksrcdir}-source
use_bzip2       yes

checksums       md5     e146fd264e1001b1313acfd41ef75552 \
                sha1    6f21903dc53c829ec71e8e49655eb19e624c8247 \
                rmd160  f22e83fc9fd5e8bc10f0eea55e1a4df2ba132d91

depends_lib     port:jpeg \
                port:libpng \
                port:zlib
universal_variant no

post-patch {
    reinplace "s|/Applications|${applications_dir}/${name}|g" \
        ${worksrcpath}/fluid/Makefile \
        ${worksrcpath}/test/Makefile
}

configure.args  --enable-threads \
                --mandir=${prefix}/share/man

use_parallel_build  yes

destroot.target install \
                install-desktop

livecheck.check regexm
livecheck.url   ${homepage}
livecheck.regex "Stable Release.*?\n.*?VERSION=(\\d+(\\.\\d+)*)'"
