Re: Arch-dependent Depends
Adam C Powell IV <email@example.com> writes:
> On Sun, 2008-06-22 at 18:31 +0200, Goswin von Brederlow wrote:
>> Adam C Powell IV <firstname.lastname@example.org> writes:
>> > Because hypre upstream doesn't make static libs, and I got tired of
>> > making a new patch with every release, libhypre-dev is arch all without
>> > static libs. However, it needs to depend on openmpi on some arches, and
>> > lam4-dev on others. Using the same syntax as Build-Depends doesn't
>> > work.
>> > Is there a way to do this, or do I need to make libhypre-dev arch any
>> > and set the dep using substvars, even though its contents are
>> > arch-independent? I notice that Policy section 7.1 provides for
>> > arch-dependent Build-Deps, but there's nothing similar for Depends...
>> There is no such syntax so you have to something else.
>> As you already said you can make libhypre-dev arch any and you must.
> "Must" is a bit strong. There's nothing in Policy (8.4) stating this;
> please correct me if I'm wrong. And 8.3 uses "usually" regarding
> provision of a static library.
I ment must as in the only way to get the right result. But I have to
correct myself (below).
> The bug filed against the package suggests "libopenmpi-dev | lam4-dev".
> Will this be a problem?
The an installed lam4-dev would suffice even on systems that need
libopenmpi-dev. Doesn't work.
>> Further you have the choice of creating libhypre-dev-common containing
>> the shared files. But only do that if libhypre-dev-common will be
>> reasonably large. There is no point in the split for just
>> 100K. ftp-master will veto if it is too small.
> The package is 141K, and it's *all* shared. That is, it consists of
> header files and .so symlinks.
On a hunch I checked the Packages.gz files on my system and found the
Depends: libgnomevfs2-0 (= 1:2.22.0-4), libgconf2-dev (>= 2.8.0-1), libgnutls-dev, libxml2-dev, libavahi-client-dev (>= 0.6) | hurd, libavahi-glib-dev (>= 0.6) | hurd, libdbus-1-dev | hurd, libselinux1-dev | not+linux-gnu
So there actually is a provision for that and here is the magic:
Provides: amd64, linux, linux-gnu, not+alpha, not+arm, not+armeb, not+bsd-darwin, not+bsd-freebsd, not+bsd-netbsd, not+bsd-openbsd, not+darwin, not+freebsd, not+gnu, not+gnu-hurd, not+gnu-kfreebsd, not+gnu-knetbsd, not+gnu-linux, not+gnueabi-linux, not+gnulp-linux, not+hppa, not+i386, not+i486, not+ia64, not+kfreebsd-gnu, not+knetbsd-gnu, not+linux-gnueabi, not+linux-gnulp, not+m32r, not+m68k, not+mips, not+mipsel, not+netbsd, not+openbsd, not+powerpc, not+powerpc64, not+ppc64, not+s390, not+s390x, not+sh3, not+sh3eb, not+sh4, not+sh4eb, not+solaris, not+sparc, not+sysv-solaris, x86-64-linux-gnu
So you just add
Depends: libopenmpi-dev | not+linux, lam4-dev | linux
or whatever set you need.