Added installation formula for SSSS (Shamir's Secret Sharing Scheme)

- Updated per requests in the issue comments by adamv
- Updated to pass compiler flag -DNOMLOCK avoiding OS X warning on run.

Signed-off-by: David Höppner <0xffea@gmail.com>

* add CFLAGS so gmp.h is picked up in non /usr/local
master
Glenn Rempe 2010-07-28 13:52:26 -07:00 committed by David Höppner
parent 057ffdd36d
commit 5f5b05feba
1 changed files with 27 additions and 0 deletions

27
Formula/ssss.rb Normal file
View File

@ -0,0 +1,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