--- cmake-modules/Makefile (revision 411321) +++ cmake-modules/Makefile (working copy) @@ -1,7 +1,7 @@ # Created by: gahr # $FreeBSD$ -PORTREVISION= 0 +PORTREVISION= 1 PKGNAMESUFFIX= -modules COMMENT= Modules and Templates for CMake --- cmake-modules/files/patch-Modules_CMakeFortranInformation.cmake (nonexistent) +++ cmake-modules/files/patch-Modules_CMakeFortranInformation.cmake (working copy) @@ -0,0 +1,12 @@ +--- Modules/CMakeFortranInformation.cmake.orig 2016-01-19 16:09:06 UTC ++++ Modules/CMakeFortranInformation.cmake +@@ -44,6 +44,9 @@ if (NOT _INCLUDED_FILE) + include(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL) + endif () + ++if(CMAKE_Fortran_RPATH) ++ set(CMAKE_INSTALL_RPATH ${CMAKE_Fortran_RPATH};${CMAKE_INSTALL_RPATH}) ++endif() + if(CMAKE_Fortran_SIZEOF_DATA_PTR) + foreach(f ${CMAKE_Fortran_ABI_FILES}) + include(${f}) --- cmake-modules/files/patch-Modules_Compiler_GNU-Fortran.cmake (nonexistent) +++ cmake-modules/files/patch-Modules_Compiler_GNU-Fortran.cmake (working copy) @@ -0,0 +1,16 @@ +--- Modules/Compiler/GNU-Fortran.cmake.orig 2016-03-18 02:08:11 UTC ++++ Modules/Compiler/GNU-Fortran.cmake +@@ -13,3 +13,13 @@ unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran) + + # Fortran-specific feature flags. + set(CMAKE_Fortran_MODDIR_FLAG -J) ++ ++# Find out where gfortran thinks that libgcc_s should come from. ++execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -print-file-name=libgcc_s.so ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ++ OUTPUT_VARIABLE _D1) ++ ++# Map that to a sensible directory. ++get_filename_component(_D2 ${_D1} DIRECTORY) ++get_filename_component(_D3 ${_D2} ABSOLUTE) ++set(CMAKE_Fortran_RPATH ${_D3})