# -*- 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 # $Id: Portfile 149360 2016-06-14 18:17:35Z dstrubbe@macports.org $ PortSystem 1.0 PortGroup qmake 1.0 name openscad version 2015.03-3 license GPL-2 categories science cad maintainers dstrubbe openmaintainer description Software for creating solid 3D CAD objects long_description ${description}. \ Unlike most free software for creating 3D models (such as the \ famous application Blender) it does not focus on the artistic \ aspects of 3D modelling but instead on the CAD aspects. Thus \ it might be the application you are looking for when you are \ planning to create 3D models of machine parts but pretty sure \ is not what you are looking for when you are more interested \ in creating computer-animated movies. \ OpenSCAD is not an interactive modeller. Instead it is something \ like a 3D-compiler that reads in a script file that describes \ the object and renders the 3D model from this script file. This \ gives you (the designer) full control over the modelling process \ and enables you to easily change any step in the modelling process \ or make designes that are defined by configurable parameters. \ OpenSCAD provides two main modelling techniques: First there is \ constructive solid geometry (aka CSG) and second there is extrusion \ of 2D outlines. As data exchange format for this 2D outlines \ Autocad DXF files are used. In addition to 2D paths for extrusion \ it is also possible to read design parameters from DXF files. Besides \ DXF files OpenSCAD can read and create 3D models in the STL and OFF \ file formats. platforms darwin homepage http://www.openscad.org/ master_sites http://files.openscad.org distfiles ${distname}.src${extract.suffix} checksums rmd160 323eda5bd96b2093d4fbb2274763f7a0ae4eb7f4 \ sha256 5d2a7d83c32f4201ee0d17445a36baccaebc0bc7facd009fc8dd86ee537c5a36 depends_build-append \ port:bison \ port:flex \ port:eigen3 depends_lib-append port:boost \ port:cgal \ port:glew \ path:lib/pkgconfig/glib-2.0.pc:glib2 \ port:gmp \ port:mpfr \ port:OpenCSG \ port:qscintilla \ port:freetype \ port:fontconfig \ port:harfbuzz configure.env-append \ OPENSCAD_LIBRARIES=${prefix} configure.pre_args-append \ VERSION=${version} CONFIG-=debug openscad.pro post-configure { # remove useless/harmful warning flags. g++-4.2 will not accept -Wno-unused-local-typedefs reinplace -W ${worksrcpath} "s|\-W\[^ \]* ||g" Makefile } # Fix these errors, as per https://bugreports.qt.io/browse/QTBUG-22829 #src/scintillaeditor.h -o objects/moc_scintillaeditor.cpp #src/QGLView.h -o objects/moc_QGLView.cpp #:info:build opt/local/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN" # On 10.6: src/AppleEvents.cc:2:22: error: MacTypes.h: No such file or directory patchfiles patch-src-scintillaeditor.h.diff patch-src-colormap.h.diff \ patch-src-AppleEvents.cc.diff use_parallel_build yes post-destroot { # The install location is wrong so we have to move the files to the expected places # Application move ${destroot}${prefix}/bin/OpenSCAD.app ${destroot}${applications_dir} # Examples move ${destroot}${prefix}/share/openscad/examples ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/examples # Library bitmaps file mkdir ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/libraries/MCAD/bitmap eval xinstall -m 644 [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/bitmap/*] ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/libraries/MCAD/bitmap eval file delete [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/bitmap/*] file delete ${destroot}${prefix}/share/openscad/libraries/MCAD/bitmap # Empty directories file delete ${destroot}${prefix}/share/openscad/libraries/MCAD/SolidPython file delete ${destroot}${prefix}/share/openscad/libraries/MCAD/ThingDoc # Libraries eval xinstall -m 644 [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/*] ${destroot}${applications_dir}/OpenSCAD.app/Contents/Resources/libraries/MCAD eval file delete [glob ${destroot}${prefix}/share/openscad/libraries/MCAD/*] # Delete un-needed files file delete ${destroot}${prefix}/share/applications/openscad.desktop file delete ${destroot}${prefix}/share/pixmaps/openscad.png } # need cmake dependency, and to set DYLD_LIBRARY_PATH # First 194 passed, remaining 1016 failed, with Error: openscad_nogui failed with return code -11 # Advice from link below did not help unfortunately. # https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Linux/UNIX#Test_suite_problems test.run yes pre-test { set worksrcdir ${worksrcdir}/tests } test { system -W ${worksrcpath} "cmake . -DCOMPARATOR=ncc" system -W ${worksrcpath} "make -j" system -W ${worksrcpath} "${prefix}/bin/ctest -C All" } livecheck.type regex livecheck.url [lindex ${master_sites} 0] livecheck.regex ${name}-(\[0-9.-\]+).src${extract.suffix}