[Debichem-devel] Bug#983221: chemps2: reduce Build-Depends

Helmut Grohne helmut at subdivi.de
Sun Feb 21 09:18:55 GMT 2021


Source: chemps2
Version: 1.8.9-1
Tags: patch
User: debian-cross at lists.debian.org
Usertags: cross-satisfiability

chemps2 cannot be cross built from source, because its sphinx dependency
is not satisfiable. Fortunately, the documentation resides in an
arch:all packages, so sphinx is not actually required in Build-Depends.
It can be moved to B-D-I if the relevant build instructions are skipped
in arch-only builds. Please consider applying the attached patch to make
that happen (post bullseye). Beyond helping cross compilation, this
change reduces the load on buildds.

Helmut
-------------- next part --------------
diff --minimal -Nru chemps2-1.8.9/debian/changelog chemps2-1.8.9/debian/changelog
--- chemps2-1.8.9/debian/changelog	2018-11-16 12:29:00.000000000 +0100
+++ chemps2-1.8.9/debian/changelog	2021-02-19 20:17:19.000000000 +0100
@@ -1,3 +1,10 @@
+chemps2 (1.8.9-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Reduce Build-Depends: build sphinx during indep build only. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Fri, 19 Feb 2021 20:17:19 +0100
+
 chemps2 (1.8.9-1) unstable; urgency=medium
 
   * Upstream 1.8.9: Bug fix long double literals in Wigner.cpp
diff --minimal -Nru chemps2-1.8.9/debian/control chemps2-1.8.9/debian/control
--- chemps2-1.8.9/debian/control	2018-11-16 11:02:00.000000000 +0100
+++ chemps2-1.8.9/debian/control	2021-02-19 20:17:19.000000000 +0100
@@ -13,13 +13,13 @@
                python3-all (>= 3.6),
                python3-setuptools,
                python3-docutils,
-               python3-sphinx (>= 1.1),
                cython3 (>= 0.19),
                python3-numpy,
                libpython3-dev,
-               libjs-mathjax,
-               libjs-jquery,
-               libjs-underscore
+Build-Depends-Indep: python3-sphinx (>= 1.1),
+                     libjs-mathjax,
+                     libjs-jquery,
+                     libjs-underscore
 Standards-Version: 4.2.1
 Homepage: http://sebwouters.github.io/CheMPS2/index.html
 Vcs-Git: https://salsa.debian.org/debichem-team/chemps2.git
diff --minimal -Nru chemps2-1.8.9/debian/rules chemps2-1.8.9/debian/rules
--- chemps2-1.8.9/debian/rules	2018-11-16 11:02:00.000000000 +0100
+++ chemps2-1.8.9/debian/rules	2021-02-19 20:17:19.000000000 +0100
@@ -17,12 +17,13 @@
 #	echo "DEB_HOST_GNU_TYPE  = ${DEB_HOST_GNU_TYPE}"
 	dh_auto_configure -- -DCMAKE_INSTALL_LIBDIR=lib/${DEB_HOST_MULTIARCH} \
                              -DENABLE_XHOST=OFF \
-                             -DBUILD_SPHINX=ON \
+                             -DBUILD_SPHINX=$(if $(filter chemps2-doc,$(shell dh_listpackages)),ON,OFF) \
                              -DHDF5_INCLUDE_DIRS=/usr/include/hdf5/serial \
                              -DCMAKE_BUILD_TYPE=release
 
 override_dh_auto_build:
 	dh_auto_build -- VERBOSE=1
+execute_after_dh_auto_build-indep:
 	# https://wiki.debian.org/Python/LibraryStyleGuide: info on sphinx-build
 	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -b html \
                                                            -c obj-${DEB_HOST_GNU_TYPE}/sphinx/ \
@@ -34,6 +35,7 @@
 	cd build-sphinx/html && sed -i "s/_static\/jquery.js/\/usr\/share\/javascript\/jquery\/jquery.js/" *.html
 	cd build-sphinx/html && sed -i "s/_static\/underscore.js/\/usr\/share\/javascript\/underscore\/underscore.js/" *.html
 	cd build-sphinx/html/_static && rm jquery*.js underscore*.js
+execute_after_dh_auto_build-arch:
 	cd PyCheMPS2 && CPATH=../CheMPS2/include:/usr/include/hdf5/serial python3 setup.py build_ext -L ../obj-${DEB_HOST_GNU_TYPE}/CheMPS2
 
 override_dh_auto_install:


More information about the Debichem-devel mailing list