[macports-ports] 07/07: npm: use an older nodejs on < 10.7

Ryan Schmidt ryandesign at macports.org
Mon Jan 30 10:27:27 UTC 2017


> On Jan 26, 2017, at 17:17, Mojca Miklavec <mojca at macports.org> wrote:
> 
> tobypeterson pushed a commit to branch master
> in repository macports-ports.
> 
> 
> https://github.com/macports/macports-ports/commit/19b2d7444aee50a1a155c2f571b4123301ba16c4
> 
> commit 19b2d7444aee50a1a155c2f571b4123301ba16c4
> 
> Author: Mojca Miklavec <mojca at macports.org>
> AuthorDate: Wed Dec 28 22:24:05 2016 +0100
> 
> 
>     npm: use an older nodejs on < 10.7
> 
>     
> 
>     See: https://trac.macports.org/ticket/53166
> 
> ---
>  devel/npm3/Portfile | 6 ++++++
>  devel/npm4/Portfile | 6 ++++++
>  2 files changed, 12 insertions(+)
> 
> 
> diff --git a/devel/npm3/Portfile b/devel/npm3/Portfile
> 
> index 34ab8c5..dfefe8f 100644
> 
> --- a/devel/npm3/Portfile
> 
> +++ b/devel/npm3/Portfile
> 
> @@ -36,6 +36,12 @@ worksrcdir          "package"
> 
>  
>  depends_lib         path:bin/node:nodejs6
>  
> 
> +platform darwin {
> 
> +    if {${os.major} < 11} {
> 
> +        depends_lib-replace bin:node:nodejs6 bin:node:nodejs4
> 
> +    }
> 
> +}
> 
> +
> 
>  use_configure       no
>  
>  patchfiles          patch-lib-update.js.diff
> 
> diff --git a/devel/npm4/Portfile b/devel/npm4/Portfile
> 
> index 16f407e..395373e 100644
> 
> --- a/devel/npm4/Portfile
> 
> +++ b/devel/npm4/Portfile
> 
> @@ -34,6 +34,12 @@ worksrcdir          "package"
> 
>  
>  depends_lib         path:bin/node:nodejs6
>  
> 
> +platform darwin {
> 
> +    if {${os.major} < 11} {
> 
> +        depends_lib-replace bin:node:nodejs6 bin:node:nodejs4
> 
> +    }
> 
> +}

This doesn't do anything. The port doesn't have a "bin:node:nodejs6" dependency to replace, nor should it, because that would allow non-MacPorts "node" binaries to satisfy the dependency, which we don't want. The port has a "path:bin/node:nodejs6" dependency, so the line needs to read "depends_lib-replace path:bin/node:nodejs6 path:bin/node:nodejs4".

I assume you copied this block from yarn, which does have a "bin:node:nodejs6" dependency. I would replace that with a "path:bin/node:nodejs6" dependency unless there's something special about yarn that I'm not aware of.




More information about the macports-dev mailing list