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

PortSystem                  1.0

name                        gvemod-crayola
version                     0.2
categories                  science graphics x11
maintainers                 raphael
description                 An interactive tool for colouring faces \
                            of geometric objects within Geomview
long_description            This is the Crayola emodule, an interactive \
                            tool for colouring faces of geometric objects \
                            within Geomview. emodules are kind of plugins \
                            which extend the functionality of Geomview (an \
                            interactive 3d viewing program).
homepage                    http://www.geomview.org/
platforms                   darwin
master_sites                sourceforge
master_sites.mirror_subdir  geomview
livecheck.name              geomview
livecheck.distname          ${name}
checksums                   md5 d860e661e846da844c66d01b18d0e4f6 \
                            sha1 5c90ab6fdc6bf43a26d70b68692b6768089f5d4d \
                            rmd160 70b6dfe6820603d712925660a004b4a04e7ebecf
depends_lib                 port:geomview \
                            port:tk

# Work around case-inensitivity "Crayola" script <-> "crayola" final binary
post-extract {
    move ${worksrcpath}/src/Crayola ${worksrcpath}/src/Crayola.tc
    reinplace "s|module_tcl_DATA = Crayola|module_tcl_DATA = Crayola.tc|" \
        ${worksrcpath}/src/Makefile.in
}
post-destroot {
    move ${destroot}${prefix}/libexec/geomview/tcl/Crayola.tc \
        ${destroot}${prefix}/libexec/geomview/tcl/Crayola
}
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
}
