Skip to content

Commit

Permalink
cprnc: set install rpath and add v1.0.8 (spack#47505)
Browse files Browse the repository at this point in the history
  • Loading branch information
climbfuji authored Nov 9, 2024
1 parent e99bf48 commit 97acf26
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions var/spack/repos/builtin/packages/cprnc/install_rpath.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- a/CMakeLists.txt 2023-12-04 07:01:57.000000000 -0700
+++ b/CMakeLists.txt 2024-11-08 06:53:55.090900241 -0700
@@ -21,6 +21,7 @@

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_MACOSX_RPATH 1)
+SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Compiler-specific compile options
if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
@@ -79,6 +80,7 @@
get_filename_component(netcdf_c_lib_location ${netcdf_c_lib} DIRECTORY)
#message (STATUS "netcdf_c_lib_location == ${netcdf_c_lib_location}")

+SET(CMAKE_INSTALL_RPATH "${netcdf_fortran_lib_location};${netcdf_c_lib_location}")
list(APPEND CMAKE_BUILD_RPATH ${netcdf_fortran_lib_location} ${netcdf_c_lib_location})
#message("CMAKE_BUILD_RPATH is ${CMAKE_BUILD_RPATH}")
add_executable (cprnc ${CPRNC_Fortran_SRCS} ${CPRNC_GenF90_SRCS})
3 changes: 3 additions & 0 deletions var/spack/repos/builtin/packages/cprnc/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Cprnc(CMakePackage):

maintainers("jedwards4b", "billsacks")

version("1.0.8", sha256="94ee3b4e724bc06161e576d45f34401f1452acf738803528cb80726eed230cae")
version("1.0.3", sha256="3e7400f9a13d5de01964d7dd95151d08e6e30818d2a1efa9a9c7896cf6646d69")
version("1.0.2", sha256="02edfa8050135ac0dc4a74aea05d19b0823d769b22cafa88b9352e29723d4179")
version("1.0.1", sha256="b8a8fd4ad7e2716968dfa60f677217c55636580807b1309276f4c062ee432ccd")
Expand All @@ -25,6 +26,8 @@ class Cprnc(CMakePackage):
depends_on("netcdf-fortran")
depends_on("cmake@3:", type="build")

patch("install_rpath.patch", when="@:1.0.7")

resource(
name="genf90",
git="https://github.com/PARALLELIO/genf90",
Expand Down

0 comments on commit 97acf26

Please sign in to comment.