Import from master
This commit is contained in:
parent
3d273b548f
commit
64e9bcbf1e
9
.gitignore
vendored
9
.gitignore
vendored
@ -0,0 +1,9 @@
|
||||
/openvdb-4.0.1.tar.gz
|
||||
/openvdb-4.0.2.tar.gz
|
||||
/openvdb-5.0.0.tar.gz
|
||||
/fix-compatibility-boost.patch
|
||||
/openvdb-5.1.0.tar.gz
|
||||
/openvdb-5.2.0.tar.gz
|
||||
/openvdb-6.0.0.tar.gz
|
||||
/boost-1.67.patch
|
||||
/openvdb-6.1.0.tar.gz
|
62
openvdb-python3.patch
Normal file
62
openvdb-python3.patch
Normal file
@ -0,0 +1,62 @@
|
||||
From 8f12e3c2e0232456eff06642e1620a9538811f29 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
|
||||
Date: Sat, 11 May 2019 14:27:50 +0100
|
||||
Subject: [PATCH] Fixes for Python3 and loading the python module on MacOS
|
||||
|
||||
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
|
||||
---
|
||||
openvdb/python/CMakeLists.txt | 9 ++++++++-
|
||||
openvdb/python/pyOpenVDBModule.cc | 9 ++++++++-
|
||||
2 files changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/openvdb/python/CMakeLists.txt b/openvdb/python/CMakeLists.txt
|
||||
index c1e7a2b2..b255483a 100644
|
||||
--- a/openvdb/python/CMakeLists.txt
|
||||
+++ b/openvdb/python/CMakeLists.txt
|
||||
@@ -182,9 +182,16 @@ target_link_libraries(pyopenvdb
|
||||
)
|
||||
|
||||
set_target_properties(pyopenvdb PROPERTIES
|
||||
- PREFIX ""
|
||||
+ PREFIX "" # no 'lib' prefix
|
||||
)
|
||||
|
||||
+if(UNIX)
|
||||
+ # must be .so (not .dylib)
|
||||
+ set_target_properties(pyopenvdb PROPERTIES
|
||||
+ SUFFIX ".so"
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
if(OPENVDB_ENABLE_RPATH)
|
||||
# @todo There is probably a better way to do this for imported targets
|
||||
set(RPATHS "")
|
||||
diff --git a/openvdb/python/pyOpenVDBModule.cc b/openvdb/python/pyOpenVDBModule.cc
|
||||
index b41095bb..5f423176 100644
|
||||
--- a/openvdb/python/pyOpenVDBModule.cc
|
||||
+++ b/openvdb/python/pyOpenVDBModule.cc
|
||||
@@ -320,7 +320,11 @@ struct PointIndexConverter
|
||||
/// @return nullptr if the given Python object is not convertible to the PointIndex.
|
||||
static void* convertible(PyObject* obj)
|
||||
{
|
||||
+#if PY_MAJOR_VERSION >= 3
|
||||
+ if (!PyLong_Check(obj)) return nullptr; // not a Python integer
|
||||
+#else
|
||||
if (!PyInt_Check(obj)) return nullptr; // not a Python integer
|
||||
+#endif
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -336,8 +340,11 @@ struct PointIndexConverter
|
||||
|
||||
// Extract the PointIndex from the python integer
|
||||
PointIndexT* index = static_cast<PointIndexT*>(storage);
|
||||
-
|
||||
+#if PY_MAJOR_VERSION >= 3
|
||||
+ *index = static_cast<IntType>(PyLong_AsLong(obj));
|
||||
+#else
|
||||
*index = static_cast<IntType>(PyInt_AsLong(obj));
|
||||
+#endif
|
||||
}
|
||||
|
||||
/// Register both the PointIndex-to-integer and the integer-to-PointIndex converters.
|
225
openvdb.spec
Normal file
225
openvdb.spec
Normal file
@ -0,0 +1,225 @@
|
||||
%global python_version %(%{__python3} -c "import sys ; print(sys.version[:3])")
|
||||
%{!?python3_sitearch: %global python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
|
||||
# Set to 1 to enable testsuite. Fails everywhere with GCC 8+.
|
||||
%global with_tests 0
|
||||
|
||||
Name: openvdb
|
||||
Version: 6.1.0
|
||||
Release: 2%{?dist}
|
||||
Summary: C++ library for sparse volumetric data discretized on three-dimensional grids
|
||||
License: MPLv2.0
|
||||
URL: http://www.openvdb.org/
|
||||
|
||||
Source0: https://github.com/AcademySoftwareFoundation/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch1: https://patch-diff.githubusercontent.com/raw/AcademySoftwareFoundation/openvdb/pull/428.patch#/%{name}-python3.patch
|
||||
|
||||
BuildRequires: blosc-devel >= 1.5.0
|
||||
BuildRequires: boost-devel >= 1.61
|
||||
BuildRequires: boost-python3-devel
|
||||
BuildRequires: cmake >= 2.8
|
||||
BuildRequires: cppunit-devel >= 1.10
|
||||
BuildRequires: doxygen >= 1.8.11
|
||||
BuildRequires: epydoc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: ghostscript >= 8.70
|
||||
BuildRequires: glfw-devel >= 2.7
|
||||
BuildRequires: ilmbase-devel
|
||||
BuildRequires: jemalloc-devel
|
||||
BuildRequires: libstdc++-devel
|
||||
BuildRequires: libXi-devel
|
||||
BuildRequires: log4cplus-devel >= 1.0
|
||||
BuildRequires: OpenEXR-devel >= 2.2
|
||||
BuildRequires: python3-numpy
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: tbb-devel >= 3.0
|
||||
BuildRequires: zlib-devel > 1.2.7
|
||||
|
||||
%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 Academy Software Foundation for use in
|
||||
volumetric applications typically encountered in feature film production.
|
||||
|
||||
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.
|
||||
It is developed and maintained by Academy Software Foundation for use in
|
||||
volumetric applications typically encountered in feature film production.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: %{name}-doc < 6.1.0-1
|
||||
Provides: %{name}-doc = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for developing
|
||||
applications that use %{name}.
|
||||
|
||||
%package python3
|
||||
Summary: OpenVDB Python module
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: %{name}-python2 < 5.1.0-1
|
||||
Provides: %{name}-python2 = %{version}-%{release}
|
||||
|
||||
%description python3
|
||||
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 Academy Software Foundation for use in
|
||||
volumetric applications typically encountered in feature film production.
|
||||
|
||||
This package contains the Python module.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
# Hardcoded values
|
||||
sed -i \
|
||||
-e 's|lib$|%{_lib}|g' \
|
||||
-e 's|lib/python|%{_lib}/python|g' \
|
||||
%{name}/CMakeLists.txt %{name}/python/CMakeLists.txt
|
||||
|
||||
mkdir build
|
||||
|
||||
%build
|
||||
pushd build
|
||||
export CXXFLAGS="%{optflags} -Wl,--as-needed"
|
||||
# Ignore versions (python 3, etc.)
|
||||
%cmake \
|
||||
-DCMAKE_NO_SYSTEM_FROM_IMPORTED=TRUE \
|
||||
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \
|
||||
-DOPENVDB_BUILD_DOCS=ON \
|
||||
-DOPENVDB_BUILD_UNITTESTS=OFF \
|
||||
-DOPENVDB_ENABLE_RPATH=OFF \
|
||||
-DOPENVDB_INSTALL_CMAKE_MODULES=OFF \
|
||||
..
|
||||
%make_build
|
||||
popd
|
||||
|
||||
%if 0%{?with_tests}
|
||||
%check
|
||||
%make test
|
||||
%endif
|
||||
|
||||
%install
|
||||
pushd build
|
||||
%make_install
|
||||
popd
|
||||
|
||||
# Let RPM pick up HTML documents in the files section
|
||||
mv %{buildroot}/%{_prefix}/docs/html .
|
||||
rm -fr %{buildroot}/%{_datadir}/doc
|
||||
|
||||
find %{buildroot} -name '*.a' -delete
|
||||
|
||||
%files
|
||||
%{_bindir}/vdb_print
|
||||
|
||||
%files libs
|
||||
%license %{name}/LICENSE %{name}/COPYRIGHT
|
||||
%doc README.md %{name}/CHANGES
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files python3
|
||||
%{_libdir}/python%{python_version}/py%{name}.so
|
||||
|
||||
%files devel
|
||||
%doc html
|
||||
%{_includedir}/*
|
||||
%{_libdir}/*.so
|
||||
|
||||
%changelog
|
||||
* Sun Aug 18 2019 Simone Caronni <negativo17@gmail.com> - 6.1.0-2
|
||||
- Fix build with latest options.
|
||||
- Update SPEC file.
|
||||
- rpmlint fixes.
|
||||
|
||||
* Thu Aug 01 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 6.1.0-1
|
||||
- Update to 6.1.0
|
||||
- Fix cmake build
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Apr 12 2019 Richard Shaw <hobbes1069@gmail.com> - 6.0.0-2
|
||||
- Rebuild for Ilmbase 2.3.0.
|
||||
|
||||
* Sat Feb 16 2019 Luya Tshimbalanga <luya@fedoraproject.org> - 6.0.0-1
|
||||
- Update to 6.0.0
|
||||
- Update source url and description
|
||||
- Apply patch for boost 1.6.9 borrowed from Arch Linux
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sat Oct 13 2018 Jerry James <loganjerry@gmail.com> - 5.1.0-4
|
||||
- Rebuild for tbb 2019_U1
|
||||
|
||||
* Tue Jul 17 2018 Simone Caronni <negativo17@gmail.com> - 5.1.0-3
|
||||
- Require libs subpackage for python3/devel.
|
||||
|
||||
* Tue Jul 17 2018 Simone Caronni <negativo17@gmail.com> - 5.1.0-2
|
||||
- Fix Python 3 Boost link.
|
||||
|
||||
* Tue Jul 17 2018 Simone Caronni <negativo17@gmail.com> - 5.1.0-1
|
||||
- Update to 5.1.0.
|
||||
- Switch to Python 3.
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue May 01 2018 Jonathan Wakely <jwakely@redhat.com> - 5.0.0-3
|
||||
- Add BuildRequires: boost-python2-devel to fix build with boost-1.66.0-7.fc29
|
||||
|
||||
* Sun Mar 04 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 5.0.0-2
|
||||
- Added gcc-c++ dependency
|
||||
- Upstream patch for Boost compability
|
||||
|
||||
* Mon Feb 26 2018 Luya Tshimbalanga <luya@fedoraproject.org> - 5.0.0-1
|
||||
- Update to 5.0.0
|
||||
- Use new upstream macro for abi compatibility
|
||||
- Rebuild for Boost 1.66
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Mon Sep 11 2017 Simone Caronni <negativo17@gmail.com> - 4.0.2-1
|
||||
- Update to 4.0.2.
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sun Jul 23 2017 Simone Caronni <negativo17@gmail.com> - 4.0.1-5
|
||||
- Rename python subpackage (module) to python2.
|
||||
|
||||
* Wed Jul 19 2017 Jonathan Wakely <jwakely@redhat.com> - 4.0.1-4
|
||||
- Rebuilt for s390x binutils bug
|
||||
|
||||
* Tue Jul 18 2017 Jonathan Wakely <jwakely@redhat.com> - 4.0.1-3
|
||||
- Rebuilt for Boost 1.64
|
||||
|
||||
* Sat May 06 2017 Simone Caronni <negativo17@gmail.com> - 4.0.1-2
|
||||
- Review fixes.
|
||||
|
||||
* Sat Apr 22 2017 Simone Caronni <negativo17@gmail.com> - 4.0.1-1
|
||||
- Update to 4.0.1.
|
||||
- Perform tests, build HTML documentation.
|
||||
- Require main OpenVDB library for Python module.
|
||||
|
||||
* Wed Nov 23 2016 Simone Caronni <negativo17@gmail.com> - 4.0.0-2
|
||||
- Update to 4.0.0.
|
||||
|
||||
* Sun Oct 16 2016 Simone Caronni <negativo17@gmail.com> - 4.0.0-1.20161015git40271e7
|
||||
- First build.
|
Loading…
Reference in New Issue
Block a user