Gentoo Archives: gentoo-commits

From: "Tim Harder (radhermit)" <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-crypt/johntheripper: johntheripper-1.7.9-r1.ebuild ChangeLog
Date: Sat, 07 Apr 2012 06:14:48
Message-Id: 20120407061436.3ED3A2004B@flycatcher.gentoo.org
1 radhermit 12/04/07 06:14:36
2
3 Modified: ChangeLog
4 Added: johntheripper-1.7.9-r1.ebuild
5 Log:
6 Revision bump. Re-add mpi support, install tgtsnarf utility, and properly apply system config.
7
8 (Portage version: 2.2.0_alpha95/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.137 app-crypt/johntheripper/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?rev=1.137&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?rev=1.137&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?r1=1.136&r2=1.137
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v
20 retrieving revision 1.136
21 retrieving revision 1.137
22 diff -u -r1.136 -r1.137
23 --- ChangeLog 19 Mar 2012 05:45:43 -0000 1.136
24 +++ ChangeLog 7 Apr 2012 06:14:36 -0000 1.137
25 @@ -1,6 +1,13 @@
26 # ChangeLog for app-crypt/johntheripper
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.136 2012/03/19 05:45:43 naota Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.137 2012/04/07 06:14:36 radhermit Exp $
30 +
31 +*johntheripper-1.7.9-r1 (07 Apr 2012)
32 +
33 + 07 Apr 2012; Tim Harder <radhermit@g.o>
34 + +johntheripper-1.7.9-r1.ebuild:
35 + Revision bump. Re-add mpi support, install tgtsnarf utility, and properly
36 + apply system config.
37
38 19 Mar 2012; Naohiro Aota <naota@g.o> johntheripper-1.7.8.ebuild:
39 Support Gentoo/FreeBSD. #319445
40
41
42
43 1.1 app-crypt/johntheripper/johntheripper-1.7.9-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: johntheripper-1.7.9-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9-r1.ebuild,v 1.1 2012/04/07 06:14:36 radhermit Exp $
53
54 EAPI="4"
55
56 inherit eutils flag-o-matic toolchain-funcs pax-utils
57
58 MY_PN="john"
59 MY_P="${MY_PN}-${PV}"
60
61 JUMBO="jumbo-5"
62
63 DESCRIPTION="fast password cracker"
64 HOMEPAGE="http://www.openwall.com/john/"
65
66 SRC_URI="http://www.openwall.com/john/g/${MY_P}.tar.bz2
67 !minimal? ( http://www.openwall.com/john/g/${MY_P}-${JUMBO}.diff.gz )"
68
69 LICENSE="GPL-2"
70 SLOT="0"
71 # This package can't be marked stable for ppc or ppc64 before bug 327211 is closed.
72 KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
73 #Remove AltiVec USE flag. Appears to be an upstream issue.
74 IUSE="custom-cflags -minimal mmx mpi openmp sse2"
75 REQUIRED_USE="openmp? ( !minimal )
76 mpi? ( !minimal )"
77
78 RDEPEND="!minimal? ( >=dev-libs/openssl-0.9.7 )
79 mpi? ( virtual/mpi )"
80 DEPEND="${RDEPEND}"
81
82 S="${WORKDIR}/${MY_P}"
83
84 has_xop() {
85 echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep -q "#define __XOP__ 1"
86 }
87
88 has_avx() {
89 echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep -q "#define __AVX__ 1"
90 }
91
92 get_target() {
93 if use alpha; then
94 echo "linux-alpha"
95 elif use amd64; then
96 if has_xop; then
97 echo "linux-x86-64-xop"
98 elif has_avx; then
99 echo "linux-x86-64-avx"
100 else
101 echo "linux-x86-64"
102 fi
103 elif use ppc; then
104 #if use altivec; then
105 # echo "linux-ppc32-altivec"
106 #else
107 echo "linux-ppc32"
108 #fi
109 elif use ppc64; then
110 #if use altivec; then
111 # echo "linux-ppc32-altivec"
112 #else
113 echo "linux-ppc64"
114 #fi
115 # linux-ppc64-altivec is slightly slower than linux-ppc32-altivec for most hash types.
116 # as per the Makefile comments
117 elif use sparc; then
118 echo "linux-sparc"
119 elif use x86; then
120 if has_xop; then
121 echo "linux-x86-xop"
122 elif has_avx; then
123 echo "linux-x86-avx"
124 elif use sse2; then
125 echo "linux-x86-sse2"
126 elif use mmx; then
127 echo "linux-x86-mmx"
128 else
129 echo "linux-x86-any"
130 fi
131 elif use ppc-macos; then
132 # force AltiVec, the non-altivec profile contains ancient compiler cruft
133 # if use altivec; then
134 echo "macosx-ppc32-altivec"
135 # else
136 # echo "macosx-ppc32"
137 # fi
138 # for Tiger this can be macosx-ppc64
139 elif use x86-macos; then
140 if use sse2; then
141 echo "macosx-x86-sse2"
142 else
143 echo "macosx-x86"
144 fi
145 elif use x86-solaris; then
146 echo "solaris-x86-any"
147 else
148 echo "generic"
149 fi
150 }
151
152 pkg_setup() {
153 if use openmp ; then
154 tc-has-openmp || die "Please switch to an openmp compatible compiler"
155 fi
156 }
157
158 src_prepare() {
159 if ! use minimal; then
160 epatch "${WORKDIR}/${MY_P}-${JUMBO}.diff"
161 if use mpi ; then
162 sed -e "s/^#CC = mpicc/CC = mpicc/" \
163 -e "s/^#MPIOBJ =/MPIOBJ =/" \
164 -i src/Makefile || die
165 fi
166 fi
167
168 local PATCHLIST="1.7.6-cflags 1.7.3.1-mkdir-sandbox"
169
170 cd src
171 for p in ${PATCHLIST}; do
172 epatch "${FILESDIR}/${PN}-${p}.patch"
173 done
174
175 if ! use minimal; then
176 sed -e "s/LDFLAGS *= */override LDFLAGS += /" -e "/LDFLAGS/s/-s//" \
177 -e "/LDFLAGS/s/-L[^ ]*//g" -e "/CFLAGS/s/-[IL][^ ]*//g" \
178 -i Makefile || die "sed Makefile failed"
179 fi
180 }
181
182 src_compile() {
183 local OMP
184
185 use custom-cflags || strip-flags
186 echo "#define JOHN_SYSTEMWIDE 1" >> config.gentoo
187 echo "#define JOHN_SYSTEMWIDE_HOME \"${EPREFIX}/etc/john\"" >> config.gentoo
188 echo "#define JOHN_SYSTEMWIDE_EXEC \"${EPREFIX}/usr/libexec/john\"" >> config.gentoo
189 append-flags -fPIC -fPIE
190 CFLAGS="${CFLAGS} -include \\\"${S}\\\"/config.gentoo"
191 gcc-specs-pie && append-ldflags -nopie
192 use openmp && OMP="-fopenmp"
193
194 CPP="$(tc-getCXX)" CC="$(tc-getCC)" AS="$(tc-getCC)" LD="$(tc-getCC)"
195 use mpi && CPP=mpicxx CC=mpicc AS=mpicc LD=mpicc
196
197 emake -C src/ \
198 CPP="${CPP}" CC="${CC}" AS="${AS}" LD="${LD}" \
199 CFLAGS="-c -Wall ${CFLAGS} ${OMP}" \
200 LDFLAGS="${LDFLAGS}" \
201 OPT_NORMAL="" \
202 OMPFLAGS="${OMP}" \
203 $(get_target)
204 }
205
206 src_test() {
207 cd run
208 if [[ -f "${EPREFIX}/etc/john/john.conf" || -f "${EPREFIX}/etc/john/john.ini" ]] ; then
209 # This requires that MPI is actually 100% online on your system, which might not
210 # be the case, depending on which MPI implementation you are using.
211 #if use mpi; then
212 # mpirun -np 2 ./john --test || die "self test failed"
213 #else
214
215 ./john --test || die 'self test failed'
216 else
217 ewarn "Tests require '${EPREFIX}/etc/john/john.conf' or '${EPREFIX}/etc/john/john.ini'"
218 fi
219 }
220
221 src_install() {
222 # executables
223 dosbin run/john
224 newsbin run/mailer john-mailer
225
226 pax-mark -m "${ED}usr/sbin/john" || die
227
228 dosym john /usr/sbin/unafs
229 dosym john /usr/sbin/unique
230 dosym john /usr/sbin/unshadow
231
232 # jumbo-patch additions
233 if ! use minimal; then
234 dosym john /usr/sbin/undrop
235 dosbin run/calc_stat
236 dosbin run/genmkvpwd
237 dosbin run/mkvcalcproba
238 dosbin run/tgtsnarf
239 insinto /etc/john
240 doins run/genincstats.rb run/stats
241 doins run/netscreen.py run/sap_prepare.pl
242 fi
243
244 # config files
245 insinto /etc/john
246 doins run/*.chr run/password.lst
247 doins run/*.conf
248
249 # documentation
250 dodoc doc/*
251 }