# FEBioStudio statically links its own module libs into one 22MB binary; debug # extraction on it is large and not useful for a first packaging. %global debug_package %{nil} Name: febiostudio Version: 3.1 Release: 3%{?dist} Summary: Pre- and post-processor GUI for the FEBio biomechanics solver License: MIT URL: https://febio.org/ Source0: https://github.com/febiosoftware/FEBioStudio/archive/refs/tags/v%{version}.tar.gz#/FEBioStudio-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: gcc BuildRequires: cmake BuildRequires: ninja-build BuildRequires: chrpath BuildRequires: desktop-file-utils # Qt6 GUI (>= 6.5; uses GuiPrivate -> qtbase-private-devel) BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qtbase-private-devel BuildRequires: qt6-qtcharts-devel BuildRequires: qt6-qtshadertools-devel BuildRequires: mesa-libGL-devel BuildRequires: glew-devel # FEBio SDK (find_package(FEBio) -> FEBio:: targets) BuildRequires: febio-devel # Optional features (all from Fedora): MMG remeshing, tetgen, CAD (OCCT+NetGen), # remote jobs (libssh/openssl), model repository (libzip/sqlite), image analysis # (SimpleITK), Python scripting (pybind11). FFMPEG is omitted (Fedora's ffmpeg 8 # dropped the avcodec_close API FEBio Studio 3.1 uses). BuildRequires: mmg-devel BuildRequires: mmg3d-devel BuildRequires: mmgs-devel BuildRequires: mmg2d-devel BuildRequires: tetgen-devel BuildRequires: opencascade-devel # netgen-mesher is ExcludeArch: %%{ix86} aarch64 in Fedora, pinned to upstream # bug NGSolve/netgen#226, so it cannot be had on aarch64 at all. Upstream # FEBioStudio ties netgen to CAD_FEATURES (CMakeLists.txt:131) with no # separate toggle, so aarch64 builds with CAD_FEATURES=OFF below. %ifnarch aarch64 BuildRequires: netgen-mesher-devel %endif BuildRequires: libssh-devel BuildRequires: openssl-devel BuildRequires: libzip-devel BuildRequires: sqlite-devel BuildRequires: simpleitk-devel BuildRequires: pybind11-devel BuildRequires: python3-devel BuildRequires: zlib-ng-compat-devel BuildRequires: libomp-devel # The FEBio runtime libraries (febiostudio's binary RPATHs %%{_libdir}/febio). Requires: febio%{?_isa} = 4.12 # itk(abi): ITK_LEGACY_REMOVE changes class layouts at unchanged sonames, so the itk_ver floor alone let a # consumer built against the removed state install over the present one (python3-simpleitk -11 on ITK -23 # returned all-zero images). Equality on the legacy-state token; see InsightToolkit5.spec. Requires: itk(abi) = %{?itk_abi}%{!?itk_abi:UNSET} %description FEBio Studio is the integrated pre- and post-processing environment for FEBio, the finite element solver for biomechanics and biophysics from the University of Utah. It provides interactive model building, meshing, material assignment, job control and result visualization for FEBio simulations. This build links the system FEBio solver and enables MMG adaptive remeshing, TetGen, CAD import/meshing (OpenCASCADE + NetGen), remote job execution over SSH, the online model repository, SimpleITK image analysis, and Python scripting. Video (mp4) export is not built (incompatible with the system ffmpeg version). %prep %autosetup -n FEBioStudio-%{version} # Fedora forbids static libstdc++/libgcc; FEBio Studio hardcodes them on Linux. sed -i 's/ -static-libstdc++//g' CMakeLists.txt sed -i '/target_link_libraries(FEBioStudio -static-libstdc++ -static-libgcc)/d' CMakeLists.txt %build # Pin the ITK layout state this build sees (see the Requires above). test -n "%{?itk_abi}" || { echo "ERROR: itk_abi undefined - needs InsightToolkit5-devel >= 5.4.7-24 (macros.itk)" >&2; exit 1; } # Raw cmake (FEBio Studio's CMake is sensitive). Qt6 + our FEBio SDK via # CMAKE_PREFIX_PATH. QT_6_10=ON so it pulls Qt6::GuiPrivate (needed by RHILib). # MMG/TetGen/SSH/MODEL_REPO/ITK/Python auto-detect ON from the system -devel pkgs; # CAD needs explicit Fedora paths (OCC 7.9 -> USE_NEW_OCC). FFMPEG off. cmake -S . -B cbuild -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=%{_prefix} \ -DQt6_DIR=%{_libdir}/cmake/Qt6 \ -DFEBio_DIR=%{_libdir}/cmake/FEBio \ -DQT_6_10=ON \ -DUSE_FFMPEG=OFF \ %ifnarch aarch64 -DCAD_FEATURES=ON -DUSE_NEW_OCC=ON \ -DOCCT_INC=%{_includedir}/opencascade -DOCCT_LIB_DIR=%{_libdir} \ -DNETGEN_INC=%{_includedir}/netgen-mesher -DNETGEN_LIB_DIR=%{_libdir} %else `# no netgen on aarch64 (see the BR above); CAD_FEATURES gates both` \ `# OCC and netgen together, so CAD import and netgen meshing are off.` \ `# TetGen and MMG meshing, model building, post-processing and running` \ `# FEBio all still work.` \ -DCAD_FEATURES=OFF %endif cmake --build cbuild %{?_smp_mflags} %install install -D -m 0755 cbuild/bin/FEBioStudio %{buildroot}%{_bindir}/FEBioStudio # Keep only the FEBio runtime libdir on the RPATH (drop the empty build-tree leak). chrpath -r '%{_libdir}/febio' %{buildroot}%{_bindir}/FEBioStudio # Desktop entry + icon. install -D -m 0644 icons/FEBioStudio.png \ %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/febiostudio.png cat > %{name}.desktop < - 3.1-3 - Pin the ITK layout state: Requires: itk(abi) = %%{itk_abi}, from InsightToolkit5-devel's macros.itk, plus a %%build guard. ITK -23 flipped ITK_LEGACY_REMOVE back off, which changes class layouts at unchanged sonames; this package was built against -10..-21 (legacy removed) and the itk_ver floor let it install over -23, giving silent wrong results or crashes. Rebuild against ITK >= 5.4.7-24. * Mon Sep 14 2026 Morgan Hough - 3.1-2 - Build on aarch64 with CAD_FEATURES=OFF instead of failing. netgen-mesher is ExcludeArch: %%{ix86} aarch64 in Fedora (FIXME NGSolve/netgen#226), so the aarch64 build died on "No match for argument: netgen-mesher-devel". Upstream binds netgen to CAD_FEATURES with no separate switch, so CAD import and netgen meshing are both unavailable on aarch64; TetGen/MMG meshing, model building, post-processing and solver runs are unaffected. Revisit if netgen#226 is fixed and Fedora drops the exclusion. * Sun Jun 21 2026 Morgan Hough - 3.1-1 - Initial package: FEBio Studio 3.1, the Qt6 GUI pre/post-processor for FEBio. Links the system FEBio SDK (febio-devel) and enables MMG, TetGen, CAD (OpenCASCADE+NetGen), SSH, model repository, SimpleITK and Python scripting. FFMPEG video export omitted (system ffmpeg 8 dropped avcodec_close). Static module libs are linked into the binary; static libstdc++/libgcc removed for Fedora policy.