# Some configuration options for other environments # rpmbuild --without=bundled_zipios: don't use bundled version of zipios++ %bcond_without bundled_zipios # rpmbuild --with=bundled_pycxx: use bundled version of pycxx %bcond_with bundled_pycxx # rpmbuild --without=bundled_smesh: don't use bundled version of Salome's Mesh %bcond_without bundled_smesh # rpmbuild --without=tests: esclude tests in %%check %bcond_without tests # rpmbuild --without=bundled_gtest: don't use bundled version of gtest and gmock %bcond_with bundled_gtest # rpmbuild --without=bundled_gtest: don't build debug information %bcond_without debug_info Name: freecad Epoch: 1 Version: weekly.2025.04.21 Release: 1.20250501163442052010.pr8.158.gbfb4f4206f%{?dist} Summary: A general purpose 3D CAD modeler Group: Applications/Engineering License: GPL-2.0-or-later URL: https://www.freecad.org/ Source0: freecad-sources.tar.gz # Maintainers: keep this list of plugins up to date # List plugins in %%{_libdir}/%%{name}/lib, less '.so' and 'Gui.so', here %global plugins AssemblyApp AssemblyGui CAMSimulator DraftUtils Fem FreeCAD Import Inspection MatGui Materials Measure Mesh MeshPart Part PartDesignGui Path PathApp PathSimulator Points QtUnitGui ReverseEngineering Robot Sketcher Spreadsheet Start Surface TechDraw Web _PartDesign area flatmesh libDriver libDriverDAT libDriverSTL libDriverUNV libE57Format libMEFISTO2 libSMDS libSMESH libSMESHDS libStdMeshers libarea-native %global exported_libs libOndselSolver %if %{with tests} %global plugins %{plugins} libgmock libgmock_main libgtest libgtest_main %endif # See FreeCAD-main/src/3rdParty/salomesmesh/CMakeLists.txt to find this out. %global bundled_smesh_version 7.7.1.0 # See /src/3rdParty/PyCXX/CXX/Version.h to find this out. %global bundled_pycxx_version 7.1.9 # See /src/3rdParty/OndselSolver/CMakeLists.txt to find this out. %global bundled_ondsel_solver_version 1.0.1 # Utilities BuildRequires: cmake gcc-c++ gettext doxygen swig graphviz gcc-gfortran desktop-file-utils git tbb-devel %if %{with tests} BuildRequires: xorg-x11-server-Xvfb %if %{without bundled_gtest} BuildRequires: gtest-devel gmock-devel %endif %endif # Development Libraries BuildRequires:boost-devel Coin4-devel eigen3-devel freeimage-devel fmt-devel libglvnd-devel libicu-devel libkdtree++-devel libspnav-devel libXmu-devel med-devel mesa-libEGL-devel mesa-libGLU-devel netgen-mesher-devel netgen-mesher-devel-private opencascade-devel openmpi-devel pcl-devel python3 python3-devel python3-matplotlib python3-pivy python3-pybind11 python3-pyside6-devel python3-shiboken6-devel pyside6-tools qt6-qttools-static qt6-qtsvg-devel vtk-devel xerces-c-devel yaml-cpp-devel %if %{without bundled_smesh} BuildRequires: smesh-devel %endif %if %{without bundled_zipios} BuildRequires: zipios++-devel %endif %if %{without bundled_pycxx} BuildRequires: python3-pycxx-devel %endif # For appdata %if 0%{?fedora} BuildRequires: libappstream-glib %endif # Packages separated because they are noarch, but not optional so require them # here. Requires: %{name}-data = %{epoch}:%{version}-%{release} # Obsolete old doc package since it's required for functionality. Obsoletes: %{name}-doc < 0.22-1 Requires: hicolor-icon-theme fmt python3-matplotlib python3-pivy python3-collada python3-pyside6 qt6-assistant %if %{with bundled_smesh} Provides: bundled(smesh) = %{bundled_smesh_version} %endif %if %{with bundled_pycxx} Provides: bundled(python-pycxx) = %{bundled_pycxx_version} %endif Provides: bundled(libondselsolver) = %{bundled_ondsel_solver_version} Recommends: python3-pysolar IfcOpenShell-python3 # plugins and private shared libs in %%{_libdir}/freecad/lib are private; # prevent private capabilities being advertised in Provides/Requires %global plugin_exclude %( for i in %{plugins}; do echo -n "\|$i\(Gui\)\?"; done ) # idem per le librerie esportate (non hanno “Gui” opzionale) %global lib_exclude %( for i in %{exported_libs}; do echo -n "\|$i"; done ) %global __requires_exclude_from ^%{_libdir}/%{name}/(lib|Mod)/.* %global __provides_exclude_from ^%{_libdir}/%{name}/Mod/.* %global __provides_exclude ^(libFreeCAD.*%{plugin_exclude})\.so.* %global __requires_exclude ^(libFreeCAD.*%{plugin_exclude}%{lib_exclude})\.so.* %description FreeCAD is a general purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler, aimed directly at mechanical engineering and product design but also fits a wider range of uses in engineering, such as architecture or other engineering specialities. It is a feature-based parametric modeler with a modular software architecture which makes it easy to provide additional functionality without modifying the core system. %package data Summary: Data files for FreeCAD BuildArch: noarch Requires: %{name} = %{epoch}:%{version}-%{release} %description data Data files for FreeCAD %package libondselsolver-devel Summary: Development file for OndselSolver BuildArch: noarch Requires: %{name} = %{epoch}:%{version}-%{release} %description libondselsolver-devel Development file for OndselSolver #path that contain main FreeCAD sources for cmake %global tests_resultdir %{_datadir}/%{name}/tests_result/%{_arch} %prep %setup -T -a 0 -q -c -n FreeCAD-1.0.0 %build # Deal with cmake projects that tend to link excessively. LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS %define MEDFILE_INCLUDE_DIRS %{_includedir}/med/ %cmake \ %if %{with debug_info} -DCMAKE_BUILD_TYPE=RelWithDebInfo \ %endif -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \ -DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \ -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ -DCMAKE_INSTALL_DATAROOTDIR=%{_datadir} \ -DRESOURCEDIR=%{_datadir}/%{name} \ -DFREECAD_USE_EXTERNAL_PIVY=TRUE \ -DFREECAD_USE_EXTERNAL_FMT=TRUE \ -DFREECAD_USE_PCL:BOOL=OFF \ -DFREECAD_QT_VERSION:STRING=6 \ -DOpenGL_GL_PREFERENCE=GLVND \ -DUSE_OCC=TRUE \ %if %{without bundled_pycxx} -DPYCXX_INCLUDE_DIR=$(pkg-config --variable=includedir PyCXX) \ -DPYCXX_SOURCE_DIR=$(pkg-config --variable=srcdir PyCXX) \ %endif %if %{without bundled_smesh} -DFREECAD_USE_EXTERNAL_SMESH=TRUE \ %endif %if %{without bundled_zipios} -DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE \ %endif %if %{with tests} -DENABLE_DEVELOPER_TESTS=TRUE \ %else -DENABLE_DEVELOPER_TESTS=FALSE \ %endif -DONDSELSOLVER_BUILD_EXE=TRUE \ -DBUILD_GUI=TRUE %cmake_build %install %cmake_install # Symlink binaries to /usr/bin mkdir -p %{buildroot}%{_bindir} ln -s ../%{_lib}/%{name}/bin/FreeCAD %{buildroot}%{_bindir}/FreeCAD ln -s ../%{_lib}/%{name}/bin/FreeCADCmd %{buildroot}%{_bindir}/FreeCADCmd # Remove header from external library that's erroneously installed rm -rf %{buildroot}%{_libdir}/%{name}/include/E57Format rm -rf %{buildroot}%{_includedir}/gmock rm -rf %{buildroot}%{_includedir}/gtest rm -rf %{buildroot}%{_libdir}/%{name}/%{_lib}/cmake rm -rf %{buildroot}%{_libdir}/%{name}/%{_lib}/pkgconfig %check desktop-file-validate %{buildroot}%{_datadir}/applications/org.freecad.FreeCAD.desktop %{?fedora:appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml} %if %{with tests} mkdir -p %{buildroot}%tests_resultdir pushd %_vpath_builddir if (timeout 30m ./tests/Tests_run) &> %{buildroot}%tests_resultdir/Tests_run.result ;then echo "Test_run OK" else echo "**** Failed Test_run ****" touch %{buildroot}%tests_resultdir/Tests_run.failed cat %{buildroot}%tests_resultdir/Tests_run.result fi popd if %ctest &> %{buildroot}%tests_resultdir/ctest.result ; then echo "ctest OK" else echo "**** Failed ctest ****" touch %{buildroot}%tests_resultdir/ctest.failed cat %{buildroot}%tests_resultdir/ctest.result fi %endif # Bug maintainers to keep %%{plugins} macro up to date. # # Make sure there are no plugins that need to be added to plugins macro %define plugin_regexp /^\\\(libFreeCAD.*%(for i in %{plugins}; do echo -n "\\\|$i"; done)\\\)\\\(\\\|Gui\\\)\\.so/d %define exported_libs_regexp /^\\\(%(for i in %{exported_libs}; do echo -n "\\\|$i"; done)\\\)\\.so/d new_plugins=`ls %{buildroot}%{_libdir}/%{name}/%{_lib} | sed -e '%{plugin_regexp}' -e '%exported_libs_regexp'` if [ -n "$new_plugins" ]; then echo -e "\n\n\n**** ERROR:\n" \ "\nPlugins not caught by regexps:" \ "\n" $new_plugins \ "\n\nPlugins in %{_libdir}/%{name}/lib do not exist in" \ "\nspecfile %%{plugins} or %%{exported_libs_regexp} macro." \ "\nPlease add these to %%{plugins} or %%{exported_libs}" \ "\nmacro at top of specfile" \ "\nand rebuild.\n****\n" 1>&2 exit 1 fi # Make sure there are no entries in the plugins macro that don't match plugins for p in %{plugins}; do if [ -z "`ls %{buildroot}%{_libdir}/%{name}/%{_lib}/$p*.so`" ]; then set +x echo -e "\n\n\n**** ERROR:\n" \ "\nExtra entry in %%{plugins} macro with no matching plugin:" \ "'$p'.\n\nPlease remove from %%{plugins} macro at top of" \ "\nspecfile and rebuild.\n****\n" 1>&2 exit 1 fi done # Make sure there are no entries in the exported_libs_regexp macro that don't match plugins for d in %{exported_libs}; do if [ -z "`ls %{buildroot}%{_libdir}/%{name}/%{_lib}/$d*.so`" ]; then set +x echo -e "\n\n\n**** ERROR:\n" \ "\nExtra entry in %%{exported_libs} macro with no matching lib:" \ "'$d'.\n\nPlease remove from %%{exported_libs} macro at top of" \ "\nspecfile and rebuild.\n****\n" 1>&2 exit 1 fi done %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-desktop-database &> /dev/null || : /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi /usr/bin/update-desktop-database &> /dev/null || : /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor/scalable/apps &>/dev/null || : %files %{_bindir}/* %{_metainfodir}/* %dir %{_libdir}/%{name} %{_libdir}/%{name}/bin/ %{_libdir}/%{name}/%{_lib}/ %{_libdir}/%{name}/Ext/ %{_libdir}/%{name}/Mod/ %{_datadir}/applications/* %{_datadir}/icons/hicolor/* %{_datadir}/pixmaps/* %{_datadir}/mime/packages/* %{_datadir}/thumbnailers/* #find a way to configure in cmake with %%name to avoid conflict with different package name %{python3_sitelib}/freecad/* %if %{with tests} %tests_resultdir/* %endif %files data %{_datadir}/%{name}/ %{_docdir}/%{name}/LICENSE.html %{_docdir}/%{name}/ThirdPartyLibraries.html %files libondselsolver-devel %{_datadir}/pkgconfig/OndselSolver.pc %{_includedir}/OndselSolver/* %changelog * Thu May 01 2025 Packit - 1:weekly.2025.04.21-1.20250501163442052010.pr8.158.gbfb4f4206f - add git information (github-actions[bot]) - use default build type for pr build and always print buiild time tests result (filippor) - add test that read build time tests result (filippor) - add tests in test-farm (filippor) - simplify configuration to use only packit remove script used to have only a spec file and build with 3 system rpkg custom bash script packit (filippor) - add new build on release (filippor) - escape changelog for spec file (filippor) - add packit configuration (filippor) - refactor prepare for packit (filippor) - remove rpkg macro for archive extraction (filippor) - add timeout to tests (filippor) - Disabile gui test to avoid timeout (FilippoR) - simplify regexp. remove delete unused source enable gui tests other fix (filippor) - use new macro for filtering requires provides (filippor) - export libondselsolver (filippor) - export dev package for ondselsolver (filippor) - build in RelWithDebInfo to generate correctly the debuginfo package (debug info will be stripped from standard package and a debuginfo package will be generated (filippor) - remove python bytecompile is default (filippor) - add tests (filippor) - configure cmake correctly to avoid moving file later (filippor) - use standard builddir and don't delete it to fast local rebuild (filippor) - use bcond macro (filippor) - add script for build from source archive (filippor) - reformat freecad.spec (filippor) - use custom macro to package the source file (filippor) - use standard macro to packages sources (filippor) - GUI: Refactor - removed soft dependency from freeze toggle (Leticia Vong) - CI: rename Weekly Build weekly- to Development Build weekly-. (Jacob Oursland) - Removed unused function (Andrea) - Doc: Improve PropertyContainer documentation (Pieter Hijma) - clean SoFCSelection.cpp (mosfet80) - Materials: External Module Support (David Carter) - remove unnecessary InitApplication.h inclusion (Andrea) - BIM: Fix Python syntax error (Ralf Habacker) - Draft: store 3 ShapeString parameters and remove font from prefs (#21054) (Roy-043) - Main: unistd.h is not needed (Ladislav Michl) - Main: output exception stream directly to stdout (Ladislav Michl) - Main: create QString from std::string directly (Ladislav Michl) - Main: use inGuiMode() consistently (Ladislav Michl) - Main: inGuiMode() helper (Ladislav Michl) - FEM: correct typos (Stefan Tröger) - Gui: rename TaskCSysDragger to TaskTransform (captain0xff) - FEM: Post task dialog opens transaction only if none is pending. Fixes item 4 in #20263 (Stefan Tröger) - FEM: Add post pipeline for check analysis type. Fixes #20936 (Stefan Tröger) - FEM: Ensure finite frame values only. Fixes #20933 (Stefan Tröger) - FEM: Fix post object load of unsupported VTK data type (Stefan Tröger) - BIM: Allow CurtainWall to have Window being assigned upon Remove/Add ops (tetektoza) - Gui: Added classic trackball orbit style (#20535) (Graic) - Sketcher: Avoid an unnecessary geometry update when trimming (Ajinkya Dahale) - Amend script so that it works on macOS (bofdahof) - CI: Check file name case sensitivity in lint workflow. (#20903) (Jackson Oursland) - Draft: Add Global mode to ShapeString task panel (Roy-043) - Bump actions/download-artifact from 4.2.1 to 4.3.0 (dependabot[bot]) - Core: Fixed a bug where an empty document disappears (#20554) (João Neves) - BIM: BIM_TDView, add tooltip info on how to insert the view on a particular page (#20932) (Furgo) - Gui: MayaGesture navigation fixes (#20948) (Bas Ruigrok) - CAM: Remove comment (#20931) (J-Dunn) - CAM: Fix array warning 2 (tarman3) - Materials: Model Manager External Interface (#20825) (David Carter) - making the buttons of the temperature constrain expandable (#20894) (muezabdalla) - [ArchStairs] ArchSketch Support and Refactoring Phase 2 (#21025) (paul) - BIM: Update working plane related code (Roy-043) - Misc: Fix various typos Found via codespell (Luz Paz) - Core: Introduce PDF Import-Export dialog (#20860) (tetektoza) - Base: remove explicit namespace-name qualifier from *PyImp.cpp (Ladislav Michl) - Base: cleanup includes in *PyImp.cpp (Ladislav Michl) - Misc: Replace dynamic_cast with qobject_cast (Kacper Donat) - Material: Replace dynamic_cast with qobject_cast (Kacper Donat) - Sketcher: Replace dynamic_cast with qobject_cast (Kacper Donat) - Spreadsheet: Replace dynamic_cast with qobject_cast (Kacper Donat) - TechDraw: Replace dynamic_cast with qobject_cast (Kacper Donat) - Gui: Use freecad_cast whenever possible (Kacper Donat) - Sketcher: Use freecad_cast whenever possible (Kacper Donat) - Fem: Use freecad_cast whenever possible (Kacper Donat) - Part: Use freecad_cast whenever possible (Kacper Donat) - Spreadsheet: Use freecad_cast whenever possible (Kacper Donat) - Robot: Use freecad_cast whenever possible (Kacper Donat) - PartDesign: Use freecad_cast whenever possible (Kacper Donat) - TechDraw: Use freecad_cast whenever possible (Kacper Donat) - Mesh: Use freecad_cast whenever possible (Kacper Donat) - Assembly: Use freecad_cast whenever possible (Kacper Donat) - Points: Use freecad_cast whenever possible (Kacper Donat) - App: Use freecad_cast whenever possible (Kacper Donat) - Surface: Add missing SurfaceExport in Surface classes (Kacper Donat) - Part: Add missing PartExports in Part Features (Kacper Donat) - [Gui] Fix bottomRight index by correcting last row count (Syres916) - importSVG - Path generation Overhaul (#20749) (aprospero) - BIM: Hidden objects used for variant Links should not be hosted (Roy-043) - [BimWindow] Integrate Interactive Creation Tool with SketchArch Parametric Attachment Feature (#20872) (paul) - BIM: Improve grid handling for some commands (#20658) (Roy-043) - Base, Gui: remove lefovers from xml -> pyi conversion (Ladislav Michl) - App: Fix inheritance information for PropertyEnumeration (Kacper Donat) - github: Remove description header (Kacper Donat) - Assembly: BOM, handle enumerations as well (Furgo) - CMake: Detect changes in .pyi file with the same name (Kacper Donat) - CMake: Rebuild .cpp/.h files from .pyi on build (Kacper Donat) - Gui: Use a perceptually uniform color map for Std_RandomColor (Alex Neufeld) - move PR template to ./github (sliptonic) - Bump github/codeql-action from 3.28.15 to 3.28.16 (dependabot[bot]) - Add `locked` keyword to Document::addProperty (Florian Foinant-Willig) - Assembly: BOM, use getUserString to simplify code (Furgo) - Assembly: BOM, use freecad_cast (Furgo) - Assembly: BOM, support superset property type only (Furgo) - Assembly: BOM, apply suggestion: do not copy baseName (Furgo) - Assembly: BOM, internationalize strings (Furgo) - Assembly: BOM properties, update help message (Furgo) - Assembly: BOM custom columns can now return property values (Furgo) - Draft: Change 'Chain Mode' GUI text to sentence case (Roy-043) - CI: Update to LibPack 3.1.1.3 (Chris Hennes) - Fix to sanity checking of ElementMap::restore() (Monty Montgomery) - Bump step-security/harden-runner from 2.11.1 to 2.12.0 (dependabot[bot]) - Gui: Fix value field for DlgAddPropertyVarSet (#20824) (Pieter Hijma) - TechDraw: Add BIM view with the page's scale (#20934) (Furgo) - Draft: adjust formatting of params.py (Roy-043) - TechDraw: Use static_cast when casting scene's child to TextField (tetektoza) - TechDraw: Return text fields directly as childs of QGISVGTemplate (tetektoza) - Remove filter excluding Spreadsheet objects (Abdelhadi Wael) - Update src/Gui/CommandStructure.cpp (Abdelhadi Wael) - Update CommandStructure.cpp (Abdelhadi Wael) - Update src/Gui/CommandStructure.cpp (Abdelhadi Wael) - fixed warning (Abdelhadi-Wael) - Updated PR with fixes (Abdelhadi Wael) - Fix: Only add objects when multiple are selected (Abdelhadi Wael) - Remove requirements.txt (Pieter Hijma) - [Core] Make enum FrameOption boolean (Pieter Hijma) - [Core] Enable a frame in VarSet dialog value field (Pieter Hijma) - [Core] Allow creating an editor with a frame (Pieter Hijma) - TemplatePyMod: Prevent user to remove core properties (Florian Foinant-Willig) - Points: Prevent user to remove core properties (Florian Foinant-Willig) - PartDesign: Prevent user to remove core properties (Florian Foinant-Willig) - Part: Prevent user to remove core properties (Florian Foinant-Willig) - OpenSCAD: Prevent user to remove core properties (Florian Foinant-Willig) - Measure: Prevent user to remove core properties (Florian Foinant-Willig) - Fem: Prevent user to remove core properties (Florian Foinant-Willig) - Draft: Prevent user to remove core properties (Florian Foinant-Willig) - BIM: prevent user to remove core properties (Florian Foinant-Willig) - Assembly: prevent user to remove core properties (Florian Foinant-Willig) - Add `locked` keyword to ViewProvider::addProperty (Florian Foinant-Willig) - Add `locked` keyword argument to DocumentObject::addProperty (Florian Foinant-Willig) - [Gui] Fix "Select dependent objects" with cycles (Pieter Hijma) - Fix SolverCalculiX object refactor (#20913) (3x380V) - [Doc] Process comments from review (Pieter Hijma) - [Doc] Improve documentation PropertyContainer (Pieter Hijma) - [Doc] Add documentation top-level namespace App (Pieter Hijma) - pixi: Match developer dependencies with weekly build and update. (#20711) (Jackson Oursland) - PartDesign: Center holes on sketch points as well as circles and arcs (#20583) (theo-vt) - Sketcher: Remove not-needed print statements (Kacper Donat) - Start: Apply reviewer suggestion (Chris Hennes) - Start: Refactor f3d to use worker threads (Chris Hennes) - Start: refactor f3d previews, use caching and configurable f3d path (Adrian Insaurralde Avalos) - Start: Switch to using QProcess, not std::system (MaxiV) - Start: add f3d previews (MaxiV)