[153656] trunk/dports/devel/nodejs4

Ryan Schmidt ryandesign at macports.org
Fri Oct 7 06:29:36 PDT 2016


> On Oct 6, 2016, at 4:52 PM, ciserlohn at macports.org wrote:
> 
> Revision
> 153656
> Author
> ciserlohn at macports.org
> Date
> 2016-10-06 14:52:24 -0700 (Thu, 06 Oct 2016)
> Log Message
> 
> nodejs4: update to version 4.5.0; add patch to fix compilation on darwin version 13 or higher
> Modified Paths
> 
> 	• trunk/dports/devel/nodejs4/Portfile
> Added Paths
> 
> 	• trunk/dports/devel/nodejs4/files/patch-src-util.h.diff
> Diff
> 
> Modified: trunk/dports/devel/nodejs4/Portfile (153655 => 153656)
> 
> --- trunk/dports/devel/nodejs4/Portfile	2016-10-06 21:42:28 UTC (rev 153655)
> +++ trunk/dports/devel/nodejs4/Portfile	2016-10-06 21:52:24 UTC (rev 153656)
> 
> @@ -5,7 +5,7 @@
> 
>  PortGroup               compiler_blacklist_versions 1.0
> 
>  
> 
>  name                    nodejs4
> 
> -version                 4.4.7
> 
> +version                 4.5.0
> 
>  
> 
>  categories              devel net
> 
>  platforms               darwin
> 
> @@ -24,8 +24,8 @@
> 
>  homepage                http://nodejs.org/
>  master_sites            ${homepage}dist/v${version}
> 
>  
> 
> -checksums               rmd160  8e5e492de0ce39e7af1ed32dfe4c900973994b7b \
> -                        sha256  cbe1c6e421969dd5639d0fbaa6d3c1f56c0463b87efe75be8594638da4d8fc4f
> 
> +checksums               rmd160  f31d3440578c322ca8c1bf2ba4e0e74d5629e60f \
> +                        sha256  74ced83b8d890d90e2a8b0d54b0d0e9b5e01d6fd6148cec6e9911ff6eaf0cf21
> 
>  
> 
>  distname                node-v${version}
> 
>  
> 
> @@ -48,6 +48,11 @@
> 
>  patchfiles              patch-common.gypi.diff \
> 
>                          patch-tools-gyp-pylib-gyp-generator-make.py.diff
> 
>  
> 
> +if {${os.major} > 12} {
> +    patchfiles-append   patch-src-util.h.diff
> +}
> +
> +
> 
>  post-patch {
> 
>      foreach f [concat ${worksrcpath}/configure \
> 
>                     ${worksrcpath}/tools/gyp/gyp \
> 
> Added: trunk/dports/devel/nodejs4/files/patch-src-util.h.diff (0 => 153656)
> 
> --- trunk/dports/devel/nodejs4/files/patch-src-util.h.diff	                        (rev 0)
> +++ trunk/dports/devel/nodejs4/files/patch-src-util.h.diff	2016-10-06 21:52:24 UTC (rev 153656)
> 
> @@ -0,0 +1,14 @@
> 
> +--- src/util.h.orig	2016-10-06 23:29:01.000000000 +0200
> ++++ src/util.h	2016-10-06 23:27:20.000000000 +0200
> +@@ -8,11 +8,7 @@
> + #include <stddef.h>
> + #include <stdlib.h>
> + 
> +-#ifdef __APPLE__
> +-#include <tr1/type_traits>  // NOLINT(build/c++tr1)
> +-#else
> + #include <type_traits>  // std::remove_reference
> +-#endif
> + 
> + namespace node {

It does not look like this patch should be OS version specific, but rather based on the value of configure.cxx_stdlib. If it's libc++, use the patch, otherwise don't. Users can configure earlier OS X versions to use libc++ too; see the LibcxxOnOlderSystems wiki page.

Ideally, fix the patch so that it can be included unconditionally and submitted upstream (i.e. so that it detects whether C++11 is supported, rather than basing the decision on __APPLE__).







More information about the macports-dev mailing list