From 04e39c5d26c063065cb87834743b07471a2263ab Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Tue, 5 Nov 2019 02:24:18 -0800 Subject: [PATCH] [netcdf-cxx4]Upgrade to 4.3.1. --- ports/netcdf-cxx4/CONTROL | 2 +- ports/netcdf-cxx4/fix-dependecy-hdf5.patch | 13 ++++++++ ports/netcdf-cxx4/install-destination.patch | 33 --------------------- ports/netcdf-cxx4/portfile.cmake | 22 +++++++------- 4 files changed, 24 insertions(+), 46 deletions(-) create mode 100644 ports/netcdf-cxx4/fix-dependecy-hdf5.patch delete mode 100644 ports/netcdf-cxx4/install-destination.patch diff --git a/ports/netcdf-cxx4/CONTROL b/ports/netcdf-cxx4/CONTROL index c207f000715..ee49b173372 100644 --- a/ports/netcdf-cxx4/CONTROL +++ b/ports/netcdf-cxx4/CONTROL @@ -1,5 +1,5 @@ Source: netcdf-cxx4 -Version: 4.3.0-5 +Version: 4.3.1 Build-Depends: 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 00000000000..2e8fa423cc3 --- /dev/null +++ b/ports/netcdf-cxx4/fix-dependecy-hdf5.patch @@ -0,0 +1,13 @@ +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/ports/netcdf-cxx4/install-destination.patch b/ports/netcdf-cxx4/install-destination.patch deleted file mode 100644 index 7ff4e08c7f6..00000000000 --- 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 0b361cdf178..d90ea7131ab 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)