Info2: << Package: qrupdate%type_pkg[-lapack] Version: 1.1.2 Revision: 4 Type: -lapack (. -atlas -ref), gcc (4.7), Source: mirror:sourceforge:%{Ni}/1.1/%{Ni}-%v.tar.gz Source-MD5: 6d073887c6e858c24aeda5b54c57a8c4 Description: QR and Cholesky decomposition library DescDetail: << qrupdate is a Fortran library for fast updates of QR, Cholesky decompositions. << DescUsage: << This package contains a static library, header, and unversioned dylib. << DescPackaging: << Patch out hardcoded /usr/local. Uses GNU 'install -D', so we patch that out and use 'mkdir -p' first to avoid BuildDepends: coreutils-default. Use -ff2c on the base variant to be compatible with Accelerate. << Maintainer: Alexander Hansen License: GPL Homepage: http://qrupdate.sourceforge.net/ BuildDepends: << (%type_raw[-lapack] = -atlas) atlas, (%type_raw[-lapack] = -ref) lapack341, gcc%type_pkg[gcc]-compiler << Depends: %N-shlibs (=%v-%r) BuildDependsOnly: true Conflicts: %{Ni}, %{Ni}-atlas, %{Ni}-ref Replaces: %{Ni}, %{Ni}-atlas, %{Ni}-ref PatchScript: << #!/bin/sh -ev darwin_vers=`uname -r | cut -d. -f1` if test $darwin_vers -ge 9 then MYLDFLAGS="-Wl,-dead_strip_dylibs" else MYLDFLAGS="" fi echo "LDFLAGS = $LDFLAGS" sed -i.orig -e 's|/usr/local|%p|g' \ -e '/FC/s|gfortran|&-fsf-%type_raw[gcc]|' Makeconf # -ff2c need for darwin8's Accelerate framework if [ "%type_pkg[-lapack]" = "-atlas" ] then perl -pi -e "s|^(BLAS=)-lblas|LDFLAGS=$LDFLAGS $MYLDFLAGS\n\1-lf77blas|" Makeconf # perl -pi -e "s|^(LAPACK=)-llapack|\1-llapack|" Makeconf elif [ "%type_pkg[-lapack]" = "-ref" ] then export PKG_CONFIG_PATH="%p/lib/lapack/pkgconfig:$PKG_CONFIG_PATH" MYBLAS=`pkg-config --libs blas` perl -pi -e " s|^(BLAS=).*|LDFLAGS=$LDFLAGS\n\1$MYBLAS|; \ s/(FFLAGS.*)-O3/\1-O2/" Makeconf perl -pi -e "s|^(LAPACK=)-llapack|\1-lreflapack|" Makeconf else sed -i.orig2 \ -e '/FFLAGS/s|-O3|-ff2c -g &|' \ -e 's|-llapack||' Makeconf perl -pi -e "s|^(BLAS=).*|LDFLAGS=$LDFLAGS\n\1-Wl,-framework,Accelerate|" Makeconf fi sed -i.orig -e 's|install -D|install|g' src/Makefile # recursive parallel Makefiles please -- fangism sed -i.orig -e '/make -C/s|make|+&|' Makefile sed -i.orig -e '/FFLAGS.*LIBS/s|(FFLAGS)|& $(LDFLAGS)|' test/Makefile << CompileScript: << make solib && make lib << InfoTest: << TestScript: make -j1 test || exit 2 << InstallScript: << install -d %i/lib make install-shlib install-staticlib DESTDIR=%d << DocFiles: COPYING README SplitOff: << Package: %N-shlibs Depends: << (%type_raw[-lapack] = -atlas) atlas-shlibs, (%type_raw[-lapack] = -ref) lapack341-shlibs, gcc%type_pkg[gcc]-shlibs << Conflicts: qrupdate-atlas-shlibs, qrupdate-shlibs Replaces: qrupdate-atlas-shlibs, qrupdate-shlibs Files: lib/lib%{Ni}.1*.dylib DocFiles: COPYING README Shlibs: %p/lib/lib%{Ni}.1.dylib 0.0.0 %n (>= 1.1.1-1) DescUsage: This package contains a shared library. << <<