Package: dbus-glib
Followup-For: Bug #946303
User: [email protected]
Usertags: origin-ubuntu focal ubuntu-patch
Here is a better patch that accounts for the test being set -u, and also
works when NOT cross-testing.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
[email protected] [email protected]
diff -Nru dbus-glib-0.110/debian/tests/build dbus-glib-0.110/debian/tests/build
--- dbus-glib-0.110/debian/tests/build 2019-01-29 01:44:28.000000000 -0800
+++ dbus-glib-0.110/debian/tests/build 2019-12-06 15:39:24.000000000 -0800
@@ -12,6 +12,12 @@
cd "$AUTOPKGTEST_TMP"
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+ CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+else
+ CROSS_COMPILE=
+fi
+
echo "1..2"
cat > connect.c <<'EOF'
@@ -42,7 +48,7 @@
# Deliberately word-splitting, that's how pkg-config works:
# shellcheck disable=SC2046
-gcc -o connect connect.c $(pkg-config --cflags --libs dbus-glib-1)
+${CROSS_COMPILE}gcc -o connect connect.c $(${CROSS_COMPILE}pkg-config --cflags
--libs dbus-glib-1)
test -x connect
dbus-run-session -- ./connect
echo "ok 1"