* to avoid possible issue next time new mozjs version recipe is
  introduced (as multilib isn't as well tested as other build configs)

* this depends on oe-core change to expand script name in MULTILIB_SCRIPTS:
  https://lists.openembedded.org/g/openembedded-core/message/188301

Signed-off-by: Martin Jansa <[email protected]>
---
v2: just rebase on top of master-next

 meta-oe/recipes-extended/mozjs/mozjs-102_102.15.1.bb | 7 ++++---
 meta-oe/recipes-extended/mozjs/mozjs-115_115.2.0.bb  | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102_102.15.1.bb 
b/meta-oe/recipes-extended/mozjs/mozjs-102_102.15.1.bb
index 38e4128d6a..3a7b51c145 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-102_102.15.1.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs-102_102.15.1.bb
@@ -66,12 +66,13 @@ do_install() {
 
 inherit multilib_script multilib_header
 
-MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js102-config"
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
+MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config"
 
 do_install:append() {
-    oe_multilib_header mozjs-102/js-config.h
+    oe_multilib_header mozjs-${MAJ_VER}/js-config.h
     sed -e 's@${STAGING_DIR_HOST}@@g' \
-        -i ${D}${bindir}/js102-config
+        -i ${D}${bindir}/js${MAJ_VER}-config
     rm -f ${D}${libdir}/libjs_static.ajs
     # remove the build path
     sed -i -e 's@${WORKDIR}@@g' `find ${B} -name Unified_c*.c*`
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115_115.2.0.bb 
b/meta-oe/recipes-extended/mozjs/mozjs-115_115.2.0.bb
index b029c5f4ec..fcdf64c932 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-115_115.2.0.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115_115.2.0.bb
@@ -66,12 +66,13 @@ do_install() {
 
 inherit multilib_script multilib_header
 
-MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js115-config"
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
+MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config"
 
 do_install:append() {
-    oe_multilib_header mozjs-115/js-config.h
+    oe_multilib_header mozjs-${MAJ_VER}/js-config.h
     sed -e 's@${STAGING_DIR_HOST}@@g' \
-        -i ${D}${bindir}/js115-config
+        -i ${D}${bindir}/js${MAJ_VER}-config
     rm -f ${D}${libdir}/libjs_static.ajs
 }
 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#105202): 
https://lists.openembedded.org/g/openembedded-devel/message/105202
Mute This Topic: https://lists.openembedded.org/mt/101625379/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to