Hello,

I've finally got around to writing the header wrapping functions for
multilib. That's an initial yet working draft. I will send patches in
reply to this mail.

The first patch just converts internal distutils-r1 root merging
function to globally available multibuild_merge_root(). This is used
in distutils-r1 to merge fakerooted distutils installs, and will be
used to merge wrapped headers on top of regular install.

The second one adds the actual code. The headers to wrap are listed
in a global variable. After each install, the headers are moved to
temporary location and wrapper is being prepared there. When all
installs are done, all those files are merged on top of them.

The per-ABI headers are installed onto /usr/include/$CHOST, repeating
the directory structure from original /usr/include install. Wrapper
includes the headers by full <$CHOST/foo/bar.h> path.

Potential issues:

- only /usr/include is supported (to be extended if necessary),

- no 'fallback' code in header (to be added in the future), if no ABIs
  match, no code is given,

- not tested thoroughly. I'd appreciate if someone could play with it
  a bit and see whether proper headers are actually included and it
  works everywhere.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to