source: trunk/dports/science/openscad/Portfile

Last change on this file was 149360, checked in by dstrubbe@…, 17 months ago

openscad: Patch to remove include file which cannot be found on 10.6 and doesn't appear to actually be necessary.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.8 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 149360 2016-06-14 18:17:35Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           qmake 1.0
6
7name                openscad
8version             2015.03-3
9license             GPL-2
10categories          science cad
11maintainers         dstrubbe openmaintainer
12description         Software for creating solid 3D CAD objects
13long_description    ${description}. \
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 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 parameters 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
40checksums           rmd160  323eda5bd96b2093d4fbb2274763f7a0ae4eb7f4 \
41                    sha256  5d2a7d83c32f4201ee0d17445a36baccaebc0bc7facd009fc8dd86ee537c5a36
42
43depends_build-append \
44                    port:bison \
45                    port:flex \
46                    port:eigen3
47
48depends_lib-append  port:boost \
49                    port:cgal \
50                    port:glew \
51                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
52                    port:gmp \
53                    port:mpfr \
54                    port:OpenCSG \
55                    port:qscintilla \
56                    port:freetype \
57                    port:fontconfig \
58                    port:harfbuzz
59
60configure.env-append \
61                    OPENSCAD_LIBRARIES=${prefix}
62configure.pre_args-append \
63                    VERSION=${version} CONFIG-=debug openscad.pro
64post-configure {
65    # remove useless/harmful warning flags. g++-4.2 will not accept -Wno-unused-local-typedefs
66    reinplace -W ${worksrcpath} "s|\-W\[^ \]* ||g" Makefile
67}
68
69# Fix these errors, as per https://bugreports.qt.io/browse/QTBUG-22829
70#src/scintillaeditor.h -o objects/moc_scintillaeditor.cpp
71#src/QGLView.h -o objects/moc_QGLView.cpp
72#:info:build opt/local/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
73# On 10.6: src/AppleEvents.cc:2:22: error: MacTypes.h: No such file or directory
74patchfiles          patch-src-scintillaeditor.h.diff patch-src-colormap.h.diff \
75                    patch-src-AppleEvents.cc.diff
76
77use_parallel_build  yes
78
79post-destroot {
80    # The install location is wrong so we have to move the files to the expected places
81
82    # Application
83    move ${destroot}${prefix}/bin/OpenSCAD.app ${destroot}${applications_dir}
84
85    # Examples
86    move ${destroot}${prefix}/share/openscad/examples ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/examples
87
88    # Library bitmaps
89    file mkdir ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/libraries/MCAD/bitmap
90    eval xinstall -m 644 [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/bitmap/*] ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/libraries/MCAD/bitmap
91    eval file delete [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/bitmap/*]
92    file delete ${destroot}${prefix}/share/openscad/libraries/MCAD/bitmap
93
94    # Empty directories
95    file delete ${destroot}${prefix}/share/openscad/libraries/MCAD/SolidPython
96    file delete ${destroot}${prefix}/share/openscad/libraries/MCAD/ThingDoc
97
98    # Libraries
99    eval xinstall -m 644 [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/*] ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/libraries/MCAD
100    eval file delete [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/*]
101
102    # Delete un-needed files
103    file delete ${destroot}${prefix}/share/applications/openscad.desktop
104    file delete ${destroot}${prefix}/share/pixmaps/openscad.png
105}
106
107# need cmake dependency, and to set DYLD_LIBRARY_PATH
108# First 194 passed, remaining 1016 failed, with Error: openscad_nogui failed with return code -11
109# Advice from link below did not help unfortunately.
110# https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Linux/UNIX#Test_suite_problems
111test.run            yes
112pre-test {
113    set worksrcdir  ${worksrcdir}/tests
114}
115test {
116    system -W ${worksrcpath} "cmake . -DCOMPARATOR=ncc"
117    system -W ${worksrcpath} "make -j"
118    system -W ${worksrcpath} "${prefix}/bin/ctest -C All"
119}
120
121livecheck.type      regex
122livecheck.url       [lindex ${master_sites} 0]
123livecheck.regex     ${name}-(\[0-9.-\]+).src${extract.suffix}
Note: See TracBrowser for help on using the repository browser.