Source: libcork Version: 1.0.0~rc3-3 Tags: patch User: debian-cr...@lists.debian.org Usertags: cross-satisfiability
libcork cannot be cross built from source, because it has unsatisfiable Build-Depends. Rather than looking into the precise issues, I looked into reducing them. One way of approaching it is observing libcork-doc to be Architecture: all and thus demoting sphinx dependencies to Build-Depends-Indep. The other is looking into making tests optional via the <!nocheck> build profile. The latter involved patching the upstream CMakeLists.txt to add support for the standard option BUILD_TESTING as the package is not using include(CTest). As a result, I managed to trim three dependencies from a nocheck arch-only build. Of these, python3-cram and python3-sphinx happened to be the unsatisfiable ones. You can find the proposed changes in the attached patch and I verified that the patch does not change output artifacts by leveraging reproducible builds based comparisons. Helmut
diff --minimal -Nru libcork-1.0.0~rc3/debian/changelog libcork-1.0.0~rc3/debian/changelog --- libcork-1.0.0~rc3/debian/changelog 2021-08-29 08:35:31.000000000 +0200 +++ libcork-1.0.0~rc3/debian/changelog 2024-10-02 14:16:14.000000000 +0200 @@ -1,3 +1,13 @@ +libcork (1.0.0~rc3-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Reduce Build-Depends: (Closes: #-1) + + Add a nocheck.patch that makes upstream honour BUILD_TESTING. + + Annotate check and python3-cram with <!nocheck>. + + Demote sphinx dependencies and dh addon to Build-Depends-Indep. + + -- Helmut Grohne <hel...@subdivi.de> Wed, 02 Oct 2024 14:16:14 +0200 + libcork (1.0.0~rc3-3) unstable; urgency=medium * debian/copyright: diff --minimal -Nru libcork-1.0.0~rc3/debian/control libcork-1.0.0~rc3/debian/control --- libcork-1.0.0~rc3/debian/control 2021-08-29 08:35:31.000000000 +0200 +++ libcork-1.0.0~rc3/debian/control 2024-10-02 12:57:08.000000000 +0200 @@ -4,12 +4,14 @@ Maintainer: Debian Bridges Team <team+brid...@tracker.debian.org> Uploaders: Roger Shimizu <r...@debian.org> Build-Depends: - check, + check <!nocheck>, cmake, debhelper-compat (= 12), pkg-config, - python3-cram, - python3-sphinx + python3-cram <!nocheck>, +Build-Depends-Indep: + dh-sequence-sphinxdoc, + python3-sphinx, Standards-Version: 4.5.0 Rules-Requires-Root: no Homepage: https://github.com/dcreager/libcork diff --minimal -Nru libcork-1.0.0~rc3/debian/patches/nocheck.patch libcork-1.0.0~rc3/debian/patches/nocheck.patch --- libcork-1.0.0~rc3/debian/patches/nocheck.patch 1970-01-01 01:00:00.000000000 +0100 +++ libcork-1.0.0~rc3/debian/patches/nocheck.patch 2024-10-02 13:58:57.000000000 +0200 @@ -0,0 +1,19 @@ +--- libcork-1.0.0~rc3.orig/CMakeLists.txt ++++ libcork-1.0.0~rc3/CMakeLists.txt +@@ -54,6 +54,7 @@ + set(ENABLE_SHARED YES CACHE BOOL "Whether to build a shared library") + set(ENABLE_SHARED_EXECUTABLES NO CACHE BOOL + "Whether to link executables using shared libraries") ++set(BUILD_TESTING YES CACHE BOOL "Whether to build and run tests") + set(ENABLE_SHARED_TESTS NO CACHE BOOL + "Whether to link test cases using shared libraries") + set(ENABLE_STATIC YES CACHE BOOL "Whether to build a static library") +@@ -85,5 +86,7 @@ + add_subdirectory(include) + add_subdirectory(share) + add_subdirectory(src) +-add_subdirectory(tests) ++if(BUILD_TESTING) ++ add_subdirectory(tests) ++endif(BUILD_TESTING) + add_subdirectory(docs/old) diff --minimal -Nru libcork-1.0.0~rc3/debian/patches/series libcork-1.0.0~rc3/debian/patches/series --- libcork-1.0.0~rc3/debian/patches/series 2021-08-29 08:35:31.000000000 +0200 +++ libcork-1.0.0~rc3/debian/patches/series 2024-10-02 13:27:23.000000000 +0200 @@ -2,3 +2,4 @@ 02-fix-fails-to-build-with-sphinx-3.1.patch 03-Use-system-python3-cram.patch #autopkgtest-Use-system-library-to-run-test.patch +nocheck.patch diff --minimal -Nru libcork-1.0.0~rc3/debian/rules libcork-1.0.0~rc3/debian/rules --- libcork-1.0.0~rc3/debian/rules 2021-08-29 08:35:31.000000000 +0200 +++ libcork-1.0.0~rc3/debian/rules 2024-10-02 11:31:03.000000000 +0200 @@ -20,16 +20,15 @@ -DENABLE_SHARED_TESTS=YES \ -DENABLE_STATIC=NO -override_dh_install: +execute_before_dh_install-indep: rm -f debian/tmp/usr/share/doc/libcork/html/.buildinfo sed -i " \ s%http[s]*://cdn.mathjax.org/mathjax/latest/MathJax.js%file:///usr/share/javascript/mathjax/MathJax.js%; \ s%https://cdnjs.cloudflare.com/ajax/libs/mathjax/[0-9].[0-9].[0-9]/MathJax.js%file:///usr/share/javascript/mathjax/MathJax.js%; \ s%https://cdnjs.cloudflare.com/ajax/libs/mathjax/[0-9].[0-9].[0-9]/latest.js%file:///usr/share/javascript/mathjax/unpacked/latest.js%; \ " debian/tmp/usr/share/doc/libcork/html/*.html - dh_install # Upstream supports both autoreconf and cmake # Here we disable autoreconf so cmake will be used %: - dh $@ --with sphinxdoc --without autoreconf + dh $@ --without autoreconf