Bug#909740: libsdl2-dev: No longer multi-arch co-installable

Hugh McMaster hugh.mcmaster at outlook.com
Tue Dec 10 10:56:51 GMT 2019


On Tue, 10 Dec 2019 at 20:01, Simon McVittie wrote:
>
> On Tue, 10 Dec 2019 at 08:50:56 +0000, Simon McVittie wrote:
> > I suppose if one of the SDL2_foo family uses #include "SDL_bar.h"
> > and expects to find an adjacent SDL2 that way, or if
> > something tries to second-guess the compiler and read
> > header files directly, that might be a reason to revert
> > https://salsa.debian.org/sdl-team/libsdl2/merge_requests/5
> > (the one that goes via pkg-config) and apply
> > https://salsa.debian.org/sdl-team/libsdl2/merge_requests/3 (my original
> > proposal with a forwarding header) instead
>
> For what it's worth, Fedora has a similar forwarding header, except that
> they don't have an equivalent of /usr/include/${multiarch}, so they have
> to hard-code every supported architecture in their forwarding header:
>
> https://src.fedoraproject.org/rpms/SDL2/blob/master/f/SDL_config.h
> https://src.fedoraproject.org/rpms/SDL2/blob/master/f/SDL2.spec#_106

As a test, I built and installed SDL2 with Simon's patch, then built
and installed SDL2-ttf. That worked fine out of the box.

Neverball failed to build because it couldn't find
/usr/include/SDL2/SDL_ttf.h, which is, of course, not part of the
default search path.

Wouldn't it be easier to just patch sdl2.pc to add
${prefix}/include/SDL2 to CFLAGS, as Felix suggested? That should
catch all #includes.
And Neverball builds fine.

Also, this small addition has far less overhead than multiple copies
of the SDL2 headers.

Hugh



More information about the Pkg-sdl-maintainers mailing list