2020-08-14 08:13:31 +00:00
|
|
|
# Force out of source build
|
|
|
|
%undefine __cmake_in_source_build
|
|
|
|
|
2022-06-12 20:02:47 +00:00
|
|
|
# Use soversion
|
|
|
|
%global soversion 9.1
|
|
|
|
|
2018-07-17 08:24:03 +00:00
|
|
|
# Set to 1 to enable testsuite. Fails everywhere with GCC 8+.
|
|
|
|
%global with_tests 0
|
2017-05-08 12:57:22 +00:00
|
|
|
|
2021-11-25 05:17:34 +00:00
|
|
|
# Optional OpenEXR support
|
|
|
|
%global with_openexr 0
|
|
|
|
|
2017-05-08 12:57:22 +00:00
|
|
|
Name: openvdb
|
2022-06-12 20:02:47 +00:00
|
|
|
Version: 9.1.0
|
|
|
|
Release: %autorelease
|
2017-05-08 12:57:22 +00:00
|
|
|
Summary: C++ library for sparse volumetric data discretized on three-dimensional grids
|
|
|
|
License: MPLv2.0
|
|
|
|
URL: http://www.openvdb.org/
|
|
|
|
|
2019-02-17 00:13:30 +00:00
|
|
|
Source0: https://github.com/AcademySoftwareFoundation/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2017-05-08 12:57:22 +00:00
|
|
|
|
2019-08-02 05:49:29 +00:00
|
|
|
BuildRequires: boost-devel >= 1.61
|
2020-05-23 19:14:01 +00:00
|
|
|
# boost-python3-devel merged in boost-devel for Fedora 33+
|
|
|
|
# https://src.fedoraproject.org/rpms/boost/c/1f2e448e099a867f9da62b9da009d3dec5e1ad64?branch=master
|
2021-11-25 05:17:34 +00:00
|
|
|
%if 0%{?rhel}
|
2018-07-17 08:24:03 +00:00
|
|
|
BuildRequires: boost-python3-devel
|
2020-05-23 19:11:42 +00:00
|
|
|
%endif
|
2017-05-08 12:57:22 +00:00
|
|
|
BuildRequires: cmake >= 2.8
|
|
|
|
BuildRequires: doxygen >= 1.8.11
|
2019-12-12 07:36:48 +00:00
|
|
|
#BuildRequires: epydoc
|
2019-08-18 20:02:18 +00:00
|
|
|
BuildRequires: gcc-c++
|
2017-05-08 12:57:22 +00:00
|
|
|
BuildRequires: ghostscript >= 8.70
|
2019-08-18 20:02:18 +00:00
|
|
|
BuildRequires: libstdc++-devel
|
2020-05-23 16:51:51 +00:00
|
|
|
BuildRequires: pkgconfig(blosc) >= 1.5.0
|
|
|
|
BuildRequires: pkgconfig(cppunit) >= 1.10
|
2021-11-25 05:17:34 +00:00
|
|
|
# RHEL and CentOS only have that build requirement for x86_64
|
2020-05-23 17:30:59 +00:00
|
|
|
%if 0%{?rhel}
|
|
|
|
%ifarch x86_64
|
|
|
|
BuildRequires: glfw-devel >= 2.7
|
|
|
|
%endif
|
|
|
|
%else
|
2020-05-23 16:51:51 +00:00
|
|
|
BuildRequires: pkgconfig(glfw3) >= 2.7
|
2020-05-23 17:30:59 +00:00
|
|
|
%endif
|
2020-05-23 16:51:51 +00:00
|
|
|
BuildRequires: pkgconfig(jemalloc)
|
|
|
|
BuildRequires: pkgconfig(log4cplus) >= 1.0
|
2021-11-25 05:17:34 +00:00
|
|
|
%if 0%{?with_openexr}
|
|
|
|
BuildRequires: pkgconfig(OpenEXR) >= 3.0
|
|
|
|
%endif
|
2020-05-23 16:51:51 +00:00
|
|
|
BuildRequires: pkgconfig(tbb) >= 3.0
|
|
|
|
BuildRequires: pkgconfig(xi)
|
|
|
|
BuildRequires: pkgconfig(zlib) > 1.2.7
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
%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.
|
2019-08-18 20:02:18 +00:00
|
|
|
It is developed and maintained by Academy Software Foundation for use in
|
|
|
|
volumetric applications typically encountered in feature film production.
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
This package contains some graphical tools.
|
|
|
|
|
|
|
|
%package libs
|
|
|
|
Summary: Core OpenVDB libraries
|
|
|
|
|
|
|
|
%description libs
|
|
|
|
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.
|
2019-08-18 20:02:18 +00:00
|
|
|
It is developed and maintained by Academy Software Foundation for use in
|
|
|
|
volumetric applications typically encountered in feature film production.
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
2020-12-26 22:17:59 +00:00
|
|
|
BuildRequires: texlive-latex
|
2018-07-17 11:28:58 +00:00
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
2019-08-18 20:02:18 +00:00
|
|
|
Obsoletes: %{name}-doc < 6.1.0-1
|
|
|
|
Provides: %{name}-doc = %{version}-%{release}
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and header files for developing
|
|
|
|
applications that use %{name}.
|
|
|
|
|
2020-05-23 16:51:51 +00:00
|
|
|
%if 0%{?fedora}
|
2019-09-20 09:02:43 +00:00
|
|
|
%package -n python3-%{name}
|
2017-05-08 12:57:22 +00:00
|
|
|
Summary: OpenVDB Python module
|
2019-12-12 07:36:48 +00:00
|
|
|
BuildRequires: pkgconfig(python3)
|
2020-12-26 22:17:59 +00:00
|
|
|
BuildRequires: python3dist(numpy)
|
2018-07-17 11:28:58 +00:00
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
2019-09-20 09:02:43 +00:00
|
|
|
Obsoletes: %{name}-python3 < 6.2.0
|
2018-07-17 08:24:03 +00:00
|
|
|
Obsoletes: %{name}-python2 < 5.1.0-1
|
|
|
|
Provides: %{name}-python2 = %{version}-%{release}
|
2019-12-12 07:36:48 +00:00
|
|
|
%{?python_provide:%python_provide python3-%{name}}
|
2019-09-20 09:02:43 +00:00
|
|
|
|
|
|
|
%description -n python3-%{name}
|
2019-12-12 07:36:48 +00:00
|
|
|
%{description}
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
This package contains the Python module.
|
2020-05-23 16:51:51 +00:00
|
|
|
%endif
|
|
|
|
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
%prep
|
2021-07-23 11:54:40 +00:00
|
|
|
%autosetup -p1
|
2017-05-08 12:57:22 +00:00
|
|
|
|
2019-08-18 20:02:18 +00:00
|
|
|
# Hardcoded values
|
2018-07-17 09:45:41 +00:00
|
|
|
sed -i \
|
2019-08-18 20:02:18 +00:00
|
|
|
-e 's|lib$|%{_lib}|g' \
|
2020-12-26 22:17:59 +00:00
|
|
|
%{name}/%{name}/CMakeLists.txt %{name}/%{name}/python/CMakeLists.txt
|
2017-05-08 12:57:22 +00:00
|
|
|
|
2019-08-02 05:49:29 +00:00
|
|
|
|
2017-05-08 12:57:22 +00:00
|
|
|
%build
|
2021-11-24 10:07:40 +00:00
|
|
|
%ifarch %{arm}
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2021376
|
|
|
|
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
|
|
|
%endif
|
2022-09-14 13:17:22 +00:00
|
|
|
%if 0%{?rhel}
|
|
|
|
%ifarch ppc64le s390x
|
|
|
|
%undefine _smp_mflags
|
|
|
|
%endif
|
|
|
|
%endif
|
2021-11-24 10:07:40 +00:00
|
|
|
export CXXFLAGS="%{build_cxxflags} -Wl,--as-needed"
|
2021-11-13 10:08:32 +00:00
|
|
|
|
2019-08-18 20:02:18 +00:00
|
|
|
# Ignore versions (python 3, etc.)
|
2017-05-08 12:57:22 +00:00
|
|
|
%cmake \
|
2019-08-18 20:02:18 +00:00
|
|
|
-DCMAKE_NO_SYSTEM_FROM_IMPORTED=TRUE \
|
2019-08-04 06:43:28 +00:00
|
|
|
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \
|
2019-08-18 20:02:18 +00:00
|
|
|
-DOPENVDB_BUILD_DOCS=ON \
|
2020-05-23 16:51:51 +00:00
|
|
|
%if 0%{?fedora}
|
2019-12-12 07:36:48 +00:00
|
|
|
-DOPENVDB_BUILD_PYTHON_MODULE=ON \
|
2020-06-21 17:42:17 +00:00
|
|
|
%endif
|
|
|
|
%if 0%{?rhel}
|
|
|
|
-DCONCURRENT_MALLOC=None \
|
2020-05-23 16:51:51 +00:00
|
|
|
%endif
|
2019-03-23 09:29:43 +00:00
|
|
|
-DOPENVDB_BUILD_UNITTESTS=OFF \
|
2019-08-18 20:02:18 +00:00
|
|
|
-DOPENVDB_ENABLE_RPATH=OFF \
|
|
|
|
-DOPENVDB_INSTALL_CMAKE_MODULES=OFF \
|
2021-11-25 05:17:34 +00:00
|
|
|
-DPYOPENVDB_INSTALL_DIRECTORY=%{python3_sitearch} \
|
|
|
|
%if 0%{?with_openexr}
|
|
|
|
-DUSE_EXR=ON \
|
|
|
|
%endif
|
|
|
|
-DUSE_NANOVDB=ON
|
2020-08-14 08:13:31 +00:00
|
|
|
%cmake_build
|
2017-05-08 12:57:22 +00:00
|
|
|
|
2018-07-17 08:24:03 +00:00
|
|
|
%if 0%{?with_tests}
|
|
|
|
%check
|
2020-08-14 08:13:31 +00:00
|
|
|
%ctest test
|
2018-07-17 08:24:03 +00:00
|
|
|
%endif
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
%install
|
2020-08-14 08:13:31 +00:00
|
|
|
%cmake_install
|
2017-05-08 12:57:22 +00:00
|
|
|
|
2021-02-06 11:07:44 +00:00
|
|
|
# Let RPM pick up html documents in the files section
|
|
|
|
mv %{buildroot}%{_docdir}/OpenVDB/html .
|
2019-09-20 09:02:43 +00:00
|
|
|
rm -fr %{buildroot}%{_datadir}/doc
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
find %{buildroot} -name '*.a' -delete
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{_bindir}/vdb_print
|
2021-11-25 05:17:34 +00:00
|
|
|
%{_bindir}/nanovdb_{print,validate}
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
%files libs
|
2020-12-26 22:17:59 +00:00
|
|
|
%license LICENSE
|
2019-09-20 09:02:43 +00:00
|
|
|
%doc README.md CHANGES
|
2020-08-24 14:23:04 +00:00
|
|
|
%{_libdir}/lib%{name}.so.%{version}
|
2022-06-12 20:02:47 +00:00
|
|
|
%{_libdir}/lib%{name}.so.%{soversion}
|
2017-05-08 12:57:22 +00:00
|
|
|
|
2020-05-23 16:51:51 +00:00
|
|
|
%if 0%{?fedora}
|
2019-09-20 09:02:43 +00:00
|
|
|
%files -n python3-%{name}
|
2019-09-17 11:12:07 +00:00
|
|
|
%{python3_sitearch}/py%{name}.so
|
2020-05-23 16:51:51 +00:00
|
|
|
%endif
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
%files devel
|
2019-08-18 20:02:18 +00:00
|
|
|
%doc html
|
2017-05-08 12:57:22 +00:00
|
|
|
%{_includedir}/*
|
2020-08-24 14:23:04 +00:00
|
|
|
%{_libdir}/lib%{name}.so
|
2017-05-08 12:57:22 +00:00
|
|
|
|
|
|
|
%changelog
|
2022-06-12 20:02:47 +00:00
|
|
|
%autochangelog
|