aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ssss.rb
blob: 3e86b2fcafb2969a2c593af96e27cfbd74dd2156 (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
require 'formula'

class Ssss <Formula
  url 'http://point-at-infinity.org/ssss/ssss-0.5.tar.gz'
  homepage 'http://point-at-infinity.org/ssss/'
  md5 '24227252aa195a146d09de1df10357a1'

  depends_on 'gmp'
  depends_on 'xmltoman'

  def install

    inreplace 'Makefile' do |contents|
      # Compile with -DNOMLOCK to avoid warning on every run on OS X.
      contents.gsub! /\-W/, '-W -DNOMLOCK $(CFLAGS) $(LDFLAGS)'
      contents.change_make_var! "CC", ENV.cc
    end

    ENV.append 'CFLAGS', "-I#{HOMEBREW_PREFIX}/include"
    system "make"
    prefix.install %w{ HISTORY LICENSE THANKS }
    man1.install %w{ ssss.1 }
    bin.install %w{ ssss-combine ssss-split }
  end

end