diff options
| author | Adam Vandenberg | 2010-02-06 16:05:34 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2010-02-06 16:05:34 -0800 |
| commit | 60cab61ed03b51aab1673a8d0367af81d6cdbc52 (patch) | |
| tree | c73d0be072f7af094f878b03f86faeecbac49154 | |
| parent | b0f98007741af4688bd1668e5b240bee6c267766 (diff) | |
| download | homebrew-60cab61ed03b51aab1673a8d0367af81d6cdbc52.tar.bz2 | |
bcrypt - use inreplace and optimize CC/CFLAGS
| -rw-r--r-- | Library/Formula/bcrypt.rb | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/Library/Formula/bcrypt.rb b/Library/Formula/bcrypt.rb index 4000e6fdf..86b3a2c6b 100644 --- a/Library/Formula/bcrypt.rb +++ b/Library/Formula/bcrypt.rb @@ -5,29 +5,15 @@ class Bcrypt <Formula homepage 'http://bcrypt.sourceforge.net' md5 '8ce2873836ccd433329c8df0e37e298c' - def patches - DATA - end - def install + inreplace "Makefile" do |s| + s.change_make_var! "CC", ENV.cc + s.change_make_var! "CFLAGS", ENV['CFLAGS'] + s.change_make_var! "LDFLAGS", "-lz" + end + system "make" - system "make install" + bin.install "bcrypt" + man1.install gzip("bcrypt.1") end - end -__END__ -diff --git a/Makefile b/Makefile -index b84da0f..96d07e2 100644 ---- a/Makefile -+++ b/Makefile -@@ -3,8 +3,8 @@ CC = gcc - CFLAGS = -O2 -Wall - COMPILE = ${CC} ${CFLAGS} - OBJS = main.o blowfish.o rwfile.o keys.o wrapbf.o endian.o wrapzl.o --LDFLAGS = -L/usr/local/lib -lz --PREFIX = /usr/local -+LDFLAGS = -L`brew --prefix`/lib -lz -+PREFIX = `brew --prefix`/Cellar/bcrypt/1.1 - - bcrypt: ${OBJS} Makefile - ${COMPILE} -o bcrypt ${OBJS} ${LDFLAGS} |
