]> git.pld-linux.org Git - packages/clapack.git/commitdiff
- patches auto/th/clapack-3_2_1-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 6 Oct 2011 17:36:29 +0000 (17:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    clapack-3.2.1-findblas-r6.patch -> 1.1
    clapack-3.2.1-findblas.patch -> 1.1
    clapack-3.2.1-fix_include_file.patch -> 1.1
    clapack-3.2.1-hang.patch -> 1.1
    clapack-3.2.1-noblasf2c.patch -> 1.1

clapack-3.2.1-findblas-r6.patch [new file with mode: 0644]
clapack-3.2.1-findblas.patch [new file with mode: 0644]
clapack-3.2.1-fix_include_file.patch [new file with mode: 0644]
clapack-3.2.1-hang.patch [new file with mode: 0644]
clapack-3.2.1-noblasf2c.patch [new file with mode: 0644]

diff --git a/clapack-3.2.1-findblas-r6.patch b/clapack-3.2.1-findblas-r6.patch
new file mode 100644 (file)
index 0000000..028dec6
--- /dev/null
@@ -0,0 +1,50 @@
+diff -ruN clapack-3.2.1-CMAKE.1.allexfb/CMakeLists.txt clapack-3.2.1-CMAKE/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.1.allexfb/CMakeLists.txt       2011-06-19 22:13:27.000000000 +0200
++++ clapack-3.2.1-CMAKE/CMakeLists.txt 2011-06-19 22:23:14.000000000 +0200
+@@ -30,6 +30,29 @@
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
++if(BLAS_LIBRARIES)
++  include(CheckFortranFunctionExists)
++  set(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
++  CHECK_FORTRAN_FUNCTION_EXISTS("dgemm" BLAS_FOUND)
++  unset( CMAKE_REQUIRED_LIBRARIES )
++  if(BLAS_FOUND)
++    message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.")
++  else(BLAS_FOUND)
++    message(ERROR "--> BLAS supplied by user is not WORKING, CANNOT USE ${BLAS_LIBRARIES}.")
++    message(ERROR "-->     Will use REFERENCE BLAS (by default)")
++    message(ERROR "-->     Or Correct your BLAS_LIBRARIES entry ")
++    message(ERROR "-->     Or Consider checking USE_OPTIMIZED_BLAS")
++  endif(BLAS_FOUND)
++else(BLAS_LIBRARIES)
++   # User did not provide a BLAS Library
++   find_package(PkgConfig)
++   pkg_check_modules(BLAS blas)
++endif (BLAS_LIBRARIES)
++
++if(NOT BLAS_FOUND)
++    message(FATAL_ERROR "--> BLAS libraries needed but not found.")
++endif(NOT BLAS_FOUND)
++
+ add_subdirectory(SRC)
+ if(ENABLE_TESTS)
+@@ -44,4 +67,3 @@
+   ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY)
+ configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in
+   ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY)
+-
+diff -ruN clapack-3.2.1-CMAKE.1.allexfb/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.1.allexfb/SRC/CMakeLists.txt   2011-06-19 22:13:44.000000000 +0200
++++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt     2011-06-19 22:15:04.000000000 +0200
+@@ -380,7 +380,7 @@
+ endif()
+ add_library(clapack SHARED ${ALLOBJ} ${ALLXOBJ})
+-target_link_libraries(clapack blas f2c m)
++target_link_libraries(clapack ${BLAS_LIBRARIES} f2c m)
+ set_target_properties(clapack PROPERTIES SOVERSION "${CLAPACK_VERSION}")
+ install(
diff --git a/clapack-3.2.1-findblas.patch b/clapack-3.2.1-findblas.patch
new file mode 100644 (file)
index 0000000..e2744f8
--- /dev/null
@@ -0,0 +1,49 @@
+diff -ruN clapack-3.2.1-CMAKE.orig/CMakeLists.txt clapack-3.2.1-CMAKE/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/CMakeLists.txt    2011-06-17 23:01:05.275747599 +0200
++++ clapack-3.2.1-CMAKE/CMakeLists.txt 2011-06-17 23:07:49.128747755 +0200
+@@ -30,6 +30,28 @@
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
++if(BLAS_LIBRARIES)
++  include(CheckFortranFunctionExists)
++  set(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
++  CHECK_FORTRAN_FUNCTION_EXISTS("dgemm" BLAS_FOUND)
++  unset( CMAKE_REQUIRED_LIBRARIES )
++  if(BLAS_FOUND)
++    message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.")
++  else(BLAS_FOUND)
++    message(ERROR "--> BLAS supplied by user is not WORKING, CANNOT USE ${BLAS_LIBRARIES}.")
++    message(ERROR "-->     Will use REFERENCE BLAS (by default)")
++    message(ERROR "-->     Or Correct your BLAS_LIBRARIES entry ")
++    message(ERROR "-->     Or Consider checking USE_OPTIMIZED_BLAS")
++  endif(BLAS_FOUND)
++else(BLAS_LIBRARIES)
++   # User did not provide a BLAS Library
++   find_package( BLAS )
++endif (BLAS_LIBRARIES)
++
++if(NOT BLAS_FOUND)
++    message(FATAL_ERROR "--> BLAS libraries needed but not found.")
++endif(NOT BLAS_FOUND)
++
+ add_subdirectory(SRC)
+ if(ENABLE_TESTS)
+@@ -44,4 +66,3 @@
+   ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY)
+ configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in
+   ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY)
+-
+diff -ruN clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt        2011-06-17 23:01:05.276747599 +0200
++++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt     2011-06-17 23:08:43.761747789 +0200
+@@ -377,7 +377,7 @@
+ endif()
+ add_library(clapack SHARED ${ALLOBJ} ${ALLXOBJ})
+-target_link_libraries(clapack blas f2c m)
++target_link_libraries(clapack ${BLAS_LIBRARIES} f2c m)
+ set_target_properties(clapack PROPERTIES SOVERSION "${CLAPACK_VERSION}")
+ install(
diff --git a/clapack-3.2.1-fix_include_file.patch b/clapack-3.2.1-fix_include_file.patch
new file mode 100644 (file)
index 0000000..002336f
--- /dev/null
@@ -0,0 +1,25 @@
+diff -urN clapack-3.2.1-CMAKE.old/INCLUDE/clapack.h clapack-3.2.1-CMAKE/INCLUDE/clapack.h
+--- clapack-3.2.1-CMAKE.old/INCLUDE/clapack.h  2011-04-30 11:39:51.000000000 +0200
++++ clapack-3.2.1-CMAKE/INCLUDE/clapack.h      2011-04-30 11:40:39.000000000 +0200
+@@ -3,6 +3,12 @@
+ #ifndef __CLAPACK_H
+ #define __CLAPACK_H
++#include <f2c.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /* Subroutine */ int caxpy_(integer *n, complex *ca, complex *cx, integer *
+       incx, complex *cy, integer *incy);
+@@ -7250,5 +7256,8 @@
+ integer ilaenv_(integer *ispec, char *name__, char *opts, integer *n1, 
+       integer *n2, integer *n3, integer *n4);
++#ifdef __cplusplus
++}
++#endif
+ #endif /* __CLAPACK_H */
diff --git a/clapack-3.2.1-hang.patch b/clapack-3.2.1-hang.patch
new file mode 100644 (file)
index 0000000..f9ec2e0
--- /dev/null
@@ -0,0 +1,13 @@
+diff -ruN clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt        2011-06-21 00:29:16.275749375 +0200
++++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt     2011-06-21 00:31:06.133749448 +0200
+@@ -355,6 +355,9 @@
+    zla_heamv.c zla_hercond_c.c zla_hercond_x.c zla_herpvgrw.c         
+    zla_lin_berr.c zlarscl2.c zlascl2.c zla_wwaddw.c)
++if(CMAKE_COMPILER_IS_GNUCC)
++   set_source_files_properties(../INSTALL/dlamch.c ../INSTALL/slamch.c PROPERTIES COMPILE_FLAGS "-ffloat-store -O0")
++endif()
+ if( USEXBLAS)
+   set(ALLXOBJ ${SXLASRC} ${DXLASRC} ${CXLASRC} ${ZXLASRC} ${ALLXAUX})
diff --git a/clapack-3.2.1-noblasf2c.patch b/clapack-3.2.1-noblasf2c.patch
new file mode 100644 (file)
index 0000000..5ae9e63
--- /dev/null
@@ -0,0 +1,189 @@
+diff -u -r -N clapack-3.2.1-CMAKE.orig/CMakeLists.txt clapack-3.2.1-CMAKE/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/CMakeLists.txt    2009-08-10 20:46:33.000000000 +0200
++++ clapack-3.2.1-CMAKE/CMakeLists.txt 2010-08-28 14:04:30.000000000 +0200
+@@ -1,7 +1,10 @@
+ cmake_minimum_required(VERSION 2.6)
+ project(CLAPACK C)
+-enable_testing()
+-include(CTest)
++
++if(ENABLE_TESTS)
++   enable_testing()
++   include(CTest)
++endif(ENABLE_TESTS)
+ if(WIN32 AND NOT CYGWIN)
+   set(SECOND_SRC  ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c)
+@@ -11,24 +14,34 @@
+   set(SECOND_SRC  ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
+   set(DSECOND_SRC  ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
+ endif()
+-enable_testing()
++
+ option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF)
+ if(NOT USE_BLAS_WRAP)
+ # _zrotg_ seems to be missing in the wrap header
+   add_definitions(-DNO_BLAS_WRAP)
+ endif()
++
+ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
+-add_subdirectory(F2CLIBS)
+-add_subdirectory(BLAS)
+-add_subdirectory(SRC)
+-add_subdirectory(TESTING)
++
+ set(CLAPACK_VERSION 3.2.1)
+ set(CPACK_PACKAGE_VERSION_MAJOR 3)
+ set(CPACK_PACKAGE_VERSION_MINOR 2)
+ set(CPACK_PACKAGE_VERSION_PATCH 1)
++
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
++
++add_subdirectory(SRC)
++
++if(ENABLE_TESTS)
++   add_subdirectory(TESTING)
++endif(ENABLE_TESTS)
++
+ include(CPack)
+-export(TARGETS f2c blas lapack FILE clapack-targets.cmake)
++
++export(TARGETS clapack FILE clapack-targets.cmake)
++
+ configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in
+   ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY)
+ configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in
+   ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY)
++
+diff -u -r -N clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt        2009-08-10 19:47:54.000000000 +0200
++++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt     2010-08-28 14:32:17.000000000 +0200
+@@ -375,6 +375,20 @@
+ if(BUILD_COMPLEX16)
+   set(ALLOBJ  ${ZLASRC} ${ALLAUX} ${DZLAUX})
+ endif()
+-add_library(lapack ${ALLOBJ} ${ALLXOBJ})
+-target_link_libraries(lapack blas)
++add_library(clapack SHARED ${ALLOBJ} ${ALLXOBJ})
++target_link_libraries(clapack blas f2c m)
++set_target_properties(clapack PROPERTIES SOVERSION "${CLAPACK_VERSION}")
++
++install(
++  TARGETS clapack EXPORT clapack 
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++)
++
++install(
++  FILES ../INCLUDE/clapack.h DESTINATION include/clapack
++)
++
++install(
++  EXPORT clapack DESTINATION "share/cmake/Modules" FILE clapack-config.cmake
++)
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/EIG/CMakeLists.txt clapack-3.2.1-CMAKE/TESTING/EIG/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/TESTING/EIG/CMakeLists.txt        2009-08-10 19:47:54.000000000 +0200
++++ clapack-3.2.1-CMAKE/TESTING/EIG/CMakeLists.txt     2010-08-28 13:46:40.000000000 +0200
+@@ -119,7 +119,7 @@
+ macro(add_eig_executable name )
+   add_executable(${name} ${ARGN})
+-  target_link_libraries(${name} tmglib lapack )
++  target_link_libraries(${name} tmglib clapack )
+ endmacro(add_eig_executable)
+ add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST} 
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/LIN/CMakeLists.txt clapack-3.2.1-CMAKE/TESTING/LIN/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/TESTING/LIN/CMakeLists.txt        2009-08-10 20:06:06.000000000 +0200
++++ clapack-3.2.1-CMAKE/TESTING/LIN/CMakeLists.txt     2010-08-28 13:46:40.000000000 +0200
+@@ -189,7 +189,7 @@
+ macro(add_lin_executable name )
+   add_executable(${name} ${ARGN})
+-  target_link_libraries(${name} tmglib lapack)
++  target_link_libraries(${name} tmglib clapack)
+ endmacro(add_lin_executable)
+ add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} 
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/CMakeLists.txt clapack-3.2.1-CMAKE/TESTING/MATGEN/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/CMakeLists.txt     2009-08-10 19:47:54.000000000 +0200
++++ clapack-3.2.1-CMAKE/TESTING/MATGEN/CMakeLists.txt  2010-08-28 13:46:40.000000000 +0200
+@@ -65,5 +65,6 @@
+ if(BUILD_COMPLEX16)
+   set(ALLOBJ $(ZMATGEN) $(DZATGEN))
+ endif()
+-add_library(tmglib ${ALLOBJ} )
++
++add_library(tmglib ${ALLOBJ} i_len_trim.c i_ceiling.c )
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_ceiling.c clapack-3.2.1-CMAKE/TESTING/MATGEN/i_ceiling.c
+--- clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_ceiling.c        1970-01-01 01:00:00.000000000 +0100
++++ clapack-3.2.1-CMAKE/TESTING/MATGEN/i_ceiling.c     2010-08-28 13:46:40.000000000 +0200
+@@ -0,0 +1,38 @@
++/* file has been copied from the included f2c library - dilfridge */
++
++#include <f2c.h>
++
++#ifdef KR_headers
++integer i_sceiling(x) real *x;
++#else
++#ifdef __cplusplus
++extern "C" {
++#endif
++integer i_sceiling(real *x)
++#endif
++{
++#define CEIL(x) ((int)(x) + ((x) > 0 && (x) != (int)(x)))
++
++    return (integer) CEIL(*x);
++}
++#ifdef __cplusplus
++}
++#endif
++
++
++#ifdef KR_headers
++integer i_dceiling(x) doublereal *x;
++#else
++#ifdef __cplusplus
++extern "C" {
++#endif
++integer i_dceiling(doublereal *x)
++#endif
++{
++#define CEIL(x) ((int)(x) + ((x) > 0 && (x) != (int)(x)))
++
++    return (integer) CEIL(*x);
++}
++#ifdef __cplusplus
++}
++#endif
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_len_trim.c clapack-3.2.1-CMAKE/TESTING/MATGEN/i_len_trim.c
+--- clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_len_trim.c       1970-01-01 01:00:00.000000000 +0100
++++ clapack-3.2.1-CMAKE/TESTING/MATGEN/i_len_trim.c    2010-08-28 13:46:40.000000000 +0200
+@@ -0,0 +1,25 @@
++/* file has been copied from the included f2c library - dilfridge */
++
++#include <f2c.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#ifdef KR_headers
++integer i_len_trim(s, n) char *s; ftnlen n;
++#else
++integer i_len_trim(char *s, ftnlen n)
++#endif
++{
++  int i;
++
++  for(i=n-1;i>=0;i--)
++    if(s[i] != ' ')
++      return i + 1;
++
++  return(0);
++}
++#ifdef __cplusplus
++}
++#endif
This page took 0.092823 seconds and 4 git commands to generate.