From ad410aca6132a1d51e41dda882a7b85762a6ad06 Mon Sep 17 00:00:00 2001 From: grimmlin Date: Sun, 25 Oct 2009 00:30:22 +0000 Subject: [PATCH] * Cleaned up a bit, added 0.2.4 --- app-crypt/pyrit/Manifest | 11 ++- app-crypt/pyrit/files/pyrit-0.1-64.patch | 35 -------- app-crypt/pyrit/files/pyrit-0.1.patch | 35 -------- app-crypt/pyrit/files/pyrit-0.2.4.patch | 26 ++++++ app-crypt/pyrit/files/pyrit-9999.patch | 71 +++++----------- app-crypt/pyrit/pyrit-0.1.ebuild | 100 ----------------------- app-crypt/pyrit/pyrit-0.2.2-r1.ebuild | 2 +- app-crypt/pyrit/pyrit-0.2.4.ebuild | 57 +++++++++++++ app-crypt/pyrit/pyrit-9999.ebuild | 2 +- 9 files changed, 111 insertions(+), 228 deletions(-) delete mode 100644 app-crypt/pyrit/files/pyrit-0.1-64.patch delete mode 100644 app-crypt/pyrit/files/pyrit-0.1.patch create mode 100644 app-crypt/pyrit/files/pyrit-0.2.4.patch delete mode 100644 app-crypt/pyrit/pyrit-0.1.ebuild create mode 100644 app-crypt/pyrit/pyrit-0.2.4.ebuild diff --git a/app-crypt/pyrit/Manifest b/app-crypt/pyrit/Manifest index 6c0f89c30..27dc36d7d 100644 --- a/app-crypt/pyrit/Manifest +++ b/app-crypt/pyrit/Manifest @@ -1,7 +1,6 @@ -AUX pyrit-0.1-64.patch 1846 RMD160 aa1e258f8a0d5d6354c9b211ec6214719a0ea781 SHA1 0cdd7ee6fc67e02cb55f633f514eb0944af5f5e6 SHA256 f9ebca6aafc6c1c20e0a80b72b8e91ba03478cf8179ab5dc68ace7cd7759e872 -AUX pyrit-0.1.patch 1834 RMD160 91769f58483d059fa9ca1223c3f314a44241033f SHA1 1c51b1e4518f5f969fa50b8956ecc3645fbe66a7 SHA256 54b80b091c732b9aedc166870554e9628fe1315622918dfa8de88fdd6db468c2 AUX pyrit-0.2.2.patch 1072 RMD160 a78dfe38760d6146848f054da2b2b2ea2abf9a8e SHA1 8848b76dda5d332975537021bb9d7996d7c17f91 SHA256 3c424fab44379b5e81f001887baf15ba0afc2e0466d29d612865303e689fa980 -AUX pyrit-9999.patch 1956 RMD160 bf0e2d973d9ff126fa2c38cfc779960b2598a1ad SHA1 39a3b3626fc1c5000316381af57420df097fd5c7 SHA256 aeb8aadc4a684945977a343bbe9af6caa355aa8c6fa4abd02d6ca189e522a904 -EBUILD pyrit-0.1.ebuild 2904 RMD160 4f83d47263f142d36b2cc9031ce1f24564e090d8 SHA1 b981a2e100a4508a5571a7e51604fbd03577c31d SHA256 a7eb7a46512cb0921014742ee44243e03837ae1984205bdf9a2c67fbc5501665 -EBUILD pyrit-0.2.2-r1.ebuild 1151 RMD160 a76ef2cd0097b709fae701afeb613215c8d697a1 SHA1 81204254aebf0c743ddbc50a6b7f948defa62b39 SHA256 6fdbdde1097647226cd1441a23c18b0284114e08eb12e1f3d6d5c0bea722719c -EBUILD pyrit-9999.ebuild 1038 RMD160 e510fb9318d49c8d5b8147057c6fb9ff9152bf5a SHA1 c733087c35a703cacd978a55192e1d0b1b4b83c2 SHA256 7cc4aabedde4a1c16be8f68ed6a1279929c50e164a8ac8ae9daf06906711ded1 +AUX pyrit-0.2.4.patch 1106 RMD160 ddb3374356d684376420eb6ca0032945f0bd9492 SHA1 4d4399a4e2b4c0fee932dad2ec4e9562a5fb6704 SHA256 6f0345c00c6dc7fc4b13a3b6ce94c030d2db568b1b772100bd68cb200dce0f43 +AUX pyrit-9999.patch 1106 RMD160 ddb3374356d684376420eb6ca0032945f0bd9492 SHA1 4d4399a4e2b4c0fee932dad2ec4e9562a5fb6704 SHA256 6f0345c00c6dc7fc4b13a3b6ce94c030d2db568b1b772100bd68cb200dce0f43 +EBUILD pyrit-0.2.2-r1.ebuild 1149 RMD160 f66e5dcf8013df3774b35ee06ce91b7a038063c0 SHA1 e4fcf70b88c259c264098c1bcdfcd14c359a4200 SHA256 26916241933d5c690ec8b8564dd9e20d11ebaa63b3826576dd10ff0ffbfa7206 +EBUILD pyrit-0.2.4.ebuild 1149 RMD160 056b5521dd9e42816acc71ca07ae8c06053cb73f SHA1 d8081b1b1fe817608e47850c683978abd57a3f60 SHA256 e8f00f7ce82fff0f3f342d809852aab29b3943272707851e3d9e59cc8d9ef4eb +EBUILD pyrit-9999.ebuild 1029 RMD160 82e81aadafd766b6c2d523ede29296ef147f7fdc SHA1 aaf0e5e220953345101608dbca17dbc1222be437 SHA256 7ba2232312cf555e204031152782b4b4ad907abd813985cc384d8edd3d6cf9ce diff --git a/app-crypt/pyrit/files/pyrit-0.1-64.patch b/app-crypt/pyrit/files/pyrit-0.1-64.patch deleted file mode 100644 index 661821cc1..000000000 --- a/app-crypt/pyrit/files/pyrit-0.1-64.patch +++ /dev/null @@ -1,35 +0,0 @@ -Index: cpyrit/setup.py -=================================================================== ---- cpyrit/setup.py (revision 65) -+++ cpyrit/setup.py (working copy) -@@ -20,8 +20,8 @@ - print "... done." - libraries.extend(['cuda', 'cudart']) - extra_compile_args.append('-DHAVE_CUDA') -- include_dirs.append('/usr/local/cuda/include') -- library_dirs.append('/usr/local/cuda/lib') -+ include_dirs.append('/opt/cuda/include') -+ library_dirs.append('/opt/cuda/lib') - extra_objects.append('cpyrit_cuda.o') - if 'HAVE_PADLOCK' in sys.argv: - sys.argv.remove('HAVE_PADLOCK') -@@ -38,14 +38,14 @@ - f.write(re.sub("W\[(.+?)\]", replace_eval, s)) - f.close() - subprocess.check_call('mkdir -p brook',shell=True); -- subprocess.check_call('/usr/local/amdbrook/sdk/bin/brcc -p cal -r -o brook/cpyrit cpyrit_stream_pp.br', shell=True); -+ subprocess.check_call('brcc -p cal -r -o brook/cpyrit cpyrit_stream_pp.br', shell=True); - print "... done." -- subprocess.check_call('g++ -O2 -I/usr/local/amdbrook/sdk/include/ -Ibrook -o brook/cpyrit.o -c brook/cpyrit.cpp',shell=True); -- subprocess.check_call('g++ -O2 -I/usr/local/amdbrook/sdk/include/ -Ibrook -c cpyrit_stream.cpp',shell=True); -+ subprocess.check_call('g++ -fpic -O2 -I/opt/amdbrook/include/ -Ibrook -o brook/cpyrit.o -c brook/cpyrit.cpp',shell=True); -+ subprocess.check_call('g++ -fpic -O2 -I/opt/amdbrook/include/ -Ibrook -c cpyrit_stream.cpp',shell=True); - libraries.extend(['brook']) - extra_compile_args.append('-DHAVE_STREAM') -- include_dirs.append('/usr/local/amdbrook/sdk/include') -- library_dirs.append('/usr/local/amdbrook/sdk/lib') -+ include_dirs.append('/opt/amdbrook/include') -+ library_dirs.append('/opt/amdbrook/lib') - extra_objects.append('cpyrit_stream.o') - extra_objects.append('brook/cpyrit.o') - diff --git a/app-crypt/pyrit/files/pyrit-0.1.patch b/app-crypt/pyrit/files/pyrit-0.1.patch deleted file mode 100644 index ba7949649..000000000 --- a/app-crypt/pyrit/files/pyrit-0.1.patch +++ /dev/null @@ -1,35 +0,0 @@ -Index: cpyrit/setup.py -=================================================================== ---- cpyrit/setup.py (revision 66) -+++ cpyrit/setup.py (working copy) -@@ -20,8 +20,8 @@ - print "... done." - libraries.extend(['cuda', 'cudart']) - extra_compile_args.append('-DHAVE_CUDA') -- include_dirs.append('/usr/local/cuda/include') -- library_dirs.append('/usr/local/cuda/lib') -+ include_dirs.append('/opt/cuda/include') -+ library_dirs.append('/opt/cuda/lib') - extra_objects.append('cpyrit_cuda.o') - if 'HAVE_PADLOCK' in sys.argv: - sys.argv.remove('HAVE_PADLOCK') -@@ -38,14 +38,14 @@ - f.write(re.sub("W\[(.+?)\]", replace_eval, s)) - f.close() - subprocess.check_call('mkdir -p brook',shell=True); -- subprocess.check_call('/usr/local/amdbrook/sdk/bin/brcc -p cal -r -o brook/cpyrit cpyrit_stream_pp.br', shell=True); -+ subprocess.check_call('brcc -p cal -r -o brook/cpyrit cpyrit_stream_pp.br', shell=True); - print "... done." -- subprocess.check_call('g++ -O2 -I/usr/local/amdbrook/sdk/include/ -Ibrook -o brook/cpyrit.o -c brook/cpyrit.cpp',shell=True); -- subprocess.check_call('g++ -O2 -I/usr/local/amdbrook/sdk/include/ -Ibrook -c cpyrit_stream.cpp',shell=True); -+ subprocess.check_call('g++ -O2 -I/opt/amdbrook/include/ -Ibrook -o brook/cpyrit.o -c brook/cpyrit.cpp',shell=True); -+ subprocess.check_call('g++ -O2 -I/opt/amdbrook/include/ -Ibrook -c cpyrit_stream.cpp',shell=True); - libraries.extend(['brook']) - extra_compile_args.append('-DHAVE_STREAM') -- include_dirs.append('/usr/local/amdbrook/sdk/include') -- library_dirs.append('/usr/local/amdbrook/sdk/lib') -+ include_dirs.append('/opt/amdbrook/include') -+ library_dirs.append('/opt/amdbrook/lib') - extra_objects.append('cpyrit_stream.o') - extra_objects.append('brook/cpyrit.o') - diff --git a/app-crypt/pyrit/files/pyrit-0.2.4.patch b/app-crypt/pyrit/files/pyrit-0.2.4.patch new file mode 100644 index 000000000..87d66a4aa --- /dev/null +++ b/app-crypt/pyrit/files/pyrit-0.2.4.patch @@ -0,0 +1,26 @@ +Index: cpyrit_stream/setup.py +=================================================================== +--- cpyrit_stream/setup.py (revision 168) ++++ cpyrit_stream/setup.py (working copy) +@@ -27,19 +27,10 @@ + import subprocess + + # Try to find the Brook+ library and headers +-STREAM_LIB_DIRS = [] +-STREAM_INC_DIRS = [] ++STREAM_INC_DIRS = ['/opt/atibrook/include','/opt/atibrook/include/brook'] ++STREAM_LIB_DIRS = ['/opt/atibrook/lib','/usr/lib'] + BRCC = 'brcc' +-for path in ('/usr/local/atibrook/sdk','/opt/atibrook/sdk'): +- if os.path.exists(path): +- STREAM_LIB_DIRS.append(os.path.sep.join((path, 'lib'))) +- STREAM_INC_DIRS.append(os.path.sep.join((path, 'include'))) +- BRCC = os.path.sep.join((path, 'bin', 'brcc')) +- break +-else: +- print >>sys.stderr, "The AMD-Stream compiler, headers and libraries required to build the kernel were not found. Trying to continue anyway..." + +- + try: + svn_info = subprocess.Popen(('svn', 'info'), stdout=subprocess.PIPE).stdout.read() + version_string = '0.2.4 (svn r%i)' % int(re.compile('Revision: ([0-9]*)').findall(svn_info)[0]) diff --git a/app-crypt/pyrit/files/pyrit-9999.patch b/app-crypt/pyrit/files/pyrit-9999.patch index 1eecb4c15..87d66a4aa 100644 --- a/app-crypt/pyrit/files/pyrit-9999.patch +++ b/app-crypt/pyrit/files/pyrit-9999.patch @@ -1,55 +1,26 @@ Index: cpyrit_stream/setup.py =================================================================== ---- cpyrit_stream/setup.py (revision 72) +--- cpyrit_stream/setup.py (revision 168) +++ cpyrit_stream/setup.py (working copy) -@@ -25,13 +25,13 @@ - import sys, subprocess, re, os +@@ -27,19 +27,10 @@ + import subprocess - # Options to use for all modules --EXTRA_COMPILE_ARGS = ['-O2', '-Werror'] -+EXTRA_COMPILE_ARGS = ['-Werror'] - LIBRARY_DIRS = ['/usr/lib'] - INCLUDE_DIRS = ['/usr/include','/usr/local/include'] - - # Stream-specific --STREAM_INC_DIRS = ['/usr/local/amdbrook/sdk/include','/usr/local/amdcal/include'] --STREAM_LIB_DIRS = ['/usr/local/amdbrook/sdk/lib'] -+STREAM_INC_DIRS = ['/opt/amdbrook/include','/opt/amdbrook/include/brook'] -+STREAM_LIB_DIRS = ['/opt/amdbrook/lib','/usr/lib'] - - - # Custom build_ext phase to create the GPU code with special compilers before building the whole thing -Index: cpyrit_cuda/setup.py -=================================================================== ---- cpyrit_cuda/setup.py (revision 72) -+++ cpyrit_cuda/setup.py (working copy) -@@ -25,13 +25,13 @@ - import sys, subprocess, re, os - - # Options to use for all modules --EXTRA_COMPILE_ARGS = ['-O2', '-Werror'] -+EXTRA_COMPILE_ARGS = ['-Werror'] - LIBRARY_DIRS = ['/usr/lib'] - INCLUDE_DIRS = ['/usr/include','/usr/local/include'] - - # CUDA-specific --NVIDIA_LIB_DIRS = ['/usr/local/cuda/lib'] --NVIDIA_INC_DIRS = ['/usr/local/cuda/include'] -+NVIDIA_LIB_DIRS = ['/opt/cuda/lib','/opt/cuda/sdk/lib'] -+NVIDIA_INC_DIRS = ['/opt/cuda/include'] - - - # Custom build_ext phase to create the GPU code with special compilers before building the whole thing -Index: pyrit/setup.py -=================================================================== ---- pyrit/setup.py (revision 72) -+++ pyrit/setup.py (working copy) -@@ -25,7 +25,7 @@ - import sys, subprocess, re, os - - # Options to use for all modules --EXTRA_COMPILE_ARGS = ['-O2', '-Werror'] -+EXTRA_COMPILE_ARGS = ['-Werror'] - LIBRARY_DIRS = ['/usr/lib'] - INCLUDE_DIRS = ['/usr/include','/usr/local/include'] + # Try to find the Brook+ library and headers +-STREAM_LIB_DIRS = [] +-STREAM_INC_DIRS = [] ++STREAM_INC_DIRS = ['/opt/atibrook/include','/opt/atibrook/include/brook'] ++STREAM_LIB_DIRS = ['/opt/atibrook/lib','/usr/lib'] + BRCC = 'brcc' +-for path in ('/usr/local/atibrook/sdk','/opt/atibrook/sdk'): +- if os.path.exists(path): +- STREAM_LIB_DIRS.append(os.path.sep.join((path, 'lib'))) +- STREAM_INC_DIRS.append(os.path.sep.join((path, 'include'))) +- BRCC = os.path.sep.join((path, 'bin', 'brcc')) +- break +-else: +- print >>sys.stderr, "The AMD-Stream compiler, headers and libraries required to build the kernel were not found. Trying to continue anyway..." +- + try: + svn_info = subprocess.Popen(('svn', 'info'), stdout=subprocess.PIPE).stdout.read() + version_string = '0.2.4 (svn r%i)' % int(re.compile('Revision: ([0-9]*)').findall(svn_info)[0]) diff --git a/app-crypt/pyrit/pyrit-0.1.ebuild b/app-crypt/pyrit/pyrit-0.1.ebuild deleted file mode 100644 index 93a589120..000000000 --- a/app-crypt/pyrit/pyrit-0.1.ebuild +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils python distutils subversion -DESCRIPTION="A GPU-based WPA-PSK and WPA2-PSK cracking tool" -HOMEPAGE="http://code.google.com/p/pyrit/" -ESVN_REPO_URI="http://pyrit.googlecode.com/svn/trunk/@66" - -LICENSE="GPL-3" -KEYWORDS="amd64 x86" -IUSE="cuda padlock stream" -SLOT="0" -DEPEND="stream? ( dev-util/amd-stream-sdk-bin ) - cuda? ( dev-util/nvidia-cuda-sdk )" -RDEPEND="${DEPEND}" - -src_compile() { - MYOPTS="" - if use amd64; then - epatch "${FILESDIR}/pyrit-0.1-64.patch" - MY_ARCH="x86_64" - else - epatch "${FILESDIR}/pyrit-0.1.patch" - MY_ARCH="i686" - fi - cd cpyrit - python setup.py build || die "Build cpu failed" - python setup.py clean - mv build/lib.linux-"${MY_ARCH}"-2.5 build/cpu - if use padlock; then - sed -e 's/_cpyrit.*(/_cpyrit_padlock(/g' -i cpyrit.c - sed -e 's/_cpyrit.*\"/_cpyrit_padlock\"/g' -i cpyrit.c - sed -e '/import/ s/_cpyrit.*/_cpyrit_padlock as _cpyrit/' -i cpyrit.py - python setup.py HAVE_PADLOCK build || die "Build padlock failed" - python setup.py clean - mv build/lib.linux-"${MY_ARCH}"-2.5 build/padlock - fi - if use cuda; then - sed -e 's/_cpyrit.*(/_cpyrit_cuda(/g' -i cpyrit.c - sed -e 's/_cpyrit.*\"/_cpyrit_cuda\"/g' -i cpyrit.c - sed -e '/import/ s/_cpyrit.*/_cpyrit_cuda as _cpyrit/' -i cpyrit.py - python setup.py HAVE_CUDA build || die "Build cuda failed" - python setup.py clean - rm cpyrit_cuda.linkinfo - mv build/lib.linux-"${MY_ARCH}"-2.5 build/cuda - fi - if use stream; then - sed -e 's/_cpyrit.*(/_cpyrit_stream(/g' -i cpyrit.c - sed -e 's/_cpyrit.*\"/_cpyrit_stream\"/g' -i cpyrit.c - sed -e '/import/ s/_cpyrit.*/_cpyrit_stream as _cpyrit/' -i cpyrit.py - python setup.py HAVE_STREAM build || die "Build stream failed" - python setup.py clean - mv build/lib.linux-"${MY_ARCH}"-2.5 build/stream - fi -} - -src_install() { - python_version - insinto /usr/lib/python"${PYVER}"/site-packages/ - cd "${S}"/cpyrit/build/cpu - doins _cpyrit.so - doins cpyrit.py - cd "${S}" - dosbin pyrit.py - if use padlock; then - cd "${S}"/cpyrit/build/padlock - newins _cpyrit.so _cpyrit_padlock.so - newins cpyrit.py cpyrit_padlock.py - cd "${S}" - sed -e '/import/ s/cpyrit.*/cpyrit_padlock as cpyrit/' -i pyrit.py - newsbin pyrit.py pyrit-padlock.py - fi - if use cuda; then - cd "${S}"/cpyrit/build/cuda - newins _cpyrit.so _cpyrit_cuda.so - newins cpyrit.py cpyrit_cuda.py - cd "${S}" - sed -e '/import/ s/cpyrit.*/cpyrit_cuda as cpyrit/' -i pyrit.py - newsbin pyrit.py pyrit-cuda.py - fi - if use stream; then - cd "${S}"/cpyrit/build/stream - newins _cpyrit.so _cpyrit_stream.so - newins cpyrit.py cpyrit_stream.py - cd "${S}" - sed -e '/import/ s/cpyrit.*/cpyrit_stream as cpyrit/' -i pyrit.py - newsbin pyrit.py pyrit-stream.py - fi - dosbin "${S}/contrib/create_hashdb.py" -} - -pkg_postinst() { - python_mod_optimize -} - -pkg_postrm() { - python_mod_cleanup -} - diff --git a/app-crypt/pyrit/pyrit-0.2.2-r1.ebuild b/app-crypt/pyrit/pyrit-0.2.2-r1.ebuild index f8f58aff9..1251aae58 100644 --- a/app-crypt/pyrit/pyrit-0.2.2-r1.ebuild +++ b/app-crypt/pyrit/pyrit-0.2.2-r1.ebuild @@ -10,7 +10,7 @@ HOMEPAGE="http://code.google.com/p/pyrit/" ESVN_REPO_URI="http://pyrit.googlecode.com/svn/trunk/@89" LICENSE="GPL-3" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" IUSE="cuda stream" SLOT="0" DEPEND="dev-db/sqlite:3 diff --git a/app-crypt/pyrit/pyrit-0.2.4.ebuild b/app-crypt/pyrit/pyrit-0.2.4.ebuild new file mode 100644 index 000000000..f46f79a3d --- /dev/null +++ b/app-crypt/pyrit/pyrit-0.2.4.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 + +inherit eutils python distutils subversion +DESCRIPTION="A GPU-based WPA-PSK and WPA2-PSK cracking tool" +HOMEPAGE="http://code.google.com/p/pyrit/" +ESVN_REPO_URI="http://pyrit.googlecode.com/svn/trunk/@168" + +LICENSE="GPL-3" +KEYWORDS="amd64 x86" +IUSE="cuda stream" +SLOT="0" +DEPEND="dev-db/sqlite:3 + dev-lang/python[sqlite] + stream? ( >=dev-util/ati-stream-sdk-bin-1.4.0_beta + >=x11-drivers/ati-drivers-8.573 ) + cuda? ( dev-util/nvidia-cuda-sdk + x11-drivers/nvidia-drivers )" +RDEPEND="${DEPEND}" + +src_compile() { + epatch "${FILESDIR}/${P}.patch" + cd "${S}/pyrit" + distutils_src_compile + if use cuda; then + cd "${S}/cpyrit_cuda" + distutils_src_compile + fi + if use stream; then + cd "${S}/cpyrit_stream" + distutils_src_compile + fi +} + +src_install() { + cd "${S}/pyrit" + distutils_src_install + if use cuda; then + cd "${S}/cpyrit_cuda" + distutils_src_install + fi + if use stream; then + cd "${S}/cpyrit_stream" + distutils_src_install + fi +} + +pkg_postinst() { + python_mod_optimize +} + +pkg_postrm() { + python_mod_cleanup +} diff --git a/app-crypt/pyrit/pyrit-9999.ebuild b/app-crypt/pyrit/pyrit-9999.ebuild index d06215420..c25a6273a 100644 --- a/app-crypt/pyrit/pyrit-9999.ebuild +++ b/app-crypt/pyrit/pyrit-9999.ebuild @@ -8,7 +8,7 @@ HOMEPAGE="http://code.google.com/p/pyrit/" ESVN_REPO_URI="http://pyrit.googlecode.com/svn/trunk/" LICENSE="GPL-3" -KEYWORDS="~amd64 ~x86" +KEYWORDS="-*" IUSE="cuda stream" SLOT="0" DEPEND="stream? ( >=dev-util/ati-stream-sdk-bin-1.4.0_beta )