diff options
| -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} |
