[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Build-Depends-If-Available



I'm maintaining mlpack. It is able to generate julia bindings, so on
architectures in which julia is available I'd like to generate julia
bindings, and this requires julia to be installed at build time. I've
set up debian/rules to check if julia is installed, and set
configuration options appropriately. Similarly, it seems best to build
the package using clang if possible, but if clang isn't available it
can be built using GCC (assuming you build single threaded and roughly
six hundred mysterious GCC space-saving options are set).

I thought I could accomplish this with build dependencies like

Build-Depends: julia | hello, ..., clang | buthead

where hello and buthead are stupid little packages that are available
on all architectures but would not otherwise be installed. Ugly, sure,
but maybe it would get the job done. Nope! The build daemons just try
to install julia and clang and fail if either's not available. I've
also seen

Build-Depends: julia | dpkg, ..., clang | dpkg

but that also doesn't work.

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.

Anybody know if there's a good solution to this problem?


Reply to: