diff options
Diffstat (limited to 'ports/netcdf-c')
| -rw-r--r-- | ports/netcdf-c/CONTROL | 2 | ||||
| -rw-r--r-- | ports/netcdf-c/hdf5_3.patch | 14 | ||||
| -rw-r--r-- | ports/netcdf-c/portfile.cmake | 10 | ||||
| -rw-r--r-- | ports/netcdf-c/usage | 4 |
4 files changed, 22 insertions, 8 deletions
diff --git a/ports/netcdf-c/CONTROL b/ports/netcdf-c/CONTROL index c82acf055..a918e9020 100644 --- a/ports/netcdf-c/CONTROL +++ b/ports/netcdf-c/CONTROL @@ -1,5 +1,5 @@ Source: netcdf-c -Version: 4.7.0-2 +Version: 4.7.0-5 Build-Depends: hdf5, curl Homepage: https://github.com/Unidata/netcdf-c Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/ports/netcdf-c/hdf5_3.patch b/ports/netcdf-c/hdf5_3.patch new file mode 100644 index 000000000..502a8ea99 --- /dev/null +++ b/ports/netcdf-c/hdf5_3.patch @@ -0,0 +1,14 @@ +diff --git a/libhdf5/CMakeLists.txt b/libhdf5/CMakeLists.txt
+index f3c7bbc..34fc2ab 100644
+--- a/libhdf5/CMakeLists.txt
++++ b/libhdf5/CMakeLists.txt
+@@ -20,3 +20,9 @@ add_library(netcdfhdf5 OBJECT ${libnchdf5_SOURCES})
+
+ # Remember to package this file for CMake builds.
+ ADD_EXTRA_DIST(${libnchdf5_SOURCES} CMakeLists.txt)
++
++if(HDF5_BUILD_SHARED_LIBS)
++ target_link_libraries(netcdfhdf5 PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared)
++else()
++ target_link_libraries(netcdfhdf5 PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static)
++endif()
diff --git a/ports/netcdf-c/portfile.cmake b/ports/netcdf-c/portfile.cmake index a2f81cdb0..f3a80ee48 100644 --- a/ports/netcdf-c/portfile.cmake +++ b/ports/netcdf-c/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_from_github( hdf5.patch hdf5_2.patch fix-build-error-on-linux.patch + hdf5_3.patch ) #Remove outdated find modules @@ -52,10 +53,5 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/netcdf-c) -file( - RENAME - ${CURRENT_PACKAGES_DIR}/share/netcdf-c/COPYRIGHT - ${CURRENT_PACKAGES_DIR}/share/netcdf-c/copyright -) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/netcdf-c/usage b/ports/netcdf-c/usage new file mode 100644 index 000000000..98824b337 --- /dev/null +++ b/ports/netcdf-c/usage @@ -0,0 +1,4 @@ +The package netcdf-c provides CMake targets:
+
+ find_package(netCDF CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE netcdf)
\ No newline at end of file |
