core: allow br2-external trees to provide libjpeg
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 29 Jul 2019 20:20:01 +0000 (22:20 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 3 Aug 2019 22:13:37 +0000 (00:13 +0200)
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" <yann.morin.1998@free.fr>
Cc: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/jpeg/Config.in
support/scripts/br2-external

index a4a63cc7dca181ad7cdfca6bff0da95f791ca867..3d0fea83b182e1f8085b7315a7d9fc7d513e5137 100644 (file)
@@ -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
index b08b77bd3360a3e9c9c0b9e5429a8c7446d5ba8a..82c8afd64c27651e67621eee4b48e282e1c2c073 100755 (executable)
@@ -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"