On Thu, 02 Apr 2020 at 15:54:03 +0200, Jeremie Courreges-Anglas wrote: > > +cc maintainer ;) > > On Thu, Apr 02 2020, Denis Fondras <[email protected]> wrote: > > node-gyp needs to know about the installed Node.js version. > > > > This needs to be updated each time Node.js is upgraded. May we do this > > automatically with sed in Makefile pre-patch section ? > > pre-configure already uses ${SUBST_CMD} on this file. > With this diff you should be able to use ${NODE_VERSION} in > patches/patch-deps_npm_node_modules_node-gyp_lib_install_js (untested).
So upstream ships -headers distfiles now - we should be using that instead of the full tarball. Alternatively, we could completely remove this fix as we don't have native modules in tree anymore. Here is a diff that updates node to the latest version and includes a fix to store the -headers file: https://deftly.net/patches/node-12.16.1.diff > > Index: Makefile > =================================================================== > RCS file: /d/cvs/ports/lang/node/Makefile,v > retrieving revision 1.82 > diff -u -p -p -u -r1.82 Makefile > --- Makefile 24 Nov 2019 18:42:28 -0000 1.82 > +++ Makefile 2 Apr 2020 13:52:05 -0000 > @@ -61,6 +61,7 @@ SUBST_VARS += DISTNAME > SUBST_VARS += DISTFILES > SUBST_VARS += EXTRACT_SUFX > SUBST_VARS += LOCALBASE > +SUBST_VARS += NODE_VERSION > SUBST_VARS += PREFIX > SUBST_VARS += WRKDIST > > > > Index: patches/patch-deps_npm_node_modules_node-gyp_lib_install_js > > =================================================================== > > RCS file: > > /cvs/ports/lang/node/patches/patch-deps_npm_node_modules_node-gyp_lib_install_js,v > > retrieving revision 1.11 > > diff -u -p -r1.11 patch-deps_npm_node_modules_node-gyp_lib_install_js > > --- patches/patch-deps_npm_node_modules_node-gyp_lib_install_js 24 Nov > > 2019 18:42:28 -0000 1.11 > > +++ patches/patch-deps_npm_node_modules_node-gyp_lib_install_js 2 Apr > > 2020 07:18:39 -0000 > > @@ -11,7 +11,7 @@ Index: deps/npm/node_modules/node-gyp/li > > > > // now download the node tarball > > - var tarPath = gyp.opts.tarball > > -+ var tarPath = gyp.opts['tarball'] || > > '/usr/local/share/node/node-v12.9.0.tar.gz' // Fix for OpenBSD > > ++ var tarPath = gyp.opts['tarball'] || > > '/usr/local/share/node/node-v12.13.1.tar.gz' // Fix for OpenBSD > > var badDownload = false > > var extractCount = 0 > > var contentShasums = {} > > > > -- > jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE -- PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A 4AF0 1F81 112D 62A9 ADCE
