Patchwork Re: [PATCH] Give sdl-config higher priority than pkg-config

login
register
mail settings
Submitter Blue Swirl
Date Feb. 14, 2010, 2:14 p.m.
Message ID <f43fc5581002140614t5428171ao9d71903421422bfe@mail.gmail.com>
Download mbox | patch
Permalink /patch/45300/
State New
Headers show

Comments

Blue Swirl - Feb. 14, 2010, 2:14 p.m.
On Sun, Feb 14, 2010 at 2:04 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 02/14/2010 08:23 AM, Blue Swirl wrote:
>>
>> On OpenBSD, pkg-config sdl --cflags forgets to add -I/usr/local/include
>> which is needed for iconv.h (included from SDL.h). This makes SDL
>> detection fail.
>>
>> Try sdl-config first, only if it fails try pkg-config.
>
> This breaks cross-compilation.  I'm CCing the OpenBSD package maintainer so
> that he can fix it.
>
> Upstream SDL has
>
>    --cflags)
>      echo -I@includedir@/SDL @SDL_CFLAGS@
>      ;;
>
> in sdl-config.in and
>
> Cflags: -I${includedir}/SDL @SDL_CFLAGS@
>
> in sdl.pc.in, while OpenBSD has different values, so he modified sdl-config
> apparently but not sdl.pc.in.

Right. I think this patch against ports/devel/sdl should do the trick:
Paolo Bonzini - Feb. 14, 2010, 2:47 p.m.
> Right. I think this patch against ports/devel/sdl should do the trick:
>
> --- patches/patch-sdl_pc_in.orig        Sun Feb 14 14:08:41 2010
> +++ patches/patch-sdl_pc_in     Sun Feb 14 14:10:50 2010
> @@ -8,4 +8,4 @@
>   -Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@
>   -Cflags: -I${includedir}/SDL @SDL_CFLAGS@
>   +Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @X_LIBS@
> -+Cflags: -I${includedir}/SDL @SDL_CFLAGS@ @X_CFLAGS@
> ++Cflags: -I${includedir} -I${includedir}/SDL @SDL_CFLAGS@ @X_CFLAGS@

Yep, thanks very much.

Paolo

Patch

--- patches/patch-sdl_pc_in.orig        Sun Feb 14 14:08:41 2010
+++ patches/patch-sdl_pc_in     Sun Feb 14 14:10:50 2010
@@ -8,4 +8,4 @@ 
 -Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@
 -Cflags: -I${includedir}/SDL @SDL_CFLAGS@
 +Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @X_LIBS@
-+Cflags: -I${includedir}/SDL @SDL_CFLAGS@ @X_CFLAGS@
++Cflags: -I${includedir} -I${includedir}/SDL @SDL_CFLAGS@ @X_CFLAGS@