aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libpst.rb
blob: 9d47903ffa0a69ebdd9b1db2fd3ec9989a4c036f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
require 'formula'

class Libpst < Formula
  homepage 'http://www.five-ten-sg.com/libpst/'
  url 'http://www.five-ten-sg.com/libpst/packages/libpst-0.6.55.tar.gz'
  sha1 'c81df95509494c99222b0b603f7500dd9caceff1'
  revision 1

  bottle do
    cellar :any
    revision 1
    sha1 "397e70df07349c23ff991842e67cbdbdd5162b7c" => :mavericks
    sha1 "c5825e6dad6100636889029f79c47c506d78660c" => :mountain_lion
    sha1 "b15cf26bccfea564461e062bbceabec7bc5dedfe" => :lion
  end

  option 'pst2dii', 'Build pst2dii using gd'

  depends_on :python => :optional
  depends_on 'gd' if build.include? 'pst2dii'
  depends_on "boost"
  depends_on "boost-python" if build.with? "python"

  def install
    args = %W[
      --disable-dependency-tracking
      --prefix=#{prefix}
    ]
    args << '--disable-dii' unless build.include? 'pst2dii'
    if build.with? 'python'
      args << '--enable-python' << '--with-boost-python=mt'
    else
      args << '--disable-python'
    end
    system "./configure", *args
    system "make"
    ENV.deparallelize
    system "make", "install"
  end
end