Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Enable libsdl-native
@ 2015-12-02 16:55 Ross Burton
  2015-12-02 16:55 ` [PATCH 1/2] base: check for existing prefix when expanding names in PACKAGECONFIG Ross Burton
  2015-12-02 16:55 ` [PATCH 2/2] libsdl: expand PACKAGECONFIG and enable native builds Ross Burton
  0 siblings, 2 replies; 5+ messages in thread
From: Ross Burton @ 2015-12-02 16:55 UTC (permalink / raw)
  To: openembedded-core

Hi,

This is part 1 of the intrusive changes to master to change qemu-native from
linking to the host libsdl to build a libsdl-native.  This part isn't actually
intrusive and just enables libsdl-native, with a fix to the PACKAGECONFIG
handling to make it work.

Ross

The following changes since commit 698c74c373110ed081a7586e21d4a27b8b44c89b:

  libsdl: remove redundant configure_tweak patch (2015-12-01 21:32:15 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ross/sdl

for you to fetch changes up to 58ec5aaf4b7988eb0feda9961ab4b6f7bd8361c9:

  libsdl: expand PACKAGECONFIG and enable native builds (2015-12-02 14:58:59 +0000)

----------------------------------------------------------------
Ross Burton (2):
      base: check for existing prefix when expanding names in PACKAGECONFIG
      libsdl: expand PACKAGECONFIG and enable native builds

 meta/classes/base.bbclass                     |  5 +++-
 meta/recipes-graphics/libsdl/libsdl_1.2.15.bb | 35 ++++++++++++++-------------
 2 files changed, 22 insertions(+), 18 deletions(-)

Ross Burton (2):
  base: check for existing prefix when expanding names in PACKAGECONFIG
  libsdl: expand PACKAGECONFIG and enable native builds

 meta/classes/base.bbclass                     |  5 +++-
 meta/recipes-graphics/libsdl/libsdl_1.2.15.bb | 35 ++++++++++++++-------------
 2 files changed, 22 insertions(+), 18 deletions(-)

-- 
2.1.4



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

* [PATCH 1/2] base: check for existing prefix when expanding names in PACKAGECONFIG
  2015-12-02 16:55 [PATCH 0/2] Enable libsdl-native Ross Burton
@ 2015-12-02 16:55 ` Ross Burton
  2015-12-02 16:55 ` [PATCH 2/2] libsdl: expand PACKAGECONFIG and enable native builds Ross Burton
  1 sibling, 0 replies; 5+ messages in thread
From: Ross Burton @ 2015-12-02 16:55 UTC (permalink / raw)
  To: openembedded-core

When the DEPENDS are added as part of the PACKAGECONFIG logic the list of
packages are expanded so that any required nativesdk-/-native/multilib prefixes
and suffixes are added.

However the special handling of virtual/foo names doesn't check that the prefix
already exists, which breaks under nativesdk as in that situation there's an
explicit nativesdk- prefix *and* MLPREFIX is set to nativesdk-.  This results in
the same prefix being applied twice, and virtual packages such as virtual/libx11
ending up as virtual/nativesdk-nativesdk-libx11.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/base.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e6d1599..4ea400e 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -363,7 +363,10 @@ python () {
                     newappends.append(a)
                 elif a.startswith("virtual/"):
                     subs = a.split("/", 1)[1]
-                    newappends.append("virtual/" + prefix + subs + extension)
+                    if subs.startswith(prefix):
+                        newappends.append(a + extension)
+                    else:
+                        newappends.append("virtual/" + prefix + subs + extension)
                 else:
                     if a.startswith(prefix):
                         newappends.append(a + extension)
-- 
2.1.4



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

* [PATCH 2/2] libsdl: expand PACKAGECONFIG and enable native builds
  2015-12-02 16:55 [PATCH 0/2] Enable libsdl-native Ross Burton
  2015-12-02 16:55 ` [PATCH 1/2] base: check for existing prefix when expanding names in PACKAGECONFIG Ross Burton
@ 2015-12-02 16:55 ` Ross Burton
  2015-12-02 23:56   ` Andreas Oberritter
  1 sibling, 1 reply; 5+ messages in thread
From: Ross Burton @ 2015-12-02 16:55 UTC (permalink / raw)
  To: openembedded-core

Use PACKAGECONFIG instead of using logic in DEPENDS and EXTRA_OECONF, adding new
options for PulseAudio, tslib, DirectFB, OpenGL and X11.  Pass
--disable-x11-shared so that it links to the X libraries instead of using
dlopen().

Disable tslib by default as the kernel event input subsystem is generally used.

SDL's OpenGL support requires X11 so check for both x11 and opengl, and merge
the dependencies.

Finally enable native builds, with a minimal PACKAGECONFIG that will build from
oe-core for native and nativesdk.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-graphics/libsdl/libsdl_1.2.15.bb | 35 ++++++++++++++-------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
index b50859a..278d68a 100644
--- a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
+++ b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
@@ -12,13 +12,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
 
 PROVIDES = "virtual/libsdl"
 
-DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxext libxrandr libxrender', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'libglu', '', d)} \
-           tslib"
-DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
-
 PR = "r3"
 
 SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
@@ -37,21 +30,29 @@ inherit autotools lib_package binconfig-disabled pkgconfig
 
 EXTRA_OECONF = "--disable-static --enable-cdrom --enable-threads --enable-timers \
                 --enable-file --disable-oss --disable-esd --disable-arts \
-                --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
+                --disable-diskaudio --disable-nas \
                 --disable-mintaudio --disable-nasm --disable-video-dga \
                 --disable-video-fbcon --disable-video-ps2gs --disable-video-ps3 \
                 --disable-xbios --disable-gem --disable-video-dummy \
-                --enable-input-events --enable-input-tslib --enable-pthreads \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', '--enable-video-directfb', '--disable-video-directfb', d)} \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '--enable-video-opengl', '--disable-video-opengl', d)} \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--enable-video-x11', '--disable-video-x11', d)} \
+                --enable-input-events --enable-pthreads \
                 --disable-video-svga \
                 --disable-video-picogui --disable-video-qtopia --enable-sdl-dlopen \
-                --disable-rpath \
-                --disable-pulseaudio"
+                --disable-rpath"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG_class-native = "x11"
+PACKAGECONFIG_class-nativesdk = "x11"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
-PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
+PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[tslib] = "--enable-input-tslib, --disable-input-tslib, tslib"
+PACKAGECONFIG[directb] = "--enable-video-directfb, --disable-video-directfb, directfb"
+PACKAGECONFIG[opengl] = "--enable-video-opengl, --disable-video-opengl, virtual/libgl libglu"
+PACKAGECONFIG[x11] = "--enable-video-x11 --disable-x11-shared, --disable-video-x11, virtual/libx11 libxext libxrandr libxrender"
 
 EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
 
@@ -64,4 +65,4 @@ do_configure_prepend() {
         export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
 }
 
-BBCLASSEXTEND = "nativesdk"
+BBCLASSEXTEND = "native nativesdk"
-- 
2.1.4



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

* Re: [PATCH 2/2] libsdl: expand PACKAGECONFIG and enable native builds
  2015-12-02 16:55 ` [PATCH 2/2] libsdl: expand PACKAGECONFIG and enable native builds Ross Burton
@ 2015-12-02 23:56   ` Andreas Oberritter
  2015-12-03  0:00     ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Oberritter @ 2015-12-02 23:56 UTC (permalink / raw)
  To: openembedded-core

Hello Ross,

On 02.12.2015 17:55, Ross Burton wrote:
> +PACKAGECONFIG[directb] = "--enable-video-directfb, --disable-video-directfb, directfb"

s/directb/directfb/

Best regards,
Andreas



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

* Re: [PATCH 2/2] libsdl: expand PACKAGECONFIG and enable native builds
  2015-12-02 23:56   ` Andreas Oberritter
@ 2015-12-03  0:00     ` Burton, Ross
  0 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2015-12-03  0:00 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 141 bytes --]

On 2 December 2015 at 23:56, Andreas Oberritter <obi@opendreambox.org>
wrote:

> s/directb/directfb/
>

Well spotted, thanks!

Ross

[-- Attachment #2: Type: text/html, Size: 547 bytes --]

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

end of thread, other threads:[~2015-12-03  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-02 16:55 [PATCH 0/2] Enable libsdl-native Ross Burton
2015-12-02 16:55 ` [PATCH 1/2] base: check for existing prefix when expanding names in PACKAGECONFIG Ross Burton
2015-12-02 16:55 ` [PATCH 2/2] libsdl: expand PACKAGECONFIG and enable native builds Ross Burton
2015-12-02 23:56   ` Andreas Oberritter
2015-12-03  0:00     ` Burton, Ross

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