core: allow br2-external trees to provide opensl
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 29 Jul 2019 20:20:02 +0000 (22:20 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 3 Aug 2019 22:13:37 +0000 (00:13 +0200)
Similar to toolchains and jpeg, we now offer a way for br2-external
trees to provide their openssl implementation, which gets included in
the openssl 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/openssl/Config.in
support/scripts/br2-external

index d84033141f59078b5d0293a0a1193589b7bd0069..a64660bea373b35316b0efc89b309b3e0f019e07 100644 (file)
@@ -68,6 +68,9 @@ config BR2_PACKAGE_LIBRESSL_BIN
 
 endif
 
+# openssl from br2-external trees, if any
+source "$BR2_BASE_DIR/.br2-external.in.openssl"
+
 endchoice
 
 config BR2_PACKAGE_HAS_OPENSSL
index 82c8afd64c27651e67621eee4b48e282e1c2c073..171526f8c865c561f43ce1144a1d55a9ad78db07 100755 (executable)
@@ -159,6 +159,7 @@ do_kconfig() {
         menus
         toolchains
         jpeg
+        openssl
     )
 
     for br2 in "${items[@]}"; do
@@ -214,6 +215,14 @@ do_kconfig() {
         else
             printf '# No jpeg from: %s\n\n' "${br2_desc}"
         fi >>"${outputdir}/.br2-external.in.jpeg"
+
+        if [ -f "${br2_ext}/provides/openssl.in" ]; then
+            printf 'comment "openssl from: %s"\n' "${br2_desc}"
+            printf 'source "%s/provides/openssl.in"\n' "${br2_ext}"
+            printf '\n'
+        else
+            printf '# No openssl from: %s\n\n' "${br2_desc}"
+        fi >>"${outputdir}/.br2-external.in.openssl"
     done
 
     printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus"