Package: clutter-1.0 Version: 1.26.2+dfsg-12 Followup-For: Bug #946294 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu focal ubuntu-patch
> I've verified that the attached patch lets the tests successfully build > (and run) i386 tests on an amd64 host. Sorry, this part was a lie (via cut'n'paste); I failed to notice that this test was set -u, so it actually broke for all *non* cross cases. The attached patch should be better.
diff -Nru clutter-1.0-1.26.2+dfsg/debian/tests/build clutter-1.0-1.26.2+dfsg/debian/tests/build --- clutter-1.0-1.26.2+dfsg/debian/tests/build 2019-08-27 02:44:04.000000000 -0700 +++ clutter-1.0-1.26.2+dfsg/debian/tests/build 2019-12-06 15:23:12.000000000 -0800 @@ -11,6 +11,13 @@ export XDG_RUNTIME_DIR="$WORKDIR" trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM cd $WORKDIR + +if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then + CROSS_COMPILE="$DEB_HOST_GNU_TYPE-" +else + CROSS_COMPILE= +fi + cat <<EOF > cally.c #include <cally/cally.h> @@ -53,7 +60,7 @@ ;; esac - gcc -o "${lib}-test" "${code}" $(pkg-config --cflags --libs ${packages}) + ${CROSS_COMPILE}gcc -o "${lib}-test" "${code}" $(${CROSS_COMPILE}pkg-config --cflags --libs ${packages}) echo "build ($lib): OK" [ -x "${lib}-test" ] dbus-run-session -- xvfb-run -a "./${lib}-test"