# $Id: Portfile,v 1.2 2005/09/14 06:00:31 yeled Exp $

PortSystem 1.0
name		john-devel
version		1.6.38
categories	sysutils security
maintainers	yeled@opendarwin.org
description	Featureful Unix password cracker
long_description	\
	John the Ripper is a UNIX password cracker, currently available for \
	UNIX (tested with Linux x86, FreeBSD x86, Solaris 2.x SPARC, OSF/1 \
	Alpha), DOS, WinNT/Win95.
homepage	http://www.openwall.com/john/
platforms	darwin
master_sites	\
	http://www.openwall.com/john/ \
	ftp://ftp.ca.openwall.com/pub/projects/john/ \
	ftp://ftp.openwall.com/pub/projects/john/ \
	ftp://ftp1.ru.openwall.com/pub/projects/john/ \
	ftp://ftp2.ru.openwall.com/pub/projects/john/ \
	ftp://ftp.pl.openwall.com/pub/projects/john/ \
	ftp://ftp.ua.openwall.com/pub/projects/john/ \
	ftp://ftp.cz.openwall.com/pub/projects/john/
checksums	md5 cad2877bc4d0e54c3863f5e7d1143fc6
distname	john-${version}
worksrcdir	${distname}/src
configure	{}
build.args	macosx-ppc32-cc
build.target
destroot {
    file mkdir ${destroot}${prefix}/bin
    file copy ${workpath}/${distname}/run ${destroot}${prefix}/share/john
    system "chmod -R ugo+rx ${destroot}${prefix}/share/john"
    system "ln -s ${prefix}/share/john/john ${destroot}${prefix}/bin/john"
    file mkdir ${destroot}${prefix}/share/doc
    file copy ${workpath}/${distname}/doc ${destroot}${prefix}/share/doc/john
    system "chmod -R ugo+rx ${destroot}${prefix}/share/doc/john"
}

variant altivec conflicts sixty-four-bit {
build.args-delete	macosx-ppc32-cc
build.args-append	macosx-ppc32-altivec-cc
depends_build	port:perl5.8
	configure {
			reinplace "s|\/usr|${prefix}|g" ${workpath}/${worksrcdir}/ppc-alti.pl
	}
}

#variant sixty-four-bit {
#build.args-delete	macosx-ppc32-cc
#build.args-append	macosx-ppc64-cc
#}

post-install {
		ui_msg	""
		ui_msg	"You'll find the john files under ${prefix}/share/john/"
		ui_msg	""
}
