Physikerwelt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/90702


Change subject: WIP: install node and phantomjs for serverside MathJax execution
......................................................................

WIP: install node and phantomjs for serverside MathJax execution

Change-Id: I0aa6ee7fa14c728fc5b10e74133c8d6433b53af7
---
M puppet/manifests/packages.pp
M puppet/manifests/roles.pp
2 files changed, 19 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/02/90702/1

diff --git a/puppet/manifests/packages.pp b/puppet/manifests/packages.pp
index af2fd3c..be2e921 100644
--- a/puppet/manifests/packages.pp
+++ b/puppet/manifests/packages.pp
@@ -49,6 +49,14 @@
     package { 'ocaml-native-compilers': }
 }
 
+class packages::npm {
+    package { 'npm': }
+}
+
+class packages::phantomjs {
+    package { 'phantomjs': }
+}
+
 class packages::elasticsearch {
     package { 'elasticsearch': }
 }
diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index a482a5e..f44f66e 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -492,10 +492,12 @@
 
     include packages::mediawiki_math
     include packages::ocaml_native_compilers
+    include packages::npm
+    include packages::phantomjs
 
     @mediawiki::extension { 'Math':
         needs_update => true,
-        before       => Exec['compile texvc'],
+        before       => [ Exec['compile texvc'], Exec['install mathoid'] ]
     }
 
     exec { 'compile texvc':
@@ -504,6 +506,14 @@
         creates => '/vagrant/mediawiki/extensions/Math/math/texvc',
         require => Package['mediawiki-math', 'ocaml-native-compilers'],
     }
+
+    exec { 'install mathoid':
+        command => 'npm install --no-bin-links', 
#https://github.com/isaacs/npm/issues/2380 (requires npm 1.2.21)
+        cwd     => '/vagrant/mediawiki/extensions/Math/mathoid',
+        creates => '/vagrant/mediawiki/extensions/Math/mathoid/node_modules',
+        require => Package['mediawiki-math', 'npm', 'phantomjs'],
+        user => root,
+    }
 }
 
 # == Class: role::chromium

-- 
To view, visit https://gerrit.wikimedia.org/r/90702
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0aa6ee7fa14c728fc5b10e74133c8d6433b53af7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <w...@physikerwelt.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to