[82093] trunk/dports/devel

ciserlohn at macports.org ciserlohn at macports.org
Sun Aug 7 15:50:15 PDT 2011


Revision: 82093
          http://trac.macports.org/changeset/82093
Author:   ciserlohn at macports.org
Date:     2011-08-07 15:50:11 -0700 (Sun, 07 Aug 2011)
Log Message:
-----------
nodejs, nodejs-devel: actually use the python version declared in  (fixes #30617)

Modified Paths:
--------------
    trunk/dports/devel/nodejs/Portfile
    trunk/dports/devel/nodejs/files/patch-Makefile-python.diff
    trunk/dports/devel/nodejs-devel/Portfile
    trunk/dports/devel/nodejs-devel/files/patch-Makefile-python.diff

Modified: trunk/dports/devel/nodejs/Portfile
===================================================================
--- trunk/dports/devel/nodejs/Portfile	2011-08-07 20:04:32 UTC (rev 82092)
+++ trunk/dports/devel/nodejs/Portfile	2011-08-07 22:50:11 UTC (rev 82093)
@@ -31,6 +31,22 @@
 patchfiles              patch-Makefile-python.diff \
                         patch-platform.diff
 
+proc rec_glob {basedir pattern} {
+    set files [glob -directory $basedir -nocomplain -type f $pattern]
+    foreach dir [glob -directory $basedir -nocomplain -type d *] {
+        eval lappend files [rec_glob $dir $pattern]
+    }
+    return $files
+}
+
+set py27_bin ${prefix}/bin/python2.7
+
+post-patch {
+    foreach f [concat ${worksrcpath}/tools/node-waf ${worksrcpath}/tools/waf-light ${worksrcpath}/wscript [rec_glob ${worksrcpath} *.py]] {
+        reinplace "s|/usr/bin/env python|${py27_bin}|" ${f}
+    }
+}
+
 pre-configure {
     foreach {badport badfile} "libev ${prefix}/include/ev.h c-ares ${prefix}/include/ares.h" {
         if {[file exists ${badfile}]} {
@@ -76,7 +92,7 @@
                     CXX=${configure.cxx} \
                     CFLAGS="${configure.cflags} ${configure.cc_archflags}" \
                     LDFLAGS="${configure.ldflags} ${configure.ld_archflags}" \
-                    PYTHON=${prefix}/bin/python2.7
+                    PYTHON=${py27_bin}
 
 livecheck.type      regex
 livecheck.regex     node-v(\\d+\\.\[02468\]+\\.\\d+)

Modified: trunk/dports/devel/nodejs/files/patch-Makefile-python.diff
===================================================================
--- trunk/dports/devel/nodejs/files/patch-Makefile-python.diff	2011-08-07 20:04:32 UTC (rev 82092)
+++ trunk/dports/devel/nodejs/files/patch-Makefile-python.diff	2011-08-07 22:50:11 UTC (rev 82093)
@@ -1,13 +1,12 @@
---- Makefile.orig	2011-03-18 22:25:20.000000000 +0100
-+++ Makefile	2011-04-05 09:51:09.000000000 +0200
-@@ -1,4 +1,5 @@
+--- Makefile.orig	2011-08-08 00:05:27.000000000 +0200
++++ Makefile	2011-08-08 00:05:41.000000000 +0200
+@@ -1,4 +1,4 @@
 -WAF=python tools/waf-light
-+PYTHON=python
 +WAF=$(PYTHON) tools/waf-light
  
  web_root = ryan at nodejs.org:~/web/nodejs.org/
  
-@@ -23,34 +24,34 @@
+@@ -23,34 +23,34 @@
  	@$(WAF) uninstall
  
  test: all
@@ -52,3 +51,16 @@
  
  build/default/node: all
  
+@@ -132,10 +132,10 @@
+ 	./node benchmark/idle_clients.js &
+ 
+ jslint:
+-	PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
++	PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
+ 
+ cpplint:
+-	@python tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
++	@$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
+ 
+ lint: jslint cpplint
+ 

Modified: trunk/dports/devel/nodejs-devel/Portfile
===================================================================
--- trunk/dports/devel/nodejs-devel/Portfile	2011-08-07 20:04:32 UTC (rev 82092)
+++ trunk/dports/devel/nodejs-devel/Portfile	2011-08-07 22:50:11 UTC (rev 82093)
@@ -30,6 +30,22 @@
 
 patchfiles              patch-Makefile-python.diff
 
+proc rec_glob {basedir pattern} {
+    set files [glob -directory $basedir -nocomplain -type f $pattern]
+    foreach dir [glob -directory $basedir -nocomplain -type d *] {
+        eval lappend files [rec_glob $dir $pattern]
+    }
+    return $files
+}
+
+set py27_bin ${prefix}/bin/python2.7
+
+post-patch {
+    foreach f [concat ${worksrcpath}/tools/node-waf ${worksrcpath}/tools/waf-light ${worksrcpath}/wscript [rec_glob ${worksrcpath} *.py]] {
+        reinplace "s|/usr/bin/env python|${py27_bin}|" ${f}
+    }
+}
+
 pre-configure {
     foreach {badport badfile} "libev ${prefix}/include/ev.h c-ares ${prefix}/include/ares.h" {
         if {[file exists ${badfile}]} {
@@ -75,7 +91,7 @@
                     CXX=${configure.cxx} \
                     CFLAGS="${configure.cflags} ${configure.cc_archflags}" \
                     LDFLAGS="${configure.ldflags} ${configure.ld_archflags}" \
-                    PYTHON=${prefix}/bin/python2.7
+                    PYTHON=${py27_bin}
 
 livecheck.type      regex
 livecheck.regex     node-v(\\d+\\.\[13579\]+\\.\\d+)

Modified: trunk/dports/devel/nodejs-devel/files/patch-Makefile-python.diff
===================================================================
--- trunk/dports/devel/nodejs-devel/files/patch-Makefile-python.diff	2011-08-07 20:04:32 UTC (rev 82092)
+++ trunk/dports/devel/nodejs-devel/files/patch-Makefile-python.diff	2011-08-07 22:50:11 UTC (rev 82093)
@@ -1,13 +1,12 @@
---- Makefile.orig	2011-08-02 18:08:14.000000000 +0200
-+++ Makefile	2011-08-02 18:08:26.000000000 +0200
-@@ -1,4 +1,5 @@
+--- Makefile.orig	2011-08-02 09:17:41.000000000 +0200
++++ Makefile	2011-08-08 00:17:31.000000000 +0200
+@@ -1,4 +1,4 @@
 -WAF=python tools/waf-light
-+PYTHON=python
 +WAF=$(PYTHON) tools/waf-light
  
  web_root = ryan at nodejs.org:~/web/nodejs.org/
  
-@@ -33,40 +34,40 @@
+@@ -33,40 +33,40 @@
  	@$(WAF) uninstall
  
  test: all
@@ -60,7 +59,7 @@
  
  UVTEST += simple/test-assert
  UVTEST += simple/test-buffer
-@@ -251,10 +252,10 @@
+@@ -251,10 +251,10 @@
  
  
  test-uv: all
@@ -73,7 +72,7 @@
  
  
  build/default/node: all
-@@ -338,10 +339,10 @@
+@@ -338,10 +338,10 @@
  	./node benchmark/idle_clients.js &
  
  jslint:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110807/fd36c56d/attachment-0001.html>


More information about the macports-changes mailing list