mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-02-26 09:35:40 +01:00
parent
512581cae3
commit
dc2db1195a
4 changed files with 65 additions and 152 deletions
63
app-crypt/johntheripper/files/1.8.0-gcc5.patch
Normal file
63
app-crypt/johntheripper/files/1.8.0-gcc5.patch
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
From e2e868db3e153b3f959e119a51703d4afb99c624 Mon Sep 17 00:00:00 2001
|
||||
From: magnum <john.magnum@hushmail.com>
|
||||
Date: Wed, 13 May 2015 12:05:00 +0200
|
||||
Subject: [PATCH] Add another solution to #1093. This make it possible to build
|
||||
using gcc 5 without --std=gnu89 (although I kept the latter for now). See
|
||||
also #1250.
|
||||
|
||||
---
|
||||
src/DES_bs_b.c | 3 +++
|
||||
src/MD5_std.c | 12 ++++++++++++
|
||||
2 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/src/DES_bs_b.c b/src/DES_bs_b.c
|
||||
index 306b4e4..18c9235 100644
|
||||
--- a/src/DES_bs_b.c
|
||||
+++ b/src/DES_bs_b.c
|
||||
@@ -1272,6 +1272,9 @@ static MAYBE_INLINE void DES_bs_finalize_keys(void)
|
||||
#endif
|
||||
|
||||
#if DES_bs_mt
|
||||
+#if __GNUC__ >= 5
|
||||
+extern
|
||||
+#endif
|
||||
MAYBE_INLINE void DES_bs_set_salt_for_thread(int t, unsigned int salt)
|
||||
#else
|
||||
void DES_bs_set_salt(ARCH_WORD salt)
|
||||
diff --git a/src/MD5_std.c b/src/MD5_std.c
|
||||
index 6bdcd35..1eec9b4 100644
|
||||
--- a/src/MD5_std.c
|
||||
+++ b/src/MD5_std.c
|
||||
@@ -496,9 +496,15 @@ extern void MD5_body(MD5_word x[15], MD5_word out[4]);
|
||||
#if MD5_std_mt
|
||||
#define MD5_body(x, out) \
|
||||
MD5_body_for_thread(t, x, out)
|
||||
+#if __GNUC__ >= 5
|
||||
+extern
|
||||
+#endif
|
||||
MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
|
||||
MD5_word x[15], MD5_word out[4])
|
||||
#else
|
||||
+#if __GNUC__ >= 5
|
||||
+extern
|
||||
+#endif
|
||||
MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
|
||||
#endif
|
||||
{
|
||||
@@ -595,10 +601,16 @@ MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
|
||||
#if MD5_std_mt
|
||||
#define MD5_body(x0, x1, out0, out1) \
|
||||
MD5_body_for_thread(t, x0, x1, out0, out1)
|
||||
+#if __GNUC__ >= 5
|
||||
+extern
|
||||
+#endif
|
||||
MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
|
||||
MD5_word x0[15], MD5_word x1[15],
|
||||
MD5_word out0[4], MD5_word out1[4])
|
||||
#else
|
||||
+#if __GNUC__ >= 5
|
||||
+extern
|
||||
+#endif
|
||||
MAYBE_INLINE_BODY void MD5_body(MD5_word x0[15], MD5_word x1[15],
|
||||
MD5_word out0[4], MD5_word out1[4])
|
||||
#endif
|
||||
|
|
@ -62,7 +62,8 @@ src_prepare() {
|
|||
else
|
||||
cd "${MY_P}-${JUMBO}" || die
|
||||
fi
|
||||
epatch ${FILESDIR}/480e95b0e449863be3e1a5b0bc634a67df28b618.patch
|
||||
epatch ${FILESDIR}/${PV}-fix-32bit.patch
|
||||
epatch ${FILESDIR}/${PV}-gcc5.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
|
|
|
|||
|
|
@ -1,151 +0,0 @@
|
|||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit cuda flag-o-matic toolchain-funcs pax-utils
|
||||
|
||||
MY_PN="john"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
JUMBO="jumbo-1"
|
||||
|
||||
DESCRIPTION="fast password cracker"
|
||||
HOMEPAGE="http://www.openwall.com/john/"
|
||||
SRC_URI="minimal? ( http://www.openwall.com/john/j/${MY_P}.tar.gz )
|
||||
!minimal? ( http://www.openwall.com/john/j/${MY_P}-${JUMBO}.tar.gz )"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE="commoncrypto cuda custom-cflags kerberos -minimal mpi opencl openmp +openssl pcap rexgen wow"
|
||||
REQUIRED_USE="openmp? ( !minimal )
|
||||
mpi? ( !minimal )
|
||||
cuda? ( !minimal )
|
||||
opencl? ( !minimal )
|
||||
^^ ( openssl commoncrypto )"
|
||||
|
||||
DEPEND="!minimal? ( >=dev-libs/openssl-1.0.1:0 )
|
||||
mpi? ( virtual/mpi )
|
||||
cuda? ( x11-drivers/nvidia-drivers
|
||||
dev-util/nvidia-cuda-toolkit:= )
|
||||
opencl? ( virtual/opencl )
|
||||
kerberos? ( virtual/krb5 )
|
||||
wow? ( dev-libs/gmp:* )
|
||||
pcap? ( net-libs/libpcap )
|
||||
dev-libs/gmp
|
||||
sys-libs/zlib
|
||||
app-arch/bzip2"
|
||||
|
||||
# commoncrypto? ( )
|
||||
# rexgen? ( )
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
pkg_setup() {
|
||||
if use openmp && [[ ${MERGE_TYPE} != binary ]]; then
|
||||
tc-has-openmp || die "Please switch to an openmp compatible compiler"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use cuda; then
|
||||
cd "${MY_P}-${JUMBO}/src" || die
|
||||
cuda_src_prepare
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use minimal; then
|
||||
cd "${MY_P}/src" || die
|
||||
else
|
||||
cd "${MY_P}-${JUMBO}/src" || die
|
||||
fi
|
||||
|
||||
use custom-cflags || strip-flags
|
||||
# John ignores CPPFLAGS, use CFLAGS instead
|
||||
append-cflags -DJOHN_SYSTEMWIDE=1
|
||||
append-cflags -DJOHN_SYSTEMWIDE_HOME="'\"${EPREFIX}/etc/john\"'"
|
||||
|
||||
NVIDIA_CUDA="${EPREFIX}/opt/cuda/" econf \
|
||||
--disable-native-macro \
|
||||
--disable-native-tests \
|
||||
$(use_enable cuda) \
|
||||
$(use_enable mpi) \
|
||||
$(use_enable opencl) \
|
||||
$(use_enable openmp) \
|
||||
$(use_enable pcap) \
|
||||
$(use_enable rexgen) \
|
||||
$(use_with commoncrypto) \
|
||||
$(use_with openssl)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use minimal; then
|
||||
cd "${MY_P}" || die
|
||||
else
|
||||
cd "${MY_P}-${JUMBO}" || die
|
||||
fi
|
||||
use custom-cflags || strip-flags
|
||||
# John ignores CPPFLAGS, use CFLAGS instead
|
||||
append-cflags -DJOHN_SYSTEMWIDE=1
|
||||
append-cflags -DJOHN_SYSTEMWIDE_HOME="'\"${EPREFIX}/etc/john\"'"
|
||||
|
||||
emake -C src
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use minimal; then
|
||||
cd "${MY_P}" || die
|
||||
else
|
||||
cd "${MY_P}-${JUMBO}" || die
|
||||
fi
|
||||
pax-mark -mr run/john
|
||||
if use opencl || use cuda; then
|
||||
ewarn "GPU tests fail, skipping all tests..."
|
||||
else
|
||||
make -C src check
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use minimal; then
|
||||
cd "${MY_P}" || die
|
||||
else
|
||||
cd "${MY_P}-${JUMBO}" || die
|
||||
fi
|
||||
# executables
|
||||
dosbin run/john
|
||||
newsbin run/mailer john-mailer
|
||||
|
||||
pax-mark -mr "${ED}usr/sbin/john" || die
|
||||
|
||||
if ! use minimal; then
|
||||
# grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3
|
||||
for s in \
|
||||
unshadow unafs undrop unique ssh2john putty2john pfx2john keepass2john keyring2john \
|
||||
zip2john gpg2john rar2john racf2john keychain2john kwallet2john pwsafe2john dmg2john \
|
||||
hccap2john base64conv truecrypt_volume2john keystore2john
|
||||
do
|
||||
dosym john /usr/sbin/$s
|
||||
done
|
||||
|
||||
insinto /usr/share/john
|
||||
doins run/*.py
|
||||
|
||||
if use opencl; then
|
||||
insinto /usr/share/john/kernels
|
||||
doins run/kernels/*
|
||||
fi
|
||||
fi
|
||||
|
||||
# config files
|
||||
insinto /etc/john
|
||||
doins run/*.chr run/password.lst
|
||||
doins run/*.conf
|
||||
|
||||
# documentation
|
||||
dodoc doc/*
|
||||
}
|
||||
Loading…
Reference in a new issue