The repository has the line with "lib/x86_64-linux-gnu" while the
downloaded tarball has only "lib". If you really need to adapt the
original tarball to some Debian specific things this needs to be done in
a quilt patch. Please also note: This change only works for amd64
architecture which currently is the only architecture where the Debian
package is built. However, this restriction is only due to the fact
that libinsighttoolkit5-dev is only available for this architecture. In
case it might be available for other architectures as well your patch
above will fail on those.
Understood. Now that the correct libDir variable is set back to just "lib",
the multiarch support should be taken into account directly in the
debian/rules.
The first instruction of the target override_dh_auto_configure target is:
sed -i 's+libDir = "lib";+libDir = "lib/$(DEB_HOST_MULTIARCH)";+g'
sdk/libraries/core/CamiTKVersion.h