• Bug#1064448: ocrad FTCBFS: uses the build architecture compiler

    From Helmut Grohne@21:1/5 to All on Thu Feb 22 10:50:01 2024
    Source: ocrad
    Version: 0.28-3
    Tags: patch
    User: debian-cross@lists.debian.org
    Usertags: ftcbfs

    ocrad fails to cross build from source, because it uses the build
    architecture compiler. debian/rules has an override_dh_auto_configure
    that invokes the upstream configure without any indiciation of which architecture we are building for. Passing CXX fixes that. I'm attaching
    a patch for your convenience.

    Helmut

    diff --minimal -Nru ocrad-0.28/debian/changelog ocrad-0.28/debian/changelog
    --- ocrad-0.28/debian/changelog 2022-08-23 15:55:51.000000000 +0200
    +++ ocrad-0.28/debian/changelog 2024-02-22 09:38:50.000000000 +0100
    @@ -1,3 +1,10 @@
    +ocrad (0.28-3.1) UNRELEASED; urgency=medium
    +
    + * Non-maintainer upload.
    + * Fix FTCBFS: Pass CXX to configure. (Closes: #-1)
    +
    + -- Helmut Grohne <helmut@subdivi.de> Thu, 22 Feb 2024 09:38:50 +0100
    +
    ocrad (0.28-3) unstable; urgency=medium

    * New maintainer (Closes: #974154). Thanks Gürkan Myczko for your work!
    diff --minimal -Nru ocrad-0.28/debian/rules ocrad-0.28/debian/rules
    --- ocrad-0.28/debian/rules 2022-08-23 15:55:51.000000000 +0200
    +++ ocrad-0.28/debian/rules 2024-02-22 09:38:45.000000000 +0100
    @@ -3,11 +3,13 @@
    export DEB_CPPFLAGS_MAINT_APPEND = -fPIC
    export DEB_CXXFLAGS_MAINT_APPEND = -fPIC

    +-include /usr/share/dpkg/buildtools.mk
    +
    %:
    dh $@

    override_dh_auto_configure:
    - dh_auto_configure -- $(shell dpkg-buildflags --export=cmdline)
    + dh_auto_configure -- CXX='$(CXX)' $(shell dpkg-buildflags --export=cmdli