[med-svn] [mia] 01/02: separate doc build and switch to automatic debug symbols

Gert Wollny gert-guest at moszumanska.debian.org
Mon May 30 13:26:41 UTC 2016


This is an automated email from the git hooks/post-receive script.

gert-guest pushed a commit to branch master
in repository mia.

commit 9816ab6d68b675283ce175d95337d5044f552777
Author: Gert Wollny <gw.fossdev at gmail.com>
Date:   Mon May 30 10:07:06 2016 +0000

    separate doc build and switch to automatic debug symbols
---
 debian/control                           | 41 ++++---------------------
 debian/patches/04_add_userdoc_flag.patch | 51 ++++++++++++++++++++++++++++++++
 debian/patches/series                    |  1 +
 debian/rules                             | 25 +++++++++++-----
 debian/run_strip                         |  3 +-
 5 files changed, 76 insertions(+), 45 deletions(-)

diff --git a/debian/control b/debian/control
index 6efb0ab..72b612f 100644
--- a/debian/control
+++ b/debian/control
@@ -5,10 +5,6 @@ Section: science
 Priority: optional
 Build-Depends: cmake,
                debhelper (>= 9.0.0),
-               docbook-xsl,
-               doxygen,
-               doxygen-latex,
-               graphviz,
                libblas-dev,
                libboost-filesystem-dev,
                libboost-regex-dev,
@@ -32,7 +28,12 @@ Build-Depends: cmake,
                libvtk6-dev,
                libvistaio-dev,
                libxml++2.6-dev,
-               python-lxml,
+               python-lxml
+Build-Depends-Indep: 
+               docbook-xsl,
+               doxygen,
+               doxygen-latex,
+               graphviz,
                xsltproc
 Standards-Version: 3.9.8
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/mia.git
@@ -91,22 +92,6 @@ Description: library for 2D and 3D gray scale image processing, documentation
  algorithms, that can be specialized by specifying the apropriate plug-ins. 
  This package provides the Doxygen generated API reference. 
 
-Package: libmia-2.2-4-dbg
-Architecture: any
-Section: debug
-Priority: extra
-Depends: libmia-2.2-4 (= ${binary:Version}),
-         ${misc:Depends}
-Conflicts: libmia-2.2-0-dbg
-Replaces: libmia-2.2-0-dbg
-Description: Debug information for the MIA library 
- libmia comprises a set of libraries and plug.ins for general purpose 
- 2D and 3D gray scale image processing and basic handling of triangular 
- meshes. The libraries provide a basic infrastructure and  generic 
- algorithms, that can be specialized by specifying the apropriate plug-ins. 
- libmia is library for general purpouse 2D and 3D gray scale image processing. 
- This package provides the debug information of the library. 
-
 Package: mia-tools
 Architecture: any
 Depends: libmia-2.2-4 (= ${binary:Version}),
@@ -137,17 +122,3 @@ Description: Cross-referenced documentation of the MIA command line tools
  processing algorithms are image filtering, combining, image registration, 
  motion compensation for image series, and the estimation of various 
  statistics over images. 
-
-Package: mia-tools-dbg
-Architecture: any
-Section: debug
-Priority: extra
-Depends: mia-tools (= ${binary:Version}),
-         ${misc:Depends}
-Description: Debugging information for the MIA command line tools
- Debug information for the MIA command lines tools. These tools provide the 
- means to run general purpose image processing tasks on 2D and 3D gray scale 
- images, and basic operations on triangular meshes from the command line. 
- Supported image processing algorithms are image filtering, combining, image 
- registration, motion compensation for image series, and the estimation of 
- various statistics over images. 
diff --git a/debian/patches/04_add_userdoc_flag.patch b/debian/patches/04_add_userdoc_flag.patch
new file mode 100644
index 0000000..4ac0b7d
--- /dev/null
+++ b/debian/patches/04_add_userdoc_flag.patch
@@ -0,0 +1,51 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -78,6 +78,7 @@
+ OPTION(ALWAYS_CREATE_DOC "Create all documentation during the normal build process (normally you need to run 'make doc')" TRUE)
+ OPTION(BUILD_EXAMPLES "Build example plug-ins and programs" FALSE)
+ OPTION(ENABLE_DEBUG_MESSAGES "Enable debug and trace outputs" TRUE)
++OPTION(MIA_CREATE_USERDOC "Enable creation of html user documentation" TRUE)
+ 
+ INCLUDE(GNUInstallDirs)
+ 
+@@ -451,13 +452,18 @@
+ #
+ # python is needed for creating end-user documentation 
+ #
+-SET(CREATE_USERDOC FALSE)
++
+ 
+ FIND_PACKAGE(PythonInterp)
+ IF(PYTHONINTERP_FOUND) 
+   EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import lxml"  RESULT_VARIABLE LXML_ERR)
+   IF(LXML_ERR) 
+-    MESSAGE(python found, but no lxml, no user documantation will be created) 
++    IF(STRICT_DEPENDECIES)
++      MESSAGE(ERROR ": requested user Html documentation creation, but python-lxml not found")
++    ELSE(STRICT_DEPENDECIES)
++      MESSAGE(python found, but no lxml, no user documantation will be created)
++      SET(MIA_CREATE_USERDOC FALSE)
++    ENDIF(STRICT_DEPENDECIES)
+   ELSE(LXML_ERR)
+     SET(CREATE_USERDOC TRUE)
+   ENDIF(LXML_ERR) 
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -41,7 +41,7 @@
+ INSTALL(PROGRAMS ${MIADOCTOOLS_PYTHON_EXE} DESTINATION ${MIA_DOCTOOLS_INSTALL_ROOT})
+ 
+ 
+-IF(CREATE_USERDOC) 
++IF(MIA_CREATE_USERDOC) 
+ 
+   ##################################################################
+   #  for html userref xsltproc and the style sheet is needed
+@@ -107,7 +107,7 @@
+     ENDIF(ALWAYS_CREATE_DOC)     
+   ENDIF(HTML_CHUNK_FILEPATH) 
+   
+-ENDIF(CREATE_USERDOC)
++ENDIF(MIA_CREATE_USERDOC)
+ 
+ IF (DOXYGEN_FOUND)
+   ADD_CUSTOM_TARGET(LibraryDoc echo "creating user library documentation")
diff --git a/debian/patches/series b/debian/patches/series
index 10e9a0d..d3384fa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 01_spellcheck_corrections.patch
 02_accumulate-not-declared-mia-2.2.7.patch
 03_fix-boost1.60_mia-2.2.7.patch
+04_add_userdoc_flag.patch
diff --git a/debian/rules b/debian/rules
index 2369978..bbee978 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,14 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -fvisibility=hidden
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+# deduce documentation option (build-indep target)
+ifeq "" "$(filter %-doc,$(shell dh_listpackages))"
+  BUILDDOC = OFF
+else
+  BUILDDOC = ON
+endif
+
+
 .PHONY: override_dh_strip override_dh_shlibdeps override_dh_auto_test
 
 %:
@@ -13,9 +21,10 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -fvisibility=hidden
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
-	-DALWAYS_CREATE_DOC=ON  \
+	-DALWAYS_CREATE_DOC=$(BUILDDOC)  \
 	-DSTRICT_DEPENDECIES=ON \
 	-DMIA_CREATE_MANPAGES=ON \
+	-DMIA_CREATE_USERDOC=$(BUILDDOC) \
 	-DMIA_CREATE_NIPYPE_INTERFACES=ON
 
 override_dh_builddeb:
@@ -24,15 +33,15 @@ override_dh_builddeb:
 # dh_strip detects executable files, so make *.mia files executable then strip then 
 # remove the executable flag 
 override_dh_strip:
-	 `pwd`/debian/run_strip
+	`pwd`/debian/run_strip
+
+override_dh_auto_build-indep: 
+	dh_auto_build -- doc
+
+override_dh_auto_build-arch: 
+	dh_auto_build
 
 override_dh_shlibdeps:
 	dh_shlibdeps -- $(shell find  debian/libmia-2.2-4/ -name "*.mia")
 
-override_dh_auto_test:
-	dh_auto_test || \
-		( echo "Test log begin =========:"  \
-		&& cat `pwd`/obj-*/Testing/Temporary/LastTest.log \
-		&& echo "Test log end =========:" \
-		&& exit 1)
 
diff --git a/debian/run_strip b/debian/run_strip
index 04edaaa..af4480c 100755
--- a/debian/run_strip
+++ b/debian/run_strip
@@ -1,5 +1,4 @@
 #!/bin/bash
 for f in $(find . -name "*.mia"); do chmod 755 $f; done
-/usr/bin/dh_strip -plibmia-2.2-4 --dbg-package=libmia-2.2-4-dbg
-/usr/bin/dh_strip -pmia-tools --dbg-package=mia-tools-dbg
+dh_strip --dbgsym-migration='libmia-2.2-4-dbg (<< 2.2.7-6),  mia-tools-dbg (<< 2.2.7-6)'
 for f in $(find . -name "*.mia"); do chmod 644 $f; done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/mia.git



More information about the debian-med-commit mailing list