diff options
author | Sébastien Fabbro <bicatali@gentoo.org> | 2016-12-30 23:58:20 +0000 |
---|---|---|
committer | Sébastien Fabbro <bicatali@gentoo.org> | 2017-01-02 16:13:44 +0000 |
commit | ac85f06620366c1e817dfcf8d7a90055f08eef47 (patch) | |
tree | bc0d25153ddc6c91fdb2f086c6a6dcda3c9a20e2 /sci-libs/sundials | |
parent | net-misc/wireguard: fix netifrc (diff) | |
download | gentoo-ac85f06620366c1e817dfcf8d7a90055f08eef47.tar.gz gentoo-ac85f06620366c1e817dfcf8d7a90055f08eef47.tar.bz2 gentoo-ac85f06620366c1e817dfcf8d7a90055f08eef47.zip |
sci-libs/sundials: initial import
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sci-libs/sundials')
-rw-r--r-- | sci-libs/sundials/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/sundials/files/sundials-2.7.0-underlinking-libdir.patch | 395 | ||||
-rw-r--r-- | sci-libs/sundials/metadata.xml | 22 | ||||
-rw-r--r-- | sci-libs/sundials/sundials-2.7.0.ebuild | 74 |
4 files changed, 492 insertions, 0 deletions
diff --git a/sci-libs/sundials/Manifest b/sci-libs/sundials/Manifest new file mode 100644 index 000000000000..53a6a986f7bc --- /dev/null +++ b/sci-libs/sundials/Manifest @@ -0,0 +1 @@ +DIST sundials-2.7.0.tar.gz 12258093 SHA256 d39fcac7175d701398e4eb209f7e92a5b30a78358d4a0c0fcc23db23c11ba104 SHA512 c86c167538065a4109b36ae7c8f60f3d92184133cfa661b5acfccee052c38f40be865412a1746bb57907b61602c212c0f15e1e30ef29e8a49db6d46a75a28e69 WHIRLPOOL 3aabd2912e6be7d159d69853ecc76d9549cc6020344083c71cdcf43867e86d95d14862463c201270f9ff5a16536f4341d6e0eb466402870cf7ee6e7a45669667 diff --git a/sci-libs/sundials/files/sundials-2.7.0-underlinking-libdir.patch b/sci-libs/sundials/files/sundials-2.7.0-underlinking-libdir.patch new file mode 100644 index 000000000000..db47ac3b350d --- /dev/null +++ b/sci-libs/sundials/files/sundials-2.7.0-underlinking-libdir.patch @@ -0,0 +1,395 @@ +diff -Nur sundials-2.7.0.orig/src/arkode/CMakeLists.txt sundials-2.7.0/src/arkode/CMakeLists.txt +--- sundials-2.7.0.orig/src/arkode/CMakeLists.txt 2016-09-26 22:16:52.000000000 +0000 ++++ sundials-2.7.0/src/arkode/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -127,7 +127,7 @@ + PROPERTIES OUTPUT_NAME sundials_arkode CLEAN_DIRECT_OUTPUT 1) + + # Install the ARKODE library +- INSTALL(TARGETS sundials_arkode_static DESTINATION lib) ++ INSTALL(TARGETS sundials_arkode_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_STATIC_LIBS) + +@@ -146,8 +146,10 @@ + SET_TARGET_PROPERTIES(sundials_arkode_shared + PROPERTIES VERSION ${arkodelib_VERSION} SOVERSION ${arkodelib_SOVERSION}) + ++ TARGET_LINK_LIBRARIES(sundials_arkode_shared -lm ${KLU_LIBRARIES} ${SUPERLUMT_LIBRARIES} ${LAPACK_LIBRARIES}) ++ + # Install the ARKODE library +- INSTALL(TARGETS sundials_arkode_shared DESTINATION lib) ++ INSTALL(TARGETS sundials_arkode_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_SHARED_LIBS) + +diff -Nur sundials-2.7.0.orig/src/arkode/fcmix/CMakeLists.txt sundials-2.7.0/src/arkode/fcmix/CMakeLists.txt +--- sundials-2.7.0.orig/src/arkode/fcmix/CMakeLists.txt 2016-09-26 22:16:52.000000000 +0000 ++++ sundials-2.7.0/src/arkode/fcmix/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -70,7 +70,7 @@ + PROPERTIES OUTPUT_NAME sundials_farkode CLEAN_DIRECT_OUTPUT 1) + + # Install the FARKODE library +-INSTALL(TARGETS sundials_farkode_static DESTINATION lib) ++INSTALL(TARGETS sundials_farkode_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + # + MESSAGE(STATUS "Added ARKODE FCMIX module") +diff -Nur sundials-2.7.0.orig/src/cvode/CMakeLists.txt sundials-2.7.0/src/cvode/CMakeLists.txt +--- sundials-2.7.0.orig/src/cvode/CMakeLists.txt 2016-09-26 22:17:07.000000000 +0000 ++++ sundials-2.7.0/src/cvode/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -134,7 +134,7 @@ + PROPERTIES OUTPUT_NAME sundials_cvode CLEAN_DIRECT_OUTPUT 1) + + # Install the CVODE library +- INSTALL(TARGETS sundials_cvode_static DESTINATION lib) ++ INSTALL(TARGETS sundials_cvode_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_STATIC_LIBS) + +@@ -153,8 +153,10 @@ + SET_TARGET_PROPERTIES(sundials_cvode_shared + PROPERTIES VERSION ${cvodelib_VERSION} SOVERSION ${cvodelib_SOVERSION}) + ++ TARGET_LINK_LIBRARIES(sundials_cvode_shared -lm ${KLU_LIBRARIES} ${SUPERLUMT_LIBRARIES} ${LAPACK_LIBRARIES}) ++ + # Install the CVODE library +- INSTALL(TARGETS sundials_cvode_shared DESTINATION lib) ++ INSTALL(TARGETS sundials_cvode_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_SHARED_LIBS) + +diff -Nur sundials-2.7.0.orig/src/cvode/fcmix/CMakeLists.txt sundials-2.7.0/src/cvode/fcmix/CMakeLists.txt +--- sundials-2.7.0.orig/src/cvode/fcmix/CMakeLists.txt 2016-09-26 22:17:07.000000000 +0000 ++++ sundials-2.7.0/src/cvode/fcmix/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -57,7 +57,7 @@ + PROPERTIES OUTPUT_NAME sundials_fcvode CLEAN_DIRECT_OUTPUT 1) + + # Install the FCVODE library +-INSTALL(TARGETS sundials_fcvode_static DESTINATION lib) ++INSTALL(TARGETS sundials_fcvode_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + # + MESSAGE(STATUS "Added CVODE FCMIX module") +diff -Nur sundials-2.7.0.orig/src/cvodes/CMakeLists.txt sundials-2.7.0/src/cvodes/CMakeLists.txt +--- sundials-2.7.0.orig/src/cvodes/CMakeLists.txt 2016-09-26 22:17:15.000000000 +0000 ++++ sundials-2.7.0/src/cvodes/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -121,7 +121,7 @@ + PROPERTIES OUTPUT_NAME sundials_cvodes CLEAN_DIRECT_OUTPUT 1) + + # Install the CVODES library +- INSTALL(TARGETS sundials_cvodes_static DESTINATION lib) ++ INSTALL(TARGETS sundials_cvodes_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_STATIC_LIBS) + +@@ -140,8 +140,9 @@ + SET_TARGET_PROPERTIES(sundials_cvodes_shared + PROPERTIES VERSION ${cvodeslib_VERSION} SOVERSION ${cvodeslib_SOVERSION}) + ++ TARGET_LINK_LIBRARIES(sundials_cvodes_shared -lm ${KLU_LIBRARIES} ${SUPERLUMT_LIBRARIES} ${LAPACK_LIBRARIES}) + # Install the CVODES library +- INSTALL(TARGETS sundials_cvodes_shared DESTINATION lib) ++ INSTALL(TARGETS sundials_cvodes_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_SHARED_LIBS) + +diff -Nur sundials-2.7.0.orig/src/ida/CMakeLists.txt sundials-2.7.0/src/ida/CMakeLists.txt +--- sundials-2.7.0.orig/src/ida/CMakeLists.txt 2016-09-26 22:17:26.000000000 +0000 ++++ sundials-2.7.0/src/ida/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -124,7 +124,7 @@ + PROPERTIES OUTPUT_NAME sundials_ida CLEAN_DIRECT_OUTPUT 1) + + # Install the IDA library +- INSTALL(TARGETS sundials_ida_static DESTINATION lib) ++ INSTALL(TARGETS sundials_ida_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_STATIC_LIBS) + +@@ -143,8 +143,10 @@ + SET_TARGET_PROPERTIES(sundials_ida_shared + PROPERTIES VERSION ${idalib_VERSION} SOVERSION ${idalib_SOVERSION}) + ++ TARGET_LINK_LIBRARIES(sundials_ida_shared -lm ${KLU_LIBRARIES} ${SUPERLUMT_LIBRARIES} ${LAPACK_LIBRARIES}) ++ + # Install the IDA library +- INSTALL(TARGETS sundials_ida_shared DESTINATION lib) ++ INSTALL(TARGETS sundials_ida_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_SHARED_LIBS) + +diff -Nur sundials-2.7.0.orig/src/ida/fcmix/CMakeLists.txt sundials-2.7.0/src/ida/fcmix/CMakeLists.txt +--- sundials-2.7.0.orig/src/ida/fcmix/CMakeLists.txt 2016-09-26 22:17:26.000000000 +0000 ++++ sundials-2.7.0/src/ida/fcmix/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -56,6 +56,6 @@ + PROPERTIES OUTPUT_NAME sundials_fida CLEAN_DIRECT_OUTPUT 1) + + # Install the FIDA library +-INSTALL(TARGETS sundials_fida_static DESTINATION lib) ++INSTALL(TARGETS sundials_fida_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + # + MESSAGE(STATUS "Added IDA FCMIX module") +diff -Nur sundials-2.7.0.orig/src/idas/CMakeLists.txt sundials-2.7.0/src/idas/CMakeLists.txt +--- sundials-2.7.0.orig/src/idas/CMakeLists.txt 2016-09-26 22:17:32.000000000 +0000 ++++ sundials-2.7.0/src/idas/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -126,7 +126,7 @@ + PROPERTIES OUTPUT_NAME sundials_idas CLEAN_DIRECT_OUTPUT 1) + + # Install the IDA library +- INSTALL(TARGETS sundials_idas_static DESTINATION lib) ++ INSTALL(TARGETS sundials_idas_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_STATIC_LIBS) + +@@ -145,8 +145,10 @@ + SET_TARGET_PROPERTIES(sundials_idas_shared + PROPERTIES VERSION ${idaslib_VERSION} SOVERSION ${idaslib_SOVERSION}) + ++ TARGET_LINK_LIBRARIES(sundials_idas_shared -lm ${KLU_LIBRARIES} ${SUPERLUMT_LIBRARIES} ${LAPACK_LIBRARIES}) ++ + # Install the IDAS library +- INSTALL(TARGETS sundials_idas_shared DESTINATION lib) ++ INSTALL(TARGETS sundials_idas_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_SHARED_LIBS) + +diff -Nur sundials-2.7.0.orig/src/kinsol/CMakeLists.txt sundials-2.7.0/src/kinsol/CMakeLists.txt +--- sundials-2.7.0.orig/src/kinsol/CMakeLists.txt 2016-09-26 22:17:39.000000000 +0000 ++++ sundials-2.7.0/src/kinsol/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -134,7 +134,7 @@ + PROPERTIES OUTPUT_NAME sundials_kinsol CLEAN_DIRECT_OUTPUT 1) + + # Install the KINSOL library +- INSTALL(TARGETS sundials_kinsol_static DESTINATION lib) ++ INSTALL(TARGETS sundials_kinsol_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_STATIC_LIBS) + +@@ -153,8 +153,10 @@ + SET_TARGET_PROPERTIES(sundials_kinsol_shared + PROPERTIES VERSION ${kinsollib_VERSION} SOVERSION ${kinsollib_SOVERSION}) + ++ TARGET_LINK_LIBRARIES(sundials_kinsol_shared -lm ${KLU_LIBRARIES} ${SUPERLUMT_LIBRARIES} ${LAPACK_LIBRARIES}) ++ + # Install the KINSOL library +- INSTALL(TARGETS sundials_kinsol_shared DESTINATION lib) ++ INSTALL(TARGETS sundials_kinsol_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDIF(BUILD_SHARED_LIBS) + +diff -Nur sundials-2.7.0.orig/src/kinsol/fcmix/CMakeLists.txt sundials-2.7.0/src/kinsol/fcmix/CMakeLists.txt +--- sundials-2.7.0.orig/src/kinsol/fcmix/CMakeLists.txt 2016-09-26 22:17:39.000000000 +0000 ++++ sundials-2.7.0/src/kinsol/fcmix/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -54,7 +54,7 @@ + PROPERTIES OUTPUT_NAME sundials_fkinsol CLEAN_DIRECT_OUTPUT 1) + + # Install the FKINSOL library +-INSTALL(TARGETS sundials_fkinsol_static DESTINATION lib) ++INSTALL(TARGETS sundials_fkinsol_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + # + MESSAGE(STATUS "Added KINSOL FCMIX module") +diff -Nur sundials-2.7.0.orig/src/nvec_openmp/CMakeLists.txt sundials-2.7.0/src/nvec_openmp/CMakeLists.txt +--- sundials-2.7.0.orig/src/nvec_openmp/CMakeLists.txt 2016-09-26 22:16:50.000000000 +0000 ++++ sundials-2.7.0/src/nvec_openmp/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -51,7 +51,7 @@ + ADD_LIBRARY(sundials_nvecopenmp_static STATIC ${nvecopenmp_SOURCES} ${shared_SOURCES}) + SET_TARGET_PROPERTIES(sundials_nvecopenmp_static + PROPERTIES OUTPUT_NAME sundials_nvecopenmp CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_nvecopenmp_static DESTINATION lib) ++ INSTALL(TARGETS sundials_nvecopenmp_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + + # Rules for building and installing the shared library: +@@ -65,7 +65,8 @@ + PROPERTIES OUTPUT_NAME sundials_nvecopenmp CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_nvecopenmp_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_nvecopenmp_shared DESTINATION lib) ++ TARGET_LINK_LIBRARIES(sundials_nvecopenmp_shared -lm) ++ INSTALL(TARGETS sundials_nvecopenmp_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + + # Install the NVECOPENMP header files +@@ -78,7 +79,7 @@ + ADD_LIBRARY(sundials_fnvecopenmp_static STATIC ${fnvecopenmp_SOURCES}) + SET_TARGET_PROPERTIES(sundials_fnvecopenmp_static + PROPERTIES OUTPUT_NAME sundials_fnvecopenmp CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_fnvecopenmp_static DESTINATION lib) ++ INSTALL(TARGETS sundials_fnvecopenmp_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + IF(BUILD_SHARED_LIBS) + ADD_LIBRARY(sundials_fnvecopenmp_shared ${fnvecopenmp_SOURCES}) +@@ -86,7 +87,8 @@ + PROPERTIES OUTPUT_NAME sundials_fnvecopenmp CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_fnvecopenmp_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_fnvecopenmp_shared DESTINATION lib) ++ TARGET_LINK_LIBRARIES(sundials_fnvecopenmp_shared -lm) ++ INSTALL(TARGETS sundials_fnvecopenmp_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + ENDIF(FCMIX_ENABLE AND F77_FOUND) + +diff -Nur sundials-2.7.0.orig/src/nvec_par/CMakeLists.txt sundials-2.7.0/src/nvec_par/CMakeLists.txt +--- sundials-2.7.0.orig/src/nvec_par/CMakeLists.txt 2016-09-26 22:16:50.000000000 +0000 ++++ sundials-2.7.0/src/nvec_par/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -52,7 +52,7 @@ + ADD_LIBRARY(sundials_nvecparallel_static STATIC ${nvecparallel_SOURCES} ${shared_SOURCES}) + SET_TARGET_PROPERTIES(sundials_nvecparallel_static + PROPERTIES OUTPUT_NAME sundials_nvecparallel CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_nvecparallel_static DESTINATION lib) ++ INSTALL(TARGETS sundials_nvecparallel_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + + # Rules for building and installing the shared library: +@@ -66,7 +66,8 @@ + PROPERTIES OUTPUT_NAME sundials_nvecparallel CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_nvecparallel_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_nvecparallel_shared DESTINATION lib) ++ TARGET_LINK_LIBRARIES(sundials_nvecparallel_shared -lm) ++ INSTALL(TARGETS sundials_nvecparallel_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + + # Install the NVECPARALLEL header files +@@ -79,7 +80,7 @@ + ADD_LIBRARY(sundials_fnvecparallel_static STATIC ${fnvecparallel_SOURCES}) + SET_TARGET_PROPERTIES(sundials_fnvecparallel_static + PROPERTIES OUTPUT_NAME sundials_fnvecparallel CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_fnvecparallel_static DESTINATION lib) ++ INSTALL(TARGETS sundials_fnvecparallel_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + IF(BUILD_SHARED_LIBS) + ADD_LIBRARY(sundials_fnvecparallel_shared SHARED ${fnvecparallel_SOURCES}) +@@ -87,7 +88,7 @@ + PROPERTIES OUTPUT_NAME sundials_fnvecparallel CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_fnvecparallel_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_fnvecparallel_shared DESTINATION lib) ++ INSTALL(TARGETS sundials_fnvecparallel_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + ENDIF(FCMIX_ENABLE AND MPIF_FOUND) + # +diff -Nur sundials-2.7.0.orig/src/nvec_parhyp/CMakeLists.txt sundials-2.7.0/src/nvec_parhyp/CMakeLists.txt +--- sundials-2.7.0.orig/src/nvec_parhyp/CMakeLists.txt 2016-09-26 22:16:50.000000000 +0000 ++++ sundials-2.7.0/src/nvec_parhyp/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -53,7 +53,7 @@ + ADD_LIBRARY(sundials_nvecparhyp_static STATIC ${nvecparhyp_SOURCES} ${shared_SOURCES}) + SET_TARGET_PROPERTIES(sundials_nvecparhyp_static + PROPERTIES OUTPUT_NAME sundials_nvecparhyp CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_nvecparhyp_static DESTINATION lib) ++ INSTALL(TARGETS sundials_nvecparhyp_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + + # Rules for building and installing the shared library: +@@ -67,7 +67,7 @@ + PROPERTIES OUTPUT_NAME sundials_nvecparhyp CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_nvecparhyp_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_nvecparhyp_shared DESTINATION lib) ++ INSTALL(TARGETS sundials_nvecparhyp_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + + # Install the NVECPARHYP header files +diff -Nur sundials-2.7.0.orig/src/nvec_petsc/CMakeLists.txt sundials-2.7.0/src/nvec_petsc/CMakeLists.txt +--- sundials-2.7.0.orig/src/nvec_petsc/CMakeLists.txt 2016-09-26 22:16:50.000000000 +0000 ++++ sundials-2.7.0/src/nvec_petsc/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -53,7 +53,7 @@ + ADD_LIBRARY(sundials_nvecpetsc_static STATIC ${nvecpetsc_SOURCES} ${shared_SOURCES}) + SET_TARGET_PROPERTIES(sundials_nvecpetsc_static + PROPERTIES OUTPUT_NAME sundials_nvecpetsc CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_nvecpetsc_static DESTINATION lib) ++ INSTALL(TARGETS sundials_nvecpetsc_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + + # Rules for building and installing the shared library: +@@ -67,7 +67,7 @@ + PROPERTIES OUTPUT_NAME sundials_nvecpetsc CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_nvecpetsc_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_nvecpetsc_shared DESTINATION lib) ++ INSTALL(TARGETS sundials_nvecpetsc_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + + # Install the NVECPARHYP header files +diff -Nur sundials-2.7.0.orig/src/nvec_pthreads/CMakeLists.txt sundials-2.7.0/src/nvec_pthreads/CMakeLists.txt +--- sundials-2.7.0.orig/src/nvec_pthreads/CMakeLists.txt 2016-09-26 22:16:50.000000000 +0000 ++++ sundials-2.7.0/src/nvec_pthreads/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -44,7 +44,7 @@ + ADD_LIBRARY(sundials_nvecpthreads_static STATIC ${nvecpthreads_SOURCES} ${shared_SOURCES}) + SET_TARGET_PROPERTIES(sundials_nvecpthreads_static + PROPERTIES OUTPUT_NAME sundials_nvecpthreads CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_nvecpthreads_static DESTINATION lib) ++ INSTALL(TARGETS sundials_nvecpthreads_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + + # Rules for building and installing the shared library: +@@ -58,7 +58,8 @@ + PROPERTIES OUTPUT_NAME sundials_nvecpthreads CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_nvecpthreads_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_nvecpthreads_shared DESTINATION lib) ++ TARGET_LINK_LIBRARIES(sundials_nvecpthreads_shared -lm -lpthread) ++ INSTALL(TARGETS sundials_nvecpthreads_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + + # Install the NVECPTHREADS header files +@@ -71,7 +72,7 @@ + ADD_LIBRARY(sundials_fnvecpthreads_static STATIC ${fnvecpthreads_SOURCES}) + SET_TARGET_PROPERTIES(sundials_fnvecpthreads_static + PROPERTIES OUTPUT_NAME sundials_fnvecpthreads CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_fnvecpthreads_static DESTINATION lib) ++ INSTALL(TARGETS sundials_fnvecpthreads_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + IF(BUILD_SHARED_LIBS) + ADD_LIBRARY(sundials_fnvecpthreads_shared ${fnvecpthreads_SOURCES}) +@@ -79,7 +80,8 @@ + PROPERTIES OUTPUT_NAME sundials_fnvecpthreads CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_fnvecpthreads_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_fnvecpthreads_shared DESTINATION lib) ++ TARGET_LINK_LIBRARIES(sundials_fnvecpthreads_shared -lm -lpthread) ++ INSTALL(TARGETS sundials_fnvecpthreads_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + ENDIF(FCMIX_ENABLE AND F77_FOUND) + +diff -Nur sundials-2.7.0.orig/src/nvec_ser/CMakeLists.txt sundials-2.7.0/src/nvec_ser/CMakeLists.txt +--- sundials-2.7.0.orig/src/nvec_ser/CMakeLists.txt 2016-09-26 22:16:49.000000000 +0000 ++++ sundials-2.7.0/src/nvec_ser/CMakeLists.txt 2016-12-30 23:41:54.355840949 +0000 +@@ -44,7 +44,7 @@ + ADD_LIBRARY(sundials_nvecserial_static STATIC ${nvecserial_SOURCES} ${shared_SOURCES}) + SET_TARGET_PROPERTIES(sundials_nvecserial_static + PROPERTIES OUTPUT_NAME sundials_nvecserial CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_nvecserial_static DESTINATION lib) ++ INSTALL(TARGETS sundials_nvecserial_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + + # Rules for building and installing the shared library: +@@ -58,7 +58,8 @@ + PROPERTIES OUTPUT_NAME sundials_nvecserial CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_nvecserial_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_nvecserial_shared DESTINATION lib) ++ TARGET_LINK_LIBRARIES(sundials_nvecserial_shared -lm) ++ INSTALL(TARGETS sundials_nvecserial_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + + # Install the NVECSERIAL header files +@@ -71,7 +72,7 @@ + ADD_LIBRARY(sundials_fnvecserial_static STATIC ${fnvecserial_SOURCES}) + SET_TARGET_PROPERTIES(sundials_fnvecserial_static + PROPERTIES OUTPUT_NAME sundials_fnvecserial CLEAN_DIRECT_OUTPUT 1) +- INSTALL(TARGETS sundials_fnvecserial_static DESTINATION lib) ++ INSTALL(TARGETS sundials_fnvecserial_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_STATIC_LIBS) + IF(BUILD_SHARED_LIBS) + ADD_LIBRARY(sundials_fnvecserial_shared ${fnvecserial_SOURCES}) +@@ -79,7 +80,8 @@ + PROPERTIES OUTPUT_NAME sundials_fnvecserial CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sundials_fnvecserial_shared + PROPERTIES VERSION ${nveclib_VERSION} SOVERSION ${nveclib_SOVERSION}) +- INSTALL(TARGETS sundials_fnvecserial_shared DESTINATION lib) ++ TARGET_LINK_LIBRARIES(sundials_fnvecserial_shared -lm) ++ INSTALL(TARGETS sundials_fnvecserial_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF(BUILD_SHARED_LIBS) + ENDIF(FCMIX_ENABLE AND F77_FOUND) + diff --git a/sci-libs/sundials/metadata.xml b/sci-libs/sundials/metadata.xml new file mode 100644 index 000000000000..b4735cc5086b --- /dev/null +++ b/sci-libs/sundials/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Scientific Project</name> + </maintainer> + <longdescription lang="en"> + SUite of Nonlinear and DIfferential/ALgebraic equation Solvers was + implemented with the goal of providing robust time integrators and + nonlinear solvers that can easily be incorporated into existing + simulation codes. The primary design goals were to require minimal + information from the user, allow users to easily supply their own + data structures underneath the solvers, and allow for easy + incorporation of user-supplied linear solvers and preconditioners. + </longdescription> + <use> + <flag name="hypre">Build with <pkg>sci-libs/hypre</pkg> conditioners</flag> + <flag name="sparse">Enable support for <pkg>sci-libs/klu</pkg> sparse solver</flag> + <flag name="superlumt">Build with <pkg>sci-libs/superlu_mt</pkg></flag> + </use> +</pkgmetadata> diff --git a/sci-libs/sundials/sundials-2.7.0.ebuild b/sci-libs/sundials/sundials-2.7.0.ebuild new file mode 100644 index 000000000000..d42c789f61c3 --- /dev/null +++ b/sci-libs/sundials/sundials-2.7.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +FORTRAN_NEEDED=fortran +FORTRAN_STANDARD=90 + +inherit cmake-utils toolchain-funcs fortran-2 versionator + +DESCRIPTION="Suite of nonlinear solvers" +HOMEPAGE="http://computation.llnl.gov/projects/sundials" +SRC_URI="http://computation.llnl.gov/projects/sundials/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/$(get_major_version)" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="cxx doc examples fortran hypre lapack mpi openmp sparse static-libs superlumt threads" +REQUIRED_USE="hypre? ( mpi )" + +RDEPEND=" + lapack? ( virtual/lapack ) + mpi? ( virtual/mpi sci-libs/hypre:= ) + sparse? ( sci-libs/klu:= ) + superlumt? ( sci-libs/superlu_mt:= ) +" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +PATCHES=( "${FILESDIR}"/${P}-underlinking-libdir.patch ) + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then + ewarn "OpenMP is not available in your current selected gcc" + die "need openmp capable gcc" + fi +} + +src_configure() { + mycmakeargs+=( + -DBUILD_SHARED_LIBS=ON + -DBUILD_STATIC_LIBS="$(usex static-libs)" + -DCXX_ENABLE="$(usex cxx)" + -DFCMIX_ENABLE="$(usex fortran)" + -DF90_ENABLE="$(usex fortran)" + -DHYPRE_ENABLE="$(usex hypre)" + -DHYPRE_INCLUDE_DIR="${EPREFIX}/usr/include/hypre" + -DHYPRE_LIBRARY="HYPRE" + -DKLU_ENABLE="$(usex sparse)" + -DKLU_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libklu.so" + -DLAPACK_ENABLE="$(usex lapack)" + -DMPI_ENABLE="$(usex mpi)" + -DOPENMP_ENABLE="$(usex openmp)" + -DPTHREAD_ENABLE="$(usex threads)" + -DSUPERLUMT_ENABLE="$(usex superlumt)" + -DSUPERLUMT_INCLUDE_DIR="${EPREFIX}/usr/include/superlu_mt" + -DSUPERLUMT_LIBRARY="superlu_mt" + -DEXAMPLES_ENABLE="$(usex examples)" + -DEXAMPLES_INSTALL=ON + -DEXAMPLES_INSTALL_PATH="/usr/share/doc/${PF}/examples" + -DUSE_GENERIC_MATH=ON + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + use doc && dodoc doc/*/*.pdf + cd src + for r in */README; do + newdoc ${r} README-${r%/*} + done +} |