# description : Feature based parametric 3D CAD modeler # homepage : https://freecadweb.org/ # depends : cmake ninja boost-libs coin fmt glew jsoncpp libspnav med-openmpi netcdf opencascade openmpi pugixml pyside6 python-gitpython # depends : python-markdown python-matplotlib python-pip python-pivy python-ply python-yaml qt6-svg qt6-tools qt6-webengine # depends : xerces-c verdict name=freecad version=0.21.2 release=1 noextract="" backup="" source="https://github.com/FreeCAD/FreeCAD/archive/refs/tags/0.21.2.tar.gz freecad-vtk9.3.patch 62c3836c.patch pyside6.patch https://github.com/FreeCAD/FreeCAD/commit/6043c904.patch" build() { patch -d FreeCAD-$version -Np1 -i $SRC/freecad-vtk9.3.patch patch -d FreeCAD-$version -Np1 -i ../62c3836c.patch # Fix Qt6 issues in addons manager patch -d FreeCAD-$version -Np1 -i ../pyside6.patch patch -d FreeCAD-$version -Np1 -i ../6043c904.patch # Fix build with Python 3.12 # cd FreeCAD-$version sed -e 's|Shiboken::Module::getTypes(requiredModule)|reinterpret_cast(Shiboken::Module::getTypes(requiredModule))|' \ -i FreeCAD-$version/src/Gui/PythonWrapper.cpp # Fix build with PySide 6.7 cmake \ -B build \ -DBUILD_ENABLE_CXX_STD=C++17 \ -DBUILD_FLAT_MESH=ON \ -DFREECAD_QT_VERSION=6 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects -fPIC -w" \ -DCMAKE_CXX_FLAGS="$CXXFLAGS -ffat-lto-objects -fPIC -w" \ -DCMAKE_INSTALL_BINDIR=/usr/lib/freecad/bin \ -DCMAKE_INSTALL_DATADIR=/usr/share/freecad \ -DCMAKE_INSTALL_DATAROOTDIR=/usr/share \ -DCMAKE_INSTALL_DOCDIR=/usr/share/freecad/doc \ -DCMAKE_INSTALL_LIBDIR=/usr/lib/freecad/lib \ -DCMAKE_INSTALL_PREFIX=/usr/lib/freecad \ -DFREECAD_USE_EXTERNAL_PIVY=ON \ -DFREECAD_USE_OCC_VARIANT='Official Version' \ -DFREECAD_USE_QT_FILEDIALOG=ON \ -DPYTHON_EXECUTABLE=/usr/bin/python \ -D INSTALL_TO_SITEPACKAGES=ON \ -G Ninja \ -S FreeCAD-$version \ -W no-dev ninja -C build DESTDIR="$PKG" ninja -C build install install -Dm755 $name/src/Tools/{$name-thumbnailer,fcinfo} -t "$PKG/usr/bin/" # symlinks install -d "$PKG/usr/bin" ln -sf /usr/lib/freecad/bin/FreeCAD "$PKG/usr/bin/freecad" ln -sf /usr/lib/freecad/bin/FreeCAD "$PKG/usr/bin/FreeCAD" ln -sf /usr/lib/freecad/bin/FreeCADCmd "$PKG/usr/bin/freecadcmd" ln -sf /usr/lib/freecad/bin/FreeCADCmd "$PKG/usr/bin/FreeCADCmd" }