Patchwork [v2,1/1] libplayer: fix cflags

login
register
mail settings
Submitter Samuel Martin
Date June 10, 2012, 11:46 a.m.
Message ID <1339328813-6269-2-git-send-email-s.martin49@gmail.com>
Download mbox | patch
Permalink /patch/163986/
State Not Applicable
Headers show

Comments

Samuel Martin - June 10, 2012, 11:46 a.m.
Explicitly run pkg-config to add some include directories to the cflags
when gstreamer support is enabled.

This patch fixes the following unfound headers:
- glib.h
- glibconfig.h
- gst/gst.h

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Peter Korsgaard - June 10, 2012, 8:23 p.m.
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 Samuel> Explicitly run pkg-config to add some include directories to the cflags
 Samuel> when gstreamer support is enabled.

 Samuel> This patch fixes the following unfound headers:
 Samuel> - glib.h
 Samuel> - glibconfig.h
 Samuel> - gst/gst.h

What problem is this solving exactly? I don't recall seeing any failures
on the autobuilders, and host-pkg-config + libglib2 are already
dependencies of gstreamer, so it shouldn't be needed to list them
explicitly.

From a quick look at the (handwritten) configure script, is seem to get
cflags / libs from pkg-config as well.


 Samuel> diff --git a/package/libplayer/libplayer.mk b/package/libplayer/libplayer.mk
 Samuel> index 093821e..643c7bb 100644
 Samuel> --- a/package/libplayer/libplayer.mk
 Samuel> +++ b/package/libplayer/libplayer.mk
 Samuel> @@ -30,8 +30,10 @@ else
 Samuel>  endif
 
 Samuel>  ifeq ($(BR2_PACKAGE_LIBPLAYER_GSTREAMER),y)
 Samuel> -	LIBPLAYER_DEPENDENCIES += gstreamer
 Samuel> +	LIBPLAYER_DEPENDENCIES += host-pkg-config libglib2 gstreamer
 Samuel>  	LIBPLAYER_CONF_OPT += --enable-gstreamer
 Samuel> +	LIBPLAYER_MAKE_OPT += \
 Samuel> +		CFLAGS+="`$(PKG_CONFIG_HOST_BINARY) --cflags glib-2.0 gstreamer-0.10`"
 Samuel>  else
 Samuel>  	LIBPLAYER_CONF_OPT += --disable-gstreamer
 Samuel>  endif
 Samuel> -- 
 Samuel> 1.7.10.4

 Samuel> _______________________________________________
 Samuel> buildroot mailing list
 Samuel> buildroot@busybox.net
 Samuel> http://lists.busybox.net/mailman/listinfo/buildroot
Samuel Martin - June 12, 2012, 7:27 p.m.
2012/6/10 Peter Korsgaard <jacmet@uclibc.org>:
>>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
>
>  Samuel> Explicitly run pkg-config to add some include directories to the cflags
>  Samuel> when gstreamer support is enabled.
>
>  Samuel> This patch fixes the following unfound headers:
>  Samuel> - glib.h
>  Samuel> - glibconfig.h
>  Samuel> - gst/gst.h
>
> What problem is this solving exactly? I don't recall seeing any failures
> on the autobuilders, and host-pkg-config + libglib2 are already
> dependencies of gstreamer, so it shouldn't be needed to list them
> explicitly.
hum... the problem was not found headers (the 3 mentioned above), but
actually this seems to be caused by a dirty work tree/build and
staging directories...
A git clean -fdx and a build from scratch fix it.

So, forget about this patch.

Apologize for the noise.
Peter Korsgaard - June 13, 2012, 6:41 a.m.
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

Hi,

 Samuel> So, forget about this patch.

 Samuel> Apologize for the noise.

Ok, no problem.

Patch

diff --git a/package/libplayer/libplayer.mk b/package/libplayer/libplayer.mk
index 093821e..643c7bb 100644
--- a/package/libplayer/libplayer.mk
+++ b/package/libplayer/libplayer.mk
@@ -30,8 +30,10 @@  else
 endif
 
 ifeq ($(BR2_PACKAGE_LIBPLAYER_GSTREAMER),y)
-	LIBPLAYER_DEPENDENCIES += gstreamer
+	LIBPLAYER_DEPENDENCIES += host-pkg-config libglib2 gstreamer
 	LIBPLAYER_CONF_OPT += --enable-gstreamer
+	LIBPLAYER_MAKE_OPT += \
+		CFLAGS+="`$(PKG_CONFIG_HOST_BINARY) --cflags glib-2.0 gstreamer-0.10`"
 else
 	LIBPLAYER_CONF_OPT += --disable-gstreamer
 endif