aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLassulus <github@lassul.us>2020-06-02 12:10:32 +0200
committerGitHub <noreply@github.com>2020-06-02 12:10:32 +0200
commit09da70f1f47d9b24c0a7b6a441739c2bb533d12f (patch)
tree6ff9eee0052e2f1a5ebcf6b251e5a377ab828f2e
parent53d0dc663895d11bbbea9a78ce8bca6899acdee8 (diff)
parent9d50563293c2d405ad7205137105e3b71410a878 (diff)
Merge pull request #87816 from helsinki-systems/precice2
precice: 2020-01-20 -> 2.0.2
-rw-r--r--pkgs/development/libraries/precice/0001-Fix-the-install-target-dirs-to-use-the-CMAKE-flags.patch112
-rw-r--r--pkgs/development/libraries/precice/default.nix18
2 files changed, 5 insertions, 125 deletions
diff --git a/pkgs/development/libraries/precice/0001-Fix-the-install-target-dirs-to-use-the-CMAKE-flags.patch b/pkgs/development/libraries/precice/0001-Fix-the-install-target-dirs-to-use-the-CMAKE-flags.patch
deleted file mode 100644
index 52a4d0b5ccc..00000000000
--- a/pkgs/development/libraries/precice/0001-Fix-the-install-target-dirs-to-use-the-CMAKE-flags.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 078cc28a3ece0dcc4033961090a6e5d6e63b3ec5 Mon Sep 17 00:00:00 2001
-From: Scriptkiddi <fritz@otlinghaus.it>
-Date: Sat, 4 Jan 2020 17:59:32 +0100
-Subject: [PATCH] Fix the install target dirs to use the CMAKE flags
-
----
- CMakeLists.txt | 27 ++++++++++++++-------------
- 1 file changed, 14 insertions(+), 13 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 96b9d1b5..ff8191ae 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -5,7 +5,7 @@ project(preCICE VERSION 1.6.1 LANGUAGES CXX)
-
- #
- # Overview of this configuration
--#
-+#
- # PREAMBLE
- # Setup Options
- # Find Mandatory Dependencies
-@@ -30,6 +30,7 @@ include(CheckCXX11Library)
- include(CopyTargetProperty)
- include(XSDKMacros)
- include(Validation)
-+include(GNUInstallDirs)
-
- # CMake Policies
-
-@@ -197,7 +198,7 @@ if(CMAKE_VERSION VERSION_LESS "3.11")
- endif()
- endif()
-
--# Add precice as an empty target
-+# Add precice as an empty target
- add_library(precice ${preCICE_DUMMY})
- set_target_properties(precice PROPERTIES
- # precice is a C++11 project
-@@ -267,7 +268,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/DetectGitRevision.cmake)
- configure_file("${PROJECT_SOURCE_DIR}/src/precice/impl/versions.hpp.in" "${PROJECT_BINARY_DIR}/src/precice/impl/versions.hpp" @ONLY)
-
- # Includes Configuration
--target_include_directories(precice PUBLIC
-+target_include_directories(precice PUBLIC
- $<BUILD_INTERFACE:${preCICE_SOURCE_DIR}/src>
- $<BUILD_INTERFACE:${preCICE_BINARY_DIR}/src>
- $<INSTALL_INTERFACE:include>
-@@ -282,7 +283,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/src/sources.cmake)
- #
-
- add_executable(binprecice "src/drivers/main.cpp")
--target_link_libraries(binprecice
-+target_link_libraries(binprecice
- PRIVATE
- Threads::Threads
- precice
-@@ -365,18 +366,18 @@ include(${CMAKE_CURRENT_LIST_DIR}/src/tests.cmake)
- # binprecice - the precice binary
- install(TARGETS precice binprecice
- EXPORT preciceTargets
-- LIBRARY DESTINATION lib
-- ARCHIVE DESTINATION lib
-- RUNTIME DESTINATION bin
-- PUBLIC_HEADER DESTINATION include/precice
-- INCLUDES DESTINATION include/precice
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/precice
-+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/precice
- )
-
- if(PRECICE_InstallTest)
- # Install the testprecice target
- install(TARGETS testprecice
- EXPORT preciceTargets
-- RUNTIME DESTINATION bin
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- )
-
- # Install the resources necessary for the tests
-@@ -396,7 +397,7 @@ endif()
- install(EXPORT preciceTargets
- FILE preciceTargets.cmake
- NAMESPACE precice::
-- DESTINATION lib/cmake/precice
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/precice
- )
-
- # Generate a Package Config File for precice
-@@ -408,7 +409,7 @@ write_basic_package_version_file("preciceConfigVersion.cmake"
-
- # Install the Config and the ConfigVersion files
- install(FILES "cmake/preciceConfig.cmake" "${preCICE_BINARY_DIR}/preciceConfigVersion.cmake"
-- DESTINATION lib/cmake/precice
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/precice
- )
-
- # Setup the config in the build directory
-@@ -477,7 +478,7 @@ configure_file(
- "lib/pkgconfig/libprecice.pc"
- @ONLY
- )
--install(DIRECTORY "${preCICE_BINARY_DIR}/lib/pkgconfig"
-+install(DIRECTORY "${preCICE_BINARY_DIR}/lib/pkgconfig"
- DESTINATION lib
- )
-
---
-2.23.1
-
diff --git a/pkgs/development/libraries/precice/default.nix b/pkgs/development/libraries/precice/default.nix
index a22df8c18e0..22726858a22 100644
--- a/pkgs/development/libraries/precice/default.nix
+++ b/pkgs/development/libraries/precice/default.nix
@@ -1,36 +1,28 @@
-{ lib, stdenv, fetchFromGitHub, cmake, gcc, boost, eigen, libxml2, openmpi, python3, python3Packages }:
+{ lib, stdenv, fetchFromGitHub, cmake, gcc, boost, eigen, libxml2, openmpi, python3, python3Packages, petsc }:
stdenv.mkDerivation rec {
pname = "precice";
- version = "2020-01-20";
+ version = "2.0.2";
# Todo next release switch back to versioning but for python3 support master is needed
src = fetchFromGitHub {
owner = "precice";
repo = pname;
- rev = "9f778290416416255fc73a495e962def301648b0";
- sha256 = "1ij43qjbf1aq3lh91gqpviajc8lyl7qkxfccmj5md5vwf88vjaip";
+ rev = "v${version}";
+ sha256 = "1s41wv2077d2gqj0wsxls6wkgdk9cgzcbmk2q43ha08ccq5i3dav";
};
cmakeFlags = [
+ "-DPRECICE_PETScMapping=OFF"
"-DBUILD_SHARED_LIBS=ON"
- "-DPETSC=off"
"-DPYTHON_LIBRARIES=${python3.libPrefix}"
"-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}m"
];
nativeBuildInputs = [ cmake gcc ];
buildInputs = [ boost eigen libxml2 openmpi python3 python3Packages.numpy ];
- patches = [
- ./0001-Fix-the-install-target-dirs-to-use-the-CMAKE-flags.patch # CMake Packaging is not perfect upstream, after this PR it is https://github.com/precice/precice/pull/577/files
- ];
enableParallelBuilding = true;
- postInstall = ''
- substituteInPlace "$out"/lib/cmake/precice/preciceTargets.cmake \
- --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include;' 'INTERFACE_INCLUDE_DIRECTORIES "'$out/include';'
- ''; # Check if this can be removed after upstream PR 577
-
meta = {
description = "preCICE stands for Precise Code Interaction Coupling Environment";
license = with lib.licenses; [ gpl3 ];