%ifarch aarch64 #global _smp_ncpus_max 4 %endif %bcond_without docs %define major 6.0 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Name: openvdb Version: 6.0.0 Release: %mkrel 2 Summary: C++ library for sparse volumetric data discretized on three-dimensional grids License: MPLv2.0 Group: System/Libraries URL: http://www.openvdb.org/ Source0: https://github.com/dreamworksanimation/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: 0001-openvdb-python-CMakeLists.txt-Fix-build-with-CMake-3.patch Patch1: openvdb-5.2.0-pthread.patch BuildRequires: cmake %if %{with docs} BuildRequires: doxygen BuildRequires: epydoc BuildRequires: dot %endif BuildRequires: gcc-c++ BuildRequires: ghostscript BuildRequires: pythonegg(3)(numpy) BuildRequires: boost-devel >= 1.57.0 BuildRequires: pkgconfig(blosc) BuildRequires: pkgconfig(cppunit) BuildRequires: pkgconfig(glfw3) BuildRequires: pkgconfig(IlmBase) BuildRequires: pkgconfig(OpenEXR) BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(tbb) BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(zlib) %if %{without docs} Obsoletes: %{name}-doc < %{version}-%{release} %endif %description OpenVDB is an Academy Award-winning open-source C++ library comprising a novel hierarchical data structure and a suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids. It is developed and maintained by DreamWorks Animation for use in volumetric applications typically encountered in feature film production. This package contains some graphical tools. %package -n %{libname} Summary: Core OpenVDB libraries Group: System/Libraries %description -n %{libname} OpenVDB is an Academy Award-winning open-source C++ library comprising a novel hierarchical data structure and a suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids. It is developed and maintained by DreamWorks Animation for use in volumetric applications typically encountered in feature film production. %package -n %{develname} Summary: Development files for %{name} Group: Development/C++ Requires: %{libname} >= %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} The %{develname} package contains libraries and header files for developing applications that use %{name}. %package -n python3-%{name} Summary: OpenVDB Python 3 module Group: Development/Python Requires: %{libname} >= %{version}-%{release} Obsoletes: python2-%{name} < 5.0.0-3 %description -n python3-%{name} OpenVDB is an Academy Award-winning open-source C++ library comprising a novel hierarchical data structure and a suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids. It is developed and maintained by DreamWorks Animation for use in volumetric applications typically encountered in feature film production. This package contains the Python 3 module. %package doc Summary: Documentation for %{name} Group: Documentation BuildArch: noarch %description doc The %{name}-doc package contains documentation for developing applications that use %{name}. %prep %autosetup -p1 iconv -f iso8859-1 -t utf-8 %{name}/CHANGES > %{name}/CHANGES.conv && \ mv -f %{name}/CHANGES.conv %{name}/CHANGES # Hardcoded paths for installation, as described in the INSTALL file sed -i -e 's|lib$|%{_lib}|g' -e 's|lib/python|%{_lib}/python|g' \ %{name}/CMakeLists.txt %{name}/python/CMakeLists.txt %build export CXXFLAGS="%{optflags} -Wl,--as-needed" %cmake \ -DOPENVDB_BUILD_DOCS=%{?with_docs:ON}%{?!with_docs:OFF} \ -DBLOSC_LOCATION=%{_prefix} \ -DGLFW3_LOCATION=%{_prefix} \ -DILMBASE_NAMESPACE_VERSIONING=OFF \ -DOPENEXR_NAMESPACE_VERSIONING=OFF \ -DILMBASE_LOCATION=%{_prefix} \ -DOPENEXR_LOCATION=%{_prefix} \ -DOPENVDB_ENABLE_RPATH=OFF \ -DOPENVDB_ABI_VERSION_NUMBER=3 \ -DTBB_LOCATION=%{_prefix} \ -DOPENVDB_BUILD_UNITTESTS=OFF \ -DUSE_GLFW3=ON %make_build %install %make_install -C build %if %{with docs} # Let RPM pick up HTML documents in the files section rm -fr %{buildroot}%{_prefix}/docs %endif find %{buildroot} -name '*.a' -delete %files %license %{name}/LICENSE %{name}/COPYRIGHT %doc README.md %{name}/CHANGES %{_bindir}/vdb_view %{_bindir}/vdb_print %{_bindir}/vdb_render %files -n %{libname} %{_libdir}/lib%{name}.so.%{major}{,.*} %files -n %{develname} %{_includedir}/* %{_libdir}/lib%{name}.so %files -n python3-%{name} %{_libdir}/python%{python3_version}/py%{name}.so %if %{with docs} %files doc %doc build/openvdb/doc/html %endif %changelog * Fri Apr 26 2019 akien <akien> 6.0.0-2.mga7 + Revision: 1395383 - Rebuild for glfw 3.3 * Tue Apr 02 2019 daviddavid <daviddavid> 6.0.0-1.mga7 + Revision: 1385412 - new version: 6.0.0 - now libmajor is 6.0 * Tue Jan 08 2019 daviddavid <daviddavid> 5.2.0-6.mga7 + Revision: 1352470 - rebuild for new Python 3.7 * Wed Oct 17 2018 wally <wally> 5.2.0-5.mga7 + Revision: 1321722 - add patch to fix linking - rebuild for new boost 1.68.0 * Mon Oct 15 2018 daviddavid <daviddavid> 5.2.0-4.mga7 + Revision: 1320542 - rebuild for new ilmbase and openexr 2.3.0 * Sun Sep 23 2018 wally <wally> 5.2.0-2.mga7 + Revision: 1297260 - fix and enable doc build * Sun Sep 23 2018 wally <wally> 5.2.0-1.mga7 + Revision: 1297236 - disable doc subpkg - new libmajor 5.2 + daviddavid <daviddavid> - new version: 5.2.0 * Sun Aug 26 2018 wally <wally> 5.1.0-4.mga7 + Revision: 1254687 - limit parallel builds to 4 on aarch64 * Sun Aug 26 2018 wally <wally> 5.1.0-3.mga7 + Revision: 1254671 - another rebuild for aarch64 * Tue Aug 07 2018 wally <wally> 5.1.0-2.mga7 + Revision: 1248694 - rebuild for aarch64 * Thu Jul 19 2018 daviddavid <daviddavid> 5.1.0-1.mga7 + Revision: 1244341 - new version: 5.1.0 - switch to Python 3 * Sun May 27 2018 wally <wally> 5.0.0-2.mga7 + Revision: 1232428 - rebuild for openexr 2.2.1 * Sat Mar 24 2018 daviddavid <daviddavid> 5.0.0-1.mga7 + Revision: 1211862 - initial package openvdb