[cpl-plugin-xsh] 02/03: Work with Fortran lapack instead of clapack or lapacke

Ole Streicher olebole-guest at alioth.debian.org
Fri Nov 1 18:19:06 UTC 2013


This is an automated email from the git hooks/post-receive script.

olebole-guest pushed a commit to branch debian
in repository cpl-plugin-xsh.

commit 1d2fc7bf8f522b8ac1a16728be7f005b954e08b6
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Fri Nov 1 19:17:45 2013 +0100

    Work with Fortran lapack instead of clapack or lapacke
---
 debian/control              |    2 +-
 debian/patches/lapack.patch |   50 +++++++++++++++++++++++++++----------------
 2 files changed, 32 insertions(+), 20 deletions(-)

diff --git a/debian/control b/debian/control
index 4245a0a..257743d 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9),
                dh-autoreconf,
                libcpl-dev (>= 5.3.1),
                libgsl0-dev,
-	       liblapacke-dev,
+	       liblapack-dev,
                python,
                python-cpl,
                python-pyfits,
diff --git a/debian/patches/lapack.patch b/debian/patches/lapack.patch
index db2cf4a..b0481a1 100644
--- a/debian/patches/lapack.patch
+++ b/debian/patches/lapack.patch
@@ -2,41 +2,53 @@ Author: Ole Streicher <debian at liska.ath.cx>
 Description: Replace clapack by lapack
 --- a/acinclude.m4
 +++ b/acinclude.m4
-@@ -6,8 +6,8 @@
- 
+@@ -7,7 +7,7 @@
      AC_MSG_CHECKING([for lapack])
  
--    xsh_lapack_check_header="clapack.h"
+     xsh_lapack_check_header="clapack.h"
 -    xsh_lapack_check_lib="libclapack.a"
-+    xsh_lapack_check_header="lapacke.h"
-+    xsh_lapack_check_lib="liblapacke.so"
++    xsh_lapack_check_lib="liblapack.so"
  
      xsh_lapack_includes=""
      xsh_lapack_libraries=""
-@@ -100,8 +100,8 @@
+@@ -53,8 +53,7 @@
+             xsh_lapack_incdirs="$xsh_with_lapack_includes"
+         fi
+ 
+-        ESO_FIND_FILE($xsh_lapack_check_header, $xsh_lapack_incdirs,
+-                      xsh_lapack_includes)
++	xsh_lapack_includes=notneeded
+ 
+ 
+         # Check for the lapack library
+@@ -100,8 +99,8 @@
          LAPACK_LDFLAGS="-L$xsh_lapack_libraries"
          LDFLAGS="$LDFLAGS $LAPACK_LDFLAGS"
          CPPFLAGS="$CPPFLAGS $LAPACK_INCLUDES"
 -        AC_CHECK_LIB([clapack], [main], [LIBLAPACKC="-lclapack"], AC_MSG_ERROR([Library clapack not found]))
 -        LIBS="$LIBS $LIBLAPACKC"
-+        AC_CHECK_LIB([lapacke], [main], [LIBLAPACKC="-llapacke"], AC_MSG_ERROR([Library lapacke not found]))
++        AC_CHECK_LIB([lapack], [main], [LIBLAPACKC="-llapack"], AC_MSG_ERROR([Library lapacke not found]))
 +        LIBS="$LIBS $LIBLAPACKC -Wl,--no-as-needed"
          LIBLAPACK="$LIBLAPACKC"
      else
          AC_MSG_RESULT([disabled])
 --- a/xsh/xsh_subtract_sky_single.c
 +++ b/xsh/xsh_subtract_sky_single.c
-@@ -67,8 +67,7 @@
+@@ -67,9 +67,10 @@
  #ifdef DARWIN
  	#include <vecLib/clapack.h>
  #else
 -	#include <f2c.h>
 -	#include <clapack.h>
-+	#include <lapacke.h>
- #endif 
+-#endif 
++void spbtrf_(char *, int *, int *, float *, int *, int *);
++void spbtrs_(char *, int *, int *, int *, const float *,
++	     int *, float *,int *, int *);
++#endif
  
  #define REGDEBUG_MEDIAN_SPLINE 0
-@@ -245,7 +244,7 @@
+ /*-----------------------------------------------------------------------------
+@@ -245,7 +246,7 @@
  	
     double kappa2 = kappa*kappa;
     for (iii=0;iii<niter;iii++){
@@ -45,7 +57,7 @@ Description: Replace clapack by lapack
        char uplo='U';
            
        /* Mac OS X uses different clapack.h type definitions, 
-@@ -258,12 +257,12 @@
+@@ -258,12 +259,12 @@
        __CLPK_integer ldb=ncoeffs;
        __CLPK_integer info=0;
  #else
@@ -55,16 +67,16 @@ Description: Replace clapack by lapack
 -      integer ldab=ord;
 -      integer ldb=ncoeffs;
 -      integer info=0;
-+      lapack_int clpk_n=ncoeffs;
-+      lapack_int kd=ord_minus_1;
-+      lapack_int nrhs=1;
-+      lapack_int ldab=ord;
-+      lapack_int ldb=ncoeffs;
-+      lapack_int info=0;
++      int clpk_n=ncoeffs;
++      int kd=ord_minus_1;
++      int nrhs=1;
++      int ldab=ord;
++      int ldb=ncoeffs;
++      int info=0;
  #endif
  
        /* Fill the basis function (Bn) and flux (y) matrices for the fitted lambda, 
-@@ -351,8 +350,8 @@
+@@ -351,8 +352,8 @@
        }
  		
        /* Do the fit, by Cholesky decomposition, using Lapack functions sptrf and spdtrs */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cpl-plugin-xsh.git



More information about the debian-science-commits mailing list