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

name                        maniview
version                     2.0.4
categories                  science graphics x11
maintainers                 {raphael @raphael-st} openmaintainer
description                 a Geomview module for viewing 3D manifolds
long_description            This is maniview, a Geomview module for viewing \
                            3D manifolds. emodules are kind of plugins \
                            which extend the functionality of Geomview (an \
                            interactive 3d viewing program).
homepage                    http://www.geomview.org/
license                     LGPL-2+
platforms                   darwin
master_sites                sourceforge:project/geomview/${name}

use_xz                      yes

checksums                   rmd160  79ac83c23bd56150254487ea342dcbf3db46dff5 \
                            sha256  0c61335b86762cd9b710ddd7582461f592ea844edb9da3fa728c083920549eb0 \
                            size    256860

depends_lib                 port:geomview \
                            port:xforms

configure.cflags-append -std=gnu89

post-destroot {
    delete ${destroot}${prefix}/share/geomview/groups

    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS \
        COPYING \
        ChangeLog \
        NEWS \
        README \
        ${docdir}
}

platform darwin 9 { configure.ldflags-append \
    -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
        /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
}

livecheck.url               http://sourceforge.net/projects/geomview/files/${name}/
livecheck.type              regex
livecheck.regex             ${name}-(\[0-9.\]+)${extract.suffix}