Changeset 28164


Ignore:
Timestamp:
03/21/24 14:50:40 (12 months ago)
Author:
jdquinn
Message:

CHG: Issues with whitespace in patch; path to config files

Location:
issm/trunk-jpl/externalpackages/gmt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/externalpackages/gmt/configs/6.5/static/cmake/modules/FindGDAL.cmake.patch

    r28161 r28164  
    1 --- src/cmake/modules/FindGDAL.cmake    2024-03-20 19:47:15
    2 +++ FindGDAL.cmake  2024-03-20 19:55:54
     1--- src/cmake/modules/FindGDAL.cmake    2024-03-20 19:47:15
     2+++ FindGDAL.cmake      2024-03-20 19:55:54
    33@@ -81,12 +81,25 @@
    4                ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
    5                OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
    6           if (GDAL_CONFIG_LIBS)
    7 -              string (REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
    8 -              string (REGEX REPLACE "-l" "" _gdal_lib "${_gdal_dashl}")
    9 -              string (REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
    10 -              string (REGEX REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}")
    11 +              string (REGEX MATCHALL "(^| )-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
    12 +              string (REGEX REPLACE "(^| )-l" "" _gdal_lib "${_gdal_dashl}")
    13 +              string (REGEX MATCHALL "(^| )-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
    14 +              string (REGEX REPLACE "(^| )-L" "" _gdal_libpath "${_gdal_dashL}")
    15           endif (GDAL_CONFIG_LIBS)
    16 +         execute_process (COMMAND ${GDAL_CONFIG} --dep-libs
    17 +              ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
    18 +              OUTPUT_VARIABLE GDAL_CONFIG_DEP_LIBS)
    19 +         if (GDAL_CONFIG_DEP_LIBS)
    20 +              string (REGEX MATCHALL "(^| )-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_DEP_LIBS})
    21 +              string (REGEX REPLACE "(^| )-l" "" _gdal_dep_lib "${_gdal_dashl}")
    22 +              string (REGEX MATCHALL "(^| )-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_DEP_LIBS})
    23 +              string (REGEX REPLACE "(^| )-L" "" _gdal_dep_libpath "${_gdal_dashL}")
    24 +         endif (GDAL_CONFIG_DEP_LIBS)
    25      endif (GDAL_CONFIG)
    26 +    if (_gdal_dep_lib)
    27 +         list (REMOVE_DUPLICATES _gdal_dep_lib)
    28 +         list (REMOVE_ITEM _gdal_dep_lib gdal)
    29 +    endif (_gdal_dep_lib)
     4                        ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
     5                        OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
     6                if (GDAL_CONFIG_LIBS)
     7-                       string (REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
     8-                       string (REGEX REPLACE "-l" "" _gdal_lib "${_gdal_dashl}")
     9-                       string (REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
     10-                       string (REGEX REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}")
     11+                       string (REGEX MATCHALL "(^| )-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
     12+                       string (REGEX REPLACE "(^| )-l" "" _gdal_lib "${_gdal_dashl}")
     13+                       string (REGEX MATCHALL "(^| )-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
     14+                       string (REGEX REPLACE "(^| )-L" "" _gdal_libpath "${_gdal_dashL}")
     15                endif (GDAL_CONFIG_LIBS)
     16+               execute_process (COMMAND ${GDAL_CONFIG} --dep-libs
     17+                       ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
     18+                       OUTPUT_VARIABLE GDAL_CONFIG_DEP_LIBS)
     19+               if (GDAL_CONFIG_DEP_LIBS)
     20+                       string (REGEX MATCHALL "(^| )-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_DEP_LIBS})
     21+                       string (REGEX REPLACE "(^| )-l" "" _gdal_dep_lib "${_gdal_dashl}")
     22+                       string (REGEX MATCHALL "(^| )-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_DEP_LIBS})
     23+                       string (REGEX REPLACE "(^| )-L" "" _gdal_dep_libpath "${_gdal_dashL}")
     24+               endif (GDAL_CONFIG_DEP_LIBS)
     25        endif (GDAL_CONFIG)
     26+       if (_gdal_dep_lib)
     27+               list (REMOVE_DUPLICATES _gdal_dep_lib)
     28+               list (REMOVE_ITEM _gdal_dep_lib gdal)
     29+       endif (_gdal_dep_lib)
    3030 endif (UNIX AND NOT GDAL_FOUND)
    3131 
    3232 find_path (GDAL_INCLUDE_DIR gdal.h
    3333@@ -129,6 +142,46 @@
    34      /usr/local
     34        /usr/local
    3535 )
    3636 
    3737+# find all libs that gdal-config --dep-libs reports
    3838+foreach (_extralib ${_gdal_dep_lib})
    39 +    find_library (_found_lib_${_extralib}
    40 +         NAMES ${_extralib}
    41 +         HINTS
    42 +         ${HDF5_ROOT}
    43 +         $ENV{HDF5_ROOT}
    44 +         ${NETCDF_ROOT}
    45 +         $ENV{NETCDF_ROOT}
    46 +         ${ZLIB_ROOT}
    47 +         $ENV{ZLIB_ROOT}
    48 +         ${CURL_ROOT}
    49 +         $ENV{CURL_ROOT}
    50 +         PATH_SUFFIXES lib
    51 +         PATHS
    52 +         ${_gdal_dep_libpath}
    53 +    )
    54 +    list (APPEND GDAL_LIBRARY ${_found_lib_${_extralib}})
     39+       find_library (_found_lib_${_extralib}
     40+               NAMES ${_extralib}
     41+               HINTS
     42+               ${HDF5_ROOT}
     43+               $ENV{HDF5_ROOT}
     44+               ${NETCDF_ROOT}
     45+               $ENV{NETCDF_ROOT}
     46+               ${ZLIB_ROOT}
     47+               $ENV{ZLIB_ROOT}
     48+               ${CURL_ROOT}
     49+               $ENV{CURL_ROOT}
     50+               PATH_SUFFIXES lib
     51+               PATHS
     52+               ${_gdal_dep_libpath}
     53+       )
     54+       list (APPEND GDAL_LIBRARY ${_found_lib_${_extralib}})
    5555+endforeach (_extralib)
    5656+
     
    5858+# find all manually-supplied libs
    5959+if (GDAL_EXTRA_LIBS)
    60 +    # Ensure -l is preceded by whitespace to not match
    61 +    # '-l' in '-L/usr/lib/x86_64-linux-gnu/hdf5/serial'
    62 +    string (REGEX MATCHALL "(^| )-l[^ ]+" _gdal_extra_lib_dashl ${GDAL_EXTRA_LIBS})
    63 +    string (REGEX REPLACE "(^| )-l" "" _gdal_extra_lib "${_gdal_extra_lib_dashl}")
    64 +    string (REGEX MATCHALL "(^| )-L[^ ]+" _gdal_extra_lib_dashL ${GDAL_EXTRA_LIBS})
    65 +    string (REGEX REPLACE "(^| )-L" "" _gdal_extra_libpath "${_gdal_extra_lib_dashL}")
    66 +    foreach (_extralib ${_gdal_extra_lib})
    67 +         find_library (_found_lib_${_extralib}
    68 +              NAMES ${_extralib}
    69 +              PATH_SUFFIXES lib
    70 +              PATHS
    71 +              ${_gdal_extra_libpath}
    72 +         )
    73 +         list (APPEND GDAL_LIBRARY ${_found_lib_${_extralib}})
    74 +    endforeach (_extralib)
     60+       # Ensure -l is preceded by whitespace to not match
     61+       # '-l' in '-L/usr/lib/x86_64-linux-gnu/hdf5/serial'
     62+       string (REGEX MATCHALL "(^| )-l[^ ]+" _gdal_extra_lib_dashl ${GDAL_EXTRA_LIBS})
     63+       string (REGEX REPLACE "(^| )-l" "" _gdal_extra_lib "${_gdal_extra_lib_dashl}")
     64+       string (REGEX MATCHALL "(^| )-L[^ ]+" _gdal_extra_lib_dashL ${GDAL_EXTRA_LIBS})
     65+       string (REGEX REPLACE "(^| )-L" "" _gdal_extra_libpath "${_gdal_extra_lib_dashL}")
     66+       foreach (_extralib ${_gdal_extra_lib})
     67+               find_library (_found_lib_${_extralib}
     68+                       NAMES ${_extralib}
     69+                       PATH_SUFFIXES lib
     70+                       PATHS
     71+                       ${_gdal_extra_libpath}
     72+               )
     73+               list (APPEND GDAL_LIBRARY ${_found_lib_${_extralib}})
     74+       endforeach (_extralib)
    7575+endif (GDAL_EXTRA_LIBS)
    7676+
  • TabularUnified issm/trunk-jpl/externalpackages/gmt/install-6-linux-static.sh

    r27837 r28164  
    4444
    4545# Copy custom configuration files
    46 cp ./configs/6/static/linux/cmake/ConfigUser.static.cmake ./src/cmake/ConfigUser.cmake
    47 cp ./configs/6/static/cmake/modules/FindGDAL.cmake ./src/cmake/modules
    48 cp ./configs/6/static/cmake/modules/FindGSHHG.cmake ./src/cmake/modules
    49 cp ./configs/6/static/cmake/modules/FindNETCDF.cmake ./src/cmake/modules
    50 cp ./configs/6/static/src/CMakeLists.txt ./src/src
     46cp ./configs/6.0/static/linux/cmake/ConfigUser.static.cmake ./src/cmake/ConfigUser.cmake
     47cp ./configs/6.0/static/cmake/modules/FindGDAL.cmake ./src/cmake/modules
     48cp ./configs/6.0/static/cmake/modules/FindGSHHG.cmake ./src/cmake/modules
     49cp ./configs/6.0/static/cmake/modules/FindNETCDF.cmake ./src/cmake/modules
     50cp ./configs/6.0/static/src/CMakeLists.txt ./src/src
    5151
    5252# Configure
  • TabularUnified issm/trunk-jpl/externalpackages/gmt/install-6-linux.sh

    r27837 r28164  
    3636
    3737# Copy custom configuration files
    38 cp ./configs/6/linux/cmake/ConfigUser.cmake ./src/cmake
     38cp ./configs/6.0/linux/cmake/ConfigUser.cmake ./src/cmake
    3939
    4040# Configure
Note: See TracChangeset for help on using the changeset viewer.