Ticket #42781: Portfile

File Portfile, 4.6 KB (added by marius@…, 10 years ago)
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 115593 2014-01-06 16:48:04Z macsforever2000@macports.org $
3
4PortSystem          1.0
5PortGroup           qt4 1.0
6
7name                openscad
8version             2014.03
9license             GPL-2
10categories          science
11maintainers         macsforever2000 openmaintainer
12description         OpenSCAD is a software for creating solid 3D CAD objects
13long_description    OpenSCAD is a software for creating solid 3D CAD objects. \
14                    Unlike most free software for creating 3D models (such as the \
15                    famous application Blender) it does not focus on the artistic \
16                    aspects of 3D modelling but instead on the CAD aspects. Thus \
17                    it might be the application you are looking for when you are \
18                    planning to create 3D models of machine parts but pretty sure \
19                    is not what you are looking for when you are more interested \
20                    in creating computer-animated movies. \
21                    OpenSCAD is not an interactive modeller. Instead it is something \
22                    like a 3D-compiler that reads in a script file that describes \
23                    the object and renders the 3D model from this script file. This \
24                    gives you (the designer) full control over the modelling process \
25                    and enables you to easily change any step in the modelling process \
26                    or make designes that are defined by configurable parameters. \
27                    OpenSCAD provides two main modelling techniques: First there is \
28                    constructive solid geometry (aka CSG) and second there is extrusion \
29                    of 2D outlines. As data exchange format format for this 2D outlines \
30                    Autocad DXF files are used. In addition to 2D paths for extrusion \
31                    it is also possible to read design parametes from DXF files. Besides \
32                    DXF files OpenSCAD can read and create 3D models in the STL and OFF \
33                    file formats.
34platforms           darwin
35homepage            http://www.openscad.org/
36
37master_sites        http://files.openscad.org
38distfiles           ${distname}.src${extract.suffix}
39# openssl sha256 /opt/local/var/macports/distfiles/openscad/openscad-master.tar.gz
40checksums           sha256 865fdc637a3ceb0678d35e88995411d8e70e8a7937625d7ede147a1570a561c3
41
42depends_build-append \
43                    port:bison \
44                    port:flex
45
46depends_lib-append  port:boost \
47                    port:cgal \
48                    port:glew \
49                    port:gmp \
50                    port:mpfr \
51                    port:OpenCSG
52
53compiler.blacklist *gcc*
54
55configure.env-append \
56                    OPENSCAD_LIBRARIES=${prefix}
57
58configure.cmd       ${qt_qmake_cmd}
59configure.pre_args  PREFIX=${prefix} VERSION=${version} CONFIG-=debug openscad.pro
60configure.args      -spec unsupported/macx-clang
61
62use_parallel_build  yes
63
64post-destroot {
65    # The install location is wrong so we have to move the files to the expected places
66
67    # Application
68    move ${destroot}${prefix}/bin/OpenSCAD.app ${destroot}${applications_dir}
69
70    # Examples
71    file mkdir ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/examples
72    eval xinstall -m 644 [glob ${destroot}${prefix}/share/openscad/examples/*] ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/examples
73    eval file delete [glob ${destroot}${prefix}/share/openscad/examples/*]
74
75    # Library bitmaps
76    file mkdir ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/libraries/MCAD/bitmap
77    eval xinstall -m 644 [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/bitmap/*] ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/libraries/MCAD/bitmap
78    eval file delete [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/bitmap/*]
79    file delete ${destroot}${prefix}/share/openscad/libraries/MCAD/bitmap
80
81    # Empty directories
82    file delete ${destroot}${prefix}/share/openscad/libraries/MCAD/SolidPython
83    file delete ${destroot}${prefix}/share/openscad/libraries/MCAD/ThingDoc
84
85    # Libraries
86    eval xinstall -m 644 [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/*] ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/libraries/MCAD
87    eval file delete [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/*]
88
89    # Delete un-needed files
90    file delete ${destroot}${prefix}/share/applications/openscad.desktop
91    file delete ${destroot}${prefix}/share/pixmaps/openscad.png
92}