Skip to content

Instantly share code, notes, and snippets.

@aliatsis
Last active March 21, 2017 11:00
Show Gist options
  • Save aliatsis/1890eecd93bb72740dbbe266eef9b788 to your computer and use it in GitHub Desktop.
Save aliatsis/1890eecd93bb72740dbbe266eef9b788 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