blob: ada4857bbf63b60da7a9adfffd0919b5c221212b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# $Id: PKGBUILD 82154 2013-01-09 16:03:12Z stephane $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
pkgbase=python-pycuda
pkgname=('python-pycuda' 'python2-pycuda' 'pycuda-headers')
pkgver=2012.1
pkgrel=1
pkgdesc="Python wrapper for Nvidia CUDA"
arch=('i686' 'x86_64')
url="http://mathema.tician.de/software/pycuda"
license=('MIT')
source=(http://pypi.python.org/packages/source/p/pycuda/pycuda-${pkgver}.tar.gz)
makedepends=('ctags' 'python2-distribute' 'python-distribute' 'python2-numpy' 'python-numpy' 'mesa' 'cuda' 'boost' 'nvidia-utils')
sha1sums=('dd52ee697ae9f6256efac3bca682be9c6e7c9649')
build() {
cd "${srcdir}"
_arch=''
[ "$CARCH" = "x86_64" ] && _arch='64'
cp -a pycuda-${pkgver}{,-python2}
cd "${srcdir}"/pycuda-${pkgver}
python3 ./configure.py \
--cuda-root=/opt/cuda \
--cuda-inc-dir=/opt/cuda/include \
--cudadrv-lib-dir=/opt/cuda/lib${_arch} \
--cudart-lib-dir=/opt/cuda/lib${_arch} \
--no-use-shipped-boost \
--boost-python-libname=boost_python3
make
cd "${srcdir}"/pycuda-${pkgver}-python2
python2 ./configure.py \
--cuda-root=/opt/cuda \
--cuda-inc-dir=/opt/cuda/include \
--cudadrv-lib-dir=/opt/cuda/lib${_arch} \
--cudart-lib-dir=/opt/cuda/lib${_arch} \
--no-use-shipped-boost
make
}
package_python-pycuda() {
depends=('cuda' 'nvidia-utils' 'python-numpy' 'python-pytools' 'python' 'boost-libs' 'pycuda-headers')
cd "${srcdir}"/pycuda-${pkgver}
python3 setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
rm -fr "${pkgdir}"/usr/include
}
package_python2-pycuda() {
depends=('cuda' 'nvidia-utils' 'python2-numpy' 'python2-pytools' 'python2' 'boost-libs' 'pycuda-headers')
cd "${srcdir}"/pycuda-${pkgver}-python2
python2 setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
rm -fr "${pkgdir}"/usr/include
}
package_pycuda-headers() {
cd "${srcdir}"/pycuda-${pkgver}
install -dm755 "${pkgdir}"/usr/include/pycuda
for file in $(ls -1 src/cuda/*.hpp); do
install -m644 ${file} "${pkgdir}"/usr/include/pycuda
done
}
|