[sundials] 05/06: patches

Dima Kogan dima at secretsauce.net
Mon Apr 3 02:44:38 UTC 2017


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

dkogan pushed a commit to branch master
in repository sundials.

commit 8a46793d00805af7fe0b6844278e076b9e6260df
Author: Dima Kogan <dima at secretsauce.net>
Date:   Sun Apr 2 19:37:42 2017 -0700

    patches
---
 debian/patches/0008-patched-findPETSc.patch | 74 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 2 files changed, 75 insertions(+)

diff --git a/debian/patches/0008-patched-findPETSc.patch b/debian/patches/0008-patched-findPETSc.patch
new file mode 100644
index 0000000..6e1480a
--- /dev/null
+++ b/debian/patches/0008-patched-findPETSc.patch
@@ -0,0 +1,74 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sun, 2 Apr 2017 19:37:27 -0700
+Subject: patched findPETSc
+
+---
+ config/FindPETSc.cmake | 44 +++++++++-----------------------------------
+ 1 file changed, 9 insertions(+), 35 deletions(-)
+
+diff --git a/config/FindPETSc.cmake b/config/FindPETSc.cmake
+index 5fb3e56..9ef86e2 100644
+--- a/config/FindPETSc.cmake
++++ b/config/FindPETSc.cmake
+@@ -1,52 +1,26 @@
+-# ---------------------------------------------------------------
+-# $Revision:  $
+-# $Date:  $
+-# ---------------------------------------------------------------
+-# Programmer:  Steven Smith @ LLNL
+-# ---------------------------------------------------------------
+-# LLNS Copyright Start
+-# Copyright (c) 2014, Lawrence Livermore National Security
+-# This work was performed under the auspices of the U.S. Department 
+-# of Energy by Lawrence Livermore National Laboratory in part under 
+-# Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
+-# Produced at the Lawrence Livermore National Laboratory.
+-# All rights reserved.
+-# For details, see the LICENSE file.
+-# LLNS Copyright End
+-# ---------------------------------------------------------------
+-# Find PETSC library.
+-# 
+-
+ find_package(PkgConfig)
+ 
+ IF(WIN32)
+   set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
+ endif(WIN32)
+-pkg_check_modules(PC_PETSC QUIET PETSc)
+ 
++# Need PETSc and MPI. Linker should be able to find MPI as is
++pkg_check_modules(PC_PETSC REQUIRED PETSc)
+ find_path(PETSC_INCLUDE_DIR petsc.h
+           HINTS ${PC_PETSC_INCLUDEDIR} ${PC_PETSC_INCLUDE_DIRS}
+           PATHS PETSC_INCLUDE_DIR
+           )
+-
+ find_library(PETSC_LIBRARY NAMES petsc
+              HINTS ${PC_PETSC_LIBDIR} ${PC_PETSC_LIBRARY_DIRS} )
+ 
+-include(CheckCSourceRuns)
+-set(CMAKE_REQUIRED_INCLUDES ${PETSC_INCLUDE_DIR})
+-set(CMAKE_REQUIRED_LIBRARIES ${PETSC_LIBRARY})
+-check_c_source_runs(
+-    "\#include \"petscvec.h\"\nint main(){Vec x;VecCreate(PETSC_COMM_WORLD, &x);return(0);}"
+-    PETSC_BUILD_STATUS
+-)
+-
+-include(FindPackageHandleStandardArgs)
+-# handle the QUIETLY and REQUIRED arguments and set PETSC_FOUND to TRUE
+-# if all listed variables are TRUE
+-find_package_handle_standard_args(PETSc  DEFAULT_MSG
+-    PETSC_LIBRARY PETSC_INCLUDE_DIR PETSC_BUILD_STATUS)
++pkg_check_modules(PC_MPI REQUIRED ompi-c)
++find_path(MPI_INCLUDE_DIR mpi.h
++          HINTS ${PC_MPI_INCLUDEDIR} ${PC_MPI_INCLUDE_DIRS}
++          PATHS MPI_INCLUDE_DIR
++          )
+ 
+ mark_as_advanced(PETSC_INCLUDE_DIR PETSC_LIBRARY )
+ 
+ set(PETSC_LIBRARIES ${PETSC_LIBRARY} )
+-set(PETSC_INCLUDE_DIRS ${PETSC_INCLUDE_DIR} )
++set(PETSC_INCLUDE_DIRS ${PC_PETSC_INCLUDE_DIRS} ${MPI_INCLUDE_DIR})
++set(PETSC_FOUND TRUE)
diff --git a/debian/patches/series b/debian/patches/series
index db3fd66..b44a949 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 0005-arkode-examples-don-t-call-SUNDIALS_ADD_TEST.patch
 0006-example-added-forgotten-library-linkage.patch
 0007-arkode-library-now-links-with-libklu.patch
+0008-patched-findPETSc.patch

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



More information about the debian-science-commits mailing list