diff options
| author | Adam Vandenberg | 2012-10-21 11:55:00 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-10-21 11:56:18 -0700 |
| commit | 913b54bf0d55516fe57f8af38ee070d7226dcbd6 (patch) | |
| tree | 68264d37a79576353542cf7805cc601fc8be699e /Library/Formula | |
| parent | 0182c8205b67a76d64fcf4cd88510e3dac0dcbe9 (diff) | |
| download | homebrew-913b54bf0d55516fe57f8af38ee070d7226dcbd6.tar.bz2 | |
john: add --jumbo to enable jumbo features
The formula also now installs documentation and does not install
non-binary files into bin.
Closes #12186.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/john.rb | 51 |
1 files changed, 37 insertions, 14 deletions
diff --git a/Library/Formula/john.rb b/Library/Formula/john.rb index f8e6e7cbb..eef4e8ad1 100644 --- a/Library/Formula/john.rb +++ b/Library/Formula/john.rb @@ -9,33 +9,56 @@ class John < Formula build 2334 end - def patches; DATA; end + option 'jumbo', 'Build with jumbo-7 features' + + def patches + p = [DATA] # Taken from MacPorts, tells john where to find runtime files + p << "http://www.openwall.com/john/g/john-1.7.9-jumbo-7.diff.gz" if build.include? 'jumbo' + return p + end def install ENV.deparallelize arch = Hardware.is_64_bit? ? '64' : 'sse2' cd 'src' do - system "make", "clean", "macosx-x86-#{arch}" + system "make", "clean", "macosx-x86-#{arch}", "CC=#{ENV.cc}" end + # Remove the README symlink and install the real file rm 'README' - # using mv over bin.install due to problem moving sym links - mv 'run', bin - chmod_R 0755, bin + prefix.install 'doc/README' + doc.install Dir['doc/*'] + + # Only symlink the binary into bin + (share/'john').install Dir['run/*'] + bin.install_symlink share/'john/john' + + # Source code defaults to 'john.ini', so rename + mv share/'john/john.conf', share/'john/john.ini' end end __END__ ---- a/src/john.c 2010-01-01 22:58:55.000000000 -0500 -+++ b/src/john.c 2010-01-01 22:59:11.000000000 -0500 -@@ -290,7 +290,7 @@ static void john_init(char *name, int ar - cfg_init(CFG_PRIVATE_ALT_NAME, 1); +--- a/src/params.h 2012-08-30 13:24:18.000000000 -0500 ++++ b/src/params.h 2012-08-30 13:25:13.000000000 -0500 +@@ -70,15 +70,15 @@ + * notes above. + */ + #ifndef JOHN_SYSTEMWIDE +-#define JOHN_SYSTEMWIDE 0 ++#define JOHN_SYSTEMWIDE 1 #endif - cfg_init(CFG_FULL_NAME, 1); -- cfg_init(CFG_ALT_NAME, 0); -+ cfg_init(CFG_ALT_NAME, 1); - } - status_init(NULL, 1); + #if JOHN_SYSTEMWIDE + #ifndef JOHN_SYSTEMWIDE_EXEC /* please refer to the notes above */ +-#define JOHN_SYSTEMWIDE_EXEC "/usr/libexec/john" ++#define JOHN_SYSTEMWIDE_EXEC "HOMEBREW_PREFIX/share/john" + #endif + #ifndef JOHN_SYSTEMWIDE_HOME +-#define JOHN_SYSTEMWIDE_HOME "/usr/share/john" ++#define JOHN_SYSTEMWIDE_HOME "HOMEBREW_PREFIX/share/john" + #endif + #define JOHN_PRIVATE_HOME "~/.john" + #endif |
