diff options
author | Kyle Guinn <elyk03@gmail.com> | 2017-03-11 11:49:38 -0600 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-03-18 06:59:49 +0700 |
commit | 152a8346eb06b9906555d4f89305fdeee2183d71 (patch) | |
tree | 92fb2e6eaed7c1a6fa895b8073145b53867bc206 /academic | |
parent | 7a3d19931123fd8661f08a90c1807914e9e406cf (diff) | |
download | slackbuilds-152a8346eb06b9906555d4f89305fdeee2183d71.tar.gz |
academic/qrupdate: Improve BLAS/LAPACK support + New maintainer.
Signed-off-by: Kyle Guinn <elyk03@gmail.com>
Diffstat (limited to 'academic')
-rw-r--r-- | academic/qrupdate/README | 12 | ||||
-rw-r--r-- | academic/qrupdate/patches/atlas-lib-rename.diff | 21 | ||||
-rw-r--r-- | academic/qrupdate/patches/autotoolize.diff | 504 | ||||
-rw-r--r-- | academic/qrupdate/qrupdate.SlackBuild | 68 | ||||
-rw-r--r-- | academic/qrupdate/qrupdate.info | 6 |
5 files changed, 589 insertions, 22 deletions
diff --git a/academic/qrupdate/README b/academic/qrupdate/README index 7e66333237..e5979003d8 100644 --- a/academic/qrupdate/README +++ b/academic/qrupdate/README @@ -1,6 +1,12 @@ -qrupdate (A Fortran library for QR and Cholesky decompositions) - qrupdate is a Fortran library for fast updates of QR and Cholesky decompositions. -qrupdate is an optional dependency for the octave package. +This requires a BLAS/LAPACK implementation. Choose one of these package sets: + * OpenBLAS (includes both a BLAS and a LAPACK implementation) + * atlas (includes both a BLAS and a LAPACK implementation) + * blas, lapack (the Netlib reference implementations) +If more than one set is installed (assuming there are no packaging conflicts) +then the auto-detection will use the first implementation from this list that +it finds. If in doubt, choose the Netlib reference implementations; other +packages that require a BLAS or LAPACK implementation may not build if they +are not configured to detect/use alternate implementations. diff --git a/academic/qrupdate/patches/atlas-lib-rename.diff b/academic/qrupdate/patches/atlas-lib-rename.diff new file mode 100644 index 0000000000..4801036f46 --- /dev/null +++ b/academic/qrupdate/patches/atlas-lib-rename.diff @@ -0,0 +1,21 @@ +diff --git a/m4/ax_blas.m4 b/m4/ax_blas.m4 +--- a/m4/ax_blas.m4 ++++ b/m4/ax_blas.m4 +@@ -116,13 +116,10 @@ + + # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) + if test $ax_blas_ok = no; then +- AC_CHECK_LIB(atlas, ATL_xerbla, +- [AC_CHECK_LIB(f77blas, $sgemm, +- [AC_CHECK_LIB(cblas, cblas_dgemm, +- [ax_blas_ok=yes +- BLAS_LIBS="-lcblas -lf77blas -latlas"], +- [], [-lf77blas -latlas])], +- [], [-latlas])]) ++ AC_CHECK_LIB(tatlas, $sgemm, ++ [ax_blas_ok=yes; BLAS_LIBS="-ltatlas"], ++ [AC_CHECK_LIB(satlas, $sgemm, ++ [ax_blas_ok=yes; BLAS_LIBS="-lsatlas"])]) + fi + + # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) diff --git a/academic/qrupdate/patches/autotoolize.diff b/academic/qrupdate/patches/autotoolize.diff new file mode 100644 index 0000000000..b8a86eb636 --- /dev/null +++ b/academic/qrupdate/patches/autotoolize.diff @@ -0,0 +1,504 @@ +diff --git a/Makefile.am b/Makefile.am +new file mode 100644 +--- /dev/null ++++ b/Makefile.am +@@ -0,0 +1,3 @@ ++SUBDIRS = src test ++ ++pkgconfig_DATA = qrupdate.pc +diff --git a/ax_blas.m4 b/ax_blas.m4 +new file mode 100644 +--- /dev/null ++++ b/ax_blas.m4 +@@ -0,0 +1,238 @@ ++# =========================================================================== ++# https://www.gnu.org/software/autoconf-archive/ax_blas.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_BLAS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) ++# ++# DESCRIPTION ++# ++# This macro looks for a library that implements the BLAS linear-algebra ++# interface (see http://www.netlib.org/blas/). On success, it sets the ++# BLAS_LIBS output variable to hold the requisite library linkages. ++# ++# To link with BLAS, you should link with: ++# ++# $BLAS_LIBS $LIBS $FLIBS ++# ++# in that order. FLIBS is the output variable of the ++# AC_F77_LIBRARY_LDFLAGS macro (called if necessary by AX_BLAS), and is ++# sometimes necessary in order to link with F77 libraries. Users will also ++# need to use AC_F77_DUMMY_MAIN (see the autoconf manual), for the same ++# reason. ++# ++# Many libraries are searched for, from ATLAS to CXML to ESSL. The user ++# may also use --with-blas=<lib> in order to use some specific BLAS ++# library <lib>. In order to link successfully, however, be aware that you ++# will probably need to use the same Fortran compiler (which can be set ++# via the F77 env. var.) as was used to compile the BLAS library. ++# ++# ACTION-IF-FOUND is a list of shell commands to run if a BLAS library is ++# found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it is ++# not found. If ACTION-IF-FOUND is not specified, the default action will ++# define HAVE_BLAS. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see <https://www.gnu.org/licenses/>. ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 15 ++ ++AU_ALIAS([ACX_BLAS], [AX_BLAS]) ++AC_DEFUN([AX_BLAS], [ ++AC_PREREQ(2.50) ++AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS]) ++AC_REQUIRE([AC_CANONICAL_HOST]) ++ax_blas_ok=no ++ ++AC_ARG_WITH(blas, ++ [AS_HELP_STRING([--with-blas=<lib>], [use BLAS library <lib>])]) ++case $with_blas in ++ yes | "") ;; ++ no) ax_blas_ok=disable ;; ++ -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; ++ *) BLAS_LIBS="-l$with_blas" ;; ++esac ++ ++# Get fortran linker names of BLAS functions to check for. ++AC_F77_FUNC(sgemm) ++AC_F77_FUNC(dgemm) ++ ++ax_blas_save_LIBS="$LIBS" ++LIBS="$LIBS $FLIBS" ++ ++# First, check BLAS_LIBS environment variable ++if test $ax_blas_ok = no; then ++if test "x$BLAS_LIBS" != x; then ++ save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" ++ AC_MSG_CHECKING([for $sgemm in $BLAS_LIBS]) ++ AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes], [BLAS_LIBS=""]) ++ AC_MSG_RESULT($ax_blas_ok) ++ LIBS="$save_LIBS" ++fi ++fi ++ ++# BLAS linked to by default? (happens on some supercomputers) ++if test $ax_blas_ok = no; then ++ save_LIBS="$LIBS"; LIBS="$LIBS" ++ AC_MSG_CHECKING([if $sgemm is being linked in already]) ++ AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes]) ++ AC_MSG_RESULT($ax_blas_ok) ++ LIBS="$save_LIBS" ++fi ++ ++# BLAS in OpenBLAS library? (http://xianyi.github.com/OpenBLAS/) ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(openblas, $sgemm, [ax_blas_ok=yes ++ BLAS_LIBS="-lopenblas"]) ++fi ++ ++# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(atlas, ATL_xerbla, ++ [AC_CHECK_LIB(f77blas, $sgemm, ++ [AC_CHECK_LIB(cblas, cblas_dgemm, ++ [ax_blas_ok=yes ++ BLAS_LIBS="-lcblas -lf77blas -latlas"], ++ [], [-lf77blas -latlas])], ++ [], [-latlas])]) ++fi ++ ++# BLAS in PhiPACK libraries? (requires generic BLAS lib, too) ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(blas, $sgemm, ++ [AC_CHECK_LIB(dgemm, $dgemm, ++ [AC_CHECK_LIB(sgemm, $sgemm, ++ [ax_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"], ++ [], [-lblas])], ++ [], [-lblas])]) ++fi ++ ++# BLAS in Intel MKL library? ++if test $ax_blas_ok = no; then ++ # MKL for gfortran ++ if test x"$ac_cv_fc_compiler_gnu" = xyes; then ++ # 64 bit ++ if test $host_cpu = x86_64; then ++ AC_CHECK_LIB(mkl_gf_lp64, $sgemm, ++ [ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread"],, ++ [-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread]) ++ # 32 bit ++ elif test $host_cpu = i686; then ++ AC_CHECK_LIB(mkl_gf, $sgemm, ++ [ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf -lmkl_sequential -lmkl_core -lpthread"],, ++ [-lmkl_gf -lmkl_sequential -lmkl_core -lpthread]) ++ fi ++ # MKL for other compilers (Intel, PGI, ...?) ++ else ++ # 64-bit ++ if test $host_cpu = x86_64; then ++ AC_CHECK_LIB(mkl_intel_lp64, $sgemm, ++ [ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread"],, ++ [-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread]) ++ # 32-bit ++ elif test $host_cpu = i686; then ++ AC_CHECK_LIB(mkl_intel, $sgemm, ++ [ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel -lmkl_sequential -lmkl_core -lpthread"],, ++ [-lmkl_intel -lmkl_sequential -lmkl_core -lpthread]) ++ fi ++ fi ++fi ++# Old versions of MKL ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(mkl, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-lmkl -lguide -lpthread"],,[-lguide -lpthread]) ++fi ++ ++# BLAS in Apple vecLib library? ++if test $ax_blas_ok = no; then ++ save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" ++ AC_MSG_CHECKING([for $sgemm in -framework vecLib]) ++ AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes;BLAS_LIBS="-framework vecLib"]) ++ AC_MSG_RESULT($ax_blas_ok) ++ LIBS="$save_LIBS" ++fi ++ ++# BLAS in Alpha CXML library? ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(cxml, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-lcxml"]) ++fi ++ ++# BLAS in Alpha DXML library? (now called CXML, see above) ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(dxml, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-ldxml"]) ++fi ++ ++# BLAS in Sun Performance library? ++if test $ax_blas_ok = no; then ++ if test "x$GCC" != xyes; then # only works with Sun CC ++ AC_CHECK_LIB(sunmath, acosp, ++ [AC_CHECK_LIB(sunperf, $sgemm, ++ [BLAS_LIBS="-xlic_lib=sunperf -lsunmath" ++ ax_blas_ok=yes],[],[-lsunmath])]) ++ fi ++fi ++ ++# BLAS in SCSL library? (SGI/Cray Scientific Library) ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(scs, $sgemm, [ax_blas_ok=yes; BLAS_LIBS="-lscs"]) ++fi ++ ++# BLAS in SGIMATH library? ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(complib.sgimath, $sgemm, ++ [ax_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"]) ++fi ++ ++# BLAS in IBM ESSL library? (requires generic BLAS lib, too) ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(blas, $sgemm, ++ [AC_CHECK_LIB(essl, $sgemm, ++ [ax_blas_ok=yes; BLAS_LIBS="-lessl -lblas"], ++ [], [-lblas $FLIBS])]) ++fi ++ ++# Generic BLAS library? ++if test $ax_blas_ok = no; then ++ AC_CHECK_LIB(blas, $sgemm, [ax_blas_ok=yes; BLAS_LIBS="-lblas"]) ++fi ++ ++AC_SUBST(BLAS_LIBS) ++ ++LIBS="$ax_blas_save_LIBS" ++ ++# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: ++if test x"$ax_blas_ok" = xyes; then ++ ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1]) ++ : ++else ++ ax_blas_ok=no ++ $2 ++fi ++])dnl AX_BLAS +diff --git a/ax_lapack.m4 b/ax_lapack.m4 +new file mode 100644 +--- /dev/null ++++ b/ax_lapack.m4 +@@ -0,0 +1,131 @@ ++# =========================================================================== ++# https://www.gnu.org/software/autoconf-archive/ax_lapack.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_LAPACK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) ++# ++# DESCRIPTION ++# ++# This macro looks for a library that implements the LAPACK linear-algebra ++# interface (see http://www.netlib.org/lapack/). On success, it sets the ++# LAPACK_LIBS output variable to hold the requisite library linkages. ++# ++# To link with LAPACK, you should link with: ++# ++# $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS ++# ++# in that order. BLAS_LIBS is the output variable of the AX_BLAS macro, ++# called automatically. FLIBS is the output variable of the ++# AC_F77_LIBRARY_LDFLAGS macro (called if necessary by AX_BLAS), and is ++# sometimes necessary in order to link with F77 libraries. Users will also ++# need to use AC_F77_DUMMY_MAIN (see the autoconf manual), for the same ++# reason. ++# ++# The user may also use --with-lapack=<lib> in order to use some specific ++# LAPACK library <lib>. In order to link successfully, however, be aware ++# that you will probably need to use the same Fortran compiler (which can ++# be set via the F77 env. var.) as was used to compile the LAPACK and BLAS ++# libraries. ++# ++# ACTION-IF-FOUND is a list of shell commands to run if a LAPACK library ++# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it ++# is not found. If ACTION-IF-FOUND is not specified, the default action ++# will define HAVE_LAPACK. ++# ++# LICENSE ++# ++# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see <https://www.gnu.org/licenses/>. ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 8 ++ ++AU_ALIAS([ACX_LAPACK], [AX_LAPACK]) ++AC_DEFUN([AX_LAPACK], [ ++AC_REQUIRE([AX_BLAS]) ++ax_lapack_ok=no ++ ++AC_ARG_WITH(lapack, ++ [AS_HELP_STRING([--with-lapack=<lib>], [use LAPACK library <lib>])]) ++case $with_lapack in ++ yes | "") ;; ++ no) ax_lapack_ok=disable ;; ++ -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; ++ *) LAPACK_LIBS="-l$with_lapack" ;; ++esac ++ ++# Get fortran linker name of LAPACK function to check for. ++AC_F77_FUNC(cheev) ++ ++# We cannot use LAPACK if BLAS is not found ++if test "x$ax_blas_ok" != xyes; then ++ ax_lapack_ok=noblas ++ LAPACK_LIBS="" ++fi ++ ++# First, check LAPACK_LIBS environment variable ++if test "x$LAPACK_LIBS" != x; then ++ save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" ++ AC_MSG_CHECKING([for $cheev in $LAPACK_LIBS]) ++ AC_TRY_LINK_FUNC($cheev, [ax_lapack_ok=yes], [LAPACK_LIBS=""]) ++ AC_MSG_RESULT($ax_lapack_ok) ++ LIBS="$save_LIBS" ++ if test $ax_lapack_ok = no; then ++ LAPACK_LIBS="" ++ fi ++fi ++ ++# LAPACK linked to by default? (is sometimes included in BLAS lib) ++if test $ax_lapack_ok = no; then ++ save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" ++ AC_CHECK_FUNC($cheev, [ax_lapack_ok=yes]) ++ LIBS="$save_LIBS" ++fi ++ ++# Generic LAPACK library? ++for lapack in lapack lapack_rs6k; do ++ if test $ax_lapack_ok = no; then ++ save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" ++ AC_CHECK_LIB($lapack, $cheev, ++ [ax_lapack_ok=yes; LAPACK_LIBS="-l$lapack"], [], [$FLIBS]) ++ LIBS="$save_LIBS" ++ fi ++done ++ ++AC_SUBST(LAPACK_LIBS) ++ ++# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: ++if test x"$ax_lapack_ok" = xyes; then ++ ifelse([$1],,AC_DEFINE(HAVE_LAPACK,1,[Define if you have LAPACK library.]),[$1]) ++ : ++else ++ ax_lapack_ok=no ++ $2 ++fi ++])dnl AX_LAPACK +diff --git a/configure.ac b/configure.ac +new file mode 100644 +--- /dev/null ++++ b/configure.ac +@@ -0,0 +1,36 @@ ++# -*- Autoconf -*- ++# Process this file with autoconf to produce a configure script. ++ ++AC_PREREQ([2.69]) ++AC_INIT([qrupdate],[1.1.2],[highegg@gmail.com],[qrupdate],[https://sourceforge.net/projects/qrupdate/]) ++AC_CONFIG_SRCDIR([src/sqr1up.f]) ++AC_CONFIG_HEADERS([src/config.h]) ++AM_INIT_AUTOMAKE([foreign]) ++LT_INIT ++ ++# Checks for programs. ++AC_PROG_INSTALL ++AC_PROG_F77 ++ ++# Checks for libraries. ++sinclude([ax_blas.m4]) ++AX_BLAS([], [AC_MSG_ERROR([cannot find BLAS])]) ++ ++sinclude([ax_lapack.m4]) ++AX_LAPACK([], [AC_MSG_ERROR([cannot find LAPACK])]) ++ ++# Checks for header files. ++ ++# Checks for typedefs, structures, and compiler characteristics. ++ ++# Checks for library functions. ++ ++m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_SUBST([pkgconfigdir], [${libdir}/pkgconfig])]) ++ ++AC_CONFIG_FILES([ ++ qrupdate.pc ++ Makefile ++ src/Makefile ++ test/Makefile ++]) ++AC_OUTPUT +diff --git a/qrupdate.pc.in b/qrupdate.pc.in +new file mode 100644 +--- /dev/null ++++ b/qrupdate.pc.in +@@ -0,0 +1,10 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++ ++Name: @PACKAGE_NAME@ ++Description: Library for fast updating of QR and Cholesky decompositions ++Version: @PACKAGE_VERSION@ ++URL: @PACKAGE_URL@ ++Libs: -L${libdir} -lqrupdate ++Libs.private: @LAPACK_LIBS@ @BLAS_LIBS@ +diff --git a/src/Makefile.am b/src/Makefile.am +new file mode 100644 +--- /dev/null ++++ b/src/Makefile.am +@@ -0,0 +1,19 @@ ++AM_FFLAGS = -fimplicit-none -O3 -funroll-loops ++ ++SRC = caxcpy.f cch1dn.f cch1up.f cchdex.f cchinx.f cchshx.f cgqvec.f \ ++cqhqr.f cqr1up.f cqrdec.f cqrder.f cqrinc.f cqrinr.f cqrot.f cqrqh.f \ ++cqrshc.f cqrtv1.f dch1dn.f dch1up.f dchdex.f dchinx.f dchshx.f \ ++dgqvec.f dqhqr.f dqr1up.f dqrdec.f dqrder.f dqrinc.f dqrinr.f dqrot.f \ ++dqrqh.f dqrshc.f dqrtv1.f sch1dn.f sch1up.f schdex.f schinx.f schshx.f \ ++sgqvec.f sqhqr.f sqr1up.f sqrdec.f sqrder.f sqrinc.f sqrinr.f sqrot.f \ ++sqrqh.f sqrshc.f sqrtv1.f zaxcpy.f zch1dn.f zch1up.f zchdex.f zchinx.f \ ++zchshx.f zgqvec.f zqhqr.f zqr1up.f zqrdec.f zqrder.f zqrinc.f zqrinr.f \ ++zqrot.f zqrqh.f zqrshc.f zqrtv1.f \ ++clu1up.f dlu1up.f slu1up.f zlu1up.f \ ++clup1up.f dlup1up.f slup1up.f zlup1up.f ++ ++lib_LTLIBRARIES = libqrupdate.la ++ ++libqrupdate_la_SOURCES = $(SRC) ++libqrupdate_la_LIBADD = $(LAPACK_LIBS) $(BLAS_LIBS) ++libqrupdate_la_LDFLAGS = -no-undefined -version-number 1:1:2 +diff --git a/test/Makefile.am b/test/Makefile.am +new file mode 100644 +--- /dev/null ++++ b/test/Makefile.am +@@ -0,0 +1,32 @@ ++AM_FFLAGS = -fimplicit-none -O3 -funroll-loops ++LDADD = $(top_builddir)/src/libqrupdate.la ++ ++EXTRA_DIST = report_results ++ ++check_PROGRAMS = \ ++ tqr1up tqrinc tqrdec tqrshc tqrinr tqrder \ ++ tch1up tch1dn tchinx tchdex tchshx \ ++ tlu1up tlup1up ++ ++tqr1up_SOURCES = tqr1up.f utils.f ++tqrinc_SOURCES = tqrinc.f utils.f ++tqrdec_SOURCES = tqrdec.f utils.f ++tqrshc_SOURCES = tqrshc.f utils.f ++tqrinr_SOURCES = tqrinr.f utils.f ++tqrder_SOURCES = tqrder.f utils.f ++tch1up_SOURCES = tch1up.f utils.f ++tch1dn_SOURCES = tch1dn.f utils.f ++tchinx_SOURCES = tchinx.f utils.f ++tchdex_SOURCES = tchdex.f utils.f ++tchshx_SOURCES = tchshx.f utils.f ++tlu1up_SOURCES = tlu1up.f utils.f ++tlup1up_SOURCES = tlup1up.f utils.f ++ ++check-local: $(check_PROGRAMS) ++ @for i in $(check_PROGRAMS); do \ ++ echo > $$i.out; \ ++ ./$$i | tee $$i.out; \ ++ done ++ @$(srcdir)/report_results $(check_PROGRAMS:%=%.out) ++ ++CLEANFILES = *.out diff --git a/academic/qrupdate/qrupdate.SlackBuild b/academic/qrupdate/qrupdate.SlackBuild index cd581d5c4e..ee2e33b1dd 100644 --- a/academic/qrupdate/qrupdate.SlackBuild +++ b/academic/qrupdate/qrupdate.SlackBuild @@ -2,18 +2,36 @@ # Slackware build script for qrupdate -# Written by Pablo Santamaria (pablosantamaria@gmail.com) +# Copyright 2017 Kyle Guinn <elyk03@gmail.com>, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=qrupdate VERSION=${VERSION:-1.1.2} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i486 ;; + case "$(uname -m)" in + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; + *) ARCH=$(uname -m) ;; esac fi @@ -22,9 +40,14 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +DOCS="COPYING ChangeLog README" + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" +elif [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" @@ -45,21 +68,34 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +chmod -R u+w,go-w,a+rX-st . + +patch -p1 < $CWD/patches/autotoolize.diff +patch -p2 < $CWD/patches/atlas-lib-rename.diff +autoreconf -vif + +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --enable-shared \ + --disable-static \ + --disable-dependency-tracking \ + --build=$ARCH-slackware-linux \ + FFLAGS="$SLKCFLAGS" \ -make solib FC=gfortran FFLAGS="$SLKCFLAGS -fimplicit-none -funroll-loops" -make install-shlib LIBDIR=/usr/lib${LIBDIRSUFFIX} PREFIX=$PKG -chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/libqrupdate.so.* +make +make check +make install-strip DESTDIR=$PKG -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +find $PKG/usr/lib${LIBDIRSUFFIX} -name '*.la' -delete mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -install -m644 COPYING README ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/academic/qrupdate/qrupdate.info b/academic/qrupdate/qrupdate.info index 93988b2389..55b1642ec7 100644 --- a/academic/qrupdate/qrupdate.info +++ b/academic/qrupdate/qrupdate.info @@ -5,6 +5,6 @@ DOWNLOAD="http://downloads.sourceforge.net/qrupdate/qrupdate-1.1.2.tar.gz" MD5SUM="6d073887c6e858c24aeda5b54c57a8c4" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="lapack" -MAINTAINER="Pablo Santamaria" -EMAIL="pablosantamaria@gmail.com" +REQUIRES="blas lapack" +MAINTAINER="Kyle Guinn" +EMAIL="elyk03@gmail.com" |