Skip to content

Instantly share code, notes, and snippets.

@nicolasbrugneaux
Forked from aliatsis/plv8.rb
Last active March 21, 2017 11:47
Show Gist options
  • Save nicolasbrugneaux/c1f8c34826448688759e1d52c1b99d70 to your computer and use it in GitHub Desktop.
Save nicolasbrugneaux/c1f8c34826448688759e1d52c1b99d70 to your computer and use it in GitHub Desktop.
brew plv8 formula (static linking to v8)
require 'formula'
# based on https://github.com/Homebrew/homebrew/pull/19833
class Plv8 < Formula
homepage 'http://code.google.com/p/plv8js/wiki/PLV8'
version '2.0.0'
url 'https://github.com/plv8/plv8/archive/master.zip'
depends_on :postgresql
def install
ENV.prepend 'PATH', Formula.factory('postgresql').bin, ':'
system 'pg_config' # ensure postgres installed
system "make static" # download right v8 version and link statically
system "make install"
end
def test
ENV.prepend 'PATH', Formula.factory('postgresql').bin, ':'
system "make installcheck"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment