diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2020-08-17 23:33:44 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-17 08:33:44 -0700 |
| commit | d6285bc24b2e48da2f5e057fc759aff7c2b3b0af (patch) | |
| tree | 0ae728a70e64d9758f6a918e515171f83424116b /ports/exiv2 | |
| parent | 5dd2b6736b7397e740d54ec2d748b56bd56350e9 (diff) | |
| download | vcpkg-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/exiv2')
| -rw-r--r-- | ports/exiv2/CONTROL | 8 | ||||
| -rw-r--r-- | ports/exiv2/expat.patch | 45 | ||||
| -rw-r--r-- | ports/exiv2/portfile.cmake | 26 |
3 files changed, 70 insertions, 9 deletions
diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 35af4ff70..798343c70 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,8 +1,14 @@ Source: exiv2 Version: 0.27.3 -Build-Depends: zlib, expat, libiconv, gettext +Port-Version: 1 +Build-Depends: zlib, libiconv, gettext Description: Image metadata library and tools Homepage: https://www.exiv2.org +Supports: !uwp Feature: unicode Description: Compile with unicode support on windows + +Feature: xmp +Description: Build with XMP metadata support +Build-Depends: expat diff --git a/ports/exiv2/expat.patch b/ports/exiv2/expat.patch new file mode 100644 index 000000000..a170e61dc --- /dev/null +++ b/ports/exiv2/expat.patch @@ -0,0 +1,45 @@ +diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
+index 9caffcf..deb01a0 100644
+--- a/cmake/findDependencies.cmake
++++ b/cmake/findDependencies.cmake
+@@ -33,7 +33,7 @@ if (EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP)
+ message(FATAL_ERROR "EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP are mutually exclusive. You can only choose one of them")
+ else()
+ if (EXIV2_ENABLE_XMP)
+- find_package(EXPAT REQUIRED)
++ find_package(expat CONFIG REQUIRED)
+ elseif (EXIV2_ENABLE_EXTERNAL_XMP)
+ find_package(XmpSdk REQUIRED)
+ endif ()
+diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
+index ae011dc..7390d26 100644
+--- a/xmpsdk/CMakeLists.txt
++++ b/xmpsdk/CMakeLists.txt
+@@ -26,16 +26,21 @@ add_library(exiv2-xmp STATIC
+ include/XMP_Version.h
+ )
+
+-target_link_libraries(exiv2-xmp
+- PRIVATE
+- ${EXPAT_LIBRARY}
+-)
++if(WIN32 AND NOT MINGW)
++ target_link_libraries(exiv2-xmp
++ PRIVATE
++ expat::libexpat
++ )
++else()
++ target_link_libraries(exiv2-xmp
++ PRIVATE
++ expat::expat
++ )
++endif()
+
+ target_include_directories(exiv2-xmp
+ PUBLIC
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
+- PRIVATE
+- ${EXPAT_INCLUDE_DIR}
+ )
+
+ # Prevent a denial-service-attack related to XML entity expansion
diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 966c9eff8..faab7e405 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -1,22 +1,33 @@ +#https://github.com/Exiv2/exiv2/issues/1063 +vcpkg_fail_port_install(ON_TARGET "uwp") + +if("xmp" IN_LIST FEATURES) + set(EXPAT_PATCH ${CMAKE_CURRENT_LIST_DIR}/expat.patch) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 REF 194bb65ac568a5435874c9d9d73b1c8a68e4edec #v0.27.3 SHA512 35a5a41e0a6cfe04d1ed005c8116ad4430516402b925db3d4f719e2385e2cfb09359eb7ab51853bc560138f221900778cd2e2d39f108c513b3e7d22dbb9bf503 HEAD_REF master + PATCHES ${EXPAT_PATCH} +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + unicode EXIV2_ENABLE_WIN_UNICODE + xmp EXIV2_ENABLE_XMP ) -if((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND ("unicode" IN_LIST FEATURES)) - set(enable_win_unicode TRUE) -elseif() - set(enable_win_unicode FALSE) +if("unicode" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature unicode only supports Windows platform.") endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DEXIV2_ENABLE_WIN_UNICODE:BOOL=${enable_win_unicode} + ${FEATURE_OPTIONS} -DEXIV2_BUILD_EXIV2_COMMAND:BOOL=FALSE -DEXIV2_BUILD_UNIT_TESTS:BOOL=FALSE -DEXIV2_BUILD_SAMPLES:BOOL=FALSE @@ -27,7 +38,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/exiv2) configure_file( ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - ${CURRENT_PACKAGES_DIR}/share/exiv2 + ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY ) @@ -42,5 +53,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/exiv2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/exiv2/COPYING ${CURRENT_PACKAGES_DIR}/share/exiv2/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file |
