aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/parsley.rb
blob: f3cf71980861a88b27fcd4b0d474b93f3a4b32bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'formula'

class Parsley < Formula
  head 'https://github.com/fizx/parsley.git'
  homepage 'https://github.com/fizx/parsley'

  depends_on 'json-c'
  depends_on 'pcre'
  depends_on 'argp-standalone'

  def install
    argp = Formula.factory("argp-standalone").prefix

    # remove the refs to /opt/local and use this opportunity to link to argp
    inrepace "configure" do |s|
      s.gsub! '-L/opt/local/lib', "-L#{argp}"
      s.gsub! '-I/opt/local/include', "-I#{argp}"
    end

    system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
    system "make install"
  end
end