aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Christoffer Hansen <dchansen@users.noreply.github.com>2019-05-23 21:33:45 +0200
committerGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-05-23 12:33:44 -0700
commit9c54cc9fab9d1725784118143eac2bb86fb4a47e (patch)
tree67b79dd9a99697fe10e88e170801ef18596399ce
parent25d80a74d67fac97226ecf2a7edea644bdebd97a (diff)
downloadvcpkg-9c54cc9fab9d1725784118143eac2bb86fb4a47e.tar.gz
vcpkg-9c54cc9fab9d1725784118143eac2bb86fb4a47e.zip
Updated ISMRMRD to 1.4. Removed patch for HDF5 dependency as that should not be optional on platforms with HDF5 available (#6111)
-rw-r--r--ports/ismrmrd/CONTROL8
-rw-r--r--ports/ismrmrd/optional_hdf5_dependency.patch77
-rw-r--r--ports/ismrmrd/portfile.cmake134
-rw-r--r--ports/ismrmrd/x86-windows-include-stddef.patch14
4 files changed, 94 insertions, 139 deletions
diff --git a/ports/ismrmrd/CONTROL b/ports/ismrmrd/CONTROL
index 395a5d331..3725293f7 100644
--- a/ports/ismrmrd/CONTROL
+++ b/ports/ismrmrd/CONTROL
@@ -1,8 +1,4 @@
Source: ismrmrd
-Version: 1.3.2-4
+Version: 1.4
Description: ISMRM Raw Data Format
-Build-Depends: pugixml
-
-Feature: dataset
-Description: Dataset and file support
-Build-Depends: hdf5
+Build-Depends: pugixml, hdf5
diff --git a/ports/ismrmrd/optional_hdf5_dependency.patch b/ports/ismrmrd/optional_hdf5_dependency.patch
deleted file mode 100644
index 7c4772ed5..000000000
--- a/ports/ismrmrd/optional_hdf5_dependency.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 456d4f4..3c235f2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -7,6 +7,7 @@ set (ISMRMRD_CMAKE_DIR ${PROJECT_SOURCE_DIR}/cmake CACHE PATH
-
- # command line options
- option(USE_SYSTEM_PUGIXML "Use pugixml installed on the system" OFF)
-+option(USE_HDF5_DATASET_SUPPORT "Use HDF5 library for dataset support" OFF)
-
- # and include it to the search list
- list(APPEND CMAKE_MODULE_PATH ${ISMRMRD_CMAKE_DIR})
-@@ -91,18 +92,23 @@ endif()
- set(ISMRMRD_VERSION_STRING ${ISMRMRD_VERSION_MAJOR}.${ISMRMRD_VERSION_MINOR}.${ISMRMRD_VERSION_PATCH})
- set(ISMRMRD_SOVERSION ${ISMRMRD_VERSION_MAJOR}.${ISMRMRD_VERSION_MINOR})
-
--# Find HDF5 for dataset support
--find_package(HDF5 1.8 COMPONENTS C)
--
--if (HDF5_FOUND)
-- set (ISMRMRD_DATASET_SUPPORT true)
-- set (ISMRMRD_DATASET_SOURCES libsrc/dataset.c libsrc/dataset.cpp)
-- set (ISMRMRD_DATASET_INCLUDE_DIR ${HDF5_C_INCLUDE_DIR})
-- set (ISMRMRD_DATASET_LIBRARIES ${HDF5_LIBRARIES})
--else (HDF5_FOUND)
-+if (USE_HDF5_DATASET_SUPPORT)
-+ # Find HDF5 for dataset support
-+ find_package(HDF5 1.8 COMPONENTS C)
-+
-+ if (HDF5_FOUND)
-+ set (ISMRMRD_DATASET_SUPPORT true)
-+ set (ISMRMRD_DATASET_SOURCES libsrc/dataset.c libsrc/dataset.cpp)
-+ set (ISMRMRD_DATASET_INCLUDE_DIR ${HDF5_C_INCLUDE_DIR})
-+ set (ISMRMRD_DATASET_LIBRARIES ${HDF5_LIBRARIES})
-+ elseif (USE_HDF5_DATASET_SUPPORT)
-+ set (ISMRMRD_DATASET_SUPPORT false)
-+ # Dataset and file support was explicitly requested, force failure rather than succeed without support.
-+ message (FATAL_ERROR "HDF5 not found. Dataset and file support unavailable!")
-+ endif (HDF5_FOUND)
-+else (USE_HDF5_DATASET_SUPPORT)
- set (ISMRMRD_DATASET_SUPPORT false)
-- message (WARNING "HDF5 not found. Dataset and file support unavailable!")
--endif (HDF5_FOUND)
-+endif (USE_HDF5_DATASET_SUPPORT)
-
- # Generate the version.h header file
- find_package(Git)
-@@ -127,7 +133,7 @@ install(FILES ${CMAKE_BINARY_DIR}/include/ismrmrd/version.h DESTINATION include/
-
- # --- Main Library (begin) ----
- # in windows, install the HDF5 dependencies
--if (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
-+if (USE_HDF5_DATASET_SUPPORT AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
- if(DEFINED ENV{HDF5_ROOT})
- set(HDF5_BIN_DIR $ENV{HDF5_ROOT}/bin)
- else (DEFINED ENV{HDF5_ROOT})
-@@ -135,7 +141,7 @@ if (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
- endif (DEFINED ENV{HDF5_ROOT})
- message("Install hdf5 libraries from ${HDF5_BIN_DIR} ")
- install( DIRECTORY ${HDF5_BIN_DIR} DESTINATION bin/.. FILES_MATCHING PATTERN "*.dll" )
--endif (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
-+endif (USE_HDF5_DATASET_SUPPORT AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
-
- # include directories for main library
- set(ISMRMRD_TARGET_INCLUDE_DIRS
-@@ -199,9 +205,9 @@ install(FILES cmake/FindIsmrmrd.cmake cmake/FindFFTW3.cmake DESTINATION share/is
- add_subdirectory(doc)
-
- add_subdirectory(utilities)
--if (HDF5_FOUND)
-+if (USE_HDF5_DATASET_SUPPORT)
- add_subdirectory(examples/c)
--endif (HDF5_FOUND)
-+endif (USE_HDF5_DATASET_SUPPORT)
-
- # TODO: make this work on Windows
- if (NOT WIN32)
diff --git a/ports/ismrmrd/portfile.cmake b/ports/ismrmrd/portfile.cmake
index af4b05f7d..2422752ea 100644
--- a/ports/ismrmrd/portfile.cmake
+++ b/ports/ismrmrd/portfile.cmake
@@ -1,56 +1,78 @@
-include(vcpkg_common_functions)
-
-vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
-
-vcpkg_from_github(
- OUT_SOURCE_PATH SOURCE_PATH
- REPO ismrmrd/ismrmrd
- REF v1.3.2
- SHA512 eb806f71c4b183105b3270d658a68195e009c0f7ca37f54f76d650a4d5c83c44d26b5f12a4c47c608aae9990cd04f1204b0c57e6438ca34a271fd54880133106
- HEAD_REF master
- PATCHES
- # Makes optional hdf5 dependency explicit
- optional_hdf5_dependency.patch
-)
-
-if ("dataset" IN_LIST FEATURES)
- set(ENABLE_DATASET ON)
-else()
- set(ENABLE_DATASET OFF)
-endif()
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
- OPTIONS
- -DUSE_SYSTEM_PUGIXML=ON
- -DUSE_HDF5_DATASET_SUPPORT=${ENABLE_DATASET}
-)
-
-vcpkg_install_cmake()
-vcpkg_copy_pdbs()
-
-vcpkg_fixup_cmake_targets(CONFIG_PATH share/ismrmrd/cmake)
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-
-if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll)
- file(COPY ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll)
-endif()
-
-if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll)
- file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll)
-endif()
-
-file(COPY ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/ismrmrd)
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info.exe)
-
-file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/ismrmrd/LICENSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/copyright)
-
-vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd)
+include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
+
+if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
+ set(WIN32_INCLUDE_STDDEF "x86-windows-include-stddef.patch")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ismrmrd/ismrmrd
+ REF 0d05ad0cf0b09adb975566ff6a817a01d69f4325
+ SHA512 7127658c3339ca3022a61093fb037aa02ac0cec4885e03657935dc41bc7266e74b437108cd0a9455c91bc74bdbb6e3a182752effca3564a36d3ddc29d3972496
+ HEAD_REF master
+ PATCHES
+ ${WIN32_INCLUDE_STDDEF}
+)
+
+
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DUSE_SYSTEM_PUGIXML=ON
+ -DUSE_HDF5_DATASET_SUPPORT=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/ismrmrd/cmake)
+
+if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll)
+ file(COPY ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll)
+endif()
+
+if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll)
+ file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll)
+endif()
+
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/FindFFTW3.cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/FindFFTW3.cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/FindFFTW3.cmake)
+
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/ismrmrd/cmake)
+
+set(ISMRMRD_CMAKE_DIRS ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
+foreach(ISMRMRD_CMAKE_DIR IN LISTS ISMRMRD_CMAKE_DIRS)
+if (EXISTS ${ISMRMRD_CMAKE_DIR})
+ file(GLOB ISMRMRD_CMAKE_FILES "${ISMRMRD_CMAKE_DIR}/ISMRMRD/ISMRMRD*.cmake")
+ foreach(ICF ${ISMRMRD_CMAKE_FILES})
+ file(COPY ${ICF} DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd/cmake/)
+ endforeach()
+endif()
+endforeach()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${ISMRMRD_CMAKE_DIRS})
+
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info.exe)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_c_example.exe)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_c_example.exe)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_read_timing_test.exe)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_read_timing_test.exe)
+
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/ismrmrd/LICENSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/copyright)
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd)
diff --git a/ports/ismrmrd/x86-windows-include-stddef.patch b/ports/ismrmrd/x86-windows-include-stddef.patch
new file mode 100644
index 000000000..3855f86d5
--- /dev/null
+++ b/ports/ismrmrd/x86-windows-include-stddef.patch
@@ -0,0 +1,14 @@
+diff --git a/include/ismrmrd/ismrmrd.h b/include/ismrmrd/ismrmrd.h
+index 40614eb..e5e3e25 100644
+--- a/include/ismrmrd/ismrmrd.h
++++ b/include/ismrmrd/ismrmrd.h
+@@ -30,6 +30,9 @@ typedef unsigned __int32 uint32_t;
+ typedef __int64 int64_t;
+ typedef unsigned __int64 uint64_t;
+ #endif
++#if _WIN32
++#include <stddef.h> /* for size_t */
++#endif
+ #else /* non MS C or C++ compiler */
+ #include <stdint.h>
+ #include <stddef.h> /* for size_t */