diff options
author | Zero_Chaos <zerochaos@gentoo.org> | 2018-11-08 10:56:07 -0500 |
---|---|---|
committer | Zero_Chaos <zerochaos@gentoo.org> | 2018-11-08 10:56:19 -0500 |
commit | e35c9d2e0cdf69bee5d8416beea62f618e0bbee5 (patch) | |
tree | b4951d15aace6ad3776e993c8140ce4441d57ab6 /app-crypt | |
parent | media-libs/opus: Minor style fix (diff) | |
download | gentoo-e35c9d2e0cdf69bee5d8416beea62f618e0bbee5.tar.gz gentoo-e35c9d2e0cdf69bee5d8416beea62f618e0bbee5.tar.bz2 gentoo-e35c9d2e0cdf69bee5d8416beea62f618e0bbee5.zip |
app-crypt/hashcat: enable brain
make sure we unbundle what we can. upstream bug opened for issues
unbundling 7zip https://github.com/hashcat/hashcat/issues/1742
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/hashcat/hashcat-9999.ebuild | 69 | ||||
-rw-r--r-- | app-crypt/hashcat/metadata.xml | 3 |
2 files changed, 72 insertions, 0 deletions
diff --git a/app-crypt/hashcat/hashcat-9999.ebuild b/app-crypt/hashcat/hashcat-9999.ebuild new file mode 100644 index 000000000000..0424dcf978e3 --- /dev/null +++ b/app-crypt/hashcat/hashcat-9999.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils pax-utils multilib + +DESCRIPTION="World's fastest and most advanced password recovery utility" +HOMEPAGE="https://github.com/hashcat/hashcat" +LICENSE="MIT" +SLOT="0" +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hashcat/hashcat.git" + KEYWORDS="" +else + KEYWORDS="~amd64 ~x86" + SRC_URI="https://github.com/hashcat/hashcat/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +IUSE="brain video_cards_nvidia" +DEPEND="virtual/opencl + app-arch/lzma + brain? ( dev-libs/xxhash ) + video_cards_nvidia? ( >x11-drivers/nvidia-drivers-367.0 )" +RDEPEND="${DEPEND}" + +src_prepare() { + #remove bundled stuff + rm -r deps/OpenCL-Headers || die "Failed to remove bundled OpenCL Headers" + rm -r deps/xxHash || die "Failed to remove bundled xxHash" + #rm -r deps/LZMA-SDK || die "Failed to remove bundled LZMA-SDK" + #rm -r deps || die "Failed to remove bundled deps" + #do not strip + sed -i "/LFLAGS += -s/d" src/Makefile + #do not add random CFLAGS + sed -i "s/-O2//" src/Makefile || die + sed -i "#LZMA_SDK_INCLUDE#d" src/Makefile || die + export PREFIX=/usr + export LIBRARY_FOLDER="/usr/$(get_libdir)" + export DOCUMENT_FOLDER="/usr/share/doc/${P}" + eapply_user +} + +src_compile() { + emake SHARED=1 PRODUCTION=1 ENABLE_BRAIN=$(usex brain 1 0) USE_SYSTEM_LZMA=0 USE_SYSTEM_OPENCL=1 USE_SYSTEM_XXHASH=1 VERSION_PURE="${PV}" + pax-mark -mr hashcat +} + +src_test() { + if use video_cards_nvidia; then + addwrite /dev/nvidia0 + addwrite /dev/nvidiactl + addwrite /dev/nvidia-uvm + if [ ! -w /dev/nvidia0 ]; then + einfo "To run these tests, portage likely must be in the video group." + einfo "Please run \"gpasswd -a portage video\" if the tests will fail" + fi + #elif use vidia_cards_fglrx; then + # addwrite /dev/ati + fi + #this always exits with 255 despite success + #./hashcat -b -m 2500 || die "Test failed" + LD_PRELOAD=./libhashcat.so.${PV} ./hashcat -a 3 -m 1500 nQCk49SiErOgk || die "Test failed" +} + +src_install() { + emake DESTDIR="${ED}" SHARED=1 PRODUCTION=1 ENABLE_BRAIN=$(usex brain 1 0) USE_SYSTEM_LZMA=0 USE_SYSTEM_OPENCL=1 USE_SYSTEM_XXHASH=1 VERSION_PURE="${PV}" install +} diff --git a/app-crypt/hashcat/metadata.xml b/app-crypt/hashcat/metadata.xml index 2f9493fe8e46..4379ee24223e 100644 --- a/app-crypt/hashcat/metadata.xml +++ b/app-crypt/hashcat/metadata.xml @@ -5,6 +5,9 @@ <email>zerochaos@gentoo.org</email> <name>Rick Farina</name> </maintainer> + <use> + <flag name="brain">Enable the hashcat brain</flag> + </use> <upstream> <remote-id type="github">hashcat/hashcat</remote-id> </upstream> |