Bug#984887: ceres-solver: move documentation dependencies to Build-Depends-Indep

Helmut Grohne helmut at subdivi.de
Tue Mar 9 16:21:20 GMT 2021


Source: ceres-solver
Version: 1.14.0-14
Tags: patch
User: debian-cross at lists.debian.org
Usertags: cross-satisfiability

ceres-solver cannot be cross built from source, because its
Build-Depends are not satisfiable. A relatively simple technique to
reduce them is demote documentation dependencies to Build-Depends-Indep.
Doing so is not entirely trivial here, because an arch-only build still
builds the documentation. The attached patch achieves the reduction in a
reproducible way (i.e. an amd64 full build exactly reproduces the .debs
of an arch-only build). Please consider applying it.

Helmut
-------------- next part --------------
diff --minimal -Nru ceres-solver-1.14.0/debian/changelog ceres-solver-1.14.0/debian/changelog
--- ceres-solver-1.14.0/debian/changelog	2021-02-22 21:34:16.000000000 +0100
+++ ceres-solver-1.14.0/debian/changelog	2021-03-09 07:53:14.000000000 +0100
@@ -1,3 +1,10 @@
+ceres-solver (1.14.0-14.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move documentation dependencies to B-D-I. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Tue, 09 Mar 2021 07:53:14 +0100
+
 ceres-solver (1.14.0-14) unstable; urgency=medium
 
   * [9cb79f7] Disable failure on file remove. (Closes: #983101)
diff --minimal -Nru ceres-solver-1.14.0/debian/control ceres-solver-1.14.0/debian/control
--- ceres-solver-1.14.0/debian/control	2021-02-22 21:34:16.000000000 +0100
+++ ceres-solver-1.14.0/debian/control	2021-03-09 07:52:50.000000000 +0100
@@ -11,16 +11,16 @@
                libgflags-dev,
                libeigen3-dev (>= 3.3.4),
                libsuitesparse-dev (>= 1:4.4.3),
-               python3,
-               python3-sphinx,
-               python3-sphinx-rtd-theme,
-               libjs-jquery,
-               libjs-mathjax,
-               libjs-modernizr,
-               libjs-underscore,
-               libjs-sphinxdoc,
-               node-html5shiv,
                awk
+Build-Depends-Indep: python3,
+                     python3-sphinx,
+                     python3-sphinx-rtd-theme,
+                     libjs-jquery,
+                     libjs-mathjax,
+                     libjs-modernizr,
+                     libjs-underscore,
+                     libjs-sphinxdoc,
+                     node-html5shiv,
 Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/science-team/ceres-solver
 Vcs-Git: https://salsa.debian.org/science-team/ceres-solver.git
diff --minimal -Nru ceres-solver-1.14.0/debian/rules ceres-solver-1.14.0/debian/rules
--- ceres-solver-1.14.0/debian/rules	2021-02-22 21:34:16.000000000 +0100
+++ ceres-solver-1.14.0/debian/rules	2021-03-09 07:51:47.000000000 +0100
@@ -39,7 +39,7 @@
 		-DSUITESPARSE_INCLUDE_DIR_HINTS=/usr/include/suitesparse/ \
 		-DCXSPARSE_LIBRARY_DIR_HINTS=/usr/lib/${DEB_HOST_MULTIARCH}/ \
 		-DCXSPARSE_INCLUDE_DIR=/usr/include/suitesparse/ \
-		-DBUILD_DOCUMENTATION=ON \
+		-DBUILD_DOCUMENTATION=$(if $(filter ceres-solver-doc,$(shell dh_listpackages)),ON,OFF) \
 		-DCMAKE_BUILD_TYPE=Release
 	dh_auto_build
 	dh_auto_test
@@ -66,7 +66,7 @@
 	mv -v ${CURDIR}/debian/config.h ${CURDIR}/debian/libceres-dev/usr/include/ceres/internal/
 	dh_install
 
-override_dh_installdocs:
+override_dh_installdocs-indep:
 	# make lintian happy
 	# https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0 -> /usr/share/javascript/mathjax
 	sed -i 's/https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/mathjax\/2.7.1/\/usr\/share\/javascript\/mathjax/g' $(CURDIR)/debian/tmp/usr/share/doc/ceres/html/*.html


More information about the debian-science-maintainers mailing list