Skip to content

Commit

Permalink
freecad: update to 0.18.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Schamschula committed Oct 29, 2019
1 parent e9958b3 commit bb53e55
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
34 changes: 26 additions & 8 deletions cad/freecad/Portfile
Expand Up @@ -6,8 +6,8 @@ PortGroup compilers 1.0
PortGroup github 1.0
PortGroup qt4 1.0

github.setup FreeCAD FreeCAD 0.17
revision 3
github.setup FreeCAD FreeCAD 0.18.4
revision 0
name freecad
categories cad
platforms darwin
Expand All @@ -27,16 +27,18 @@ long_description \

homepage https://www.freecadweb.org

checksums rmd160 9f6da6f2d1b666e818de0103520d96c95cd089dd \
sha256 db93b20132c97fe07b169ce453e656c94d05874f1a648c6ae4e446904ef2dcd2 \
size 192380486
checksums rmd160 2fdb6bb247571e2ffaffaca1defb02ca0b2e1cc5 \
sha256 d2f10f861cbcc9d19b34f79cd1c96baca2f23174f232e834f64a7c4a74f5f1e7 \
size 219760632

depends_build-append port:doxygen

depends_lib-append port:boost \
port:Coin-framework \
port:eigen3 \
port:freetype \
port:oce \
port:python27 \
port:opencascade \
port:py27-backports-functools_lru_cache \
port:py27-matplotlib \
port:py27-pivy \
port:py27-pyside \
Expand All @@ -50,7 +52,8 @@ depends_lib-append port:boost \

depends_run port:qt4-mac-sqlite3-plugin

patchfiles cMake-FindCoin3D.cmake.diff
patchfiles cMake-FindCoin3D.cmake.diff \
patch-src-Main-MainPy.cpp.diff

# disable FreeCAD FEM module, as it requires hdf5 1.8.x
patchfiles-append patch-CMakeLists.txt.diff
Expand Down Expand Up @@ -97,6 +100,17 @@ pre-configure {
-DOCE_DIR=${frameworks_dir}/OCE.framework/Versions/0.17/Resources
}

post-configure {
reinplace "s|sed -i|sed -i .orig|" \
${workpath}/build/src/Mod/Arch/CMakeFiles/Arch.dir/build.make \
${workpath}/build/src/Mod/Draft/CMakeFiles/Draft.dir/build.make \
${workpath}/build/src/Mod/Material/CMakeFiles/Material.dir/build.make \
${workpath}/build/src/Mod/OpenSCAD/CMakeFiles/OpenSCAD.dir/build.make \
${workpath}/build/src/Mod/Plot/CMakeFiles/Plot.dir/build.make \
${workpath}/build/src/Mod/Ship/CMakeFiles/Ship.dir/build.make \
${workpath}/build/src/Mod/Tux/CMakeFiles/Tux.dir/build.make
}

post-destroot {
# link the executables back
ln -s ${prefix}/libexec/${name}/MacOS/FreeCAD \
Expand All @@ -118,4 +132,8 @@ post-destroot {
reinplace -W ${appdir}/Contents/MacOS "s,@@PREFIX@@,${prefix},g" FreeCAD
}

variant oce description {use Community Edition version of Open CASCADE} {
depends_lib-replace port:opencascade port:oce
}

github.livecheck.regex {(\d\.\d+(\.\d+)?(?!_pre))}
14 changes: 14 additions & 0 deletions cad/freecad/files/patch-src-Main-MainPy.cpp.diff
@@ -0,0 +1,14 @@
--- src/Main/MainPy.cpp.orig 2019-05-11 06:02:55.000000000 -0500
+++ src/Main/MainPy.cpp 2019-06-16 16:46:14.000000000 -0500
@@ -143,7 +143,11 @@
// backwards since the FreeCAD path was likely appended just before
// we were imported.
for (i = PyList_Size(pySysPath) - 1; i >= 0 ; --i) {
+#if PY_MAJOR_VERSION >= 3
const char *basePath;
+#else
+ char *basePath;
+#endif
PyObject *pyPath = PyList_GetItem(pySysPath, i);
long sz = 0;

0 comments on commit bb53e55

Please sign in to comment.