diff options
Diffstat (limited to 'development/numpy/numpy.SlackBuild')
-rw-r--r-- | development/numpy/numpy.SlackBuild | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/development/numpy/numpy.SlackBuild b/development/numpy/numpy.SlackBuild index 592daadb80..011e0d2a4b 100644 --- a/development/numpy/numpy.SlackBuild +++ b/development/numpy/numpy.SlackBuild @@ -3,9 +3,13 @@ # Slackware build script for NumPy # Written by Aleksandar Samardzic <asamardzic@gmail.com> +# Updated up to 1.6.2 by Serban Udrea <S.Udrea@gsi.de> +# Added support for building with debugging symbols (S. Udrea) +# LIBDIRSUFFIX is now needed to set the proper path for +# UMFPACK (S. Udrea) PRGNAM=numpy -VERSION=${VERSION:-1.6.1} +VERSION=${VERSION:-1.6.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -17,6 +21,12 @@ if [ -z "$ARCH" ]; then esac fi +if [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=${PKG:-$TMP/package-$PRGNAM} @@ -37,10 +47,35 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -python setup.py install --root $PKG +cat > site.cfg <<EOF +[amd] +library_dirs = /usr/lib${LIBDIRSUFFIX} +include_dirs = /usr/include/amd +amd_libs = amd + +[umfpack] +library_dirs = /usr/lib${LIBDIRSUFFIX} +include_dirs = /usr/include/umfpack +umfpack_libs = umfpack +EOF + -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +DEBUG=${DEBUG:-no} + +case "$DEBUG" in + [yY]|[yY][eE][sS]) DEBUG="y" ;; + *) DEBUG="" ;; +esac + +if [ ! "$DEBUG" ]; then + python setup.py install --root $PKG + + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +else + python setup.py build --debug + python setup.py install --root $PKG +fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COMPATIBILITY DEV_README.txt LICENSE.txt README.txt THANKS.txt\ |