Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Extend target version for libsdl and enable openGL for it
@ 2011-08-15 13:04 Jiajun Xu
  2011-08-15 13:05 ` [PATCH 1/2] libsdl: add target version Jiajun Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jiajun Xu @ 2011-08-15 13:04 UTC (permalink / raw)
  To: openembedded-core

Some targets need to run 3D games, which requires libsdl. Enable libsdl for target
and add a flag to check in build time if openGL needed to be built.


The following changes since commit d126e22f6b3f27196144f87e22b36ebccd6dea65:

  rt-tests: use an explicit commit ID (2011-08-12 17:51:18 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib jxu49/oe-contrib
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jxu49/oe-contrib

Jiajun Xu (2):
  libsdl: add target version
  libsdl: enable opengl for libsdl

 ...libsdl-nativesdk_1.2.11.bb => libsdl_1.2.11.bb} |   23 ++++++++++++++-----
 1 files changed, 17 insertions(+), 6 deletions(-)
 rename meta/recipes-graphics/libsdl/{libsdl-nativesdk_1.2.11.bb => libsdl_1.2.11.bb} (64%)




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

* [PATCH 1/2] libsdl: add target version
  2011-08-15 13:04 [PATCH 0/2] Extend target version for libsdl and enable openGL for it Jiajun Xu
@ 2011-08-15 13:05 ` Jiajun Xu
  2011-08-15 13:05 ` [PATCH 2/2] libsdl: enable opengl for libsdl Jiajun Xu
  2011-08-15 14:02 ` [PATCH 0/2] Extend target version for libsdl and enable openGL for it Richard Purdie
  2 siblings, 0 replies; 6+ messages in thread
From: Jiajun Xu @ 2011-08-15 13:05 UTC (permalink / raw)
  To: openembedded-core

Rename libsdl-nativesdk to libsdl to enable target version. libsdl
is needed in some graphics testing.

Signed-off-by: Jiajun Xu <jiajun.xu@intel.com>
Acked-by: Phil Blundell <philb@gnu.org>
---
 ...libsdl-nativesdk_1.2.11.bb => libsdl_1.2.11.bb} |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)
 rename meta/recipes-graphics/libsdl/{libsdl-nativesdk_1.2.11.bb => libsdl_1.2.11.bb} (73%)

diff --git a/meta/recipes-graphics/libsdl/libsdl-nativesdk_1.2.11.bb b/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb
similarity index 73%
rename from meta/recipes-graphics/libsdl/libsdl-nativesdk_1.2.11.bb
rename to meta/recipes-graphics/libsdl/libsdl_1.2.11.bb
index e64a62e..7c1c507 100644
--- a/meta/recipes-graphics/libsdl/libsdl-nativesdk_1.2.11.bb
+++ b/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb
@@ -1,17 +1,25 @@
-DESCRIPTION = "Simple DirectMedia Layer - native Edition"
+SUMMARY = "Simple DirectMedia Layer"
+DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
+library designed to provide low level access to audio, keyboard, mouse, \
+joystick, 3D hardware via OpenGL, and 2D video framebuffer."
 HOMEPAGE = "http://www.libsdl.org"
+BUGTRACKER = "http://bugzilla.libsdl.org/"
+
 SECTION = "libs"
-LICENSE = "LGPLv2.1"
-DEPENDS = "libx11-nativesdk libxext-nativesdk libxrandr-nativesdk libxrender-nativesdk"
-RDEPENDS_${PN} = "libx11-nativesdk libxrandr-nativesdk libxrender-nativesdk libxext-nativesdk"
-PR = "r5"
 
+LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
 
+DEPENDS = "virtual/libx11 libxext libxrandr libxrender"
+DEPENDS_virtclass-nativesdk = "libx11-nativesdk libxrandr-nativesdk libxrender-nativesdk libxext-nativesdk"
+
+PR = "r6"
+
 SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
 	   file://acinclude.m4 \
 	   file://configure_tweak.patch;patch=1 \
 	   file://kernel-asm-page.patch;patch=1 "
+
 S = "${WORKDIR}/SDL-${PV}"
 
 SRC_URI[md5sum] = "418b42956b7cd103bfab1b9077ccc149"
@@ -34,3 +42,5 @@ PARALLEL_MAKE = ""
 do_configure_prepend() {
 	cp ${WORKDIR}/acinclude.m4 ${S}/acinclude.m4
 }
+
+BBCLASSEXTEND = "nativesdk"
-- 
1.7.1




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

* [PATCH 2/2] libsdl: enable opengl for libsdl
  2011-08-15 13:04 [PATCH 0/2] Extend target version for libsdl and enable openGL for it Jiajun Xu
  2011-08-15 13:05 ` [PATCH 1/2] libsdl: add target version Jiajun Xu
@ 2011-08-15 13:05 ` Jiajun Xu
  2011-08-16  7:52   ` Koen Kooi
  2011-08-15 14:02 ` [PATCH 0/2] Extend target version for libsdl and enable openGL for it Richard Purdie
  2 siblings, 1 reply; 6+ messages in thread
From: Jiajun Xu @ 2011-08-15 13:05 UTC (permalink / raw)
  To: openembedded-core

To enable opengl for libsdl, we need DEPENDS on virtual/libgl. Add a check for
"opengl" in DISTRO_FEATURES and when it's set, "--enable-video-opengl"
and "virtual/libgl" will be added into EXTRA_CONF and DEPENDS.

Signed-off-by: Jiajun Xu <jiajun.xu@intel.com>
Acked-by: Phil Blundell <philb@gnu.org>
---
 meta/recipes-graphics/libsdl/libsdl_1.2.11.bb |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb b/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb
index 7c1c507..f08077d 100644
--- a/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb
+++ b/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb
@@ -10,10 +10,10 @@ SECTION = "libs"
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
 
-DEPENDS = "virtual/libx11 libxext libxrandr libxrender"
+DEPENDS = "${@base_contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} virtual/libx11 libxext libxrandr libxrender"
 DEPENDS_virtclass-nativesdk = "libx11-nativesdk libxrandr-nativesdk libxrender-nativesdk libxext-nativesdk"
 
-PR = "r6"
+PR = "r7"
 
 SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
 	   file://acinclude.m4 \
@@ -33,7 +33,8 @@ EXTRA_OECONF = "--disable-static --disable-debug --disable-cdrom --enable-thread
                 --disable-mintaudio --disable-nasm --enable-video-x11 --disable-video-dga \
                 --disable-video-fbcon --disable-video-directfb --disable-video-ps2gs \
                 --disable-video-xbios --disable-video-gem --disable-video-dummy \
-                --disable-video-opengl --enable-input-events --enable-pthreads \
+                --enable-input-events --enable-pthreads \
+		${@base_contains('DISTRO_FEATURES', 'opengl', '--enable-video-opengl', '--disable-video-opengl', d)} \
 		--disable-video-svga \
                 --disable-video-picogui --disable-video-qtopia --enable-dlopen"
 
-- 
1.7.1




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

* Re: [PATCH 0/2] Extend target version for libsdl and enable openGL for it
  2011-08-15 13:04 [PATCH 0/2] Extend target version for libsdl and enable openGL for it Jiajun Xu
  2011-08-15 13:05 ` [PATCH 1/2] libsdl: add target version Jiajun Xu
  2011-08-15 13:05 ` [PATCH 2/2] libsdl: enable opengl for libsdl Jiajun Xu
@ 2011-08-15 14:02 ` Richard Purdie
  2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-08-15 14:02 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-08-15 at 21:04 +0800, Jiajun Xu wrote:
> Some targets need to run 3D games, which requires libsdl. Enable libsdl for target
> and add a flag to check in build time if openGL needed to be built.
> 
> 
> The following changes since commit d126e22f6b3f27196144f87e22b36ebccd6dea65:
> 
>   rt-tests: use an explicit commit ID (2011-08-12 17:51:18 +0100)
> 
> are available in the git repository at:
>   git://git.pokylinux.org/poky-contrib jxu49/oe-contrib
>   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jxu49/oe-contrib
> 
> Jiajun Xu (2):
>   libsdl: add target version
>   libsdl: enable opengl for libsdl

Merged to master, thanks Jiajun!

Cheers,

Richard




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

* Re: [PATCH 2/2] libsdl: enable opengl for libsdl
  2011-08-15 13:05 ` [PATCH 2/2] libsdl: enable opengl for libsdl Jiajun Xu
@ 2011-08-16  7:52   ` Koen Kooi
  2011-08-16 10:19     ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2011-08-16  7:52 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 15 aug. 2011, om 15:05 heeft Jiajun Xu het volgende geschreven:

> To enable opengl for libsdl, we need DEPENDS on virtual/libgl. Add a check for
> "opengl" in DISTRO_FEATURES and when it's set, "--enable-video-opengl"
> and "virtual/libgl" will be added into EXTRA_CONF and DEPENDS.

Is that really a distro feature? Opengl has always been a machine feature in OE, so with this the situation gets a lot worse.


> 
> Signed-off-by: Jiajun Xu <jiajun.xu@intel.com>
> Acked-by: Phil Blundell <philb@gnu.org>
> ---
> meta/recipes-graphics/libsdl/libsdl_1.2.11.bb |    7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb b/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb
> index 7c1c507..f08077d 100644
> --- a/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb
> +++ b/meta/recipes-graphics/libsdl/libsdl_1.2.11.bb
> @@ -10,10 +10,10 @@ SECTION = "libs"
> LICENSE = "LGPLv2.1"
> LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
> 
> -DEPENDS = "virtual/libx11 libxext libxrandr libxrender"
> +DEPENDS = "${@base_contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} virtual/libx11 libxext libxrandr libxrender"
> DEPENDS_virtclass-nativesdk = "libx11-nativesdk libxrandr-nativesdk libxrender-nativesdk libxext-nativesdk"
> 
> -PR = "r6"
> +PR = "r7"
> 
> SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
> 	   file://acinclude.m4 \
> @@ -33,7 +33,8 @@ EXTRA_OECONF = "--disable-static --disable-debug --disable-cdrom --enable-thread
>                 --disable-mintaudio --disable-nasm --enable-video-x11 --disable-video-dga \
>                 --disable-video-fbcon --disable-video-directfb --disable-video-ps2gs \
>                 --disable-video-xbios --disable-video-gem --disable-video-dummy \
> -                --disable-video-opengl --enable-input-events --enable-pthreads \
> +                --enable-input-events --enable-pthreads \
> +		${@base_contains('DISTRO_FEATURES', 'opengl', '--enable-video-opengl', '--disable-video-opengl', d)} \
> 		--disable-video-svga \
>                 --disable-video-picogui --disable-video-qtopia --enable-dlopen"
> 
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




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

* Re: [PATCH 2/2] libsdl: enable opengl for libsdl
  2011-08-16  7:52   ` Koen Kooi
@ 2011-08-16 10:19     ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-08-16 10:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, 2011-08-16 at 09:52 +0200, Koen Kooi wrote:
> Op 15 aug. 2011, om 15:05 heeft Jiajun Xu het volgende geschreven:
> 
> > To enable opengl for libsdl, we need DEPENDS on virtual/libgl. Add a check for
> > "opengl" in DISTRO_FEATURES and when it's set, "--enable-video-opengl"
> > and "virtual/libgl" will be added into EXTRA_CONF and DEPENDS.
> 
> Is that really a distro feature? Opengl has always been a machine feature in OE, so with this the situation gets a lot worse.

Not really. This is one of the flags that makes sense at both a machine
*and* distro level. The distro flag means "build GL components" or can
be used to globally disable GL. The machine flag means the hardware can
support accelerated GL. This isn't the only such flag and was
anticipated long ago and why we have COMBINED_FEATURES (or whatever its
called).

The tricky piece to fit into this is software rendering. There are some
cases where we might want to build and include mesa-xlib even though we
know it will be slow (e.g. qemu machines to allow fuller testing).
Should or shouldn't those machines list opengl? Should we always fall
back to software rendering or error? Those questions are harder to
answer.

Cheers,

Richard




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

end of thread, other threads:[~2011-08-16 10:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 13:04 [PATCH 0/2] Extend target version for libsdl and enable openGL for it Jiajun Xu
2011-08-15 13:05 ` [PATCH 1/2] libsdl: add target version Jiajun Xu
2011-08-15 13:05 ` [PATCH 2/2] libsdl: enable opengl for libsdl Jiajun Xu
2011-08-16  7:52   ` Koen Kooi
2011-08-16 10:19     ` Richard Purdie
2011-08-15 14:02 ` [PATCH 0/2] Extend target version for libsdl and enable openGL for it Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox