aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2020-11-12 07:19:56 +0800
committerGitHub <noreply@github.com>2020-11-11 15:19:56 -0800
commit0abdaf5c9d2f8ce40a10cde1955df4c2d4f4060f (patch)
treeabab1eb7191b648ad1a646a55f3482730f0b0450
parent53b9f6eb5c7b0b0b081c9a29d6ebb880ab0b228d (diff)
downloadvcpkg-0abdaf5c9d2f8ce40a10cde1955df4c2d4f4060f.tar.gz
vcpkg-0abdaf5c9d2f8ce40a10cde1955df4c2d4f4060f.zip
[netcdf-c] Fix linkage error (#14421)
-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