source: trunk/dports/science/OpenCSG/Portfile

Last change on this file was 153492, checked in by dstrubbe@…, 14 months ago

OpenCSG: Update to 1.4.2.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# -*- 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
2# $Id: Portfile 153492 2016-10-02 16:59:02Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           qmake 1.0
6
7name                OpenCSG
8version             1.4.2
9license             GPL-2
10categories          science cad
11maintainers         dstrubbe openmaintainer
12description         OpenCSG is a library that does image-based CSG rendering using OpenGL
13long_description    CSG is short for Constructive Solid Geometry and denotes an approach \
14                    to model complex 3D-shapes using simpler ones, i.e., two shapes can be \
15                    combined by taking the union of them, by intersecting them, or by \
16                    subtracting one shape of the other. The most basic shapes, which are \
17                    not results of such CSG operations, are called primitives. Primitives \
18                    must be solid, i.e., they must have a clearly defined interior and \
19                    exterior. By construction, a CSG shape is also solid then.
20platforms           darwin
21homepage            http://www.opencsg.org/
22master_sites        ${homepage}
23
24checksums           rmd160  d2bf9fad3691b0ddb41369d526379303121ffca6 \
25                    sha256  d952ec5d3a2e46a30019c210963fcddff66813efc9c29603b72f9553adff4afb
26
27depends_lib-append  port:glew
28
29worksrcdir          ${distname}
30
31post-patch {
32    reinplace "s@\\.\\./glew/include@@" ${worksrcpath}/src/src.pro
33}
34
35configure.optflags  -O3
36configure.args      -r -o Makefile opencsg.pro
37build.target        sub-src-all
38
39destroot {
40    copy {*}[glob ${worksrcpath}/lib/*] ${destroot}${prefix}/lib
41    copy {*}[glob ${worksrcpath}/include/*] ${destroot}${prefix}/include
42    system "install_name_tool -id ${prefix}/lib/libopencsg.[lindex [split ${version} .] 0].dylib ${destroot}${prefix}/lib/libopencsg.dylib"
43}
44
45livecheck.type      regex
46livecheck.url       [lindex ${master_sites} 0]
47livecheck.regex     ${name}-(\[0-9.-\]+)\\.tar.gz
48
49test.run            yes
50test.target         sub-example-all
51post-test {
52    ui_msg "To finish the test, close the window that appears."
53    system "DYLD_LIBRARY_PATH=${worksrcpath}/lib ${worksrcpath}/example/opencsgexample.app/Contents/MacOS/opencsgexample"
54}
Note: See TracBrowser for help on using the repository browser.