Source: mongo-c-driver
Version: 2.2.2-1
Tags: patch
User: [email protected]
Usertags: cross-satisfiability

mongo-c-driver cannot be cross built from source, because its sphinx
dependencies are not satisfiable. Without looking deeper into the
reasons for why, I observe that the documentation is fully separated
into Arch:all *-doc packages. It should be possible to just skip them
altogether in arch-only builds such as cross builds. I propose dropping
support for the nodoc option in favor of just making arch-only builds
equate to being nodoc builds. Once doing so, the relevant dependencies
can be moved to B-D-I. I used reproducible builds to confirm that this
change does not incur unwanted differences between full builds and
arch-only builds. Please find a patch attached for your convenience.

Helmut
diff -Nru mongo-c-driver-2.2.2/debian/changelog 
mongo-c-driver-2.2.2/debian/changelog
--- mongo-c-driver-2.2.2/debian/changelog       2026-02-13 22:52:06.000000000 
+0100
+++ mongo-c-driver-2.2.2/debian/changelog       2026-02-27 06:27:06.000000000 
+0100
@@ -1,3 +1,10 @@
+mongo-c-driver (2.2.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Skip documentation during arch-only build. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Fri, 27 Feb 2026 06:27:06 +0100
+
 mongo-c-driver (2.2.2-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru mongo-c-driver-2.2.2/debian/control 
mongo-c-driver-2.2.2/debian/control
--- mongo-c-driver-2.2.2/debian/control 2026-02-13 22:52:06.000000000 +0100
+++ mongo-c-driver-2.2.2/debian/control 2026-02-26 21:44:34.000000000 +0100
@@ -8,15 +8,15 @@
                cmake,
                libssl-dev,
                pkgconf,
-               python3-sphinx,
-               python3-sphinx-design,
-               furo,
                libmongocrypt-dev (>= 1.12.0) 
<!pkg.mongo-c-driver.no-libmongocrypt>,
                zlib1g-dev,
                libsasl2-dev,
                libsnappy-dev,
                libutf8proc-dev,
                libzstd-dev
+Build-Depends-Indep: furo,
+                     python3-sphinx,
+                     python3-sphinx-design
 Standards-Version: 4.7.2
 Section: libs
 Homepage: https://github.com/mongodb/mongo-c-driver
diff -Nru mongo-c-driver-2.2.2/debian/rules mongo-c-driver-2.2.2/debian/rules
--- mongo-c-driver-2.2.2/debian/rules   2026-02-13 22:52:06.000000000 +0100
+++ mongo-c-driver-2.2.2/debian/rules   2026-02-27 06:27:06.000000000 +0100
@@ -21,7 +21,8 @@
        export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic 
-Wl,--as-needed
 endif
 
-ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
+
+ifeq (,$(filter libbson-doc libmongoc-doc,$(shell dh_listpackages)))
        DOCS=OFF
 else
        DOCS=ON
@@ -32,7 +33,7 @@
        dh $@
 
 override_dh_auto_configure:
-       [ "$(DOCS)" = "ON" ] || echo "Found 'nodoc' in 'DEB_BUILD_OPTIONS'; not 
building documentation"
+       [ "$(DOCS)" = "ON" ] || echo "arch-only build; not building 
documentation"
        echo $(DEB_VERSION_UPSTREAM) > VERSION_CURRENT
        dh_auto_configure -- \
        -DENABLE_MONGOC=ON \

Reply via email to