# Feature toggles: tests enabled by default, Python bindings disabled by default %bcond_without tests %bcond_with python %global soversion 3 %global forgeurl https://github.com/elalish/manifold Version: 3.2.1 %forgemeta Name: manifold Release: %autorelease Summary: Geometry library for topological robustness License: Apache-2.0 URL: %{forgeurl} Source0: %{forgesource} # Build dependencies # Manifold requires static files BuildRequires: polyclipping2-static BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: openvdb-devel >= 11 BuildRequires: pkgconfig(assimp) BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(tbb) %if %{with python} BuildRequires: python3-devel BuildRequires: python3-nanobind-devel %endif %description Manifold provides robust operations on watertight triangle meshes with guaranteed manifold output. Features include parallelized algorithms, support for arbitrary vertex attributes, and material mapping for rendering applications. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development files for %{name}, including headers, CMake config, and pkg-config files. %if %{with python} %package -n python3-%{name} Summary: Python bindings for %{name} %description -n python3-%{name} Python interface for %{name} geometry library %endif %prep %forgeautosetup %build %cmake \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_SKIP_BUILD_RPATH=ON \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DMANIFOLD_EXPORT=ON \ -DMANIFOLD_PAR=ON \ -DMANIFOLD_BUILD_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \ -DMANIFOLD_PYBIND=%{?with_python:ON}%{!?with_python:OFF} \ -DMANIFOLD_CBIND=ON %cmake_build %install %cmake_install %if %{with tests} %check %ctest --test-dir %{_vpath_builddir} %endif %files %license LICENSE %{_libdir}/libmanifold.so.%{soversion}* %{_libdir}/libmanifoldc.so.%{soversion}* %files devel %doc README.md CONTRIBUTING.md %{_includedir}/%{name}/ %{_libdir}/libmanifold.so %{_libdir}/libmanifoldc.so %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/cmake/%{name}/ %if %{with python} %files -n python3-%{name} %license %{_licensedir}/%{name}/LICENSE %{python3_sitearch}/manifold3d.*.so %{python3_sitearch}/manifold3d.pyi %endif %changelog %autochangelog