64e9bcb
# Set to 1 to enable testsuite. Fails everywhere with GCC 8+.
64e9bcb
%global with_tests 0
64e9bcb
64e9bcb
Name:           openvdb
3fc4e0c
Version:        7.0.0
f972080
Release:        7%{?dist}
64e9bcb
Summary:        C++ library for sparse volumetric data discretized on three-dimensional grids
64e9bcb
License:        MPLv2.0
64e9bcb
URL:            http://www.openvdb.org/
64e9bcb
64e9bcb
Source0:        https://github.com/AcademySoftwareFoundation/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
64e9bcb
64e9bcb
BuildRequires:  boost-devel >= 1.61
8c2ca4d
# boost-python3-devel merged in boost-devel for Fedora 33+
8c2ca4d
# https://src.fedoraproject.org/rpms/boost/c/1f2e448e099a867f9da62b9da009d3dec5e1ad64?branch=master
798ba80
%if 0%{?fedora} < 33
64e9bcb
BuildRequires:  boost-python3-devel
798ba80
%endif
64e9bcb
BuildRequires:  cmake >= 2.8
64e9bcb
BuildRequires:  doxygen >= 1.8.11
3fc4e0c
#BuildRequires:  epydoc
64e9bcb
BuildRequires:  gcc-c++
64e9bcb
BuildRequires:  ghostscript >= 8.70
64e9bcb
BuildRequires:  libstdc++-devel
d7fc02e
BuildRequires:  pkgconfig(blosc) >= 1.5.0
d7fc02e
BuildRequires:  pkgconfig(cppunit) >= 1.10
315b01b
# RHEL and CentOS only has that build requirement for x86_64
315b01b
%if 0%{?rhel}
315b01b
%ifarch x86_64
315b01b
BuildRequires:  glfw-devel >= 2.7
315b01b
%endif
315b01b
%else
d7fc02e
BuildRequires:  pkgconfig(glfw3) >= 2.7
315b01b
%endif
d7fc02e
BuildRequires:  pkgconfig(IlmBase)
d7fc02e
BuildRequires:  pkgconfig(jemalloc)
d7fc02e
BuildRequires:  pkgconfig(log4cplus) >= 1.0
d7fc02e
BuildRequires:  pkgconfig(OpenEXR) >= 2.2
d7fc02e
BuildRequires:  pkgconfig(tbb) >= 3.0
d7fc02e
BuildRequires:  pkgconfig(xi)
d7fc02e
BuildRequires:  pkgconfig(zlib) > 1.2.7
64e9bcb
64e9bcb
%description
64e9bcb
OpenVDB is an Academy Award-winning open-source C++ library comprising a novel
64e9bcb
hierarchical data structure and a suite of tools for the efficient storage and
64e9bcb
manipulation of sparse volumetric data discretized on three-dimensional grids.
64e9bcb
It is developed and maintained by Academy Software Foundation for use in
64e9bcb
volumetric applications typically encountered in feature film production.
64e9bcb
64e9bcb
This package contains some graphical tools.
64e9bcb
64e9bcb
%package        libs
64e9bcb
Summary:        Core OpenVDB libraries
64e9bcb
64e9bcb
%description    libs
64e9bcb
OpenVDB is an Academy Award-winning open-source C++ library comprising a novel
64e9bcb
hierarchical data structure and a suite of tools for the efficient storage and
64e9bcb
manipulation of sparse volumetric data discretized on three-dimensional grids.
64e9bcb
It is developed and maintained by Academy Software Foundation for use in
64e9bcb
volumetric applications typically encountered in feature film production.
64e9bcb
64e9bcb
%package        devel
64e9bcb
Summary:        Development files for %{name}
64e9bcb
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
64e9bcb
Obsoletes:      %{name}-doc < 6.1.0-1
64e9bcb
Provides:       %{name}-doc = %{version}-%{release}
64e9bcb
64e9bcb
%description    devel
64e9bcb
The %{name}-devel package contains libraries and header files for developing
64e9bcb
applications that use %{name}.
64e9bcb
b43ae63
%if 0%{?fedora}
21f4f5b
%package        -n python3-%{name}
64e9bcb
Summary:        OpenVDB Python module
440af80
BuildRequires:  pkgconfig(python3)
3fc4e0c
BuildRequires:  python3-numpy
64e9bcb
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
21f4f5b
Obsoletes:      %{name}-python3 < 6.2.0
64e9bcb
Obsoletes:      %{name}-python2 < 5.1.0-1
64e9bcb
Provides:       %{name}-python2 = %{version}-%{release}
3fc4e0c
%{?python_provide:%python_provide python3-%{name}}
64e9bcb
21f4f5b
%description    -n python3-%{name}
3fc4e0c
%{description}
64e9bcb
64e9bcb
This package contains the Python module.
b43ae63
%endif
b43ae63
64e9bcb
64e9bcb
%prep
21f4f5b
%autosetup
64e9bcb
64e9bcb
# Hardcoded values
5ba3715
sed -i \
5ba3715
    -e 's|lib$|%{_lib}|g' \
5ba3715
    -e 's|lib/python|%{_lib}/python|g' \
26c5aa2
    %{name}/CMakeLists.txt %{name}/python/CMakeLists.txt
64e9bcb
64e9bcb
mkdir build
64e9bcb
64e9bcb
%build
64e9bcb
pushd build
64e9bcb
export CXXFLAGS="%{optflags} -Wl,--as-needed"
64e9bcb
# Ignore versions (python 3, etc.)
64e9bcb
%cmake \
64e9bcb
    -DCMAKE_NO_SYSTEM_FROM_IMPORTED=TRUE \
64e9bcb
    -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \
64e9bcb
    -DOPENVDB_BUILD_DOCS=ON \
b43ae63
%if 0%{?fedora}
3fc4e0c
    -DOPENVDB_BUILD_PYTHON_MODULE=ON \
b43ae63
%endif
f972080
%if 0%{?rhel}
f972080
    -DCONCURRENT_MALLOC=None \
f972080
%endif
64e9bcb
    -DOPENVDB_BUILD_UNITTESTS=OFF \
64e9bcb
    -DOPENVDB_ENABLE_RPATH=OFF \
64e9bcb
    -DOPENVDB_INSTALL_CMAKE_MODULES=OFF \
3fc4e0c
    -DPYOPENVDB_INSTALL_DIRECTORY=%{python3_sitearch} \
64e9bcb
    ..
64e9bcb
%make_build
64e9bcb
popd
64e9bcb
64e9bcb
%if 0%{?with_tests}
64e9bcb
%check
64e9bcb
%make test
64e9bcb
%endif
64e9bcb
64e9bcb
%install
64e9bcb
pushd build
64e9bcb
%make_install
64e9bcb
popd
64e9bcb
64e9bcb
# Let RPM pick up HTML documents in the files section
21f4f5b
mv %{buildroot}%{_prefix}/doc/html .
21f4f5b
rm -fr %{buildroot}%{_datadir}/doc
e78e645
64e9bcb
64e9bcb
find %{buildroot} -name '*.a' -delete
64e9bcb
64e9bcb
%files
64e9bcb
%{_bindir}/vdb_print
64e9bcb
64e9bcb
%files libs
64e9bcb
%license %{name}/LICENSE %{name}/COPYRIGHT
21f4f5b
%doc README.md CHANGES
64e9bcb
%{_libdir}/*.so.*
64e9bcb
b43ae63
%if 0%{?fedora}
21f4f5b
%files -n python3-%{name}
f688fdb
%{python3_sitearch}/py%{name}.so
b43ae63
%endif
64e9bcb
64e9bcb
%files devel
64e9bcb
%doc html
64e9bcb
%{_includedir}/*
64e9bcb
%{_libdir}/*.so
64e9bcb
64e9bcb
%changelog
f972080
* Sun Jun 21 2020 Luya Tshimbalanga <luya@fedoraproject.org> - 7.0.0-7
f972080
- Disable jemalloc build for RHEL and its derivative
f972080
065e226
* Thu May 28 2020 Jonathan Wakely <jwakely@redhat.com> - 7.0.0-6
065e226
- Rebuilt for Boost 1.73
065e226
771a793
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 7.0.0-5
771a793
- Rebuilt for Python 3.9
771a793
798ba80
* Sat May 23 2020 Luya Tshimbalanga <luya@fedoraproject.org> - 7.0.0-4
8c2ca4d
- Drop boost-python3-devel build requirement for Fedora 33+ 
798ba80
095bf1f
* Sat May 23 2020 Luya Tshimbalanga <luya@fedoraproject.org> - 7.0.0-3
b43ae63
- Disable python3 binding for CentOS and Red Hat Enterprise
7638693
- On RHEL and CentOS, glfw is exclusive for x86_64
315b01b
- Switch to pkgconfig build requirements as possible
b43ae63
02fd0a6
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-2
02fd0a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
02fd0a6
3fc4e0c
* Wed Dec 11 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 7.0.0-1
3fc4e0c
- Update to 7.0.0
3fc4e0c
- Set python3 module installation path via cmake
3fc4e0c
- Drop epydoc dependency
3fc4e0c
21f4f5b
* Thu Sep 19 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 6.2.0-1
21f4f5b
- Update to 6.2.0
21f4f5b
- Drop no longer needed upstream patch
21f4f5b
- Rename subpackge module to python3-*
21f4f5b
- Fix correct python module installation path
21f4f5b
6bd8302
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 6.1.0-3
6bd8302
- Rebuilt for Python 3.8
6bd8302
64e9bcb
* Sun Aug 18 2019 Simone Caronni <negativo17@gmail.com> - 6.1.0-2
64e9bcb
- Fix build with latest options.
64e9bcb
- Update SPEC file.
64e9bcb
- rpmlint fixes.
64e9bcb
64e9bcb
* Thu Aug 01 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 6.1.0-1
64e9bcb
- Update to 6.1.0
64e9bcb
- Fix cmake build
64e9bcb
64e9bcb
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-3
64e9bcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
64e9bcb
64e9bcb
* Fri Apr 12 2019 Richard Shaw <hobbes1069@gmail.com> - 6.0.0-2
64e9bcb
- Rebuild for Ilmbase 2.3.0.
64e9bcb
64e9bcb
* Sat Feb 16 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 6.0.0-1
64e9bcb
- Update to 6.0.0
64e9bcb
- Update source url and description
64e9bcb
- Apply patch for boost 1.6.9 borrowed from Arch Linux
64e9bcb
64e9bcb
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-5
64e9bcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
64e9bcb
64e9bcb
* Sat Oct 13 2018 Jerry James <loganjerry@gmail.com> - 5.1.0-4
64e9bcb
- Rebuild for tbb 2019_U1
64e9bcb
64e9bcb
* Tue Jul 17 2018 Simone Caronni <negativo17@gmail.com> - 5.1.0-3
64e9bcb
- Require libs subpackage for python3/devel.
64e9bcb
64e9bcb
* Tue Jul 17 2018 Simone Caronni <negativo17@gmail.com> - 5.1.0-2
64e9bcb
- Fix Python 3 Boost link.
64e9bcb
64e9bcb
* Tue Jul 17 2018 Simone Caronni <negativo17@gmail.com> - 5.1.0-1
64e9bcb
- Update to 5.1.0.
64e9bcb
- Switch to Python 3.
64e9bcb
64e9bcb
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-4
64e9bcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
64e9bcb
64e9bcb
* Tue May 01 2018 Jonathan Wakely <jwakely@redhat.com> - 5.0.0-3
64e9bcb
- Add BuildRequires: boost-python2-devel to fix build with boost-1.66.0-7.fc29
64e9bcb
64e9bcb
* Sun Mar 04 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 5.0.0-2
64e9bcb
- Added gcc-c++ dependency
64e9bcb
- Upstream patch for Boost compability
64e9bcb
64e9bcb
* Mon Feb 26 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 5.0.0-1
64e9bcb
- Update to 5.0.0
64e9bcb
- Use new upstream macro for abi compatibility
64e9bcb
- Rebuild for Boost 1.66
64e9bcb
64e9bcb
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.2-2
64e9bcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
64e9bcb
64e9bcb
* Mon Sep 11 2017 Simone Caronni <negativo17@gmail.com> - 4.0.2-1
64e9bcb
- Update to 4.0.2.
64e9bcb
64e9bcb
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-7
64e9bcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
64e9bcb
64e9bcb
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-6
64e9bcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
64e9bcb
64e9bcb
* Sun Jul 23 2017 Simone Caronni <negativo17@gmail.com> - 4.0.1-5
64e9bcb
- Rename python subpackage (module) to python2.
64e9bcb
64e9bcb
* Wed Jul 19 2017 Jonathan Wakely <jwakely@redhat.com> - 4.0.1-4
64e9bcb
- Rebuilt for s390x binutils bug
64e9bcb
64e9bcb
* Tue Jul 18 2017 Jonathan Wakely <jwakely@redhat.com> - 4.0.1-3
64e9bcb
- Rebuilt for Boost 1.64
64e9bcb
64e9bcb
* Sat May 06 2017 Simone Caronni <negativo17@gmail.com> - 4.0.1-2
64e9bcb
- Review fixes.
64e9bcb
64e9bcb
* Sat Apr 22 2017 Simone Caronni <negativo17@gmail.com> - 4.0.1-1
64e9bcb
- Update to 4.0.1.
64e9bcb
- Perform tests, build HTML documentation.
64e9bcb
- Require main OpenVDB library for Python module.
64e9bcb
64e9bcb
* Wed Nov 23 2016 Simone Caronni <negativo17@gmail.com> - 4.0.0-2
64e9bcb
- Update to 4.0.0.
64e9bcb
64e9bcb
* Sun Oct 16 2016 Simone Caronni <negativo17@gmail.com> - 4.0.0-1.20161015git40271e7
64e9bcb
- First build.