From 2aee1066ef250d6a9a6440ea7c359e2dea2851b2 Mon Sep 17 00:00:00 2001 From: Adrian Insaurralde Avalos Date: Tue, 13 May 2025 22:42:32 -0300 Subject: [PATCH] fedora rpm packaging: tweak rpmbuild options change `bundled_zipios` option to enabled by default, it was wrongly always set to enabled no matter what option was chosen change `bundled_pycxx` option to enabled by default add `pcl_enabled` option --- package/fedora/freecad.spec | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/package/fedora/freecad.spec b/package/fedora/freecad.spec index a60b122610..0c259bfa90 100644 --- a/package/fedora/freecad.spec +++ b/package/fedora/freecad.spec @@ -10,10 +10,12 @@ %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 libOndselSolver libSMDS libSMESH libSMESHDS libStdMeshers libarea-native # Some configuration options for other environments -# rpmbuild --with=bundled_zipios: use bundled version of zipios++ -%global bundled_zipios %{?_with_bundled_zipios: 1} %{?!_with_bundled_zipios: 1} -# rpmbuild --with=bundled_pycxx: use bundled version of pycxx -%global bundled_pycxx %{?_with_bundled_pycxx: 1} %{?!_with_bundled_pycxx: 0} +# rpmbuild --with=pcl_enabled: build with pcl support +%global pcl_enabled %{?_with_pcl_enabled: 1} %{?!_with_pcl_enabled: 0} +# rpmbuild --without=bundled_pycxx: use bundled version of pycxx +%global bundled_pycxx %{?_without_bundled_pycxx: 0} %{?!_without_bundled_pycxx: 1} +# rpmbuild --without=bundled_zipios: use bundled version of zipios++ +%global bundled_zipios %{?_without_bundled_zipios: 0} %{?!_without_bundled_zipios: 1} # rpmbuild --without=bundled_smesh: don't use bundled version of Salome's Mesh %global bundled_smesh %{?_without_bundled_smesh: 0} %{?!_without_bundled_smesh: 1} @@ -95,7 +97,9 @@ BuildRequires: openmpi-devel BuildRequires: med-devel BuildRequires: libkdtree++-devel +%if ! %{pcl_enabled} BuildRequires: pcl-devel +%endif BuildRequires: python3 BuildRequires: libglvnd-devel BuildRequires: yaml-cpp-devel @@ -201,7 +205,6 @@ LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS -DRESOURCEDIR=%{_datadir}/%{name} \ -DFREECAD_USE_EXTERNAL_PIVY=TRUE \ -DFREECAD_USE_EXTERNAL_FMT=TRUE \ - -DFREECAD_USE_PCL:BOOL=OFF \ -DFREECAD_QT_VERSION:STRING=6 \ -DSHIBOKEN_INCLUDE_DIR=%{_includedir}/shiboken6 \ -DSHIBOKEN_LIBRARY=-lshiboken6.%{py_suffix} \ @@ -214,6 +217,11 @@ LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS -DCOIN3D_INCLUDE_DIR=%{_includedir}/Coin4 \ -DCOIN3D_DOC_PATH=%{_datadir}/Coin4/Coin \ -DUSE_OCC=TRUE \ +%if ! %{pcl_enabled} + -DFREECAD_USE_PCL:BOOL=ON \ +%else + -DFREECAD_USE_PCL:BOOL=OFF \ +%endif %if ! %{bundled_smesh} -DFREECAD_USE_EXTERNAL_SMESH=TRUE \ -DSMESH_FOUND=TRUE \