aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2019-11-22 09:08:04 -0800
committerGitHub <noreply@github.com>2019-11-22 09:08:04 -0800
commit436d8a4b3bd821d8b2fc6af2fb7a8211a2d46243 (patch)
tree2a23dceeb6c9073e47063f74d94a5dff65d2b6a5
parent2846c89c0c3604fcae57ce386b47ef09d6870dae (diff)
parent41d5d78a3c0897136e82220c3e906bde5801c754 (diff)
downloadvcpkg-436d8a4b3bd821d8b2fc6af2fb7a8211a2d46243.tar.gz
vcpkg-436d8a4b3bd821d8b2fc6af2fb7a8211a2d46243.zip
Merge pull request #8978 from JackBoosY/dev/jack/upgrade_netcdf-cxx4_4.3.1
[netcdf-cxx4] Update to 4.3.1
-rw-r--r--ports/netcdf-cxx4/CONTROL4
-rw-r--r--ports/netcdf-cxx4/fix-dependecy-hdf5.patch32
-rw-r--r--ports/netcdf-cxx4/install-destination.patch33
-rw-r--r--ports/netcdf-cxx4/portfile.cmake22
4 files changed, 44 insertions, 47 deletions
diff --git a/ports/netcdf-cxx4/CONTROL b/ports/netcdf-cxx4/CONTROL
index c207f0007..baf0147c6 100644
--- a/ports/netcdf-cxx4/CONTROL
+++ b/ports/netcdf-cxx4/CONTROL
@@ -1,5 +1,5 @@
Source: netcdf-cxx4
-Version: 4.3.0-5
-Build-Depends: netcdf-c
+Version: 4.3.1
+Build-Depends: hdf5, netcdf-c
Homepage: https://github.com/Unidata/netcdf-cxx4
Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.
diff --git a/ports/netcdf-cxx4/fix-dependecy-hdf5.patch b/ports/netcdf-cxx4/fix-dependecy-hdf5.patch
new file mode 100644
index 000000000..5d289ec2e
--- /dev/null
+++ b/ports/netcdf-cxx4/fix-dependecy-hdf5.patch
@@ -0,0 +1,32 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 60c699d..6bd7822 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -402,7 +402,7 @@ ELSE(MSVC)
+ FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
+ ENDIF(MSVC)
+
+-CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5free_memory "" HAVE_H5FREE_MEMORY)
++set(HAVE_H5FREE_MEMORY ON)
+ IF(NOT HAVE_H5FREE_MEMORY)
+ MESSAGE(STATUS "Plugin support requires libhdf5 with H5Free support. Your libhdf5 install does not provide H5Free. Please install a newer version of libhdf5 if you require plugin compression support.")
+ SET(NC_HAS_DEF_VAR_FILTER "")
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6a48709..79de128 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -399,7 +399,13 @@ IF(MSVC)
+ SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME})
+ FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL NO_MODULES REQUIRED ${NC_HDF5_LINK_TYPE})
+ ELSE(MSVC)
+- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
++ FIND_PACKAGE(hdf5 CONFIG REQUIRED)
++ set(HDF5_FOUND ${hdf5_FOUND})
++ if (BUILD_SHARED_LIBS)
++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared hdf5::hdf5_hl-shared)
++ else()
++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static hdf5::hdf5_hl-static)
++ endif()
+ ENDIF(MSVC)
+
+ set(HAVE_H5FREE_MEMORY ON)
diff --git a/ports/netcdf-cxx4/install-destination.patch b/ports/netcdf-cxx4/install-destination.patch
deleted file mode 100644
index 7ff4e08c7..000000000
--- a/ports/netcdf-cxx4/install-destination.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6673282..d6c7a78 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -522,10 +522,14 @@ write_basic_package_version_file(
- COMPATIBILITY SameMajorVersion
- )
-
-+if(NOT DEFINED CMAKE_INSTALL_CMAKECONFIGDIR)
-+ set(CMAKE_INSTALL_CMAKECONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/netCDFCxx)
-+endif()
-+
- install(
- FILES
- "${CMAKE_CURRENT_BINARY_DIR}/netCDF/netCDFCxxConfigVersion.cmake"
-- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/netCDFCxx
-+ DESTINATION ${CMAKE_INSTALL_CMAKECONFIGDIR}
- COMPONENT headers
- )
-
-diff --git a/cxx4/CMakeLists.txt b/cxx4/CMakeLists.txt
-index 431eb45..0423594 100644
---- a/cxx4/CMakeLists.txt
-+++ b/cxx4/CMakeLists.txt
-@@ -43,5 +43,7 @@ INSTALL(
- )
- INSTALL(
- TARGETS netcdf-cxx4
-- DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- )
diff --git a/ports/netcdf-cxx4/portfile.cmake b/ports/netcdf-cxx4/portfile.cmake
index 0b361cdf1..d90ea7131 100644
--- a/ports/netcdf-cxx4/portfile.cmake
+++ b/ports/netcdf-cxx4/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
set(HDF5_USE_STATIC_LIBRARIES ON)
@@ -7,11 +5,10 @@ set(HDF5_USE_STATIC_LIBRARIES ON)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Unidata/netcdf-cxx4
- REF v4.3.0
- SHA512 8e77333c979513721209e6b3fde31c298e18a45d7ea08123056e8120469eb8c4024d71289fab2b9182ee19ee7b6ad22bd133525bef048a497ede4aa2e9017465
+ REF f8882188267488ef801691e69ad072e3eb217ad8 # v4.3.1
+ SHA512 9816acf221d196e21af19d4c3d85484934916e7c018e9b2c96aab9f5660b2f08c5db9cd8254ba3fa5f0aa5f5c5ad7bd3a3aaba559e5e640c5349d44e07a20ed3
HEAD_REF master
- PATCHES
- install-destination.patch
+ PATCHES fix-dependecy-hdf5.patch
)
vcpkg_configure_cmake(
@@ -26,14 +23,15 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/netCDFCxx TARGET_PATH share/netCDFCxx)
+vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/netcdf-cxx4)
-file(
- RENAME
- ${CURRENT_PACKAGES_DIR}/share/netcdf-cxx4/COPYRIGHT
- ${CURRENT_PACKAGES_DIR}/share/netcdf-cxx4/copyright
-)
+file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)