mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-25 00:01:15 +02:00
* Fixed for the new svn version, enable custom CFLAGS optimization
This commit is contained in:
parent
7459d32ab5
commit
adbdefc2d1
5 changed files with 72 additions and 136 deletions
|
|
@ -1,6 +1,5 @@
|
|||
AUX gentoo-64.patch 1846 RMD160 aa1e258f8a0d5d6354c9b211ec6214719a0ea781 SHA1 0cdd7ee6fc67e02cb55f633f514eb0944af5f5e6 SHA256 f9ebca6aafc6c1c20e0a80b72b8e91ba03478cf8179ab5dc68ace7cd7759e872
|
||||
AUX gentoo.patch 1834 RMD160 91769f58483d059fa9ca1223c3f314a44241033f SHA1 1c51b1e4518f5f969fa50b8956ecc3645fbe66a7 SHA256 54b80b091c732b9aedc166870554e9628fe1315622918dfa8de88fdd6db468c2
|
||||
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-9999.patch 1956 RMD160 bf0e2d973d9ff126fa2c38cfc779960b2598a1ad SHA1 39a3b3626fc1c5000316381af57420df097fd5c7 SHA256 aeb8aadc4a684945977a343bbe9af6caa355aa8c6fa4abd02d6ca189e522a904
|
||||
EBUILD pyrit-0.1.ebuild 2897 RMD160 afad2d595d50a304278ae2fac9fbd2ec5ee7b2e4 SHA1 60066ca960464b36922440866b74d2af0085540f SHA256 85567c2496c616d0a28c330dda23fe4bc8976460aa31d8c0119f71eb56c3cbd4
|
||||
EBUILD pyrit-9999.ebuild 2888 RMD160 ebb11cccfe7f5c62aebaa1efb767ee72c845a5de SHA1 d28bbc4f91c5885c9fb494f8511f193305c7279e SHA256 714f2e77c783a2e963239b300111b0deef8ee45f7f2624f42ca97fbeca0f02b1
|
||||
EBUILD pyrit-9999.ebuild 1032 RMD160 ac5fff9a39ca6fdf77963cab9f4f3d7f575b5218 SHA1 cad0efcb98065dfa7d821b5ff7b5440ac21fbaca SHA256 d1ae08c6d006841402f3fabb58cea0e4164c67a344ec1e3501e5729d6bd781c0
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
||||
|
|
@ -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')
|
||||
|
||||
55
app-crypt/pyrit/files/pyrit-9999.patch
Normal file
55
app-crypt/pyrit/files/pyrit-9999.patch
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
Index: cpyrit_stream/setup.py
|
||||
===================================================================
|
||||
--- cpyrit_stream/setup.py (revision 72)
|
||||
+++ cpyrit_stream/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']
|
||||
|
||||
# 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']
|
||||
|
||||
|
|
@ -9,85 +9,37 @@ ESVN_REPO_URI="http://pyrit.googlecode.com/svn/trunk/"
|
|||
|
||||
LICENSE="GPL-3"
|
||||
KEYWORDS="-*"
|
||||
IUSE="cuda padlock stream"
|
||||
IUSE="cuda stream"
|
||||
SLOT="0"
|
||||
DEPEND="stream? ( dev-util/amd-stream-sdk-bin )
|
||||
DEPEND="stream? ( >=dev-util/amd-stream-sdk-bin-1.3.0_beta-r1 )
|
||||
cuda? ( dev-util/nvidia-cuda-sdk )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
MYOPTS=""
|
||||
if use amd64; then
|
||||
epatch "${FILESDIR}/gentoo-64.patch"
|
||||
MY_ARCH="x86_64"
|
||||
else
|
||||
epatch "${FILESDIR}/gentoo.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
|
||||
epatch "${FILESDIR}/pyrit-9999.patch"
|
||||
cd "${S}/pyrit"
|
||||
distutils_src_compile
|
||||
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
|
||||
cd "${S}/cpyrit_cuda"
|
||||
distutils_src_compile
|
||||
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
|
||||
cd "${S}/cpyrit_stream"
|
||||
distutils_src_compile
|
||||
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
|
||||
cd "${S}/pyrit"
|
||||
distutils_src_install
|
||||
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
|
||||
cd "${S}/cpyrit_cuda"
|
||||
distutils_src_install
|
||||
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
|
||||
cd "${S}/cpyrit_stream"
|
||||
distutils_src_install
|
||||
fi
|
||||
dosbin "${S}/contrib/create_hashdb.py"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue