fde0919
%global python_version %(%{__python3} -c "import sys ; print(sys.version[:3])")
543410d
%{!?python3_sitearch: %global python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
fde0919
fde0919
# Set to 1 to enable testsuite. Fails everywhere with GCC 8+.
fde0919
%global with_tests 0
e78e645
e78e645
Name:           openvdb
45052a3
Version:        6.0.0
45052a3
Release:        1%{?dist}
e78e645
Summary:        C++ library for sparse volumetric data discretized on three-dimensional grids
e78e645
License:        MPLv2.0
e78e645
URL:            http://www.openvdb.org/
e78e645
45052a3
Source0:        https://github.com/AcademySoftwareFoundation/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
e78e645
e78e645
BuildRequires:  blosc-devel >= 1.5.0
e78e645
BuildRequires:  boost-devel >= 1.57.0
fde0919
BuildRequires:  boost-python3-devel
e78e645
BuildRequires:  cmake >= 2.8
e78e645
BuildRequires:  cppunit-devel >= 1.10
e78e645
BuildRequires:  doxygen >= 1.8.11
e78e645
BuildRequires:  epydoc
071a4ff
BuildRequires:	gcc-c++
e78e645
BuildRequires:  ghostscript >= 8.70
e78e645
BuildRequires:  glfw-devel >= 2.7
e78e645
BuildRequires:  ilmbase-devel
c601478
BuildRequires:	jemalloc-devel
e78e645
BuildRequires:  libXi-devel
e78e645
BuildRequires:  log4cplus-devel >= 1.0
e78e645
BuildRequires:  OpenEXR-devel
fde0919
BuildRequires:  python3-numpy
fde0919
BuildRequires:  python3-devel
e78e645
BuildRequires:  tbb-devel >= 3.0
e78e645
BuildRequires:  zlib-devel
e78e645
c601478
# Borrowed from Arch linux
c601478
Patch:		boost-1.67.patch
c601478
c601478
e78e645
%description
e78e645
OpenVDB is an Academy Award-winning open-source C++ library comprising a novel
e78e645
hierarchical data structure and a suite of tools for the efficient storage and
e78e645
manipulation of sparse volumetric data discretized on three-dimensional grids.
45052a3
It is developed and maintained by Academy Software Foundation for use in volumetric
e78e645
applications typically encountered in feature film production.
e78e645
e78e645
This package contains some graphical tools.
e78e645
e78e645
%package        libs
e78e645
Summary:        Core OpenVDB libraries
e78e645
e78e645
%description    libs
e78e645
OpenVDB is an Academy Award-winning open-source C++ library comprising a novel
e78e645
hierarchical data structure and a suite of tools for the efficient storage and
e78e645
manipulation of sparse volumetric data discretized on three-dimensional grids.
e78e645
It is developed and maintained by DreamWorks Animation for use in volumetric
e78e645
applications typically encountered in feature film production.
e78e645
e78e645
%package        devel
e78e645
Summary:        Development files for %{name}
3d699f4
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
e78e645
e78e645
%description    devel
e78e645
The %{name}-devel package contains libraries and header files for developing
e78e645
applications that use %{name}.
e78e645
fde0919
%package        python3
e78e645
Summary:        OpenVDB Python module
3d699f4
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
fde0919
Obsoletes:      %{name}-python2 < 5.1.0-1
fde0919
Provides:       %{name}-python2 = %{version}-%{release}
e78e645
fde0919
%description    python3
e78e645
OpenVDB is an Academy Award-winning open-source C++ library comprising a novel
e78e645
hierarchical data structure and a suite of tools for the efficient storage and
e78e645
manipulation of sparse volumetric data discretized on three-dimensional grids.
e78e645
It is developed and maintained by DreamWorks Animation for use in volumetric
e78e645
applications typically encountered in feature film production.
e78e645
e78e645
This package contains the Python module.
e78e645
a1261af
%package        doc
a1261af
Summary:        Documentation for %{name}
a1261af
BuildArch:      noarch
a1261af
a1261af
%description    doc
a1261af
The %{name}-doc package contains documentation for developing applications that
a1261af
use %{name}.
a1261af
e78e645
%prep
071a4ff
%autosetup -p1
e78e645
a1261af
iconv -f iso8859-1 -t utf-8 %{name}/CHANGES > %{name}/CHANGES.conv && \
a1261af
    mv -f %{name}/CHANGES.conv %{name}/CHANGES
a1261af
543410d
# Hardcoded values for Python module
543410d
sed -i \
543410d
    -e 's|lib$|%{_lib}|g' -e 's|lib/python|%{_lib}/python|g' \
0d47522
    %{name}/CMakeLists.txt %{name}/python/CMakeLists.txt
e78e645
e78e645
# Save Makefile that contains doc building instructions, new cmake build system
e78e645
# does not build docs yet
e78e645
cp %{name}/Makefile %{name}/Makefile.docbuild
e78e645
e78e645
%build
a1261af
export CXXFLAGS="%{optflags} -Wl,--as-needed"
e78e645
%cmake \
e78e645
    -DBLOSC_LOCATION=%{_prefix} \
c601478
    -DCMAKE_EXE_LINKER_FLAGS="%{optflags} -fPIE" \
e78e645
    -DCPPUNIT_LOCATION=%{_prefix} \
e78e645
    -DGLEW_LOCATION=%{_prefix} \
e78e645
    -DGLFW3_LOCATION=%{_prefix} \
e78e645
    -DILMBASE_NAMESPACE_VERSIONING=OFF \
e78e645
    -DILMBASE_LOCATION=%{_prefix} \
e78e645
    -DOPENEXR_LOCATION=%{_prefix} \
e78e645
    -DOPENEXR_NAMESPACE_VERSIONING=OFF \
e78e645
    -DOPENVDB_ENABLE_RPATH=OFF \
071a4ff
    -DOPENVDB_ABI_VERSION_NUMBER=3  \
c601478
    -DOPENVDB_BUILD_UNITTESTS=OFF \
e78e645
    -DPYTHON_VERSION=%{python_version} \
c601478
    -DPY_OPENVDB_USE_NUMPY=True \
e78e645
    -DTBB_LOCATION=%{_prefix} \
e78e645
    -DUSE_GLFW3=True
e78e645
e78e645
%make_build
e78e645
e78e645
# Build docs with previously saved Makefile
e78e645
pushd %{name}
e78e645
make -f Makefile.docbuild doc
e78e645
popd
e78e645
fde0919
%if 0%{?with_tests}
fde0919
%ifarch x86_64
fde0919
%check
fde0919
%make test
fde0919
%endif
fde0919
%endif
e78e645
e78e645
%install
e78e645
%make_install
e78e645
e78e645
# Remove CMakeFiles from includes
a1261af
rm -fr %{buildroot}/%{_includedir}/%{name}/CMakeFiles
e78e645
e78e645
# Let RPM pick up HTML documents in the files section
e78e645
rm -fr %{buildroot}/%{_datadir}/doc
e78e645
e78e645
find %{buildroot} -name '*.a' -delete
e78e645
c601478
#%%ldconfig_scriptlets libs
e78e645
e78e645
%files
e78e645
%{_bindir}/vdb_view
e78e645
%{_bindir}/vdb_print
e78e645
%{_bindir}/vdb_render
e78e645
e78e645
%files libs
e78e645
%license %{name}/LICENSE %{name}/COPYRIGHT
e78e645
%doc README.md %{name}/CHANGES
e78e645
%{_libdir}/*.so.*
e78e645
fde0919
%files python3
e78e645
%{_libdir}/python%{python_version}/py%{name}.so
e78e645
e78e645
%files devel
e78e645
%{_includedir}/*
e78e645
%{_libdir}/*.so
e78e645
a1261af
%files doc
a1261af
%doc %{name}/doc/html
a1261af
e78e645
%changelog
45052a3
* Sat Feb 16 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 6.0.0-1
45052a3
- Update to 6.0.0
45052a3
- Update source url and description
c601478
- Apply patch for boost 1.6.9 borrowed from Arch Linux
45052a3
2771e79
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-5
2771e79
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2771e79
0ec7ee7
* Sat Oct 13 2018 Jerry James <loganjerry@gmail.com> - 5.1.0-4
0ec7ee7
- Rebuild for tbb 2019_U1
0ec7ee7
3d699f4
* Tue Jul 17 2018 Simone Caronni <negativo17@gmail.com> - 5.1.0-3
3d699f4
- Require libs subpackage for python3/devel.
3d699f4
543410d
* Tue Jul 17 2018 Simone Caronni <negativo17@gmail.com> - 5.1.0-2
543410d
- Fix Python 3 Boost link.
543410d
fde0919
* Tue Jul 17 2018 Simone Caronni <negativo17@gmail.com> - 5.1.0-1
fde0919
- Update to 5.1.0.
fde0919
- Switch to Python 3.
fde0919
fbd2adc
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-4
fbd2adc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
fbd2adc
67b40ac
* Tue May 01 2018 Jonathan Wakely <jwakely@redhat.com> - 5.0.0-3
67b40ac
- Add BuildRequires: boost-python2-devel to fix build with boost-1.66.0-7.fc29
67b40ac
071a4ff
* Sun Mar 04 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 5.0.0-2
071a4ff
- Added gcc-c++ dependency
071a4ff
- Upstream patch for Boost compability
071a4ff
2dab0d7
* Mon Feb 26 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 5.0.0-1
2dab0d7
- Update to 5.0.0
071a4ff
- Use new upstream macro for abi compatibility
071a4ff
- Rebuild for Boost 1.66
411c91d
19e86b0
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.2-2
19e86b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
19e86b0
0d47522
* Mon Sep 11 2017 Simone Caronni <negativo17@gmail.com> - 4.0.2-1
0d47522
- Update to 4.0.2.
0d47522
220cb9d
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-7
220cb9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
220cb9d
b460c3c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-6
b460c3c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b460c3c
4078160
* Sun Jul 23 2017 Simone Caronni <negativo17@gmail.com> - 4.0.1-5
4078160
- Rename python subpackage (module) to python2.
4078160
d218576
* Wed Jul 19 2017 Jonathan Wakely <jwakely@redhat.com> - 4.0.1-4
d218576
- Rebuilt for s390x binutils bug
d218576
8b308a5
* Tue Jul 18 2017 Jonathan Wakely <jwakely@redhat.com> - 4.0.1-3
8b308a5
- Rebuilt for Boost 1.64
8b308a5
a1261af
* Sat May 06 2017 Simone Caronni <negativo17@gmail.com> - 4.0.1-2
a1261af
- Review fixes.
a1261af
e78e645
* Sat Apr 22 2017 Simone Caronni <negativo17@gmail.com> - 4.0.1-1
e78e645
- Update to 4.0.1.
e78e645
- Perform tests, build HTML documentation.
e78e645
- Require main OpenVDB library for Python module.
e78e645
e78e645
* Wed Nov 23 2016 Simone Caronni <negativo17@gmail.com> - 4.0.0-2
e78e645
- Update to 4.0.0.
e78e645
e78e645
* Sun Oct 16 2016 Simone Caronni <negativo17@gmail.com> - 4.0.0-1.20161015git40271e7
e78e645
- First build.