summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/openvdb/files')
-rw-r--r--media-gfx/openvdb/files/openvdb-3.2.0-build-fixes.patch33
-rw-r--r--media-gfx/openvdb/files/openvdb-3.2.0-makefile-fixes.patch93
-rw-r--r--media-gfx/openvdb/files/openvdb-3.2.0-numpy-fix.patch17
3 files changed, 143 insertions, 0 deletions
diff --git a/media-gfx/openvdb/files/openvdb-3.2.0-build-fixes.patch b/media-gfx/openvdb/files/openvdb-3.2.0-build-fixes.patch
new file mode 100644
index 000000000000..e919ec23fea4
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-3.2.0-build-fixes.patch
@@ -0,0 +1,33 @@
+diff -purN a/doxygen-config b/doxygen-config
+--- a/doxygen-config 2016-08-10 16:59:33.000000000 +0100
++++ b/doxygen-config 2016-10-12 12:19:06.124785164 +0100
+@@ -2257,7 +2257,7 @@ DIRECTORY_GRAPH = YES
+ # The default value is: png.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+
+-DOT_IMAGE_FORMAT = png
++DOT_IMAGE_FORMAT = svg
+
+ # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+ # enable generation of interactive SVG images that allow zooming and panning.
+diff -purN a/Makefile b/Makefile
+--- a/Makefile 2016-08-10 16:59:33.000000000 +0100
++++ b/Makefile 2016-10-12 12:18:32.434773635 +0100
+@@ -678,7 +678,7 @@ ALL_PRODUCTS := \
+ @echo "Building $@ because of $(call list_deps)"
+ $(CXX) -c $(CXXFLAGS) -fPIC -o $@ $<
+
+-all: lib python vdb_print vdb_render vdb_test depend
++all: lib python vdb_print vdb_render vdb_view vdb_test depend
+
+ $(OBJ_NAMES): %.o: %.cc
+ @echo "Building $@ because of $(call list_deps)"
+@@ -794,7 +794,7 @@ pydoc: $(PYTHON_MODULE) $(LIBOPENVDB_SON
+ echo "Created $${pydocdir}"; \
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(CURDIR); \
+ export PYTHONPATH=${PYTHONPATH}:$(CURDIR); \
+- $(EPYDOC) --html -o $${pydocdir} $(PYTHON_MODULE_NAME) $(QUIET)
++ $(EPYDOC) --html --html-dir $${pydocdir} $(PYTHON_MODULE_NAME) $(QUIET)
+ else
+ pydoc:
+ @echo "$@"': $$EPYDOC is undefined'
diff --git a/media-gfx/openvdb/files/openvdb-3.2.0-makefile-fixes.patch b/media-gfx/openvdb/files/openvdb-3.2.0-makefile-fixes.patch
new file mode 100644
index 000000000000..633c3808806d
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-3.2.0-makefile-fixes.patch
@@ -0,0 +1,93 @@
+diff --git a/Makefile b/Makefile
+index fba4fb6..0054f64 100644
+--- a/Makefile
++++ b/Makefile
+@@ -158,6 +158,9 @@ PYCONFIG_INCL_DIR := $(PYTHON_INCL_DIR)
+ # The directory containing libpython
+ PYTHON_LIB_DIR := $(HFS)/python/lib
+ PYTHON_LIB := -lpython$(PYTHON_VERSION)
++# The Directory to install the python module and includes to.
++PYTHON_INSTALL_INCL_DIR := $(DESTDIR)/python/include/python$(PYTHON_VERSION)
++PYTHON_INSTALL_LIB_DIR := $(DESTDIR)/python/lib/python$(PYTHON_VERSION)
+ # The directory containing libboost_python
+ BOOST_PYTHON_LIB_DIR := /rel/depot/third_party_build/boost/rhel6-1.46.1-0/lib
+ BOOST_PYTHON_LIB := -lboost_python-gcc41-mt-python26-1_46_1
+@@ -179,7 +182,6 @@ PYTHON_WRAP_ALL_GRID_TYPES := no
+ # (leave blank if Doxygen is unavailable)
+ DOXYGEN := doxygen
+
+-
+ #
+ # Ideally, users shouldn't need to change anything below this line.
+ #
+@@ -717,8 +719,13 @@ $(DOC_PDF): doxygen-config $(INCLUDE_NAMES) $(SRC_NAMES) $(DOC_FILES)
+ @echo "Generating documentation because of $(list_deps)"
+ echo -e 'OUTPUT_DIRECTORY=./doc\nGENERATE_LATEX=YES\nGENERATE_HTML=NO' \
+ | cat doxygen-config - | $(DOXYGEN) - $(QUIET) \
+- && cd ./doc/latex && make refman.pdf $(QUIET) \
++ && cd ./doc/latex && $(MAKE) refman.pdf $(QUIET) \
+ && echo 'Created doc/latex/refman.pdf'
++ @#
++ mkdir -p $(DESTDIR)/share/doc/openvdb/pdf; \
++ echo "Created $(DESTDIR)/share/doc/openvdb/pdf"; \
++ cp -r -f doc/latex/refman.pdf $(DESTDIR)/share/doc/openvdb/pdf/; \
++ echo "Copied documentation to $(DESTDIR)/share/doc/openvdb/pdf/"; \
+
+ ifneq (,$(strip $(DOXYGEN)))
+ doc: $(DOC_INDEX)
+@@ -782,6 +789,22 @@ $(PYTHON_MODULE): $(LIBOPENVDB) $(PYTHON_OBJ_NAMES)
+ -Wl,-rpath,$(BOOST_PYTHON_LIB_DIR) -L$(BOOST_PYTHON_LIB_DIR) $(BOOST_PYTHON_LIB) \
+ $(LIBOPENVDB_RPATH) -L$(CURDIR) $(LIBOPENVDB) \
+ $(LIBS_RPATH) $(CONCURRENT_MALLOC_LIB)
++ @echo "Installing the python module and includes"
++ @#
++ mkdir -p $(PYTHON_INSTALL_INCL_DIR); \
++ echo "Created $(PYTHON_INSTALL_INCL_DIR)"; \
++ cp -f $(PYTHON_PUBLIC_INCLUDE_NAMES) $(PYTHON_INSTALL_INCL_DIR)/; \
++ echo "Copied Python header files to $(PYTHON_INSTALL_INCL_DIR)"; \
++ mkdir -p $(PYTHON_INSTALL_LIB_DIR); \
++ echo "Created $(PYTHON_INSTALL_LIB_DIR)"; \
++ cp -f $(PYTHON_MODULE) $(PYTHON_INSTALL_LIB_DIR)/; \
++ pushd $(PYTHON_INSTALL_LIB_DIR) > /dev/null; \
++ ln -f -s $(PYTHON_MODULE) $(PYTHON_SONAME); \
++ popd > /dev/null; \
++ echo "Copied Python module to $(PYTHON_INSTALL_LIB_DIR)"
++ @echo "Clean the Python modules so the next one will compile"
++ @#
++ $(RM) $(PYTHON_OBJ_NAMES)
+
+ ifeq (yes,$(has_python))
+ ifneq (,$(strip $(EPYDOC)))
+@@ -833,7 +856,7 @@ test:
+ @echo "$@"': $$(CPPUNIT_INCL_DIR) is undefined'
+ endif
+
+-install: lib python vdb_print vdb_render vdb_view doc pydoc
++install: lib vdb_print vdb_render vdb_view doc pydoc
+ mkdir -p $(DESTDIR)/include/openvdb
+ @echo "Created $(DESTDIR)/include/openvdb"
+ pushd $(DESTDIR)/include/openvdb > /dev/null; \
+@@ -870,23 +893,6 @@ install: lib python vdb_print vdb_render vdb_view doc pydoc
+ echo "Copied libopenvdb_viewer to $(DESTDIR)/lib/"; \
+ fi
+ @#
+- if [ -f $(PYTHON_MODULE) ]; \
+- then \
+- installdir=$(DESTDIR)/python/include/python$(PYTHON_VERSION); \
+- mkdir -p $${installdir}; \
+- echo "Created $${installdir}"; \
+- cp -f $(PYTHON_PUBLIC_INCLUDE_NAMES) $${installdir}/; \
+- echo "Copied Python header files to $${installdir}"; \
+- installdir=$(DESTDIR)/python/lib/python$(PYTHON_VERSION); \
+- mkdir -p $${installdir}; \
+- echo "Created $${installdir}"; \
+- cp -f $(PYTHON_MODULE) $${installdir}/; \
+- pushd $${installdir} > /dev/null; \
+- ln -f -s $(PYTHON_MODULE) $(PYTHON_SONAME); \
+- popd > /dev/null; \
+- echo "Copied Python module to $${installdir}"; \
+- fi
+- @#
+ mkdir -p $(DESTDIR)/bin
+ @echo "Created $(DESTDIR)/bin/"
+ cp -f vdb_print $(DESTDIR)/bin
diff --git a/media-gfx/openvdb/files/openvdb-3.2.0-numpy-fix.patch b/media-gfx/openvdb/files/openvdb-3.2.0-numpy-fix.patch
new file mode 100644
index 000000000000..bef10240477c
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-3.2.0-numpy-fix.patch
@@ -0,0 +1,17 @@
+diff --git a/python/pyOpenVDBModule.cc b/openvdb/python/pyOpenVDBModule.cc
+index 508c787..dd069e0 100644
+--- a/python/pyOpenVDBModule.cc
++++ b/python/pyOpenVDBModule.cc
+@@ -592,8 +592,12 @@ BOOST_PYTHON_MODULE(PY_OPENVDB_MODULE_NAME)
+
+ #ifdef PY_OPENVDB_USE_NUMPY
+ // Initialize NumPy.
++#if PY_MAJOR_VERSION >= 3
++ if (_import_array()) { };
++#else
+ import_array();
+ #endif
++#endif
+
+ using namespace openvdb::OPENVDB_VERSION_NAME;
+