Patchwork [1/1] libsdl: Add libSDL.so into Sato image

login
register
mail settings
Submitter Jiajun Xu
Date Aug. 15, 2011, 7:09 a.m.
Message ID <D5AB6E638E5A3E4B8F4406B113A5A19A12D7163EBE@shsmsx501.ccr.corp.intel.com>
Download mbox | patch
Permalink /patch/9831/
State New, archived
Headers show

Comments

Jiajun Xu - Aug. 15, 2011, 7:09 a.m.
> Something like that, yeah.  I don't think you want/need to do anything
> with RDEPENDS since that should all be automatic.
> 

Thanks for your suggestion, Phil. I have modified my patches as below. Could you help to review it?

> If SDL can use GLES as well as GL then it might be worth adding
> support for both.  They should probably be separate DISTRO_FEATUREs
> (and possibly we should have separate features again for GLES1.1 versus GLES2.0).
> 

It seems libsdl 1.2 could not support GLES. Libsdl 1.3 supports GLES but it is still under construction.


Patch 1
Libsdl: add target version
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=jxu49/oe-contrib&id=e141a00db49c6c2aa631b065b4a1391c9abe0277


> p.

Best Regards,
Jiajun
Phil Blundell - Aug. 15, 2011, 9:17 a.m.
On Mon, 2011-08-15 at 15:09 +0800, Xu, Jiajun wrote:
> > Something like that, yeah.  I don't think you want/need to do anything
> > with RDEPENDS since that should all be automatic.
> > 
> 
> Thanks for your suggestion, Phil. I have modified my patches as below. Could you help to review it?

Looks good to me.  Thanks.

p.

Patch

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"


Patch 2
Libsdl: enable opengl for libsdl
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=jxu49/oe-contrib&id=a6139bd9b26c792ab0c00b57c374e9ac8dade33d

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"