[vtk6] 03/07: Add rules for buildin/not building documentation
Gert Wollny
gert-guest at moszumanska.debian.org
Sat May 28 11:41:10 UTC 2016
This is an automated email from the git hooks/post-receive script.
gert-guest pushed a commit to branch master
in repository vtk6.
commit cf26bd0f8fa0a713c3ac9107eab6a1771e4881be
Author: Gert Wollny <gw.fossdev at gmail.com>
Date: Fri May 27 17:37:41 2016 +0000
Add rules for buildin/not building documentation
---
...06_install_doxygen_scripts_in_nodoc_build.patch | 146 +++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 12 +-
3 files changed, 158 insertions(+), 1 deletion(-)
diff --git a/debian/patches/106_install_doxygen_scripts_in_nodoc_build.patch b/debian/patches/106_install_doxygen_scripts_in_nodoc_build.patch
new file mode 100644
index 0000000..31e73a3
--- /dev/null
+++ b/debian/patches/106_install_doxygen_scripts_in_nodoc_build.patch
@@ -0,0 +1,146 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -546,9 +546,7 @@
+
+ # The doxygen documentation needs to be aware of all modules.
+ option(BUILD_DOCUMENTATION "Build the VTK documentation" OFF)
+-if(BUILD_DOCUMENTATION)
+- add_subdirectory(Utilities/Doxygen)
+-endif()
++add_subdirectory(Utilities/Doxygen)
+
+ # If python wrapping and testing is enabled then add driver scripts to run
+ # tests. Note: Many pythong tests used to be automatically converted from TCL
+--- a/Utilities/Doxygen/CMakeLists.txt
++++ b/Utilities/Doxygen/CMakeLists.txt
+@@ -1,69 +1,72 @@
+ #
+ # Build the documentation
+ #
+-find_package(Doxygen REQUIRED)
+-find_package(Perl REQUIRED)
+-find_package(HTMLHelp)
+-
+-option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF)
+-option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF)
+-option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON)
+-mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP)
+-if(DOXYGEN_SHORT_NAMES)
+- set(DOXYGEN_SHORT_NAMES YES)
+-else()
+- set(DOXYGEN_SHORT_NAMES NO)
+-endif()
+-if(DOXYGEN_GENERATE_HTMLHELP)
+- set(DOXYGEN_GENERATE_HTMLHELP YES)
+-else()
+- set(DOXYGEN_GENERATE_HTMLHELP NO)
+-endif()
+-
+-#
+-# Configure the script and the doxyfile, then add target
+-#
+-set(HAVE_DOT_YESNO NO)
+-if(DOT)
+- set(HAVE_DOT_YESNO YES)
+- if(NOT DOT_PATH)
+- get_filename_component(DOT_PATH ${DOT} PATH)
++if (BUILDDOC_DOCUMENTATION)
++ find_package(Doxygen REQUIRED)
++ find_package(Perl REQUIRED)
++ find_package(HTMLHelp)
++
++ option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF)
++ option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF)
++ option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON)
++ mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP)
++ if(DOXYGEN_SHORT_NAMES)
++ set(DOXYGEN_SHORT_NAMES YES)
++ else()
++ set(DOXYGEN_SHORT_NAMES NO)
+ endif()
+-endif()
+-
+-# Build up a list of all module source directories. Note that this should be
+-# all source directories and so does not use the normal variables.
+-unset(VTK_MODULE_DIRS_DOXYGEN)
+-file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake")
+-foreach(module ${src})
+- get_filename_component(module_BASE ${module} PATH)
+- if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third")
+- # Skip the utilities and third parties directories.
++ if(DOXYGEN_GENERATE_HTMLHELP)
++ set(DOXYGEN_GENERATE_HTMLHELP YES)
+ else()
+- # Use both the source and binary directories, this ensures that
+- # generated files will be included, but they may then be architecture,
+- # build configuration and/or compiler specific. All source directories
+- # are included whether the module is enabled or not.
+- set(VTK_MODULE_DIRS_DOXYGEN
+- "${VTK_MODULE_DIRS_DOXYGEN}
++ set(DOXYGEN_GENERATE_HTMLHELP NO)
++ endif()
++
++ #
++ # Configure the script and the doxyfile, then add target
++ #
++ set(HAVE_DOT_YESNO NO)
++ if(DOT)
++ set(HAVE_DOT_YESNO YES)
++ if(NOT DOT_PATH)
++ get_filename_component(DOT_PATH ${DOT} PATH)
++ endif()
++ endif()
++
++ # Build up a list of all module source directories. Note that this should be
++ # all source directories and so does not use the normal variables.
++ unset(VTK_MODULE_DIRS_DOXYGEN)
++ file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake")
++ foreach(module ${src})
++ get_filename_component(module_BASE ${module} PATH)
++ if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third")
++ # Skip the utilities and third parties directories.
++ else()
++ # Use both the source and binary directories, this ensures that
++ # generated files will be included, but they may then be architecture,
++ # build configuration and/or compiler specific. All source directories
++ # are included whether the module is enabled or not.
++ set(VTK_MODULE_DIRS_DOXYGEN
++ "${VTK_MODULE_DIRS_DOXYGEN}
+ \"${VTK_SOURCE_DIR}/${module_BASE}\"
+ \"${VTK_BINARY_DIR}/${module_BASE}\"")
+- endif()
+-endforeach()
++ endif()
++ endforeach()
++
++ configure_file(
++ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in
++ ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile)
++
++ configure_file(
++ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in
++ ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake
++ @ONLY)
++
++ add_custom_target(DoxygenDoc
++ ${CMAKE_COMMAND}
++ -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake
++ DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake)
+
+-configure_file(
+- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in
+- ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile)
+-
+-configure_file(
+- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in
+- ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake
+- @ONLY)
+-
+-add_custom_target(DoxygenDoc
+- ${CMAKE_COMMAND}
+- -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake
+- DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake)
++endif()
+
+ if(NOT VTK_INSTALL_NO_DOCUMENTATION)
+ macro(__vtk_install_documentation_files glob)
diff --git a/debian/patches/series b/debian/patches/series
index 5d6041f..98abdea 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@
102_enable_system_proj4_lib.patch
104_fix_gcc_version_6.patch
105_unforce_embedded_glew.patch
+106_install_doxygen_scripts_in_nodoc_build.patch
diff --git a/debian/rules b/debian/rules
index 39636e5..cc9d6c3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,13 @@
#!/usr/bin/make -f
BUILDDIR = $(CURDIR)/debian/build
+# deduce documentation option (build-indep target)
+ifeq "" "$(filter %-doc,$(shell dh_listpackages))"
+ BUILDDOC = OFF
+else
+ BUILDDOC = ON
+endif
+
# export JAVA_HOME to help FindJava.cmake and FindJNI.cmake
export JAVA_HOME=/usr/lib/jvm/default-java
@@ -11,7 +18,7 @@ extra_flags += \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
- -DBUILD_DOCUMENTATION=ON \
+ -DBUILD_DOCUMENTATION=$(BUILDDOC) \
-DBUILD_EXAMPLES=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
@@ -72,6 +79,9 @@ override_dh_auto_build-indep:
# remove .md5 files
find $(BUILDDIR)/Utilities/Doxygen/doc/html/ -name "*.md5" | xargs rm -f
+override_dh_auto_build-arch:
+ dh_auto_build
+
override_dh_auto_install:
pwd
dh_auto_install -X.pyc -X.pyo
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/vtk6.git
More information about the debian-science-commits
mailing list