All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Give sdl-config higher priority than pkg-config
@ 2010-02-14  7:23 Blue Swirl
  2010-02-14 12:04 ` [Qemu-devel] " Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2010-02-14  7:23 UTC (permalink / raw)
  To: qemu-devel

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.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 configure |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 0a84b0e..aee1f2c 100755
--- a/configure
+++ b/configure
@@ -1036,12 +1036,12 @@ fi
 ##########################################
 # SDL probe

-if $pkgconfig sdl --modversion >/dev/null 2>&1; then
-  sdlconfig="$pkgconfig sdl"
-  _sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'`
-elif has sdl-config; then
+if has sdl-config; then
   sdlconfig='sdl-config'
   _sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'`
+elif $pkgconfig sdl --modversion >/dev/null 2>&1; then
+  sdlconfig="$pkgconfig sdl"
+  _sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'`
 else
   if test "$sdl" = "yes" ; then
     feature_not_found "sdl"
-- 
1.6.2.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH] Give sdl-config higher priority than pkg-config
  2010-02-14  7:23 [Qemu-devel] [PATCH] Give sdl-config higher priority than pkg-config Blue Swirl
@ 2010-02-14 12:04 ` Paolo Bonzini
  2010-02-14 14:14   ` Blue Swirl
  2010-02-14 15:19   ` Jacob Meuser
  0 siblings, 2 replies; 5+ messages in thread
From: Paolo Bonzini @ 2010-02-14 12:04 UTC (permalink / raw)
  To: Blue Swirl; +Cc: Jacob Meuser, qemu-devel

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.

Paolo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH] Give sdl-config higher priority than pkg-config
  2010-02-14 12:04 ` [Qemu-devel] " Paolo Bonzini
@ 2010-02-14 14:14   ` Blue Swirl
  2010-02-14 14:47     ` Paolo Bonzini
  2010-02-14 15:19   ` Jacob Meuser
  1 sibling, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2010-02-14 14:14 UTC (permalink / raw)
  To: Paolo Bonzini, Jacob Meuser; +Cc: qemu-devel

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:

--- 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@

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH] Give sdl-config higher priority than pkg-config
  2010-02-14 14:14   ` Blue Swirl
@ 2010-02-14 14:47     ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2010-02-14 14:47 UTC (permalink / raw)
  To: Blue Swirl; +Cc: Jacob Meuser, qemu-devel


> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH] Give sdl-config higher priority than pkg-config
  2010-02-14 12:04 ` [Qemu-devel] " Paolo Bonzini
  2010-02-14 14:14   ` Blue Swirl
@ 2010-02-14 15:19   ` Jacob Meuser
  1 sibling, 0 replies; 5+ messages in thread
From: Jacob Meuser @ 2010-02-14 15:19 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Blue Swirl, Jacob Meuser, qemu-devel

On Sun, Feb 14, 2010 at 01:04:31PM +0100, Paolo Bonzini 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.

that was done before I became maintainer.  anyway, I'll fix it after
ports unlocks.  thanks for the notice.

-- 
jakemsr@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-14 15:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-14  7:23 [Qemu-devel] [PATCH] Give sdl-config higher priority than pkg-config Blue Swirl
2010-02-14 12:04 ` [Qemu-devel] " Paolo Bonzini
2010-02-14 14:14   ` Blue Swirl
2010-02-14 14:47     ` Paolo Bonzini
2010-02-14 15:19   ` Jacob Meuser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.