cprnc: install rpath patch for v1.0.8 (#47913)

This commit is contained in:
Dom Heinzeller 2024-12-12 12:31:40 -07:00 committed by GitHub
parent 9cd2f0a536
commit 1581922c9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,17 @@
--- a/CMakeLists.txt 2024-12-03 16:22:56.474665264 -0700
+++ b/CMakeLists.txt 2024-12-03 16:23:47.304644596 -0700
@@ -82,13 +82,13 @@
#message (STATUS "netcdf_fortran_lib == ${netcdf_fortran_lib}")
get_filename_component(netcdf_fortran_lib_location ${netcdf_fortran_lib} DIRECTORY)
#message (STATUS "netcdf_fortran_lib_location == ${netcdf_fortran_lib_location}")
-SET(CMAKE_INSTALL_RPATH "${netcdf_fortran_lib_location};${netcdf_c_lib_location}")
find_library(netcdf_c_lib netcdf HINTS ${NetCDF_C_LIBRARY})
#message (STATUS "netcdf_c_lib == ${netcdf_c_lib}")
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})

View File

@ -26,7 +26,9 @@ class Cprnc(CMakePackage):
depends_on("netcdf-fortran")
depends_on("cmake@3:", type="build")
# Still need a patch for 1.0.8 ...
patch("install_rpath.patch", when="@:1.0.7")
patch("install_rpath_108.patch", when="@1.0.8")
resource(
name="genf90",