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 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup active_variants 1.1 |
---|
6 | PortGroup cmake 1.0 |
---|
7 | PortGroup compilers 1.0 |
---|
8 | |
---|
9 | name freecad |
---|
10 | version 0.14.3702 |
---|
11 | categories cad |
---|
12 | platforms darwin |
---|
13 | maintainers gmail.com:mark.brethen \ |
---|
14 | openmaintainer |
---|
15 | license LGPL-2+ |
---|
16 | |
---|
17 | description \ |
---|
18 | FreeCAD is a general purpose feature-based, parametric 3D modeler. |
---|
19 | |
---|
20 | long_description \ |
---|
21 | FreeCAD is a general purpose feature-based, parametric 3D modeler for \ |
---|
22 | CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering \ |
---|
23 | and product design but also fits a wider range of uses in engineering, \ |
---|
24 | such as architecture or other engineering specialties. It is 100% Open \ |
---|
25 | Source (LGPL2+ license) and extremely modular, allowing for very \ |
---|
26 | advanced extension and customization. |
---|
27 | |
---|
28 | homepage http://www.freecadweb.org/ |
---|
29 | master_sites sourceforge:project/free-cad/FreeCAD%20Source/ |
---|
30 | |
---|
31 | checksums rmd160 b62582b1283c874f07d9407c7e7a87bb94591f66 \ |
---|
32 | sha256 ee24cf3542bfb1a887a12d2df52458bcc0e3e82679370c449b9d8b5b473b9dc9 |
---|
33 | |
---|
34 | depends_lib-append port:python27 \ |
---|
35 | port:boost \ |
---|
36 | port:xercesc \ |
---|
37 | port:zlib \ |
---|
38 | port:oce \ |
---|
39 | port:swig \ |
---|
40 | port:eigen3 \ |
---|
41 | port:qt4-mac \ |
---|
42 | port:freetype \ |
---|
43 | port:Coin-framework \ |
---|
44 | port:SoQt \ |
---|
45 | port:py27-shiboken \ |
---|
46 | port:py27-pyside |
---|
47 | |
---|
48 | depends_run port:qt4-mac-sqlite3-plugin |
---|
49 | |
---|
50 | patchfiles cMake-FindCoin3D.cmake.diff \ |
---|
51 | src-App-FreeCADInit.py.diff \ |
---|
52 | src-Mod-Sketcher-CMakeLists.txt.diff |
---|
53 | |
---|
54 | |
---|
55 | post-patch { |
---|
56 | reinplace "s|QLibraryInfo::location.*|QLatin1String\(\"${applications_dir}/Qt4/\"\);|" \ |
---|
57 | ${worksrcpath}/src/Gui/Assistant.cpp |
---|
58 | |
---|
59 | reinplace "s|/Applications|/Applications/MacPorts|" \ |
---|
60 | ${worksrcpath}/src/Mod/OpenSCAD/OpenSCADUtils.py |
---|
61 | } |
---|
62 | |
---|
63 | compilers.choose fc |
---|
64 | compilers.setup -dragonegg -g95 -gcc gcc48 require_fortran |
---|
65 | |
---|
66 | if {![fortran_variant_isset]} { |
---|
67 | default_variants-append +gcc48 |
---|
68 | } |
---|
69 | |
---|
70 | configure.args-delete -DCMAKE_INSTALL_RPATH=${prefix}/lib \ |
---|
71 | -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib |
---|
72 | |
---|
73 | configure.args-append -DCMAKE_INSTALL_RPATH=${prefix}/libexec/${name}/lib \ |
---|
74 | -DCMAKE_INSTALL_NAME_DIR=${prefix}/libexec/${name}/lib \ |
---|
75 | -DCMAKE_INSTALL_PREFIX=${prefix}/libexec/${name} \ |
---|
76 | -DCMAKE_INSTALL_DATADIR=${prefix}/share/${name} \ |
---|
77 | -DCMAKE_INSTALL_DOCDIR=${prefix}/share/doc/${name} \ |
---|
78 | -DCMAKE_FRAMEWORK_PATH=${frameworks_dir} |
---|
79 | |
---|
80 | pre-configure { |
---|
81 | # The c++ compiler is used for linking instead of fc. |
---|
82 | # -L needs a path to a directory. |
---|
83 | |
---|
84 | set libgfortran [exec ${configure.fc} --print-file-name libgfortran.a] |
---|
85 | configure.ldflags-append "-L[file dirname ${libgfortran}]" |
---|
86 | |
---|
87 | set python_prefix [exec ${prefix}/bin/python2.7-config --prefix] |
---|
88 | configure.args-append -DFREECAD_BUILD_ROBOT=OFF \ |
---|
89 | -DPYTHON_LIBRARY=${python_prefix}/Python \ |
---|
90 | -DPYTHON_INCLUDE_DIR=${python_prefix}/Headers \ |
---|
91 | -DPYTHON_EXECUTABLE=${python_prefix}/bin/python2.7 \ |
---|
92 | -DShiboken_DIR=${python_prefix}/lib/cmake/Shiboken-1.2.2 \ |
---|
93 | -DPySide_DIR=${python_prefix}/lib/cmake/PySide-1.2.2 \ |
---|
94 | -DOCE_DIR=${frameworks_dir}/OCE.framework/Versions/0.15/Resources |
---|
95 | } |
---|
96 | |
---|
97 | post-destroot { |
---|
98 | # link the executables back |
---|
99 | |
---|
100 | ln -s ${prefix}/libexec/${name}/bin/FreeCAD \ |
---|
101 | ${destroot}${prefix}/bin |
---|
102 | |
---|
103 | ln -s ${prefix}/libexec/${name}/bin/FreeCADCmd \ |
---|
104 | ${destroot}${prefix}/bin |
---|
105 | } |
---|