On Sun, 09 Aug 2020 at 15:22:20 +0100, Barak A. Pearlmutter wrote: > I could check which architectures have julia, and which have clang, > and list them. > > Build-Depends: julia [amd64 arm64 i386 ...], clang [amd64 arm64 armel > armhf i386 ...] > > but that makes my skin crawl because it is highly non-future-proof and > violates all sorts of software engineering principles.
Unfortunately, to the best of my knowledge, this is currently the least bad thing to do. This pattern is also seen in packages that (conditionally) build-depend on valgrind, libseccomp or anything with Rust dependencies, all of which need specific porting to each new architecture. One alternative that occurs to me would be for the maintainers of the package that needs per-architecture porting (let's say src:valgrind) to provide an empty binary package like this: Package: valgrind-if-supported Architecture: any Depends: valgrind [amd64 arm64 i386 ...] which would let dependent packages have "Build-Depends: valgrind-if-supported", and then test for valgrind.pc or /usr/bin/valgrind during their configure/build step. However, that would require src:valgrind to be able to go through the motions of building for all architectures, skipping the real (upstream) build process on architectures to which it has not yet been ported, and that might be difficult to maintain long-term. smcv