Skip to contentSkip to conversation

nodejs: use python3native

PATCH New Martin Jansa 1 participant 2 messages Jan 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nodejs: use python3native

---
 .../recipes-devtools/nodejs/nodejs_12.14.0.bb  | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb +8 -10
index 35abb8f1f0..e4a2aa18c4 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=be4d5107c64dc3d7c57e3797e1a0674b"
 DEPENDS = "openssl"
 DEPENDS_append_class-target = " nodejs-native"
 
-inherit pkgconfig ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative", "", d)}
+inherit pkgconfig python3native
 
 COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
 COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
@@ -96,7 +96,7 @@ do_configure () {
     export LD="${CXX}"
     GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
     # $TARGET_ARCH settings don't match --dest-cpu settings
-   ./configure --prefix=${prefix} --without-snapshot --shared-openssl \
+    python3 configure.py --prefix=${prefix} --without-snapshot --shared-openssl \
                --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
                --dest-os=linux \
                --libdir=${D}${libdir} \
@@ -111,6 +111,10 @@ do_compile () {
 
 do_install () {
     oe_runmake install DESTDIR=${D}
+
+    # wasn't updated since 2009 and is the only thing requiring python2 in runtime
+    # ERROR: nodejs-12.14.1-r0 do_package_qa: QA Issue: /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples contained in package nodejs-npm requires /usr/bin/python, but no providers found in RDEPENDS_nodejs-npm? [file-rdeps]
+    rm -f ${D}${exec_prefix}/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples
 }
 
 do_install_append_class-native() {
@@ -142,16 +146,10 @@ do_install_append_class-target() {
 
 PACKAGES =+ "${PN}-npm"
 FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx"
-RDEPENDS_${PN}-npm = "bash python-core python-shell python-datetime python-subprocess python-textutils \
-    python-compiler python-misc python-multiprocessing"
+RDEPENDS_${PN}-npm = "bash python3-core python3-shell python3-datetime \
+    python3-misc python3-multiprocessing"
 
 PACKAGES =+ "${PN}-systemtap"
 FILES_${PN}-systemtap = "${datadir}/systemtap"
 
-
 BBCLASSEXTEND = "native"
-
-python() {
-    if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
-        raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
-}
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 nodejs: upgrade to 12.14.1

---
 .../nodejs/{nodejs_12.14.0.bb => nodejs_12.14.1.bb}           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta-oe/recipes-devtools/nodejs/{nodejs_12.14.0.bb => nodejs_12.14.1.bb} (97%)
meta-oe/recipes-devtools/nodejs/nodejs_12.14.1.bb renamed from meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb +2 -2
similarity index 97%
rename from meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb
rename to meta-oe/recipes-devtools/nodejs/nodejs_12.14.1.bb
index e4a2aa18c4..e9ec500e51 100644
@@ -24,8 +24,8 @@ SRC_URI_append_class-target = " \
            file://0002-Using-native-binaries.patch \
            "
 
-SRC_URI[md5sum] = "6762f5629f6f68fb9bdf83a741cba038"
-SRC_URI[sha256sum] = "088a217ba2af641b8cc15be29f6e2956b8a33e6badb85596bbc2cdea9df9be71"
+SRC_URI[md5sum] = "1c78a75f5c95321f533ecccca695e814"
+SRC_URI[sha256sum] = "877b4b842318b0e09bc754faf7343f2f097f0fc4f88ab9ae57cf9944e88e7adb"
 
 S = "${WORKDIR}/node-v${PV}"
 
Signature · 1 line
2.20.1