Patchwork qemu: Add alsa PACKAGECONFIG and cleanup native/nativesdk DEPENDS

login
register
mail settings
Submitter Richard Purdie
Date Aug. 14, 2014, 2:25 p.m.
Message ID <1408026352.22187.112.camel@ted>
Download mbox | patch
Permalink /patch/78229/
State Accepted
Commit 153773e62ba00c19e9094369d5c2c681b2c94365
Headers show

Comments

Richard Purdie - Aug. 14, 2014, 2:25 p.m.
Converting this dependency to become a PACKAGECONFIG makes sense. Since
there is a "," in the configuration option, its not quite as straightforward
as normal.

Also clean up the native and nativesdk DEPENDS and set the PACKAGECONFIG
entries to match the old behaviour by default.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Martin Jansa - Aug. 14, 2014, 2:58 p.m.
On Thu, Aug 14, 2014 at 03:25:52PM +0100, Richard Purdie wrote:
> Converting this dependency to become a PACKAGECONFIG makes sense. Since
> there is a "," in the configuration option, its not quite as straightforward
> as normal.
> 
> Also clean up the native and nativesdk DEPENDS and set the PACKAGECONFIG
> entries to match the old behaviour by default.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
> index 0c89e0b..e6f9e38 100644
> --- a/meta/recipes-devtools/qemu/qemu.inc
> +++ b/meta/recipes-devtools/qemu/qemu.inc
> @@ -1,10 +1,10 @@
>  SUMMARY = "Fast open source processor emulator"
>  HOMEPAGE = "http://qemu.org"
>  LICENSE = "GPLv2 & LGPLv2.1"
> -DEPENDS = "glib-2.0 zlib alsa-lib pixman \
> +DEPENDS = "glib-2.0 zlib pixman \
>             ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
> -DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native pixman-native dtc-native"
> -DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl nativesdk-glib-2.0 nativesdk-pixman nativesdk-dtc"
> +DEPENDS_class-native = "zlib-native glib-2.0-native pixman-native"
> +DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-glib-2.0 nativesdk-pixman"
>  RDEPENDS_${PN}_class-nativesdk = "nativesdk-libsdl"
>  RDEPENDS_${PN}_class-target += "bash python"
>  
> @@ -26,7 +26,7 @@ SRC_URI_append_class-native = "\
>      file://fix-libcap-header-issue-on-some-distro.patch \
>      "
>  
> -EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --audio-drv-list=oss,alsa --disable-bluez --with-system-pixman --extra-cflags='${CFLAGS}'"
> +EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror  --disable-bluez --with-system-pixman --extra-cflags='${CFLAGS}'"
>  
>  EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror \
>  				"
> @@ -79,7 +79,9 @@ do_install_append() {
>  }
>  # END of qemu-mips workaround
>  
> -PACKAGECONFIG ??= "fdt sdl"
> +PACKAGECONFIG ??= "fdt sdl alsa"
> +PACKAGECONFIG_class-native ??= "fdt alsa"
> +PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
>  PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
>  PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
>  PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
> @@ -100,6 +102,9 @@ PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl,"
>  PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
>  PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
>  PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
> +PACKAGECONFIG[alsa] = ",,alsa-lib"
> +
> +EXTRA_OECONF += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', '--audio-drv-list=oss,alsa', '', d)}"

Is there some option to disable it, when alsa PACKAGECONFIG isn't
selected? Or is it disabled by default?

>  # Qemu target will not build in world build for ARM or Mips
>  BROKEN_qemuarm = "1"
> 
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 0c89e0b..e6f9e38 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -1,10 +1,10 @@ 
 SUMMARY = "Fast open source processor emulator"
 HOMEPAGE = "http://qemu.org"
 LICENSE = "GPLv2 & LGPLv2.1"
-DEPENDS = "glib-2.0 zlib alsa-lib pixman \
+DEPENDS = "glib-2.0 zlib pixman \
            ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
-DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native pixman-native dtc-native"
-DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl nativesdk-glib-2.0 nativesdk-pixman nativesdk-dtc"
+DEPENDS_class-native = "zlib-native glib-2.0-native pixman-native"
+DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-glib-2.0 nativesdk-pixman"
 RDEPENDS_${PN}_class-nativesdk = "nativesdk-libsdl"
 RDEPENDS_${PN}_class-target += "bash python"
 
@@ -26,7 +26,7 @@  SRC_URI_append_class-native = "\
     file://fix-libcap-header-issue-on-some-distro.patch \
     "
 
-EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --audio-drv-list=oss,alsa --disable-bluez --with-system-pixman --extra-cflags='${CFLAGS}'"
+EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror  --disable-bluez --with-system-pixman --extra-cflags='${CFLAGS}'"
 
 EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror \
 				"
@@ -79,7 +79,9 @@  do_install_append() {
 }
 # END of qemu-mips workaround
 
-PACKAGECONFIG ??= "fdt sdl"
+PACKAGECONFIG ??= "fdt sdl alsa"
+PACKAGECONFIG_class-native ??= "fdt alsa"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
 PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
 PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
 PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
@@ -100,6 +102,9 @@  PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl,"
 PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
 PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
 PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
+PACKAGECONFIG[alsa] = ",,alsa-lib"
+
+EXTRA_OECONF += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', '--audio-drv-list=oss,alsa', '', d)}"
 
 # Qemu target will not build in world build for ARM or Mips
 BROKEN_qemuarm = "1"