summaryrefslogtreecommitdiffstats
path: root/extra/lapack/Pkgfile
blob: a2eb01c6bb424bd027818217cf44f7c0f837c9bb (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
# Description: Linear Algebra PACKage 
# URL: http://www.netlib.org/lapack
# Maintainer: NuTyX core team
# Packager: lesibel at free dot fr
# Depends on: blas
# Run on: blas

name=lapack
version=3.2.1
release=2
source=(http://www.netlib.org/$name/$name-$version.tgz
	http://nutyx.meticul.eu/files/patchs/$name/{make.inc.archlinux,blas-link.patch})
build() {
  cd $name-$version
  install -d $PKG/usr/lib
  cp $SRC/make.inc.archlinux make.inc
  
  # fix blas linking FS#13093
  patch -Np1 -i $SRC/blas-link.patch 
  # Build with Position Independent Code (PIC) FS#12464 (i686), required for x86_64
  CFLAGS="${CFLAGS} -fPIC"

  make clean
  make lib OPTS="${CFLAGS}" NOOPT="${CFLAGS/-O?/-O0}" 
  install -m755 *.so* $PKG/usr/lib/
  ln -sf liblapack.so.3 $PKG/usr/lib/liblapack.so
  ln -sf libtmglib.so.3 $PKG/usr/lib/libtmglib.so
  install -Dm644 $SRC/$name-$version/LICENSE $PKG/usr/share/licenses/$name/LICENSE
}