diff mbox series

[kirkstone+,2/2] recipes-graphics: ti-img-rogue-umlibs: Make -vulkan optional

Message ID 20230504123736.1475746-2-d.schultz@phytec.de
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [kirkstone+,1/2] conf: machine: include: k3: Select correct WKS file | expand

Commit Message

Daniel Schultz May 4, 2023, 12:37 p.m. UTC
Only include the ti-img-rogue-umlibs-vulkan package if the
DISTRO_FEATURES x11 is enabled. Right now, this recipe has a failed
build dependency on images without x11.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
 .../libgles/ti-img-rogue-umlibs_23.1.6404501.bb   | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Comments

Denys Dmytriyenko May 7, 2023, 4:08 p.m. UTC | #1
On Thu, May 04, 2023 at 05:37:36AM -0700, Daniel Schultz wrote:
> Only include the ti-img-rogue-umlibs-vulkan package if the
> DISTRO_FEATURES x11 is enabled. Right now, this recipe has a failed
> build dependency on images without x11.

Just to clarify - this recipe has run-time dependency from vulkan package 
to libx11-xcb, which itself won't build w/o "x11" distro feature.


> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>

Tested-by: Denys Dmytriyenko <denys@konsulko.com>


> ---
>  .../libgles/ti-img-rogue-umlibs_23.1.6404501.bb   | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_23.1.6404501.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_23.1.6404501.bb
> index c33f8ae0..a6ed57f4 100644
> --- a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_23.1.6404501.bb
> +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_23.1.6404501.bb
> @@ -29,10 +29,18 @@ do_install:append() {
>          mv ${D}/lib/firmware ${D}${nonarch_base_libdir}
>          rmdir ${D}/lib
>      fi
> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
> +        rm -rf ${D}${libdir}/libVK_IMG.so*
> +    fi 
>      rm -rf "${D}/etc/init.d"
>  }
>  
> -PACKAGES = "${PN}-vulkan ${PN}-tools ${PN}-firmware ${PN}"
> +PACKAGES = " \
> +    ${@bb.utils.contains("DISTRO_FEATURES", "x11", "${PN}-vulkan", "", d)} \
> +    ${PN}-tools \
> +    ${PN}-firmware \
> +    ${PN} \
> +"
>  
>  FILES:${PN}-vulkan = " \
>      ${datadir}/vulkan \
> @@ -56,7 +64,10 @@ RDEPENDS:${PN}-tools = "python3-core"
>  FILES:${PN}-firmware = "${base_libdir}/firmware/*"
>  INSANE_SKIP:${PN}-firmware += "arch"
>  
> -RRECOMMENDS:${PN} += "${PN}-vulkan ${PN}-tools"
> +RRECOMMENDS:${PN} += " \
> +    ${@bb.utils.contains("DISTRO_FEATURES", "x11", "${PN}-vulkan", "", d)} \
> +    ${PN}-tools \
> +"
>  RDEPENDS:${PN} += " ${PN}-firmware"
>  
>  INSANE_SKIP:${PN} += "already-stripped dev-so"
> -- 
> 2.25.1
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_23.1.6404501.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_23.1.6404501.bb
index c33f8ae0..a6ed57f4 100644
--- a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_23.1.6404501.bb
+++ b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_23.1.6404501.bb
@@ -29,10 +29,18 @@  do_install:append() {
         mv ${D}/lib/firmware ${D}${nonarch_base_libdir}
         rmdir ${D}/lib
     fi
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
+        rm -rf ${D}${libdir}/libVK_IMG.so*
+    fi 
     rm -rf "${D}/etc/init.d"
 }
 
-PACKAGES = "${PN}-vulkan ${PN}-tools ${PN}-firmware ${PN}"
+PACKAGES = " \
+    ${@bb.utils.contains("DISTRO_FEATURES", "x11", "${PN}-vulkan", "", d)} \
+    ${PN}-tools \
+    ${PN}-firmware \
+    ${PN} \
+"
 
 FILES:${PN}-vulkan = " \
     ${datadir}/vulkan \
@@ -56,7 +64,10 @@  RDEPENDS:${PN}-tools = "python3-core"
 FILES:${PN}-firmware = "${base_libdir}/firmware/*"
 INSANE_SKIP:${PN}-firmware += "arch"
 
-RRECOMMENDS:${PN} += "${PN}-vulkan ${PN}-tools"
+RRECOMMENDS:${PN} += " \
+    ${@bb.utils.contains("DISTRO_FEATURES", "x11", "${PN}-vulkan", "", d)} \
+    ${PN}-tools \
+"
 RDEPENDS:${PN} += " ${PN}-firmware"
 
 INSANE_SKIP:${PN} += "already-stripped dev-so"