Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Apr 2016 15:22:31 +0000 (UTC)
From:      Brad Davis <brd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r414112 - in head/devel/rubygem-execjs: . files
Message-ID:  <201604271522.u3RFMVsO081870@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brd
Date: Wed Apr 27 15:22:31 2016
New Revision: 414112
URL: https://svnweb.freebsd.org/changeset/ports/414112

Log:
  Handle nodejs not being found in the path.
  
  This fixes running ruby on rails under nginx and passenger.
  
  Approved by:	swills (mentor, ruby)

Added:
  head/devel/rubygem-execjs/files/
  head/devel/rubygem-execjs/files/patch-lib_execjs_runtimes.rb   (contents, props changed)
Modified:
  head/devel/rubygem-execjs/Makefile

Modified: head/devel/rubygem-execjs/Makefile
==============================================================================
--- head/devel/rubygem-execjs/Makefile	Wed Apr 27 14:52:41 2016	(r414111)
+++ head/devel/rubygem-execjs/Makefile	Wed Apr 27 15:22:31 2016	(r414112)
@@ -3,6 +3,7 @@
 
 PORTNAME=	execjs
 PORTVERSION=	2.6.0
+PORTREVISION=	1
 CATEGORIES=	devel rubygems
 MASTER_SITES=	RG
 
@@ -19,4 +20,8 @@ USE_RUBY=	yes
 USE_RUBYGEMS=	yes
 RUBYGEM_AUTOPLIST=	yes
 
+post-patch:
+	@${REINPLACE_CMD} -e 's#%%LOCALBASE%%#${LOCALBASE}#' \
+		${WRKSRC}/lib/${PORTNAME}/runtimes.rb
+
 .include <bsd.port.mk>

Added: head/devel/rubygem-execjs/files/patch-lib_execjs_runtimes.rb
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/rubygem-execjs/files/patch-lib_execjs_runtimes.rb	Wed Apr 27 15:22:31 2016	(r414112)
@@ -0,0 +1,11 @@
+--- lib/execjs/runtimes.rb.orig 2016-04-25 16:51:44 UTC
++++ lib/execjs/runtimes.rb
+@@ -17,7 +17,7 @@ module ExecJS
+ 
+     Node = ExternalRuntime.new(
+       name:        "Node.js (V8)",
+-      command:     ["nodejs", "node"],
++      command:     ["nodejs", "node", "%%LOCALBASE%%/bin/node"],
+       runner_path: ExecJS.root + "/support/node_runner.js",
+       encoding:    'UTF-8'
+     )



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604271522.u3RFMVsO081870>