[94636] trunk/dports/devel/nodejs/Portfile

ciserlohn at macports.org ciserlohn at macports.org
Mon Jun 25 08:35:56 PDT 2012


Revision: 94636
          https://trac.macports.org/changeset/94636
Author:   ciserlohn at macports.org
Date:     2012-06-25 08:35:56 -0700 (Mon, 25 Jun 2012)
Log Message:
-----------
ndoejs: update to version 0.8.0 (based on the nodejs-devel at 0.7.12 portfile)

Modified Paths:
--------------
    trunk/dports/devel/nodejs/Portfile

Modified: trunk/dports/devel/nodejs/Portfile
===================================================================
--- trunk/dports/devel/nodejs/Portfile	2012-06-25 13:46:52 UTC (rev 94635)
+++ trunk/dports/devel/nodejs/Portfile	2012-06-25 15:35:56 UTC (rev 94636)
@@ -4,7 +4,7 @@
 PortSystem              1.0
 
 name                    nodejs
-version                 0.6.19
+version                 0.8.0
 categories              devel net
 platforms               darwin
 license                 {MIT BSD}
@@ -22,8 +22,8 @@
 homepage                http://nodejs.org/
 master_sites            ${homepage}dist/v${version}
 
-checksums               rmd160  a57f07d2bf2282f1f8200cd6e97fb0ae2b0b0502 \
-                        sha256  4e33292477b01dfcf50bc628d580fd5af3e5ff807490ec46472b84100fb52fbb
+checksums               rmd160  acf06bbaa5fe6e707e60c719f27a7a4f9f041172 \
+                        sha256  ecafca018b5109a28537633d0433d513f68b1bae7191a1821e8eaa84ccf128ee
 
 distname                node-v${version}
 
@@ -38,33 +38,38 @@
 configure.python ${prefix}/bin/python2.7
 
 post-patch {
-    foreach f [concat ${worksrcpath}/wscript \
-                   ${worksrcpath}/configure-gyp \
+    foreach f [concat ${worksrcpath}/configure \
                    ${worksrcpath}/tools/node-waf \
                    ${worksrcpath}/tools/waf-light \
                    ${worksrcpath}/tools/gyp/gyp \
+                   ${worksrcpath}/tools/gyp_addon \
                    ${worksrcpath}/tools/gyp_node \
                    ${worksrcpath}/deps/uv/gyp_uv \
+                   ${worksrcpath}/tools/gyp/test/mac/gyptest-sourceless-module.gyp \
+                   ${worksrcpath}/tools/gyp/test/mac/gyptest-postbuild-static-library.gyp \
+                   ${worksrcpath}/deps/npm/node_modules/node-gyp/legacy/tools/gyp/gyp \
+                   ${worksrcpath}/deps/npm/node_modules/node-gyp/legacy/tools/gyp_addon \
                    [rec_glob ${worksrcpath} *.py]] {
         reinplace "s|/usr/bin/env python|${configure.python}|" ${f}
     }
+    reinplace "s|/usr/bin/env node|${prefix}/bin/node|" ${worksrcpath}/tools/doc/node_modules/marked/bin/marked 
 }
 
 configure.args          --without-ssl
 configure.args-append   --without-npm
 
 variant python25 conflicts python26 python27 description {Use python 2.5} {
-    depends_lib         port:python25
+    depends_lib-append  port:python25
     configure.python    ${prefix}/bin/python2.5
 }
 
 variant python26 conflicts python25 python27 description {Use python 2.6} {
-    depends_lib         port:python26
+    depends_lib-append  port:python26
     configure.python    ${prefix}/bin/python2.6
 }
 
 variant python27 conflicts python25 python26 description {Use python 2.7} {
-    depends_lib         port:python27
+    depends_lib-append  port:python27
     configure.python    ${prefix}/bin/python2.7
 }
 
@@ -76,6 +81,9 @@
     depends_build-append    port:pkgconfig
     depends_lib-append      port:openssl
     configure.args-delete   --without-ssl
+    configure.args-append   --openssl-use-sys
+    configure.args-append   --openssl-includes=${prefix}/include/openssl
+    configure.args-append   --openssl-libpath=${prefix}/lib
 }
 
 default_variants        +ssl
@@ -92,19 +100,73 @@
 
 use_parallel_build      no
 
-configure.args-append   --dest-cpu=${build_arch}
+switch $build_arch {
+    i386 {
+        configure.args-append   --dest-cpu=ia32
+    }
+    x86_64 {
+        configure.args-append   --dest-cpu=x64
+    }
+}
 
 build.args-append   CC=${configure.cc} \
                     CXX=${configure.cxx} \
                     CPP=${configure.cpp} \
-                    CFLAGS="${configure.cflags} ${configure.cc_archflags}" \
-                    LDFLAGS="${configure.ldflags} ${configure.ld_archflags}" \
+                    CFLAGS=${configure.cflags} \
+                    LDFLAGS=${configure.ldflags} \
                     PYTHON=${configure.python}
 
-post-destroot {
+destroot {
+    set bindir ${destroot}${prefix}/bin
+    set libdir ${destroot}${prefix}/lib/node
+    set incdir ${destroot}${prefix}/include/node
+    set incpdir ${destroot}${prefix}/include/node/uv-private
     set docdir ${destroot}${prefix}/share/doc/${name}
+
+    xinstall -d ${bindir}
+    xinstall -d ${libdir}
+    xinstall -d ${incdir}
+    xinstall -d ${incpdir}
     xinstall -d ${docdir}
+
+# install binaries
+    xinstall -m 755 -W ${worksrcpath} \
+        out/Release/node \
+        tools/node-waf \
+        ${bindir}
+
+# install headers
     xinstall -m 644 -W ${worksrcpath} \
+        src/node.h \
+        src/node_buffer.h \
+        src/node_object_wrap.h \
+        src/node_version.h \
+        deps/v8/include/v8-debug.h \
+        deps/v8/include/v8-preparser.h \
+        deps/v8/include/v8-profiler.h \
+        deps/v8/include/v8-testing.h \
+        deps/v8/include/v8.h \
+        deps/v8/include/v8stdint.h \
+        deps/uv/include/uv.h \
+        deps/uv/include/ares.h \
+        deps/uv/include/ares_version.h \
+        ${incdir}
+
+# install privat uv headers
+    xinstall -m 644 -W ${worksrcpath} \
+        deps/uv/include/uv-private/eio.h \
+        deps/uv/include/uv-private/ev.h \
+        deps/uv/include/uv-private/ngx-queue.h \
+        deps/uv/include/uv-private/tree.h \
+        deps/uv/include/uv-private/uv-unix.h \
+        deps/uv/include/uv-private/uv-win.h \
+        ${incpdir}
+
+# install the wafadmin tool
+    eval xinstall -m 644 [rec_glob ${worksrcpath}/tools/wafadmin *.py] ${libdir}
+
+# install docs
+    xinstall -m 644 -W ${worksrcpath} \
         AUTHORS \
         ChangeLog \
         LICENSE \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120625/3109a6bd/attachment.html>


More information about the macports-changes mailing list