# $Id: Portfile 63347 2010-02-03 09:49:23Z raphael@macports.org $

PortSystem                  1.0

name                        gvemod-ndview
version                     0.2
categories                  science graphics x11
maintainers                 raphael
description                 A Geomview emodule for displaying projections \
                            of higher dimensional objects.
long_description            This package contains the NDview emodule and \
                            the emodules of the src/bin/ndutils directory \
                            of the original Geomview distribution. emodules \
                            are kind of plugins which extend the \
                            functionality of Geomview (an interactive 3d \
                            viewing program). The modules are based on \
                            Tcl/Tk and can be used as a tool-kit for \
                            displaying projections of higher dimensional \
                            objects.
homepage                    http://www.geomview.org/
platforms                   darwin
master_sites                sourceforge
master_sites.mirror_subdir  geomview
livecheck.name              geomview
livecheck.distname          ${name}
checksums                   md5 c8cbfec59ae14215098c4608433a54cf \
                            sha1 64f7cd168de7b57b733250ca2c5a974fd30be6f6 \
                            rmd160 5e95e2c308bc8019d0588ab689bbbc05371e7469
patchfiles                  patch-wrappers.c.diff
depends_lib                 port:geomview \
                            port:tk
# Work around case-inensitivity "NDview" Tcl script <-> "ndview" module
post-extract {
    move ${worksrcpath}/src/NDview/NDview ${worksrcpath}/src/NDview/NDview.tc
    reinplace "s|module_tcl_DATA = NDview|module_tcl_DATA = NDview.tc|" \
        ${worksrcpath}/src/NDview/Makefile.in
}
post-destroot {
    move ${destroot}${prefix}/libexec/geomview/tcl/NDview.tc \
        ${destroot}${prefix}/libexec/geomview/tcl/NDview
}

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
}
