diff options
author | Simone Riva | 2017-10-23 20:39:22 +0200 |
---|---|---|
committer | Simone Riva | 2017-10-23 20:39:22 +0200 |
commit | 74cf8598c9030ffd7930bb17916354170b38b583 (patch) | |
tree | 84cfc1b1ac88cdfc46c0788d6d18256122b3833e | |
parent | 5c9fce9125f80d26c1b77ea1e88352c508153adf (diff) | |
download | aur-74cf8598c9030ffd7930bb17916354170b38b583.tar.gz |
1.13.3-2
-rw-r--r-- | PKGBUILD | 148 |
1 files changed, 74 insertions, 74 deletions
@@ -28,109 +28,109 @@ sha256sums=( '1db97b12ea8f2ae5a8b847505f634dcd8c670ee311057ff5412a126becca45b8' build() { -cd "${srcdir}" + cd "${srcdir}" -# set by hand this flag if you want to compile with gcc -force_gcc=false + # set by hand this flag if you want to compile with gcc + force_gcc=false -if hash icc; then - use_intel_cc=true - use_gcc=false -else - use_intel_cc=false - use_gcc=true -fi + if hash icc; then + use_intel_cc=true + use_gcc=false + else + use_intel_cc=false + use_gcc=true + fi -if [ "$force_gcc" = true ] ; then - use_intel_cc=false - use_gcc=true -fi + if [ "$force_gcc" = true ] ; then + use_intel_cc=false + use_gcc=true + fi -if [ "$CARCH" = "i686" ]; then - cp ${srcdir}/site32.cfg ${srcdir}/site.cfg - _compiler=intel -else - cp ${srcdir}/site64.cfg ${srcdir}/site.cfg - _compiler=intelem -fi + if [ "$CARCH" = "i686" ]; then + cp ${srcdir}/site32.cfg ${srcdir}/site.cfg + _compiler=intel + else + cp ${srcdir}/site64.cfg ${srcdir}/site.cfg + _compiler=intelem + fi -cp -a numpy-${pkgver} numpy-py2-${pkgver} + cp -a numpy-${pkgver} numpy-py2-${pkgver} -export Atlas=None -export LDFLAGS="$LDFLAGS -shared" + export Atlas=None + export LDFLAGS="$LDFLAGS -shared" -if [ "$use_gcc" = true ]; then - export CFLAGS="-fopenmp -m64 -mtune=native -O3 -Wl,--no-as-needed" - export CXXFLAGS="-fopenmp -m64 -mtune=native -O3 -Wl,--no-as-needed" - export LDFLAGS="-ldl -lm" - export FFLAGS="-fopenmp -m64 -mtune=native -O3" -fi + if [ "$use_gcc" = true ]; then + export CFLAGS="-fopenmp -m64 -mtune=native -O3 -Wl,--no-as-needed" + export CXXFLAGS="-fopenmp -m64 -mtune=native -O3 -Wl,--no-as-needed" + export LDFLAGS="-ldl -lm" + export FFLAGS="-fopenmp -m64 -mtune=native -O3" + fi -if [ "$use_intel_cc" = true ]; then - export __INTEL_PRE_CFLAGS="$__INTEL_PRE_CFLAGS -D_Float128=__float128" -fi + if [ "$use_intel_cc" = true ]; then + export __INTEL_PRE_CFLAGS="$__INTEL_PRE_CFLAGS -D_Float128=__float128" + fi -echo "Building Python2" -cd "${srcdir}" -cp ${srcdir}/site.cfg "${srcdir}/numpy-py2-${pkgver}" -cd "${srcdir}/numpy-py2-${pkgver}" + echo "Building Python2" + cd "${srcdir}" + cp ${srcdir}/site.cfg "${srcdir}/numpy-py2-${pkgver}" + cd "${srcdir}/numpy-py2-${pkgver}" -if [ "$use_intel_cc" = true ]; then - python2 setup.py config --compiler=${_compiler} build_clib --compiler=${_compiler} build_ext --compiler=${_compiler} -fi + if [ "$use_intel_cc" = true ]; then + python2 setup.py config --compiler=${_compiler} build_clib --compiler=${_compiler} build_ext --compiler=${_compiler} + fi -if [ "$use_gcc" = true ]; then - python2 setup.py config build_clib build_ext -fi + if [ "$use_gcc" = true ]; then + python2 setup.py config build_clib build_ext + fi -echo "Building Python3" -cd "${srcdir}" -cp ${srcdir}/site.cfg "${srcdir}/numpy-${pkgver}" -cd "${srcdir}/numpy-${pkgver}" + echo "Building Python3" + cd "${srcdir}" + cp ${srcdir}/site.cfg "${srcdir}/numpy-${pkgver}" + cd "${srcdir}/numpy-${pkgver}" -if [ "$use_intel_cc" = true ]; then - python setup.py config --compiler=${_compiler} build_clib --compiler=${_compiler} build_ext --compiler=${_compiler} -fi + if [ "$use_intel_cc" = true ]; then + python setup.py config --compiler=${_compiler} build_clib --compiler=${_compiler} build_ext --compiler=${_compiler} + fi -if [ "$use_gcc" = true ]; then - python setup.py config build_clib build_ext -fi + if [ "$use_gcc" = true ]; then + python setup.py config build_clib build_ext + fi } package_python2-numpy-mkl() { -depends=('intel-mkl' 'python2') -provides=( "python2-numpy=${pkgver}" ) -replaces=( "python2-numpy" ) -conflicts=( "python2-numpy" ) -optdepends=('python-nose: testsuite') + depends=('intel-mkl' 'python2') + provides=( "python2-numpy=${pkgver}" ) + replaces=( "python2-numpy" ) + conflicts=( "python2-numpy" ) + optdepends=('python-nose: testsuite') -cd "${srcdir}/numpy-py2-${pkgver}" -python2 setup.py config_fc install --prefix=/usr --root="${pkgdir}" --optimize=1 + cd "${srcdir}/numpy-py2-${pkgver}" + python2 setup.py config_fc install --prefix=/usr --root="${pkgdir}" --optimize=1 -install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy" -install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/" + install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy" + install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/" -sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ --e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ --e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ -$(find ${pkgdir} -name '*.py') + sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ + $(find ${pkgdir} -name '*.py') } package_python-numpy-mkl() { -depends=('intel-mkl' 'python') -provides=("python3-numpy=${pkgver}" "python-numpy=${pkgver}") -replaces=('python3-numpy') -conflicts=('python3-numpy' 'python-numpy') + depends=('intel-mkl' 'python') + provides=("python3-numpy=${pkgver}" "python-numpy=${pkgver}") + replaces=('python3-numpy') + conflicts=('python3-numpy' 'python-numpy') -cd "${srcdir}/numpy-${pkgver}" -python setup.py config_fc install --prefix=/usr --root="${pkgdir}" --optimize=1 + cd "${srcdir}/numpy-${pkgver}" + python setup.py config_fc install --prefix=/usr --root="${pkgdir}" --optimize=1 -install -m755 -d "${pkgdir}/usr/share/licenses/python3-numpy" -install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python3-numpy/" + install -m755 -d "${pkgdir}/usr/share/licenses/python3-numpy" + install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python3-numpy/" } |