--- /dev/null
+default :
+{
+ name : "cminpack"
+ build_source : "cmake"
+ cmake_options : " -DUSE_BLAS=ON -DUSE_FPIC=ON -DBUILD_SHARED_LIBS=ON"
+ compil_script : $name + $VARS.scriptExtension
+ get_source : "archive"
+ environ :
+ {
+ env_script : $name + ".py"
+ }
+ depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib']
+ build_depend : ["cmake", "swig"]
+ opt_depend : ['openmpi']
+ patches : []
+ source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name
+ build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name
+ install_dir : 'base'
+ properties :
+ {
+ single_install_dir : "no"
+ incremental : "yes"
+ }
+}
+
+version_1_3_6 :
+{
+ patches : ['cminpack-1.3.6-cblas.patch']
+}
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env python
+import os.path
+
+def set_env(env, prereq_dir, version):
+ env.set('CMINPACK_ROOT_DIR', prereq_dir)
+ env.prepend('PATH', os.path.join(prereq_dir,'bin'))
+ env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib'))
+
+def set_nativ_env(env):
+ pass
import os.path
def set_env(env, prereq_dir, version):
- env.set('OPENTURN_ROOT_DIR', prereq_dir)
+ env.set('OPENTURNS_ROOT_DIR', prereq_dir)
env.prepend('PATH', os.path.join(prereq_dir,'bin'))
env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib'))
pyver = 'python' + env.get('PYTHON_VERSION')
--- /dev/null
+diff -Naur cminpack-1.3.6_ref/CMakeLists.txt cminpack-1.3.6_dev/CMakeLists.txt
+--- cminpack-1.3.6_ref/CMakeLists.txt 2017-02-24 16:09:31.000000000 +0100
++++ cminpack-1.3.6_dev/CMakeLists.txt 2021-08-30 14:02:27.425683737 +0200
+@@ -69,12 +69,23 @@
+
+ # Link with a BLAS library if requested
+ if (USE_BLAS)
++ SET(LAPACK_ROOT_DIR $ENV{LAPACK_ROOT_DIR} CACHE PATH "Path to the LAPACK.")
++ IF(LAPACK_ROOT_DIR)
++ LIST(APPEND CMAKE_PREFIX_PATH "${LAPACK_ROOT_DIR}")
++ ENDIF(LAPACK_ROOT_DIR)
+ if (NOT BUILD_SHARED_LIBS)
+ set(BLA_STATIC True)
+ endif()
+ find_package(BLAS)
+ if (BLAS_FOUND)
+- target_link_libraries(cminpack PUBLIC ${BLAS_LIBRARIES})
++ MESSAGE(STATUS "Searching for C-BLAS library...")
++ FIND_LIBRARY(CBLAS_LIBRARIES NAMES cblas
++ HINTS ${LAPACK_ROOT_DIR}
++ PATH_SUFFIXES lib
++ PATHS ${LAPACK_ROOT_DIR}
++ )
++
++ target_link_libraries(cminpack PUBLIC ${BLAS_LIBRARIES} ${CBLAS_LIBRARIES})
+ set_target_properties(cminpack PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
+ target_compile_definitions(cminpack PUBLIC -DUSE_CBLAS)
+ endif()