Ticket #16981: Portfile-openvrml-devel

File Portfile-openvrml-devel, 3.9 KB (added by dbevans (David B. Evans), 15 years ago)

Portfile that builds openvrml from svn trunk r33570.

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$
3
4PortSystem              1.0
5
6name                    openvrml-devel
7set svn_revision        33570
8version                 ${svn_revision}
9categories              graphics x11
10maintainers             devans openmaintainer
11description             a cross-platform VRML and X3D browser and C++ runtime \
12                        library
13long_description        OpenVRML is a free cross-platform runtime for VRML and \
14                        X3D available under the GNU Lesser General Public \
15                        License. The OpenVRML distribution includes libraries \
16                        you can use to add VRML/X3D support to an application. \
17                        On platforms where GTK+ is available, OpenVRML also \
18                        provides a plug-in to render VRML/X3D worlds in Web \
19                        browsers.
20homepage                http://www.openvrml.org/
21platforms               darwin
22
23fetch.type              svn
24svn.url                 http://svn.openvrml.org/svnroot/openvrml/trunk ${worksrcdir}
25svn.tag                 ${svn_revision}
26depends_lib             port:boost \
27                        port:libpng \
28                        port:jpeg \
29                        port:fontconfig \
30                        port:mesa \
31                        port:libsdl
32depends_build           port:pkgconfig
33
34pre-extract {           if {"darwin" == ${os.platform} && 9 == ${os.major}} {
35                            set minimum_xcodeversion 3.1
36                            set current_xcodeversion [exec defaults read /Developer/Applications/Xcode.app/Contents/Info CFBundleShortVersionString]
37                            if {[rpm-vercomp ${current_xcodeversion} ${minimum_xcodeversion}] < 0} {
38                                ui_msg "On Mac OS X ${macosx_version}, ${name} ${version} requires Xcode ${minimum_xcodeversion} or later but you have Xcode ${current_xcodeversion}."
39                                return -code error "incompatible Xcode version"
40                            }
41                        }
42}
43
44configure.cmd           {./bootstrap && ./configure}
45
46configure.args          --disable-script-node-javascript \
47                        --disable-script-node-java \
48                        --disable-xembed \
49                        --disable-player \
50                        --disable-mozilla-plugin \
51                        --with-x
52configure.env-append    BOOST_LIB_SUFFIX=-mt
53
54use_parallel_build      yes
55
56platform macosx {
57        if {[file exists ${prefix}/lib/pkgconfig/x11.pc]} {
58                configure.args-append   --x-includes=${prefix}/include \
59                        --x-libraries=${prefix}/lib
60        } else {
61                configure.args-append   --x-includes=${x11prefix}/include \
62                        --x-libraries=${x11prefix}/lib
63        }
64}
65
66variant js_mozilla description {Enable support for JavaScript in the Script node with Mozilla} {
67    depends_lib-append          port:mozilla
68    configure.args-delete       --disable-script-node-javascript
69}
70
71variant no_opengl conflicts xembed description {Do not build the GL renderer} {
72    depends_lib-delete          port:mesa
73    configure.args-append       --disable-gl-renderer
74}
75
76variant xembed conflicts no_opengl description {Build the XEmbed control} {
77    depends_lib-append          port:gtk2 \
78                                port:dbus-glib
79    configure.args-delete       --disable-xembed
80}
81
82variant player requires xembed description {Build the GNOME openvrml-player} {
83    depends_lib-append          port:libgnomeui \
84                                port:curl
85    configure.args-delete       --disable-player
86}
87
88variant mozilla_plugin requires xembed description {Build the Mozilla plug-in} {
89    depends_lib-append          port:mozilla
90    configure.args-delete       --disable-mozilla-plugin
91}
92
93variant no_x11 description {
94    configure.args-delete       --with-x
95    configure.args-append       --without-x
96}