2010-01-02 04:13:16 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class John < Formula
|
2010-01-02 04:13:16 +00:00
|
|
|
homepage 'http://www.openwall.com/john/'
|
2012-03-18 03:34:48 +00:00
|
|
|
url 'http://www.openwall.com/john/g/john-1.7.9.tar.bz2'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '8f77bdd42b7cf94ec176f55ea69c4da9b2b8fe3b'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2012-10-21 18:55:00 +00:00
|
|
|
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
|
2011-03-21 21:24:22 +00:00
|
|
|
|
2013-01-15 17:32:18 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2334
|
|
|
|
end
|
|
|
|
|
|
|
|
fails_with :clang do
|
|
|
|
build 421
|
|
|
|
cause "rawSHA1_ng_fmt.c:535:19: error: redefinition of '_mm_testz_si128'"
|
|
|
|
end if build.include? 'jumbo'
|
|
|
|
|
2010-01-02 04:13:16 +00:00
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
|
|
|
arch = Hardware.is_64_bit? ? '64' : 'sse2'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2012-02-21 06:04:21 +00:00
|
|
|
cd 'src' do
|
2012-10-21 18:55:00 +00:00
|
|
|
system "make", "clean", "macosx-x86-#{arch}", "CC=#{ENV.cc}"
|
2010-01-02 04:13:16 +00:00
|
|
|
end
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2012-10-21 18:55:00 +00:00
|
|
|
# Remove the README symlink and install the real file
|
2010-04-07 05:58:35 +00:00
|
|
|
rm 'README'
|
2012-10-21 18:55:00 +00:00
|
|
|
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'
|
2010-01-02 04:13:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
__END__
|
2012-10-21 18:55:00 +00:00
|
|
|
--- 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
|
2010-01-02 04:13:16 +00:00
|
|
|
#endif
|
|
|
|
|
2012-10-21 18:55:00 +00:00
|
|
|
#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
|