# -*- 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 111840 2013-10-03 16:10:09Z devans@macports.org $

PortSystem              1.0
PortGroup               cmake 1.0

name                    OpenSceneGraph
conflicts               OpenSceneGraph-devel
version                 3.2.0
platforms               darwin
categories              graphics
maintainers             nomaintainer
license                 wxWidgets-3
description             high-performance 3D graphics toolkit

long_description        ${name} is a high-performance 3D graphics toolkit useful in fields such as \
                        visual simulation, games, virtual reality, scientific visualization and \
                        modelling.

homepage                http://www.openscenegraph.org/
master_sites            ${homepage}downloads/developer_releases/

use_zip                 yes

checksums               rmd160  cba6679cec2a9a6639f5758239b5af5b2df5208a \
                        sha256  ceca56e58e9ba245d5f9d0661352ddf405a7cb105341a122c5541b69c0ce032e

patchfiles              patch-CMakeLists.txt.diff

depends_build-append    port:pkgconfig

depends_lib             port:freetype \
                        port:jasper \
                        port:openexr \
                        port:zlib \
                        port:gdal \
                        port:curl \
                        path:lib/libavcodec.dylib:ffmpeg \
                        port:poppler \
                        port:librsvg \
                        port:giflib \
                        port:tiff \
                        port:qt4-mac \
                        port:boost

configure.args-append   -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \
                        -DOSG_CONFIG_HAS_BEEN_RUN_BEFORE=YES \
                        -DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio \
                        -DOSG_WINDOWING_SYSTEM=Cocoa \
                        -DDESIRED_QT_VERSION=4

livecheck.type          regex
livecheck.url           ${homepage}downloads/developer_releases/
livecheck.regex         "${name}-(\\d+\\.\\d*\[02468\](?:\\.\\d+)*)${extract.suffix}"
