# Qt widgets for CSXCAD structures (tree, property and grid editors, VTK 3D view): the library behind AppCSXCAD. # Third of the four openEMS packages. Built with Qt6 because the project's VTK 9.7 is; upstream's CMake takes # the Qt version from VTK_QT_VERSION and links Qt6::Core5Compat for its QRegExp use. %global libsuffix %(echo %{_lib} | sed 's/^lib//') Name: QCSXCAD Version: 0.7.0 Release: 2%{?dist} Summary: Qt GUI library for CSXCAD structures (openEMS) License: LGPL-3.0-or-later URL: https://github.com/thliebig/QCSXCAD Source0: %{url}/archive/v%{version}/QCSXCAD-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: CSXCAD-devel = %{version} BuildRequires: tinyxml-devel BuildRequires: hdf5-devel BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qt5compat-devel BuildRequires: vtk-devel # Defines %%vtk_abi on Fedora's vtk (via vtk-abi-compat); our vtk provides it itself. BuildRequires: vtk(abi) 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 # 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 QCSXCAD provides Qt widgets to display and edit CSXCAD structures: the primitive/property tree, property and grid editors, a VTK-based 3D view with mesh and field overlays, and X3D/POV-Ray export. AppCSXCAD is its viewer application; openEMS scripts call it to inspect a model before solving. %package devel Summary: Headers and development files for QCSXCAD Requires: %{name}%{?_isa} = %{version}-%{release} Requires: CSXCAD-devel%{?_isa} Requires: qt6-qtbase-devel%{?_isa} Requires: vtk-devel%{?_isa} %description devel Headers and the unversioned shared library link for building against QCSXCAD. %prep %autosetup -p1 -n QCSXCAD-%{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 %files %license COPYING %doc README NEWS %{_libdir}/libQCSXCAD.so.0 %{_libdir}/libQCSXCAD.so.%{version} %files devel %{_includedir}/QCSXCAD/ %{_libdir}/libQCSXCAD.so %changelog * Fri Oct 30 2026 Morgan Hough - 0.7.0-2 - Rebuild against Fedora's vtk 9.7.0 on rawhide. No spec change was needed: the mock build was clean and no binary needs libjava, libjvm or libvtkJava. * Fri Oct 23 2026 Morgan Hough - 0.7.0-1 - Initial package: QCSXCAD 0.7.0 on Qt6 (Core5Compat) and the project's VTK 9.7 (vtk(abi) pin).