# The CSXCAD/openEMS structure viewer: opens the XML a CSXCAD/openEMS script writes and shows geometry, mesh and # dumps in 3D. Last of the four openEMS packages. Upstream ships no desktop entry; AppCSXCAD.desktop here is # ours (to offer upstream, see docs/desktop-integration-pattern.md). %global libsuffix %(echo %{_lib} | sed 's/^lib//') Name: AppCSXCAD Version: 0.7.0 Release: 1%{?dist} Summary: 3D viewer for CSXCAD / openEMS simulation structures License: GPL-3.0-or-later URL: https://github.com/thliebig/AppCSXCAD Source0: %{url}/archive/v%{version}/AppCSXCAD-%{version}.tar.gz Source1: AppCSXCAD.desktop BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: CSXCAD-devel = %{version} BuildRequires: QCSXCAD-devel = %{version} BuildRequires: tinyxml-devel BuildRequires: hdf5-devel BuildRequires: qt6-qtbase-devel BuildRequires: vtk-devel BuildRequires: vtk-qt # VTK cmake config pulls these at find_package time. BuildRequires: freetype-devel pugixml-devel fmt-devel utf8cpp-devel BuildRequires: PEGTL-devel jsoncpp-devel nlohmann-json-devel BuildRequires: double-conversion-devel expat-devel glew-devel lz4-devel BuildRequires: libxml2-devel libtiff-devel libjpeg-turbo-devel libpng-devel BuildRequires: mesa-libGL-devel BuildRequires: desktop-file-utils # Pin the exact VTK ABI this package was built against. VTK freezes its soname at # libvtk*.so.1 across all of 9.x, so rpm cannot tell 9.5 from 9.6 from 9.7: a consumer # built against one installs cleanly against another and fails at LOAD with undefined # symbols. %%vtk_abi comes from vtk-devel's macros.vtk; the %%build test catches a # buildroot without it (see 3dslicer-igt.spec for why the check is not at parse time). Requires: vtk(abi) = %{?vtk_abi}%{!?vtk_abi:UNSET} %description AppCSXCAD displays CSXCAD structure files (the XML that openEMS scripts write with Write2XML) in a Qt/VTK window: primitives by property, the FDTD mesh, field dumps, with export to X3D and POV-Ray. python3-CSXCAD's AppCSXCAD_BIN and the Octave CSXGeomPlot call it. %prep %autosetup -p1 -n AppCSXCAD-%{version} %build test -n "%{?vtk_abi}" || { echo "ERROR: vtk_abi undefined - add 'BuildRequires: vtk-devel'" >&2; exit 1; } # ENABLE_RPATH=OFF still leaves CMAKE_INSTALL_RPATH=%%{_libdir}, which check-rpaths rejects %cmake -G Ninja \ -DLIB_SUFFIX=%{libsuffix} \ -DENABLE_RPATH=OFF \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DVTK_QT_VERSION=6 %cmake_build %install %cmake_install # AppCSXCAD.sh clears LD_LIBRARY_PATH and execs the binary next to itself: a relocatable-tarball helper. rm -f %{buildroot}%{_bindir}/AppCSXCAD.sh desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} %check desktop-file-validate %{buildroot}%{_datadir}/applications/AppCSXCAD.desktop %files %license COPYING %doc README %{_bindir}/AppCSXCAD %{_datadir}/applications/AppCSXCAD.desktop %changelog * Fri Oct 23 2026 Morgan Hough - 0.7.0-1 - Initial package: AppCSXCAD 0.7.0 on QCSXCAD/CSXCAD 0.7.0, Qt6 and the project's VTK 9.7 (vtk(abi) pin), with a desktop entry of ours (upstream has none).