Skip to content

Commit

Permalink
cad/FreeCAD: update to 1.0rc1
Browse files Browse the repository at this point in the history
newer (and less messy) than the snapshot before.

Release Notes (WIP):
  https://wiki.freecad.org/Release_notes_1.0

PR:		280391
Reported By:	jwb
  • Loading branch information
moench-tegeder committed Sep 22, 2024
1 parent fe59f73 commit 078cb3b
Show file tree
Hide file tree
Showing 10 changed files with 971 additions and 754 deletions.
38 changes: 20 additions & 18 deletions cad/freecad/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
PORTNAME= FreeCAD
DISTVERSION= 0.21.2
PORTREVISION= 6
DISTVERSION= 1.0rc1
CATEGORIES= cad

MAINTAINER= [email protected]
Expand All @@ -12,17 +11,20 @@ LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= doxygen:devel/doxygen \
pybind11-config:devel/py-pybind11@${PY_FLAVOR} \
pyside_tool.py:devel/pyside2-tools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyside6-tools>0:devel/pyside6-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 \
microsoft-gsl>0:devel/microsoft-gsl \
googletest>0:devel/googletest \
swig:devel/swig
# the ffmpeg4 dependency is inherited via cad/opencascade
LIB_DEPENDS= libexpat.so:textproc/expat2 \
libyaml-cpp.so:devel/yaml-cpp \
libfreetype.so:print/freetype2 \
libtbb.so:devel/onetbb \
${PY_BOOST} \
libpyside2.cpython-${PYTHON_SUFFIX}${PYTHON_ABIVER}.so:devel/pyside2@${PY_FLAVOR} \
libpyside6.abi3.so:devel/pyside6@${PY_FLAVOR} \
libCoin.so:graphics/Coin \
libfmt.so:devel/libfmt \
libpng.so:graphics/png \
Expand All @@ -33,24 +35,23 @@ LIB_DEPENDS= libexpat.so:textproc/expat2 \
libboost_thread.so:devel/boost-libs \
libfontconfig.so:x11-fonts/fontconfig \
libfreeimage.so:graphics/freeimage \
libavutil.so:multimedia/ffmpeg4 \
libavutil.so.58:multimedia/ffmpeg \
libavformat.so.58:multimedia/ffmpeg4 \
libmed.so:french/med \
libshiboken2.cpython-${PYTHON_SUFFIX}${PYTHON_ABIVER}.so:devel/shiboken2@${PY_FLAVOR} \
libshiboken6.abi3.so:devel/shiboken6@${PY_FLAVOR} \
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 gmake jpeg \
localbase:ldflags mpi:openmpi pkgconfig python localbase qt:5 xorg \
localbase:ldflags mpi:openmpi pkgconfig python localbase qt:6 xorg \
desktop-file-utils shared-mime-info shebangfix
USE_GITHUB= yes
GH_TAGNAME= 8abd09398a010337c3b294e687e0666b60bceacf # PR #11909 Add support for OCCT 7.8.0
GH_TAGNAME= ${DISTVERSION}
USE_XORG= ice sm x11 xext xt
USE_GL= gl glu
USE_QT= buildtools concurrent core declarative designer gui \
linguisttools location network opengl printsupport \
qmake:build svg webchannel widgets xml xmlpatterns
USE_QT= base declarative location svg tools webchannel
USE_LDCONFIG= yes

CPE_VENDOR= freecad_project
Expand All @@ -63,7 +64,7 @@ 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" \
-DFREECAD_QT_VERSION="6" \
-DPYTHON_LIBRARY="${PYTHONBASE}/lib/libpython${PYTHON_VER}${PYTHON_ABIVER}.so" \
-DPYTHON_INCLUDE_DIR="${PYTHON_INCLUDEDIR}" \
-DPYTHON_PACKAGES_PATH="${PYTHON_SITELIBDIR}" \
Expand All @@ -72,29 +73,30 @@ CMAKE_ARGS+= -DOCC_INCLUDE_DIR="${LOCALBASE}/include/OpenCASCADE" \
-DBUILD_ASSEMBLY="OFF" \
-DBUILD_DESIGNER_PLUGIN="ON" \
-DBUILD_FLAT_MESH="ON" \
-DBUILD_TEST="OFF" \
-DENABLE_DEVELOPER_TESTS="OFF" \
-DBUILD_VR="OFF" \
-DFREECAD_LIBPACK_USE="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" \
-DUSE_CUDA="OFF" \
-DUSE_OPENCV="OFF" \
-Dpybind11_DIR="${PYTHON_SITELIBDIR}/pybind11/share/cmake/pybind11" \
-DHDF5_CFLAGS="-I${LOCALBASE}/include" \
-DHDF5_FOUND=TRUE \
-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

-DBUILD_ENABLE_CXX_STD=C++17 \
-DXDG_DATADIR="${PREFIX}/share"

CMAKE_INSTALL_PREFIX= ${PREFIX}/${PORTNAME}
# Install XDG icons and files to the standard path
CMAKE_ARGS+= -DXDG_DATADIR="${PREFIX}/share"

OPTIONS_DEFINE= COLLADA

Expand Down
6 changes: 3 additions & 3 deletions cad/freecad/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1710958473
SHA256 (FreeCAD-FreeCAD-0.21.2-8abd09398a010337c3b294e687e0666b60bceacf_GH0.tar.gz) = 05023d52a60b01d5c108a71279d21eb1c1b50db169016b0510ef39c7bbb2361d
SIZE (FreeCAD-FreeCAD-0.21.2-8abd09398a010337c3b294e687e0666b60bceacf_GH0.tar.gz) = 67392556
TIMESTAMP = 1726945270
SHA256 (FreeCAD-FreeCAD-1.0rc1_GH0.tar.gz) = 33ad59dcd268557cab14053987aefafb22c70b47e43c0d19a955762b0f4d7c03
SIZE (FreeCAD-FreeCAD-1.0rc1_GH0.tar.gz) = 88552055

This file was deleted.

31 changes: 0 additions & 31 deletions cad/freecad/files/patch-src_Gui_SoFCCSysDragger.cpp

This file was deleted.

25 changes: 25 additions & 0 deletions cad/freecad/files/patch-src_Mod_Gui_StartView.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
commit 0946c6880def66bc0c611dad37140da3f126a6c3
Author: wmayer <[email protected]>
Date: Wed Sep 11 16:53:08 2024 +0200

StartPage: Make sure to pass a container widget to the QScrollArea

Fixes #16047: FreeBSD: Segfault in StartView::firstStartWidgetDismissed

diff --git src/Mod/Start/Gui/StartView.cpp src/Mod/Start/Gui/StartView.cpp
index 4667c8db72..086cec7c35 100644
--- src/Mod/Start/Gui/StartView.cpp
+++ src/Mod/Start/Gui/StartView.cpp
@@ -117,7 +117,11 @@ StartView::StartView(QWidget* parent)

// First start page
auto firstStartScrollArea = gsl::owner<QScrollArea*>(new QScrollArea());
- auto firstStartRegion = gsl::owner<QHBoxLayout*>(new QHBoxLayout(firstStartScrollArea));
+ auto firstStartScrollWidget = gsl::owner<QWidget*>(new QWidget(firstStartScrollArea));
+ firstStartScrollArea->setWidget(firstStartScrollWidget);
+ firstStartScrollArea->setWidgetResizable(true);
+
+ auto firstStartRegion = gsl::owner<QHBoxLayout*>(new QHBoxLayout(firstStartScrollWidget));
firstStartRegion->addStretch();
auto firstStartWidget = gsl::owner<FirstStartWidget*>(new FirstStartWidget(this));
connect(firstStartWidget,
22 changes: 22 additions & 0 deletions cad/freecad/files/patch-src_Mod_Material_Gui_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
commit 448306c93760c0304ab1f74ff1fc4173c542fd60
Author: Christoph Moench-Tegeder <[email protected]>
Date: Sun Sep 22 01:40:21 2024 +0200

fix installation path

diff --git src/Mod/Material/Gui/CMakeLists.txt src/Mod/Material/Gui/CMakeLists.txt
index a33c503e90..e9804543d1 100644
--- src/Mod/Material/Gui/CMakeLists.txt
+++ src/Mod/Material/Gui/CMakeLists.txt
@@ -169,9 +169,9 @@ SET_PYTHON_PREFIX_SUFFIX(MatGui)

fc_copy_sources(MatGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Material" ${MatGuiIcon_SVG})
fc_copy_sources(MatGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Material" ${MatGuiImages})
-fc_copy_sources(MatGui "${CMAKE_BINARY_DIR}/Mod/Material" ${Material_Ui_Files})
+fc_copy_sources(MatGui "${CMAKE_BINARY_DIR}/Mod/Material" ${Material_Ui_Files})

INSTALL(TARGETS MatGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL(FILES ${MatGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Material/Resources/icons")
INSTALL(FILES ${MatGuiImages} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Material/Resources/images")
-INSTALL(FILES ${Material_Ui_Files} DESTINATION "${CMAKE_BINARY_DIR}/Mod/Material/Resources/ui")
+INSTALL(FILES ${Material_Ui_Files} DESTINATION "Mod/Material/Resources/ui")
8 changes: 4 additions & 4 deletions cad/freecad/files/patch-src_Mod_MeshPart_App_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git src/Mod/MeshPart/App/CMakeLists.txt src/Mod/MeshPart/App/CMakeLists.txt
index 6ee9deb4eb..6fb25015e3 100644
index 11a84e1a13..d78fc8a197 100644
--- src/Mod/MeshPart/App/CMakeLists.txt
+++ src/Mod/MeshPart/App/CMakeLists.txt
@@ -21,6 +21,7 @@ include_directories(
${PYTHON_INCLUDE_DIRS}
@@ -19,6 +19,7 @@ include_directories(
${SMESH_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
+ ${pybind11_INCLUDE_DIR}
${EIGEN3_INCLUDE_DIR}
+ ${pybind11_INCLUDE_DIR}
)


101 changes: 0 additions & 101 deletions cad/freecad/files/patch-src_Mod_Part_App_Geometry2d.cpp

This file was deleted.

21 changes: 21 additions & 0 deletions cad/freecad/files/patch-src_Tools_plugins_widget_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
commit 22eb8cc0f4ffcc6e1e283d2d325b043f0f9fb625
Author: Christoph Moench-Tegeder <[email protected]>
Date: Sat Sep 21 21:58:31 2024 +0200

fix CMAKE CMP0153

use execute_process() instead of exec_program()

diff --git src/Tools/plugins/widget/CMakeLists.txt src/Tools/plugins/widget/CMakeLists.txt
index d909c156a1..9052694f28 100644
--- src/Tools/plugins/widget/CMakeLists.txt
+++ src/Tools/plugins/widget/CMakeLists.txt
@@ -57,7 +57,7 @@ target_compile_options(FreeCAD_widgets PRIVATE ${COMPILE_OPTIONS})

# Get the install location of a plugin to determine the path to designer plguins
get_target_property(QMAKE_EXECUTABLE Qt${FREECAD_QT_MAJOR_VERSION}::qmake LOCATION)
-exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_PLUGINS" RETURN_VALUE return_code OUTPUT_VARIABLE DEFAULT_QT_PLUGINS_DIR )
+execute_process(COMMAND ${QMAKE_EXECUTABLE} "-query" "QT_INSTALL_PLUGINS" RESULT_VARIABLE return_code OUTPUT_VARIABLE DEFAULT_QT_PLUGINS_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
set(DESIGNER_PLUGIN_LOCATION ${DEFAULT_QT_PLUGINS_DIR}/designer CACHE PATH "Path where the plugin will be installed to")

if (NOT IS_SUB_PROJECT)
Loading

0 comments on commit 078cb3b

Please sign in to comment.