aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/netcdf-c/CONTROL1
-rw-r--r--ports/netcdf-c/fix-linkage-error.patch19
-rw-r--r--ports/netcdf-c/portfile.cmake1
3 files changed, 21 insertions, 0 deletions
diff --git a/ports/netcdf-c/CONTROL b/ports/netcdf-c/CONTROL
index 9ea0d125e..3f164781c 100644
--- a/ports/netcdf-c/CONTROL
+++ b/ports/netcdf-c/CONTROL
@@ -1,5 +1,6 @@
Source: netcdf-c
Version: 4.7.4
+Port-Version: 1
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/fix-linkage-error.patch b/ports/netcdf-c/fix-linkage-error.patch
new file mode 100644
index 000000000..e71c30fde
--- /dev/null
+++ b/ports/netcdf-c/fix-linkage-error.patch
@@ -0,0 +1,19 @@
+diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt
+index 8aeeab7..5b578f7 100644
+--- a/liblib/CMakeLists.txt
++++ b/liblib/CMakeLists.txt
+@@ -70,8 +70,14 @@ ENDIF()
+ IF(USE_HDF5 OR USE_NETCDF4)
+ if(TARGET hdf5::hdf5-shared)
+ SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-shared hdf5::hdf5_hl-shared)
++ if(USE_PARALLEL)
++ list(APPEND TLL_LIBS ${MPI_C_LIBRARIES})
++ endif()
+ else()
+ SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-static hdf5::hdf5_hl-static)
++ if(USE_PARALLEL)
++ list(APPEND TLL_LIBS ${MPI_C_LIBRARIES})
++ endif()
+ endif()
+ ENDIF()
+
diff --git a/ports/netcdf-c/portfile.cmake b/ports/netcdf-c/portfile.cmake
index 167150530..bef7d9893 100644
--- a/ports/netcdf-c/portfile.cmake
+++ b/ports/netcdf-c/portfile.cmake
@@ -9,6 +9,7 @@ vcpkg_from_github(
config-pkg-location.patch
use_targets.patch
fix-dependency-libmath.patch
+ fix-linkage-error.patch
)
#Remove outdated find modules