diff options
| author | JackBoosY <47264268+JackBoosY@users.noreply.github.com> | 2019-05-10 14:03:59 +0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-05-09 23:03:59 -0700 |
| commit | ddec7174c17c927074c903a63f638808ad19ea07 (patch) | |
| tree | fa6497de0429d796354a39e259d4543a39862f15 | |
| parent | 0022e0b0ac96d1ebe514a757b670e09b0a148dc8 (diff) | |
| download | vcpkg-ddec7174c17c927074c903a63f638808ad19ea07.tar.gz vcpkg-ddec7174c17c927074c903a63f638808ad19ea07.zip | |
[gdcm]Update to v3.0.0 and rename to gdcm. (#6348)
* [gdcm]Update to v3.0.0 and rename to gdcm.
* [gdcm2]Add empty port "gdcm2" mapping to port gdcm
| -rw-r--r-- | ports/gdcm/CONTROL | 4 | ||||
| -rw-r--r-- | ports/gdcm/find-openjpeg.patch (renamed from ports/gdcm2/find-openjpeg.patch) | 0 | ||||
| -rw-r--r-- | ports/gdcm/fix-share-path.patch | 32 | ||||
| -rw-r--r-- | ports/gdcm/portfile.cmake | 49 | ||||
| -rw-r--r-- | ports/gdcm2/CONTROL | 6 | ||||
| -rw-r--r-- | ports/gdcm2/portfile.cmake | 47 | ||||
| -rw-r--r-- | ports/opencv/CONTROL | 2 | ||||
| -rw-r--r-- | ports/vtk-dicom/CONTROL | 2 |
8 files changed, 91 insertions, 51 deletions
diff --git a/ports/gdcm/CONTROL b/ports/gdcm/CONTROL new file mode 100644 index 000000000..127a89c67 --- /dev/null +++ b/ports/gdcm/CONTROL @@ -0,0 +1,4 @@ +Source: gdcm +Version: 3.0.0 +Description: Grassroots DICOM library +Build-Depends: zlib, expat, openjpeg diff --git a/ports/gdcm2/find-openjpeg.patch b/ports/gdcm/find-openjpeg.patch index c3fff18f5..c3fff18f5 100644 --- a/ports/gdcm2/find-openjpeg.patch +++ b/ports/gdcm/find-openjpeg.patch diff --git a/ports/gdcm/fix-share-path.patch b/ports/gdcm/fix-share-path.patch new file mode 100644 index 000000000..931094681 --- /dev/null +++ b/ports/gdcm/fix-share-path.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6ac16ab..842d833 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -246,15 +246,15 @@ if(NOT GDCM_INSTALL_LIB_DIR)
+ endif()
+
+ if(NOT GDCM_INSTALL_DATA_DIR)
+- set(GDCM_INSTALL_DATA_DIR "share/${subdir}")
++ set(GDCM_INSTALL_DATA_DIR "share/${projectname}")
+ endif()
+
+ if(NOT GDCM_INSTALL_INCLUDE_DIR)
+- set(GDCM_INSTALL_INCLUDE_DIR "include/${subdir}")
++ set(GDCM_INSTALL_INCLUDE_DIR "include/${projectname}")
+ endif()
+
+ if(NOT GDCM_INSTALL_DOC_DIR)
+- set(GDCM_INSTALL_DOC_DIR "share/doc/${subdir}")
++ set(GDCM_INSTALL_DOC_DIR "share/doc/${projectname}")
+ endif()
+
+ if(NOT GDCM_INSTALL_MAN_DIR)
+@@ -262,7 +262,7 @@ if(NOT GDCM_INSTALL_MAN_DIR)
+ endif()
+
+ if(NOT GDCM_INSTALL_PACKAGE_DIR)
+- set(GDCM_INSTALL_PACKAGE_DIR ${GDCM_INSTALL_LIB_DIR}/${subdir}
++ set(GDCM_INSTALL_PACKAGE_DIR ${GDCM_INSTALL_LIB_DIR}/${projectname}
+ CACHE INTERNAL "")
+ endif()
+
diff --git a/ports/gdcm/portfile.cmake b/ports/gdcm/portfile.cmake new file mode 100644 index 000000000..80b0ab6d8 --- /dev/null +++ b/ports/gdcm/portfile.cmake @@ -0,0 +1,49 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO malaterre/GDCM + REF v3.0.0 + SHA512 2ac076dd49011234f4431ffe67fcba84a1ca9042ec5fc4dfc8aed2ed16bec5f499fa7aa666e5630796afc266ce76741d931cca333534b55fdc477e25a9189d33 + HEAD_REF master + PATCHES + find-openjpeg.patch + fix-share-path.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(GDCM_BUILD_SHARED_LIBS ON) +else() + set(GDCM_BUILD_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF + -DGDCM_BUILD_SHARED_LIBS=${GDCM_BUILD_SHARED_LIBS} + -DGDCM_INSTALL_INCLUDE_DIR=include + -DGDCM_USE_SYSTEM_EXPAT=ON + -DGDCM_USE_SYSTEM_ZLIB=ON + -DGDCM_USE_SYSTEM_OPENJPEG=ON + -DGDCM_BUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/gdcm TARGET_PATH share/gdcm) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${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(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gdcm RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL index baabd1df1..88d473b65 100644 --- a/ports/gdcm2/CONTROL +++ b/ports/gdcm2/CONTROL @@ -1,4 +1,4 @@ Source: gdcm2 -Version: 2.8.9 -Description: Grassroots DICOM library -Build-Depends: zlib, expat, openjpeg +Version: deprecated +Description: This port was renamed to gdcm. The gdcm2 name is deprecated. +Build-Depends: gdcm
\ No newline at end of file diff --git a/ports/gdcm2/portfile.cmake b/ports/gdcm2/portfile.cmake index bc44a0a97..0015715fb 100644 --- a/ports/gdcm2/portfile.cmake +++ b/ports/gdcm2/portfile.cmake @@ -1,46 +1 @@ -include(vcpkg_common_functions) -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO malaterre/GDCM - REF v2.8.9 - SHA512 3c80503de6df8fe2589849ae9334d11e3cb033701450e1d7ea2781d122d1c8c1fc205fefc358d0ad1b9c5199c838e1c7c1bb34949da1c73cc8ae174b72e7e70c - HEAD_REF master - PATCHES find-openjpeg.patch -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(GDCM_BUILD_SHARED_LIBS ON) -else() - set(GDCM_BUILD_SHARED_LIBS OFF) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF - -DGDCM_BUILD_SHARED_LIBS=${GDCM_BUILD_SHARED_LIBS} - -DGDCM_INSTALL_INCLUDE_DIR=include - -DGDCM_USE_SYSTEM_EXPAT=ON - -DGDCM_USE_SYSTEM_ZLIB=ON - -DGDCM_USE_SYSTEM_OPENJPEG=ON - -DGDCM_BUILD_TESTING=OFF -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/gdcm-2.8 TARGET_PATH share/gdcm) - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${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(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gdcm2 RENAME copyright) - -vcpkg_copy_pdbs() +set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
\ No newline at end of file diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 88ade6e28..6106a274e 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -50,7 +50,7 @@ Build-Depends: vtk Description: vtk support for opencv Feature: gdcm -Build-Depends: gdcm2 +Build-Depends: gdcm Description: GDCM support for opencv Feature: webp diff --git a/ports/vtk-dicom/CONTROL b/ports/vtk-dicom/CONTROL index fdd8e04d3..9abef4ca1 100644 --- a/ports/vtk-dicom/CONTROL +++ b/ports/vtk-dicom/CONTROL @@ -5,4 +5,4 @@ Build-Depends: vtk, zlib Feature: gdcm
Description: Use gdcm for decompressing DICOM files.
-Build-Depends: gdcm2
+Build-Depends: gdcm
|
