john-jumbo 1.9.0

Closes #43531.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Kirill A. Korinsky 2019-09-14 09:28:43 +02:00 committed by FX Coudert
parent 88f180caf2
commit 80fbac8180

View file

@ -1,9 +1,9 @@
class JohnJumbo < Formula
desc "Enhanced version of john, a UNIX password cracker"
homepage "https://www.openwall.com/john/"
url "https://openwall.com/john/j/john-1.8.0-jumbo-1.tar.xz"
version "1.8.0"
sha256 "bac93d025995a051f055adbd7ce2f1975676cac6c74a6c7a3ee4cfdd9c160923"
url "https://openwall.com/john/k/john-1.9.0-jumbo-1.tar.xz"
version "1.9.0"
sha256 "f5d123f82983c53d8cc598e174394b074be7a77756f5fb5ed8515918c81e7f3b"
bottle do
cellar :any
@ -27,28 +27,26 @@ class JohnJumbo < Formula
cause "Upstream have a hacky workaround for supporting gcc that we can't use."
end
# Patch taken from MacPorts, tells john where to find runtime files.
# https://github.com/magnumripper/JohnTheRipper/issues/982
patch :DATA
# Previously john-jumbo ignored the value of $HOME; fixed
# upstream. See
# https://github.com/magnumripper/JohnTheRipper/issues/1901
# Fixed setup `-mno-sse4.1` for some machines.
# See details for example from here: https://github.com/magnumripper/JohnTheRipper/pull/4100
patch do
url "https://github.com/magnumripper/JohnTheRipper/commit/d29ad8aabaa9726eb08f440001c37611fa072e0c.diff?full_index=1"
sha256 "b3400f54c64dccce6fe4846872c945b280ec221c7a3d614b03c18029cba3695a"
url "https://github.com/magnumripper/JohnTheRipper/commit/a537bbca37c1c2452ffcfccea6d2366447ec05c2.diff?full_index=1"
sha256 "c246b7a4b06436810dee66d324fa550c5f6bc2dabcb09a2f5f7836c6633a549a"
end
def install
ENV.append "CFLAGS", "-DJOHN_SYSTEMWIDE=1"
ENV.append "CFLAGS", "-DJOHN_SYSTEMWIDE_EXEC='\"#{share}/john\"'"
ENV.append "CFLAGS", "-DJOHN_SYSTEMWIDE_HOME='\"#{share}/john\"'"
ENV.append "CFLAGS", "-mno-sse4.1" unless MacOS.version.requires_sse4?
cd "src" do
system "./configure", "--disable-native-tests", "--disable-native-macro"
system "./configure", "--disable-native-tests"
system "make", "clean"
system "make", "-s", "CC=#{ENV.cc}"
system "make"
end
# Remove the symlink and install the real file
rm "README"
prefix.install "doc/README"
doc.install Dir["doc/*"]
# Only symlink the main binary into bin
@ -57,9 +55,6 @@ class JohnJumbo < Formula
bash_completion.install share/"john/john.bash_completion" => "john.bash"
zsh_completion.install share/"john/john.zsh_completion" => "_john"
# Source code defaults to "john.ini", so rename
mv share/"john/john.conf", share/"john/john.ini"
end
test do
@ -69,27 +64,3 @@ class JohnJumbo < Formula
assert_match(/secret/, (testpath/"john2.pot").read)
end
end
__END__
--- 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
#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