From 63add214bbd429d3680a2be85bafc2eb92041d2f Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Fri, 15 Oct 2021 16:47:34 +0200 Subject: [PATCH] update patch --- products/compil_scripts/openturns-1.17.sh | 32 ++++++++++------------ products/patches/openturns-1.17.0001.patch | 10 ++++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/products/compil_scripts/openturns-1.17.sh b/products/compil_scripts/openturns-1.17.sh index d1bd895..caec155 100755 --- a/products/compil_scripts/openturns-1.17.sh +++ b/products/compil_scripts/openturns-1.17.sh @@ -24,22 +24,19 @@ CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release" CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=${PYTHONBIN}" CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" -if [ "${TBB_ROOT_DIR}" != "/usr" ] -then +if [ -n "$TBB_ROOT_DIR" ] && [ "${TBB_ROOT_DIR}" != "/usr" ]; then CMAKE_OPTIONS+=" -DTBB_ROOT_DIR=${TBB_ROOT_DIR}" fi ### libxml2 settings -if [ "${LIBXML2_ROOT_DIR}" != "/usr" ] -then +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" fi # HDF5 -if [ "${HDF5_ROOT_DIR}" != "/usr" ] -then +if [ -n "$HDF5_ROOT_DIR" ] && [ "${HDF5_ROOT_DIR}" != "/usr" ]; then CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" @@ -50,8 +47,7 @@ then fi # CMINPACK -if [ "${CMINPACK_ROOT_DIR}" != "/usr" ] -then +if [ "${CMINPACK_ROOT_DIR}" != "/usr" ]; then CMAKE_OPTIONS+=" -DCMINPACK_ROOT_DIR=${CMINPACK_ROOT_DIR}" CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1" CMAKE_OPTIONS+=" -DCMINPACK_LIBRARY=$CMINPACK_ROOT_DIR/lib/libcminpack_s.a" @@ -67,15 +63,17 @@ then CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libcblas.so" fi ### libxml2 settings -if [ -n "$LIBXML2_ROOT_DIR" ] -then - # with a native libxml2, do not use these options - if [ "${LIBXML2_ROOT_DIR}" != "/usr" ] - then - CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" - CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" - CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" - fi +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" + CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" + CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" +fi + +## nlopt +if [ -n "$NLOPT_ROOT_DIR" ] && [ "${NLOPT_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIRS:STRING=${NLOPT_ROOT_DIR}/include" + CMAKE_OPTIONS+=" -DNLOPT_LIBRARIES:STRING=${NLOPT_ROOT_DIR}/lib" + CMAKE_OPTIONS+=" -DNLOPT_DIR:STRING=${NLOPT_ROOT_DIR}" fi echo diff --git a/products/patches/openturns-1.17.0001.patch b/products/patches/openturns-1.17.0001.patch index 7a5e14f..1e98e9b 100644 --- a/products/patches/openturns-1.17.0001.patch +++ b/products/patches/openturns-1.17.0001.patch @@ -1,6 +1,6 @@ diff -Naur openturns-1.17_ref/openturns-1.17/CMakeLists.txt openturns-1.17_new/openturns-1.17/CMakeLists.txt ---- openturns-1.17_ref/openturns-1.17/CMakeLists.txt 2021-09-21 13:28:10.257960906 +0200 -+++ openturns-1.17_new/openturns-1.17/CMakeLists.txt 2021-09-21 13:37:49.975423413 +0200 +--- openturns-1.17_ref/openturns-1.17/CMakeLists.txt 2021-09-21 13:59:56.000000000 +0200 ++++ openturns-1.17_new/openturns-1.17/CMakeLists.txt 2021-10-04 13:27:16.893096795 +0200 @@ -133,6 +133,11 @@ set (CMAKE_CXX_STANDARD 11) @@ -79,17 +79,19 @@ diff -Naur openturns-1.17_ref/openturns-1.17/CMakeLists.txt openturns-1.17_new/o find_package (Boost 1.46) if (Boost_FOUND) if (CMAKE_VERSION VERSION_LESS 3.15) -@@ -272,6 +305,10 @@ +@@ -272,7 +305,11 @@ endif () if (USE_NLOPT) +- find_package (NLopt CONFIG QUIET) + SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR} CACHE PATH "Path to the NLOPT.") + IF(NLOPT_ROOT_DIR) + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}") + ENDIF(NLOPT_ROOT_DIR) - find_package (NLopt CONFIG QUIET) ++ find_package (NLopt) if (NLopt_FOUND) message(STATUS "Found NLopt: ${NLopt_DIR}") + else () @@ -336,22 +373,22 @@ endif () -- 2.39.2