diff mbox series

[meta-oe] mozjs: use PV in MULTILIB_SCRIPTS

Message ID 20230927200830.2296905-2-martin.jansa@gmail.com
State Under Review
Headers show
Series [meta-oe] mozjs: use PV in MULTILIB_SCRIPTS | expand

Commit Message

Martin Jansa Sept. 27, 2023, 8:08 p.m. UTC
* 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 <martin.jansa@gmail.com>
---
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 mbox series

Patch

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
 }