diff --git a/cad/freecad/Makefile b/cad/freecad/Makefile index f7e8b0a5d287..7051fac59702 100644 --- a/cad/freecad/Makefile +++ b/cad/freecad/Makefile @@ -1,104 +1,120 @@ PORTNAME= FreeCAD -DISTVERSION= 0.20.2 -PORTREVISION= 5 -# use these for bugfixes/snapshots -# DISTVERSION= 0.18-16093 # git rev-list --count -# DISTVERSIONSUFFIX= -g690774c0e +DISTVERSION= 0.21.0 CATEGORIES= cad MAINTAINER= cmt@FreeBSD.org COMMENT= General purpose 3D CAD modeller WWW= https://www.freecadweb.org/ LICENSE= LGPL20+ LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= pyside_tool.py:devel/pyside2-tools@${PY_FLAVOR} \ +BUILD_DEPENDS= doxygen:devel/doxygen \ + pybind11-config:devel/py-pybind11@${PY_FLAVOR} \ + pyside_tool.py:devel/pyside2-tools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pivy>0:graphics/py-pivy@${PY_FLAVOR} \ ${PYTHON_SITELIBDIR}/matplotlib/__init__.py:math/py-matplotlib@${PY_FLAVOR} \ + ${PYTHON_INCLUDEDIR}/CXX/Config.hxx:devel/py-cxx \ swig:devel/swig LIB_DEPENDS= libexpat.so:textproc/expat2 \ libfreetype.so:print/freetype2 \ ${PY_BOOST} \ libpyside2.cpython-${PYTHON_SUFFIX}${PYTHON_ABIVER}.so:devel/pyside2@${PY_FLAVOR} \ libCoin.so:graphics/Coin \ + libfmt.so:devel/libfmt \ libpng.so:graphics/png \ libtiff.so:graphics/tiff \ libvtksys-${VTK_VER}.so:math/vtk${VTK_VER:R} \ libTKernel.so:cad/opencascade \ libxerces-c.so:textproc/xerces-c3 \ libboost_thread.so:devel/boost-libs \ libarea.so:devel/libarea \ libmed.so:french/med \ libshiboken2.cpython-${PYTHON_SUFFIX}${PYTHON_ABIVER}.so:devel/shiboken2@${PY_FLAVOR} \ - libhdf5-110.so:science/hdf5-110 + libhdf5.so:science/hdf5 RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pivy>0:graphics/py-pivy@${PY_FLAVOR} \ ${PYTHON_SITELIBDIR}/matplotlib/__init__.py:math/py-matplotlib@${PY_FLAVOR} USES= dos2unix compiler:c++17-lang cmake cpe gl eigen:3 fortran jpeg \ localbase:ldflags mpi:openmpi pkgconfig python localbase qt:5 xorg \ desktop-file-utils shared-mime-info shebangfix USE_GITHUB= yes USE_XORG= ice sm x11 xext xt USE_GL= gl glu -USE_QT= buildtools concurrent core declarative gui location network \ - opengl printsupport qmake:build svg webchannel widgets xml \ - xmlpatterns +USE_QT= buildtools concurrent core declarative designer gui \ + linguisttools location network opengl printsupport \ + qmake:build svg webchannel widgets xml xmlpatterns USE_LDCONFIG= yes CPE_VENDOR= freecad_project VTK_VER= 9.2 DOS2UNIX_GLOB= *.txt *.h *.cpp *.py *.qss *.csv *.pov *.stp *.ui *.wrl *.WRL SHEBANG_FILES= src/Tools/freecad-thumbnailer +# our HDF5/CMake integration is messy, so workarounds are required below CMAKE_ARGS+= -DOCC_INCLUDE_DIR="${LOCALBASE}/include/OpenCASCADE" \ -DOPENMPI_INCLUDE_DIRS="${LOCALBASE}/mpi/openmpi/include" \ -DBUILD_QT5="ON" \ -DPYTHON_LIBRARY="${PYTHONBASE}/lib/libpython${PYTHON_VER}${PYTHON_ABIVER}.so" \ -DPYTHON_INCLUDE_DIR="${PYTHON_INCLUDEDIR}" \ -DPYTHON_PACKAGES_PATH="${PYTHON_SITELIBDIR}" \ -DPYTHON_EXECUTABLE="${PYTHON_CMD}" \ - -DBUILD_ASSEMBLY="OFF" -DBUILD_FLAT_MESH="ON" \ - -DHDF5_CFLAGS="-I${LOCALBASE}/include/hdf5-110" \ + -DPYCXX_INCLUDE_DIR="${PYTHON_INCLUDEDIR}" \ + -DBUILD_ASSEMBLY="OFF" \ + -DBUILD_DESIGNER_PLUGIN="ON" \ + -DBUILD_FLAT_MESH="ON" \ + -DBUILD_VR="OFF" \ + -DFREECAD_USE_EXTERNAL_FMT="ON" \ + -DFREECAD_CREATE_MAC_APP="OFF" \ + -DFREECAD_FREECAD_LIBPACK_USE="OFF" \ + -DFREECAD_USE_EXTERNAL_KDL="OFF" \ + -DFREECAD_USE_EXTERNAL_SMESH="OFF" \ + -DFREECAD_USE_FREETYPE="ON" \ + -DFREECAD_USE_PYBIND11="ON" \ + -Dpybind11_DIR="${PYTHON_SITELIBDIR}/pybind11/share/cmake/pybind11" \ + -DHDF5_CFLAGS="-I${LOCALBASE}/include" \ -DHDF5_FOUND=TRUE \ - -DHDF5_INCLUDE_DIRS="${LOCALBASE}/include/hdf5-110" \ - -DHDF5_LIBRARIES="-L${LOCALBASE}/lib -lhdf5-110" \ + -DHDF5_VERSION="1.12.2" \ + -DHDF5_INCLUDE_DIRS="${LOCALBASE}/include/hdf5" \ + -DHDF5_LIBRARIES="-L${LOCALBASE}/lib -lhdf5" \ -DHDF5_LIBRARY_DIRS="${LOCALBASE}/lib" \ -DPYSIDE2RCCBINARY="${RCC}" \ -DPYSIDE2UICBINARY="${UIC}" \ -DBUILD_ENABLE_CXX_STD=C++17 + CMAKE_INSTALL_PREFIX= ${PREFIX}/${PORTNAME} # Install XDG icons and files to the standard path CMAKE_ARGS+= -DXDG_DATADIR="${PREFIX}/share" OPTIONS_DEFINE= COLLADA COLLADA_DESC= Install pycollada for Collada files import COLLADA_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycollada>0:graphics/py-pycollada@${PY_FLAVOR} .include .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 USE_QT+= webengine .else USE_QT+= webkit .endif post-patch: @${REINPLACE_CMD} -e '/self\.rev/s/Unknown/${DISTVERSION:C/.*-//}/' \ ${WRKSRC}/src/Tools/SubWCRev.py # Install XDG icons and files to the standard path @${REINPLACE_CMD} -e 's/CMAKE_INSTALL_DATAROOTDIR/XDG_DATADIR/g' \ ${WRKSRC}/src/XDGData/CMakeLists.txt \ ${WRKSRC}/src/Gui/CMakeLists.txt post-install: ${LN} -s ../${PORTNAME}/bin/FreeCAD ${STAGEDIR}${LOCALBASE}/bin/FreeCAD ${LN} -s ../${PORTNAME}/bin/FreeCADCmd ${STAGEDIR}${LOCALBASE}/bin/FreeCADCmd ${INSTALL_SCRIPT} ${WRKSRC}/src/Tools/freecad-thumbnailer \ ${STAGEDIR}${PREFIX}/bin/freecad-thumbnailer .include diff --git a/cad/freecad/distinfo b/cad/freecad/distinfo index 94f9a3e40388..fbe59cefabec 100644 --- a/cad/freecad/distinfo +++ b/cad/freecad/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1670364675 -SHA256 (FreeCAD-FreeCAD-0.20.2_GH0.tar.gz) = be3b0be917142d36074f58782b276973890a3fad850bc1db2db99a5ad0c8732b -SIZE (FreeCAD-FreeCAD-0.20.2_GH0.tar.gz) = 75558140 +TIMESTAMP = 1691075290 +SHA256 (FreeCAD-FreeCAD-0.21.0_GH0.tar.gz) = 31a7f9aef99763904d7ffa9fd2d06e2e318e10e5306dac04710234a564fa778b +SIZE (FreeCAD-FreeCAD-0.21.0_GH0.tar.gz) = 66086371 diff --git a/cad/freecad/files/patch-src_Mod_Import_App_ImportOCAF2.h b/cad/freecad/files/patch-src_Mod_Import_App_ImportOCAF2.h deleted file mode 100644 index 807f2c01750e..000000000000 --- a/cad/freecad/files/patch-src_Mod_Import_App_ImportOCAF2.h +++ /dev/null @@ -1,10 +0,0 @@ ---- src/Mod/Import/App/ImportOCAF2.h.orig 2023-01-21 23:09:25.522104000 +0100 -+++ src/Mod/Import/App/ImportOCAF2.h 2023-01-21 23:09:52.176852000 +0100 -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/cad/freecad/files/patch-src_Mod_MeshPart_App_CMakeLists.txt b/cad/freecad/files/patch-src_Mod_MeshPart_App_CMakeLists.txt new file mode 100644 index 000000000000..afd5191ccffe --- /dev/null +++ b/cad/freecad/files/patch-src_Mod_MeshPart_App_CMakeLists.txt @@ -0,0 +1,12 @@ +diff --git src/Mod/MeshPart/App/CMakeLists.txt src/Mod/MeshPart/App/CMakeLists.txt +index 6ee9deb4eb..6fb25015e3 100644 +--- src/Mod/MeshPart/App/CMakeLists.txt ++++ src/Mod/MeshPart/App/CMakeLists.txt +@@ -21,6 +21,7 @@ include_directories( + ${PYTHON_INCLUDE_DIRS} + ${SMESH_INCLUDE_DIR} + ${VTK_INCLUDE_DIRS} ++ ${pybind11_INCLUDE_DIR} + ${EIGEN3_INCLUDE_DIR} + ) + diff --git a/cad/freecad/files/patch-src_Mod_Part_App_OCCError.h b/cad/freecad/files/patch-src_Mod_Part_App_OCCError.h deleted file mode 100644 index 02f00c05cee2..000000000000 --- a/cad/freecad/files/patch-src_Mod_Part_App_OCCError.h +++ /dev/null @@ -1,12 +0,0 @@ ---- src/Mod/Part/App/OCCError.h.orig 2022-12-06 23:30:48.794152000 +0100 -+++ src/Mod/Part/App/OCCError.h 2022-12-06 23:31:40.841019000 +0100 -@@ -50,7 +50,9 @@ - # include - # include - # include -+# if OCC_VERSION_HEX <= 0x070600 - # include -+# endif - # include - # include - diff --git a/cad/freecad/files/patch-src_Mod_Raytracing_App_AppRaytracingPy.cpp b/cad/freecad/files/patch-src_Mod_Raytracing_App_AppRaytracingPy.cpp deleted file mode 100644 index b2b35586f377..000000000000 --- a/cad/freecad/files/patch-src_Mod_Raytracing_App_AppRaytracingPy.cpp +++ /dev/null @@ -1,38 +0,0 @@ ---- src/Mod/Raytracing/App/AppRaytracingPy.cpp.orig 2019-10-04 10:44:17 UTC -+++ src/Mod/Raytracing/App/AppRaytracingPy.cpp -@@ -105,13 +105,13 @@ class Module : public Py::ExtensionModule (pri - - PovTools::writeShape(out,PartName,aShape,(float)0.1); - // This must not be done in PovTools::writeShape! -- out << "// instance to render" << endl -- << "object {" << PartName << endl -- << " texture {" << endl -- << " pigment {color rgb <"<}" << endl -- << " finish {StdFinish } //definition on top of the project" << endl -- << " }" << endl -- << "}" << endl ; -+ out << "// instance to render" << std::endl -+ << "object {" << PartName << std::endl -+ << " texture {" << std::endl -+ << " pigment {color rgb <"<}" << std::endl -+ << " finish {StdFinish } //definition on top of the project" << std::endl -+ << " }" << std::endl -+ << "}" << std::endl ; - return Py::String(out.str()); - } - Py::Object getPartAsLux(const Py::Tuple& args) -@@ -128,10 +128,10 @@ class Module : public Py::ExtensionModule (pri - - // write a material entry - // This must not be done in PovTools::writeShape! -- out << "MakeNamedMaterial \"FreeCADMaterial_" << PartName << "\"" << endl; -- out << " \"color Kd\" [" << r << " " << g << " " << b << "]" << endl; -- out << " \"float sigma\" [0.000000000000000]" << endl; -- out << " \"string type\" [\"matte\"]" << endl << endl; -+ out << "MakeNamedMaterial \"FreeCADMaterial_" << PartName << "\"" << std::endl; -+ out << " \"color Kd\" [" << r << " " << g << " " << b << "]" << std::endl; -+ out << " \"float sigma\" [0.000000000000000]" << std::endl; -+ out << " \"string type\" [\"matte\"]" << std::endl << std::endl; - - LuxTools::writeShape(out,PartName,aShape,(float)0.1); - return Py::String(out.str()); diff --git a/cad/freecad/files/patch-src_Mod_Raytracing_App_LuxFeature.cpp b/cad/freecad/files/patch-src_Mod_Raytracing_App_LuxFeature.cpp deleted file mode 100644 index 96118c364569..000000000000 --- a/cad/freecad/files/patch-src_Mod_Raytracing_App_LuxFeature.cpp +++ /dev/null @@ -1,41 +0,0 @@ ---- src/Mod/Raytracing/App/LuxFeature.cpp.orig 2019-10-04 10:45:53 UTC -+++ src/Mod/Raytracing/App/LuxFeature.cpp -@@ -88,23 +88,23 @@ App::DocumentObjectExecReturn *LuxFeature::execute(voi - const App::Color& c = Color.getValue(); - long t = Transparency.getValue(); - if (t == 0) { -- result << "MakeNamedMaterial \"FreeCADMaterial_" << Name << "\"" << endl -- << " \"color Kd\" [" << c.r << " " << c.g << " " << c.b << "]" << endl -- << " \"float sigma\" [0.000000000000000]" << endl -- << " \"string type\" [\"matte\"]" << endl << endl; -+ result << "MakeNamedMaterial \"FreeCADMaterial_" << Name << "\"" << std::endl -+ << " \"color Kd\" [" << c.r << " " << c.g << " " << c.b << "]" << std::endl -+ << " \"float sigma\" [0.000000000000000]" << std::endl -+ << " \"string type\" [\"matte\"]" << std::endl << std::endl; - } else { - float trans = t/100.0f; -- result << "MakeNamedMaterial \"FreeCADMaterial_Base_" << Name << "\"" << endl -- << " \"color Kd\" [" << c.r << " " << c.g << " " << c.b << "]" << endl -- << " \"float sigma\" [0.000000000000000]" << endl -- << " \"string type\" [\"matte\"]" << endl << endl -- << "MakeNamedMaterial \"FreeCADMaterial_Null_" << Name << "\"" << endl -- << " \"string type\" [\"null\"]" << endl << endl -- << "MakeNamedMaterial \"FreeCADMaterial_" << Name << "\"" << endl -- << " \"string namedmaterial1\" [\"FreeCADMaterial_Null_" << Name << "\"]" << endl -- << " \"string namedmaterial2\" [\"FreeCADMaterial_Base_" << Name << "\"]" << endl -- << " \"float amount\" [" << trans << "]" << endl -- << " \"string type\" [\"mix\"]" << endl << endl; -+ result << "MakeNamedMaterial \"FreeCADMaterial_Base_" << Name << "\"" << std::endl -+ << " \"color Kd\" [" << c.r << " " << c.g << " " << c.b << "]" << std::endl -+ << " \"float sigma\" [0.000000000000000]" << std::endl -+ << " \"string type\" [\"matte\"]" << std::endl << std::endl -+ << "MakeNamedMaterial \"FreeCADMaterial_Null_" << Name << "\"" << std::endl -+ << " \"string type\" [\"null\"]" << std::endl << std::endl -+ << "MakeNamedMaterial \"FreeCADMaterial_" << Name << "\"" << std::endl -+ << " \"string namedmaterial1\" [\"FreeCADMaterial_Null_" << Name << "\"]" << std::endl -+ << " \"string namedmaterial2\" [\"FreeCADMaterial_Base_" << Name << "\"]" << std::endl -+ << " \"float amount\" [" << trans << "]" << std::endl -+ << " \"string type\" [\"mix\"]" << std::endl << std::endl; - } - - LuxTools::writeShape(result,Name.c_str(),shape); diff --git a/cad/freecad/files/patch-src_Mod_Raytracing_App_RayFeature.cpp b/cad/freecad/files/patch-src_Mod_Raytracing_App_RayFeature.cpp deleted file mode 100644 index 92c0f65afdfe..000000000000 --- a/cad/freecad/files/patch-src_Mod_Raytracing_App_RayFeature.cpp +++ /dev/null @@ -1,30 +0,0 @@ ---- src/Mod/Raytracing/App/RayFeature.cpp.orig 2019-10-04 10:45:11 UTC -+++ src/Mod/Raytracing/App/RayFeature.cpp -@@ -81,19 +81,19 @@ App::DocumentObjectExecReturn *RayFeature::execute(voi - // This must not be done in PovTools::writeShape! - long t = Transparency.getValue(); - const App::Color& c = Color.getValue(); -- result << "// instance to render" << endl -- << "object {" << Name << endl -- << " texture {" << endl; -+ result << "// instance to render" << std::endl -+ << "object {" << Name << std::endl -+ << " texture {" << std::endl; - if (t == 0) { -- result << " pigment {color rgb <"<}" << endl; -+ result << " pigment {color rgb <"<}" << std::endl; - } - else { - float trans = t/100.0f; -- result << " pigment {color rgb <"< transmit "< transmit "<