aboutsummaryrefslogtreecommitdiff
path: root/ports/gdcm
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2020-08-17 23:33:44 +0800
committerGitHub <noreply@github.com>2020-08-17 08:33:44 -0700
commitd6285bc24b2e48da2f5e057fc759aff7c2b3b0af (patch)
tree0ae728a70e64d9758f6a918e515171f83424116b /ports/gdcm
parent5dd2b6736b7397e740d54ec2d748b56bd56350e9 (diff)
downloadvcpkg-d6285bc24b2e48da2f5e057fc759aff7c2b3b0af.tar.gz
vcpkg-d6285bc24b2e48da2f5e057fc759aff7c2b3b0af.zip
[expat] Update the version to 2.2.9 (add support for uwp) (#9146)
* [expat] Update the version to 2.2.9(support uwp) * [readosm] Fix expat.lib cannot be found * Remove expat:arm-uwp and expat:x64-uwp from fail list in ci.baseline.txt * [apr-util,io2d,skia] Fix expat cannot be found and also update expat * [many ports] Add supports and fix the regressions * Fix new regressions * Fix typo * [io2d] Update expat patch * [io2d,libkml,skia] Fix expat cannot find and also fix typo * [expat] Remove usage * [libkml,vtk] Update expat patch and fix static build * [wxwidgets] Fix static build caused by expat cannot found * Update as review suggestion * Add Port-Version * Remove evpp:x64-osx=fail from ci.baseline.txt * [wxwidgest] Remove unnecessary spaces * [itk] Fix expat cannot be found * fix cmake test port * [wxwidgets] Update Port-Version Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Diffstat (limited to 'ports/gdcm')
-rw-r--r--ports/gdcm/CONTROL2
-rw-r--r--ports/gdcm/portfile.cmake15
-rw-r--r--ports/gdcm/use-expat-config.patch13
3 files changed, 24 insertions, 6 deletions
diff --git a/ports/gdcm/CONTROL b/ports/gdcm/CONTROL
index 85f634cd6..e6d6b052d 100644
--- a/ports/gdcm/CONTROL
+++ b/ports/gdcm/CONTROL
@@ -1,5 +1,7 @@
Source: gdcm
Version: 3.0.5
+Port-Version: 1
Homepage: https://github.com/malaterre/GDCM
Description: Grassroots DICOM library
Build-Depends: zlib, expat, openjpeg
+Supports: !uwp \ No newline at end of file
diff --git a/ports/gdcm/portfile.cmake b/ports/gdcm/portfile.cmake
index 5626e812b..e9afedd3c 100644
--- a/ports/gdcm/portfile.cmake
+++ b/ports/gdcm/portfile.cmake
@@ -1,3 +1,5 @@
+vcpkg_fail_port_install(ON_TARGET "uwp")
+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
@@ -10,6 +12,7 @@ vcpkg_from_github(
use-openjpeg-config.patch
fix-share-path.patch
Fix-Cmake_DIR.patch
+ use-expat-config.patch
)
file(REMOVE ${SOURCE_PATH}/CMake/FindOpenJPEG.cmake)
@@ -42,14 +45,14 @@ file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/share
)
-file(READ ${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake GDCM_TARGETS)
-string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)"
- "set(CMAKE_IMPORT_FILE_VERSION 1)
-find_package(OpenJPEG QUIET)" GDCM_TARGETS "${GDCM_TARGETS}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake "${GDCM_TARGETS}")
+vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake
+ "set(CMAKE_IMPORT_FILE_VERSION 1)"
+ "set(CMAKE_IMPORT_FILE_VERSION 1)
+ find_package(OpenJPEG QUIET)"
+)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
-file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file
diff --git a/ports/gdcm/use-expat-config.patch b/ports/gdcm/use-expat-config.patch
new file mode 100644
index 000000000..94a54e6c7
--- /dev/null
+++ b/ports/gdcm/use-expat-config.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 32786db..4215d25 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -426,7 +426,7 @@ endif()
+
+ if(GDCM_USE_SYSTEM_EXPAT)
+ # If user say so, then this is a requirement !
+- find_package(EXPAT REQUIRED)
++ find_package(expat CONFIG REQUIRED)
+ set(GDCM_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
+ else()
+ set(GDCM_EXPAT_LIBRARIES "gdcmexpat")