[arch-commits] Commit in lapack/trunk (4 files)

Jan de Groot jgc at archlinux.org
Mon Nov 3 11:02:12 UTC 2008


    Date: Monday, November 3, 2008 @ 06:02:11
  Author: jgc
Revision: 18132

upgpkg: lapack 3.1.1-4
    Link dynamic to blas, remove static lib, fix symlinks in a way that -llapack works

Added:
  lapack/trunk/blas-link.patch
Modified:
  lapack/trunk/PKGBUILD
  lapack/trunk/make.inc.archlinux
Deleted:
  lapack/trunk/make.inc.archlinux-static

---------------------------+
 PKGBUILD                  |   52 +++++++++++++++++---------------------------
 blas-link.patch           |   24 ++++++++++++++++++++
 make.inc.archlinux        |    6 ++---
 make.inc.archlinux-static |   49 -----------------------------------------
 4 files changed, 48 insertions(+), 83 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-11-03 10:52:47 UTC (rev 18131)
+++ PKGBUILD	2008-11-03 11:02:11 UTC (rev 18132)
@@ -4,50 +4,40 @@
 
 pkgname=lapack
 pkgver=3.1.1
-pkgrel=3
+pkgrel=4
 pkgdesc="Linear Algebra PACKage"
 url="http://www.netlib.org/lapack"
 arch=('i686' 'x86_64')
 license=("custom")
-depends=('gcc-libs>=4.3.0')
-makedepends=('blas')
+depends=('blas>=20070405')
 source=(http://www.netlib.org/${pkgname}/${pkgname}-${pkgver}.tgz
 	make.inc.archlinux
-	make.inc.archlinux-static)
-md5sums=('00b21551a899bcfbaa7b8443e1faeef9' 'a9504078034722a348d83d17206c91ca'\
-         '33c2ebbcc06eb8af4d417a502c868d16')
+	blas-link.patch)
+md5sums=('00b21551a899bcfbaa7b8443e1faeef9'
+         'cc368c407e396227c473db5bac92cf02'
+         'c223181737ed2eb68422b139233cc019')
 
 build() {
-  cd ${startdir}/src/${pkgname}-${pkgver}
-  install -m755 -d ${startdir}/pkg/usr/lib
-  install -m755 -d ${startdir}/pkg/usr/share/man/man1
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -Np1 -i "${srcdir}/blas-link.patch" || return 1
+  install -m755 -d "${pkgdir}/usr/lib" || return 1
+  install -m755 -d "${pkgdir}/usr/share/man/man1" || return 1
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" || return 1
 
-# shared:
-  cp ${startdir}/src/make.inc.archlinux ${startdir}/src/${pkgname}-${pkgver}/make.inc
+  cp "${srcdir}/make.inc.archlinux" make.inc || return 1
   if [ "${CARCH}" = "x86_64" ]; then
-    sed -i 's/OPTS     = -funroll-all-loops -O3/OPTS     = -funroll-all-loops -O3 -fPIC/' make.inc
-    sed -i 's/NOOPT    = -O0/NOOPT    = -O0 -fPIC/' make.inc
-    sed -i 's/i686/x86_86/' make.inc
+    CFLAGS="${CFLAGS} -fPIC"
   fi
-  make lib || return 1
-  install -m755 *.so.* ${startdir}/pkg/usr/lib/ || return 1
-  make clean 
+  make clean
+  make lib OPTS="${CFLAGS}" NOOPT="${CFLAGS/-O?/-O0}" || return 1
+  install -m755 *.so* "${startdir}/pkg/usr/lib/" || return 1
+  ln -sf liblapack.so.3 "${pkgdir}/usr/lib/liblapack.so"
+  ln -sf libtmglib.so.3 "${pkgdir}/usr/lib/libtmglib.so"
 
-# static:
-  cp ${startdir}/src/make.inc.archlinux-static ${startdir}/src/${pkgname}-${pkgver}/make.inc
-  if [ "${CARCH}" = "x86_64" ]; then
-    sed -i 's/OPTS     = -funroll-all-loops -O3/OPTS     = -funroll-all-loops -O3 -fPIC/' make.inc
-    sed -i 's/NOOPT    = -O0/NOOPT    = -O0 -fPIC/' make.inc
-    sed -i 's/i686/x86_86/' make.inc
-  fi
-  make lib || return 1
-  install -m644 *.a ${startdir}/pkg/usr/lib/ || return 1
-
-# man pages
+# manpages
   for _file in manpages/man/manl/* manpages/blas/man/manl/*; do
-    install -m644 ${_file} ${startdir}/pkg/usr/share/man/man1/$(basename ${_file} .l).1
+    install -m644 "${_file}" "${pkgdir}/usr/share/man/man1/$(basename ${_file} .l).1" || return 1
   done
 
-  install -d -m755 ${startdir}/pkg/usr/share/licenses/${pkgname}
-  install -m644 COPYING $startdir/pkg/usr/share/licenses/$pkgname/COPYING
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
 }

Added: blas-link.patch
===================================================================
--- blas-link.patch	                        (rev 0)
+++ blas-link.patch	2008-11-03 11:02:11 UTC (rev 18132)
@@ -0,0 +1,24 @@
+diff -ru lapack-3.1.1/SRC/Makefile lapack-3.1.1.patched/SRC/Makefile
+--- lapack-3.1.1/SRC/Makefile	2007-02-23 22:33:05.000000000 +0100
++++ lapack-3.1.1.patched/SRC/Makefile	2008-11-03 11:49:54.000000000 +0100
+@@ -294,7 +294,7 @@
+ 	$(ALLAUX)
+ 
+ ../$(LAPACKLIB): $(ALLOBJ)
+-	$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ)
++	$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) -lblas
+ 	$(RANLIB) $@
+ 
+ single: $(SLASRC) $(ALLAUX) $(SCLAUX) 
+diff -ru lapack-3.1.1/TESTING/MATGEN/Makefile lapack-3.1.1.patched/TESTING/MATGEN/Makefile
+--- lapack-3.1.1/TESTING/MATGEN/Makefile	2007-02-20 22:33:03.000000000 +0100
++++ lapack-3.1.1.patched/TESTING/MATGEN/Makefile	2008-11-03 11:53:15.000000000 +0100
+@@ -60,7 +60,7 @@
+ 
+ ../../$(TMGLIB): $(SMATGEN) $(CMATGEN) $(SCATGEN) $(DMATGEN)	\
+ 		$(ZMATGEN) $(DZATGEN)
+-	$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ)
++	$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) -lblas
+ 	$(RANLIB) $@
+ 
+ single: $(SMATGEN) $(SCATGEN)

Modified: make.inc.archlinux
===================================================================
--- make.inc.archlinux	2008-11-03 10:52:47 UTC (rev 18131)
+++ make.inc.archlinux	2008-11-03 11:02:11 UTC (rev 18132)
@@ -20,7 +20,7 @@
 #  desired load options for your machine.
 #
 FORTRAN  = gfortran
-OPTS     = -funroll-all-loops -O3
+OPTS     = -O2
 DRVOPTS  = $(OPTS)
 NOOPT    = -O0
 LOADER   = gfortran
@@ -35,7 +35,7 @@
 #
 ARCH     = gfortran
 # ar
-ARCHFLAGS= -march=i686 -shared -o
+ARCHFLAGS= -shared -o
 # cr
 RANLIB   = echo
 # ranlib
@@ -44,7 +44,7 @@
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
-BLASLIB      = -lblas -L/usr/lib/
+BLASLIB      = -lblas
 LAPACKLIB    = liblapack.so.3
 TMGLIB       = libtmglib.so.3
 EIGSRCLIB    = libeigsrc.so.3

Deleted: make.inc.archlinux-static
===================================================================
--- make.inc.archlinux-static	2008-11-03 10:52:47 UTC (rev 18131)
+++ make.inc.archlinux-static	2008-11-03 11:02:11 UTC (rev 18132)
@@ -1,49 +0,0 @@
-# make include file addapted for archlinux - damir at archlinux.org 20061212
-####################################################################
-#  LAPACK make include file.                                       #
-#  LAPACK, Version 3.0                                             #
-#  June 30, 1999                                                  #
-####################################################################
-#
-# See the INSTALL/ directory for more examples.
-#
-SHELL = /bin/sh
-#
-#  The machine (platform) identifier to append to the library names
-#
-PLAT =
-#
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
-#
-FORTRAN  = gfortran
-OPTS     = -funroll-all-loops -O3
-DRVOPTS  = $(OPTS)
-NOOPT    = -O0
-LOADER   = gfortran
-LOADOPTS =
-#
-# Timer for the SECOND and DSECND routines
-#
-TIMER    = INT_ETIME
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = echo
-# ranlib
-#
-#  The location of the libraries to which you will link.  (The
-#  machine-specific, optimized BLAS library should be used whenever
-#  possible.)
-#
-BLASLIB      = /lib/libblas.a
-LAPACKLIB    = liblapack.a
-TMGLIB       = tmglib.a
-EIGSRCLIB    = eigsrc.a
-LINSRCLIB    = linsrc.a




More information about the arch-commits mailing list