source: trunk/dports/devel/inventor/Portfile

Last change on this file was 144718, checked in by css@…, 20 months ago

inventor: fix building on El Capitan. refs #48558

  • add libGLU dependency
  • patch for explicitly using $DYLD_LIBRARY_PATH
  • fix main functions not declaring return types
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.7 KB
Line 
1# $Id: Portfile 144718 2016-01-16 03:39:31Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name       inventor
6version    2.1.5-10
7revision        10
8categories      devel graphics x11
9platforms       darwin
10maintainers     css
11
12description     SGI Open InventorTM graphics toolkit
13license         GPL-2
14long_description    Open InventorTM is an object-oriented 3D toolkit offering a comprehensive \
15                    solution to interactive graphics programming problems. It presents a \
16                    programming model based on a 3D  scene database that dramatically simplifies \
17                    graphics programming. It includes a rich set of objects such as cubes, \
18                    polygons, text, materials, cameras, lights, trackballs, handle boxes, 3D \
19                    viewers, and editors that speed up your programming time and extend your \
20                    3D programming capabilities.
21
22homepage            http://oss.sgi.com/projects/inventor/
23master_sites        ftp://oss.sgi.com/projects/inventor/download/
24checksums           md5 82208096f1e0b111160e864e239c3a51
25distname            ${name}-${version}.src
26worksrcdir          ${name}
27
28depends_lib         port:xorg-libXi \
29                    port:xorg-libXt \
30                    port:libGLU \
31                    port:freetype \
32                    port:jpeg \
33                    port:glw
34
35patchfiles          patch-BarChart-GNUmakefile.diff \
36                    patch-Decal-GNUmakefile.diff \
37                    patch-GeneralizedCylinder-GNUmakefile.diff \
38                    patch-SceneViewer-GNUmakefile.diff \
39                    patch-SoCalcParse.y.diff \
40                    patch-SoGLTextureImageElement.c++.diff \
41                    patch-drop-GNUmakefile.diff \
42                    patch-flfreetype.h.diff \
43                    patch-gview-GNUmakefile.diff \
44                    patch-ivcat-GNUmakefile.diff \
45                    patch-ivcommondefs.diff \
46                    patch-ivcommonrules.diff \
47                    patch-ivdowngrade-GNUmakefile.diff \
48                    patch-ivfix-GNUmakefile.diff \
49                    patch-ivinfo-GNUmakefile.diff \
50                    patch-ivman-GNUmakefile.diff \
51                    patch-ivview-GNUmakefile.diff \
52                    patch-lib-GNUmakefile.diff \
53                    patch-libFL-fl.c.diff \
54                    patch-libSoXt-GNUmakefile.diff \
55                    patch-localrules.apple.diff \
56                    patch-machine.h.diff \
57                    patch-maze-GNUmakefile.diff \
58                    patch-noodle-GNUmakefile.diff \
59                    patch-qmorf-GNUmakefile.diff \
60                    patch-revo-GNUmakefile.diff \
61                    patch-soxt-GNUmakefile.diff \
62                    patch-textomatic-GNUmakefile.diff \
63                    patch-widgets-GNUmakefile.componentTest.diff \
64                    patch-SoPath.h.diff \
65                    patch-SoGLwDrawA.c.diff \
66                    patch-LP64.diff
67
68post-patch {
69        # gcc allows for declaring main without a return type, clang does not.
70        reinplace "s|^main|int main|" \
71${worksrcpath}/apps/demos/qmorf/quadCube.c++ \
72${worksrcpath}/apps/demos/qmorf/quadSheet.c++ \
73${worksrcpath}/apps/demos/qmorf/quadSphere.c++ \
74${worksrcpath}/apps/examples/Mentor/CXX/09.3.Search.c++ \
75${worksrcpath}/apps/examples/Mentor/CXX/09.5.GenSph.c++ \
76${worksrcpath}/apps/examples/Mentor/CXX/17.3.GLFloor.c++ \
77${worksrcpath}/apps/examples/Toolmaker/02.Nodes/newNodes.c++ \
78${worksrcpath}/apps/examples/Toolmaker/04.Actions/printVolume.c++ \
79${worksrcpath}/apps/examples/Toolmaker/07.Nodekits/jumpingJackKitTest.c++ \
80${worksrcpath}/apps/examples/Toolmaker/07.Nodekits/pyramidKitTest.c++ \
81${worksrcpath}/apps/examples/Toolmaker/08.Manips/newManips.c++ \
82${worksrcpath}/apps/samples/4view/4view.c++ \
83${worksrcpath}/apps/samples/ivNodeKitStructure/ivNodeKitStructure.c++ \
84${worksrcpath}/apps/samples/ivToInclude/ivToIncludeFile.c++ \
85${worksrcpath}/apps/samples/ivToInclude/testResults.c++ \
86${worksrcpath}/apps/tools/ivcat/ivcat.c++ \
87${worksrcpath}/apps/tools/ivfix/ivfix.c++ \
88${worksrcpath}/apps/tools/ivinfo/ivinfo.c++ \
89${worksrcpath}/apps/tools/ivperf/ivperf.c++ \
90${worksrcpath}/doc/man/ivman/Main.c++ \
91${worksrcpath}/tools/ppp/ppp.c++
92        reinplace "s|unsigned int argc| int argc |" ${worksrcpath}/apps/samples/widgets/componentTest.c++
93
94        # path substitutions
95        reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/make/ivcommondefs
96        reinplace "s|/usr/X11R6|${prefix}|" ${worksrcpath}/make/ivcommondefs
97
98        # El Capitan security workaround
99        reinplace "s|__WORKSRCPATH__|${worksrcpath}/lib|" ${worksrcpath}/make/ivcommonrules
100}
101
102universal_variant       no
103use_configure   no
104build.env       DYLD_LIBRARY_PATH=${worksrcpath}/lib IVROOT=${destroot}
105
106destroot.env    ${build.env}
107
108post-destroot {
109              xinstall -m 755 -d ${destroot}${prefix}/share/${name}
110              xinstall -m 644 -W ${worksrcpath} COPYING FAQ.misc KNOWN.BUGS \
111              ${destroot}${prefix}/share/${name}
112}
113
114variant debug description {build with debug information} {
115    build.env-append      LIBTYPE=debug
116    patchfiles-append     patch-SoV1NkCatalog.c++.diff \
117                          patch-SoText3V2.c++.diff
118}
119
120variant imagelib description {include the image library} {
121        post-destroot {
122                xinstall -m 644 -W ${worksrcpath}/libimage libimage.a \
123                        ${destroot}${prefix}/lib
124                xinstall -m 644 -W ${worksrcpath}/libimage image.h \
125                        ${destroot}${prefix}/include
126                system "ranlib ${destroot}${prefix}/lib/libimage.a"
127        }
128}
Note: See TracBrowser for help on using the repository browser.