[exiv2] update to 0.27.5 (#21941)

* [exiv2] update to 0.27.5

* update version

* update version

* update patch

* update version

* update fix-ninja-error.patch

* update version

* delete the patch

* update version

* Fix find_expat of xmp in feature

* update version

* update name

* update version

* update patch

* update version
This commit is contained in:
Frank 2021-12-14 03:55:50 +08:00 committed by GitHub
parent 1ac3a7f078
commit 4c77ec5486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 101 additions and 60 deletions

View File

@ -0,0 +1,64 @@
diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
index ec3a43f..d8637cc 100644
--- a/cmake/findDependencies.cmake
+++ b/cmake/findDependencies.cmake
@@ -42,7 +42,8 @@ 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)
+ set(EXPAT_FOUND 1)
elseif (EXIV2_ENABLE_EXTERNAL_XMP)
find_package(XmpSdk REQUIRED)
endif ()
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
index de8aa1d..524724c 100644
--- a/samples/CMakeLists.txt
+++ b/samples/CMakeLists.txt
@@ -77,11 +77,10 @@ if( EXPAT_FOUND )
target_link_libraries(geotag
PRIVATE
exiv2-xmp
- ${EXPAT_LIBRARIES}
+ expat::expat
)
target_include_directories(geotag PRIVATE ${CMAKE_BINARY_DIR}) # exv_conf.h
target_include_directories(geotag PRIVATE ${CMAKE_SOURCE_DIR}/include) # <exiv2/exiv2.hpp>
- target_include_directories(geotag PRIVATE ${EXPAT_INCLUDE_DIR})
target_include_directories(geotag PRIVATE ${CMAKE_SOURCE_DIR}/src) # To find unused.h
if (WIN32)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 26e5a95..5dc722c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -154,8 +154,7 @@ target_include_directories(exiv2lib SYSTEM PRIVATE
)
if (EXIV2_ENABLE_XMP OR EXIV2_ENABLE_EXTERNAL_XMP)
- target_include_directories(exiv2lib PRIVATE ${EXPAT_INCLUDE_DIR})
- target_link_libraries(exiv2lib PRIVATE ${EXPAT_LIBRARIES})
+ target_link_libraries(exiv2lib PRIVATE expat::expat)
if (WIN32)
target_compile_definitions(exiv2lib PRIVATE XML_STATIC)
diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
index a22698f..55102ce 100644
--- a/xmpsdk/CMakeLists.txt
+++ b/xmpsdk/CMakeLists.txt
@@ -28,13 +28,12 @@ add_library(exiv2-xmp STATIC
target_link_libraries(exiv2-xmp
PRIVATE
- $<BUILD_INTERFACE:${EXPAT_LIBRARY}>
+ $<BUILD_INTERFACE:expat::expat>
)
target_include_directories(exiv2-xmp
PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
- ${EXPAT_INCLUDE_DIR}
)
# Prevent a denial-service-attack related to XML entity expansion

View File

@ -1,42 +0,0 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c52b352..b19c438 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -149,7 +149,7 @@ set_target_properties( exiv2lib_int PROPERTIES
target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR})
target_include_directories(exiv2lib PRIVATE
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
+ ${PROJECT_SOURCE_DIR}/xmpsdk/include
${ZLIB_INCLUDE_DIR}
)
@@ -215,7 +215,7 @@ else()
endif()
if( EXIV2_ENABLE_PNG )
- target_link_libraries( exiv2lib PRIVATE $<BUILD_INTERFACE:${ZLIB_LIBRARIES}>)
+ target_link_libraries( exiv2lib PRIVATE ${ZLIB_LIBRARIES})
endif()
if( EXIV2_ENABLE_NLS )
diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
index a22698f..ca6ffe0 100644
--- a/xmpsdk/CMakeLists.txt
+++ b/xmpsdk/CMakeLists.txt
@@ -27,13 +27,12 @@ add_library(exiv2-xmp STATIC
)
target_link_libraries(exiv2-xmp
- PRIVATE
- $<BUILD_INTERFACE:${EXPAT_LIBRARY}>
+ PRIVATE ${EXPAT_LIBRARY}
)
target_include_directories(exiv2-xmp
PRIVATE
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
+ ${PROJECT_SOURCE_DIR}/xmpsdk/include
${EXPAT_INCLUDE_DIR}
)

View File

@ -4,11 +4,11 @@ vcpkg_fail_port_install(ON_TARGET "uwp")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Exiv2/exiv2
REF 15098f4ef50cc721ad0018218acab2ff06e60beb #v0.27.4
SHA512 4be0a9c4c64c65a9ca85291ba2cf54efacc5a88dae534c2d9252986df4e12212899c33093b07695369108e3763b3d74592a6153d832743694ec95c9a03c7e2c3
REF ad5484cb1eaba3ad0e49b290d244f6b1ee9ff076 #v0.27.5
SHA512 33b8c60990b05f1599860974d6fe44baba8369356acd2cab3ce4919a48bb44348ed0496ffc4581d9fd5eb8a1b36d48a0eaa3fafe4584bfd655d0a88e7a9458ef
HEAD_REF master
PATCHES
fix-ninja-error.patch
fix-find_expat.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@ -26,9 +26,10 @@ 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
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DEXIV2_BUILD_EXIV2_COMMAND=OFF
@ -49,8 +50,8 @@ vcpkg_configure_cmake(
-DEXIV2_TEAM_USE_SANITIZERS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/exiv2)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/exiv2)
vcpkg_fixup_pkgconfig()
if("nls" IN_LIST FEATURES)
@ -67,12 +68,12 @@ configure_file(
vcpkg_copy_pdbs()
# Clean
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/exiv2 ${CURRENT_PACKAGES_DIR}/lib/exiv2)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/exiv2" "${CURRENT_PACKAGES_DIR}/lib/exiv2")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,18 +1,31 @@
{
"name": "exiv2",
"version": "0.27.4",
"port-version": 2,
"version": "0.27.5",
"description": "Image metadata library and tools",
"homepage": "https://www.exiv2.org",
"supports": "!uwp",
"dependencies": [
"libiconv"
"libiconv",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"nls": {
"description": "Build native language support",
"dependencies": [
"gettext"
{
"name": "gettext",
"host": true,
"features": [
"tools"
]
}
]
},
"png": {

View File

@ -2045,8 +2045,8 @@
"port-version": 5
},
"exiv2": {
"baseline": "0.27.4",
"port-version": 2
"baseline": "0.27.5",
"port-version": 0
},
"expat": {
"baseline": "2.4.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "65e38e497c48c6e2fc463997ce9998e6af9f56b5",
"version": "0.27.5",
"port-version": 0
},
{
"git-tree": "4ce7841080b34ab8f91006430e9a40e0d9bfba96",
"version": "0.27.4",