public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-crypt/johntheripper: ChangeLog johntheripper-1.7.9.ebuild
@ 2012-03-05 22:19 Tim Harder (radhermit)
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Harder (radhermit) @ 2012-03-05 22:19 UTC (permalink / raw
  To: gentoo-commits

radhermit    12/03/05 22:19:51

  Modified:             ChangeLog johntheripper-1.7.9.ebuild
  Log:
  Use correct targets when xop and avx instructions sets are enabled (bugs #405927 and 405941, patch by Rick Farina).
  
  (Portage version: 2.2.0_alpha89/cvs/Linux x86_64)

Revision  Changes    Path
1.135                app-crypt/johntheripper/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?rev=1.135&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?rev=1.135&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?r1=1.134&r2=1.135

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -r1.134 -r1.135
--- ChangeLog	23 Feb 2012 10:04:21 -0000	1.134
+++ ChangeLog	5 Mar 2012 22:19:51 -0000	1.135
@@ -1,6 +1,10 @@
 # ChangeLog for app-crypt/johntheripper
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.134 2012/02/23 10:04:21 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.135 2012/03/05 22:19:51 radhermit Exp $
+
+  05 Mar 2012; Tim Harder <radhermit@gentoo.org> johntheripper-1.7.9.ebuild:
+  Use correct targets when xop and avx instructions sets are enabled (bugs
+  #405927 and 405941, patch by Rick Farina).
 
 *johntheripper-1.7.9 (23 Feb 2012)
 



1.2                  app-crypt/johntheripper/johntheripper-1.7.9.ebuild

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9.ebuild?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9.ebuild?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9.ebuild?r1=1.1&r2=1.2

Index: johntheripper-1.7.9.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9.ebuild,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- johntheripper-1.7.9.ebuild	23 Feb 2012 10:04:21 -0000	1.1
+++ johntheripper-1.7.9.ebuild	5 Mar 2012 22:19:51 -0000	1.2
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9.ebuild,v 1.1 2012/02/23 10:04:21 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9.ebuild,v 1.2 2012/03/05 22:19:51 radhermit Exp $
 
 EAPI="4"
 
@@ -36,11 +36,25 @@
 
 S="${WORKDIR}/${MY_P}"
 
+has_xop() {
+	echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep -q "#define __XOP__ 1"
+}
+
+has_avx() {
+	echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep -q "#define __AVX__ 1"
+}
+
 get_target() {
 	if use alpha; then
 		echo "linux-alpha"
 	elif use amd64; then
-		echo "linux-x86-64"
+		if has_xop; then
+			echo "linux-x86-64-xop"
+		elif has_avx; then
+			echo "linux-x86-64-avx"
+		else
+			echo "linux-x86-64"
+		fi
 	elif use ppc; then
 		#if use altivec; then
 		#	echo "linux-ppc32-altivec"
@@ -58,7 +72,11 @@
 	elif use sparc; then
 		echo "linux-sparc"
 	elif use x86; then
-		if use sse2; then
+		if has_xop; then
+			echo "linux-x86-xop"
+		elif has_avx; then
+			echo "linux-x86-avx"
+		elif use sse2; then
 			echo "linux-x86-sse2"
 		elif use mmx; then
 			echo "linux-x86-mmx"






^ permalink raw reply	[flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in app-crypt/johntheripper: ChangeLog johntheripper-1.7.9.ebuild
@ 2012-02-23 10:04 Tim Harder (radhermit)
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Harder (radhermit) @ 2012-02-23 10:04 UTC (permalink / raw
  To: gentoo-commits

radhermit    12/02/23 10:04:21

  Modified:             ChangeLog
  Added:                johntheripper-1.7.9.ebuild
  Log:
  Version bump (bug #405101 by Renato Alves). Check for openmp toolchain support and remove unnecessary conditions for running tests.
  
  (Portage version: 2.2.0_alpha87/cvs/Linux x86_64)

Revision  Changes    Path
1.134                app-crypt/johntheripper/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?rev=1.134&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?rev=1.134&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?r1=1.133&r2=1.134

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -r1.133 -r1.134
--- ChangeLog	5 Jul 2011 14:01:52 -0000	1.133
+++ ChangeLog	23 Feb 2012 10:04:21 -0000	1.134
@@ -1,6 +1,12 @@
 # ChangeLog for app-crypt/johntheripper
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.133 2011/07/05 14:01:52 c1pher Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.134 2012/02/23 10:04:21 radhermit Exp $
+
+*johntheripper-1.7.9 (23 Feb 2012)
+
+  23 Feb 2012; Tim Harder <radhermit@gentoo.org> +johntheripper-1.7.9.ebuild:
+  Version bump (bug #405101 by Renato Alves). Check for openmp toolchain
+  support and remove unnecessary conditions for running tests.
 
 *johntheripper-1.7.8 (05 Jul 2011)
 



1.1                  app-crypt/johntheripper/johntheripper-1.7.9.ebuild

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9.ebuild?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9.ebuild?rev=1.1&content-type=text/plain

Index: johntheripper-1.7.9.ebuild
===================================================================
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9.ebuild,v 1.1 2012/02/23 10:04:21 radhermit Exp $

EAPI="4"

inherit eutils flag-o-matic toolchain-funcs pax-utils

MY_PN="john"
MY_P="${MY_PN}-${PV}"

JUMBO="jumbo-5"
#MPI="mpi10"

DESCRIPTION="fast password cracker"
HOMEPAGE="http://www.openwall.com/john/"

SRC_URI="http://www.openwall.com/john/g/${MY_P}.tar.bz2
	!minimal? ( http://www.openwall.com/john/g/${MY_P}-${JUMBO}.diff.gz )"
#	mpi? ( ftp://ftp.openwall.com/john/contrib/mpi/2009-bindshell/${MY_P}-${MPI}.patch.gz )

LICENSE="GPL-2"
SLOT="0"
# This package can't be marked stable for ppc or ppc64 before bug 327211 is closed.
KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="custom-cflags -minimal mmx openmp sse2"
REQUIRED_USE="openmp? ( !minimal )"
#Remove AltiVec USE flag. Appears to be an upstream issue.
#IUSE="altivec custom-cflags -minimal mmx openmp sse2"
#IUSE="altivec custom-cflags -minimal mmx -mpi sse2"

# Seems a bit fussy with other MPI implementations.
RDEPEND="!minimal? ( >=dev-libs/openssl-0.9.7 )"
#	mpi? ( sys-cluster/openmpi )
DEPEND="${RDEPEND}"

S="${WORKDIR}/${MY_P}"

get_target() {
	if use alpha; then
		echo "linux-alpha"
	elif use amd64; then
		echo "linux-x86-64"
	elif use ppc; then
		#if use altivec; then
		#	echo "linux-ppc32-altivec"
		#else
			echo "linux-ppc32"
		#fi
	elif use ppc64; then
		#if use altivec; then
		#	echo "linux-ppc32-altivec"
		#else
			echo "linux-ppc64"
		#fi
		# linux-ppc64-altivec is slightly slower than linux-ppc32-altivec for most hash types.
		# as per the Makefile comments
	elif use sparc; then
		echo "linux-sparc"
	elif use x86; then
		if use sse2; then
			echo "linux-x86-sse2"
		elif use mmx; then
			echo "linux-x86-mmx"
		else
			echo "linux-x86-any"
		fi
	elif use ppc-macos; then
	# force AltiVec, the non-altivec profile contains ancient compiler cruft
	#	if use altivec; then
			echo "macosx-ppc32-altivec"
	#	else
	#		echo "macosx-ppc32"
	#	fi
		# for Tiger this can be macosx-ppc64
	elif use x86-macos; then
		if use sse2; then
			echo "macosx-x86-sse2"
		else
			echo "macosx-x86"
		fi
	elif use x86-solaris; then
		echo "solaris-x86-any"
	else
		echo "generic"
	fi
}

pkg_setup() {
	if use openmp ; then
		tc-has-openmp || die "Please switch to an openmp compatible compiler"
	fi
}

src_prepare() {
#	if use mpi; then
#		epatch "${WORKDIR}/${MY_P}-${MPI}.patch"
#	fi
	if ! use minimal; then
		epatch "${WORKDIR}/${MY_P}-${JUMBO}.diff"
	fi
	local PATCHLIST="1.7.6-cflags 1.7.3.1-mkdir-sandbox"

	cd src
	for p in ${PATCHLIST}; do
		epatch "${FILESDIR}/${PN}-${p}.patch"
	done

	if ! use minimal; then
		sed -e "s/LDFLAGS  *=  */override LDFLAGS += /" -e "/LDFLAGS/s/-s//" \
			-e "/LDFLAGS/s/-L[^ ]*//g" -e "/CFLAGS/s/-[IL][^ ]*//g" \
			-i Makefile || die "sed Makefile failed"
	fi
}

src_compile() {
	local OMP

	use custom-cflags || strip-flags
	echo "#define JOHN_SYSTEMWIDE 1" >> config.gentoo
	echo "#define JOHN_SYSTEMWIDE_HOME \"${EPREFIX}/etc/john\"" >> config.gentoo
	echo "#define JOHN_SYSTEMWIDE_EXEC \"${EPREFIX}/usr/libexec/john\"" >> config.gentoo
	append-flags -fPIC -fPIE -include "${S}"/config.gentoo
	gcc-specs-pie && append-ldflags -nopie
	use openmp && OMP="-fopenmp"

	CPP=$(tc-getCXX) CC=$(tc-getCC) AS=$(tc-getCC) LD=$(tc-getCC)
#	use mpi && CPP=mpicxx CC=mpicc AS=mpicc LD=mpicc
	emake -C src/ \
		CPP=${CPP} CC=${CC} AS=${AS} LD=${LD} \
		CFLAGS="-c -Wall ${CFLAGS} ${OMP}" \
		LDFLAGS="${LDFLAGS}" \
		OPT_NORMAL="" \
		OMPFLAGS="${OMP}" \
		$(get_target)
}

src_test() {
	cd run
	./john --test || die "self test failed"

	# This requires that MPI is actually 100% online on your system, which might not
	# be the case, depending on which MPI implementation you are using.
	#if use mpi; then
	#	mpirun -np 2 ./john --test || die "self test failed"
	#else
}

src_install() {
	# executables
	dosbin run/john
	newsbin run/mailer john-mailer

	pax-mark -m "${ED}usr/sbin/john" || die

	dosym john /usr/sbin/unafs
	dosym john /usr/sbin/unique
	dosym john /usr/sbin/unshadow

	# jumbo-patch additions
	if ! use minimal; then
		dosym john /usr/sbin/undrop
		dosbin run/calc_stat
		dosbin run/genmkvpwd
		dosbin run/mkvcalcproba
		insinto /etc/john
		doins run/genincstats.rb run/stats
		doins run/netscreen.py run/sap_prepare.pl
	fi

	# config files
	insinto /etc/john
	doins run/*.chr run/password.lst
	doins run/*.conf

	# documentation
	dodoc doc/*
}






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-05 22:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-05 22:19 [gentoo-commits] gentoo-x86 commit in app-crypt/johntheripper: ChangeLog johntheripper-1.7.9.ebuild Tim Harder (radhermit)
  -- strict thread matches above, loose matches on Subject: below --
2012-02-23 10:04 Tim Harder (radhermit)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox