From 3b67e8e664d4087c3cf6573bd327ae5c4a196d67 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Mon, 29 Jul 2019 22:20:01 +0200 Subject: [PATCH] core: allow br2-external trees to provide libjpeg Similar to toolchains, we now offer a way for br2-external trees to provide their libjpeg implementation, which gets included in the jpeg choice. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan Signed-off-by: Peter Korsgaard --- package/jpeg/Config.in | 3 +++ support/scripts/br2-external | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/package/jpeg/Config.in b/package/jpeg/Config.in index a4a63cc7dc..3d0fea83b1 100644 --- a/package/jpeg/Config.in +++ b/package/jpeg/Config.in @@ -38,6 +38,9 @@ config BR2_PACKAGE_JPEG_TURBO http://www.libjpeg-turbo.org +# libjpeg from br2-external trees, if any +source "$BR2_BASE_DIR/.br2-external.in.jpeg" + endchoice config BR2_PACKAGE_HAS_JPEG diff --git a/support/scripts/br2-external b/support/scripts/br2-external index b08b77bd33..82c8afd64c 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -158,6 +158,7 @@ do_kconfig() { paths menus toolchains + jpeg ) for br2 in "${items[@]}"; do @@ -205,6 +206,14 @@ do_kconfig() { else printf '# No toolchain from: %s\n\n' "${br2_desc}" fi >>"${outputdir}/.br2-external.in.toolchains" + + if [ -f "${br2_ext}/provides/jpeg.in" ]; then + printf 'comment "jpeg from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/jpeg.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No jpeg from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.jpeg" done printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus" -- 2.30.2