diff --git a/ports/exiv2/dependencies.diff b/ports/exiv2/dependencies.diff index 3e850d625a..de9e5939da 100644 --- a/ports/exiv2/dependencies.diff +++ b/ports/exiv2/dependencies.diff @@ -7,7 +7,7 @@ index 09b46df..85badd2 100644 if(@EXIV2_ENABLE_BMFF@ AND @EXIV2_ENABLE_BROTLI@) # if(EXIV2_ENABLE_BMFF AND EXIV2_ENABLE_BROTLI) - find_package(Brotli QUIET) -+ find_package(unofficial-brotli QUIET) ++ find_dependency(Brotli NAMES unofficial-brotli) if (NOT Brotli_FOUND) message(FATAL_ERROR "Static builds of exiv2 require Brotli. " @@ -16,7 +16,7 @@ index 09b46df..85badd2 100644 if(@EXIV2_ENABLE_XMP@) # if(EXIV2_ENABLE_XMP) - find_dependency(EXPAT REQUIRED) -+ find_dependency(expat CONFIG REQUIRED) ++ find_dependency(EXPAT NAMES expat) elseif(@EXIV2_ENABLE_EXTERNAL_XMP@) # elseif(EXIV2_ENABLE_EXTERNAL_XMP) find_dependency(XmpSdk REQUIRED) endif() @@ -25,7 +25,7 @@ index 09b46df..85badd2 100644 if(@EXIV2_ENABLE_INIH@) # if(EXIV2_ENABLE_INIH) - find_package(inih QUIET) -+ find_package(unofficial-inih QUIET) ++ find_dependency(inih NAMES unofficial-inih) if (NOT inih_FOUND) message(FATAL_ERROR "Static builds of exiv2 require inih. " diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index eaf75768c4..00895237be 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -10,10 +10,10 @@ vcpkg_from_github( vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES - xmp EXIV2_ENABLE_XMP - png EXIV2_ENABLE_PNG - nls EXIV2_ENABLE_NLS bmff EXIV2_ENABLE_BMFF + nls EXIV2_ENABLE_NLS + png EXIV2_ENABLE_PNG + xmp EXIV2_ENABLE_XMP ) if(VCPKG_TARGET_IS_UWP) list(APPEND FEATURE_OPTIONS -DEXIV2_ENABLE_FILESYSTEM_ACCESS=OFF) @@ -45,9 +45,22 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/exiv2) -vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/exiv2) + +if(VCPKG_TARGET_IS_OSX AND "nls" IN_LIST FEATURES) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/exiv2.pc" " -lintl" " -lintl -framework CoreFoundation") + if(NOT VCPKG_BUILD_TYPE) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/exiv2.pc" " -lintl" " -lintl -framework CoreFoundation") + endif() +endif() +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/exiv2.pc" "Libs.private: " "Libs.private: -lpsapi ") + if(NOT VCPKG_BUILD_TYPE) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/exiv2.pc" "Libs.private: " "Libs.private: -lpsapi ") + endif() +endif() +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" diff --git a/ports/exiv2/vcpkg.json b/ports/exiv2/vcpkg.json index cedaea0cbf..ba1695f90f 100644 --- a/ports/exiv2/vcpkg.json +++ b/ports/exiv2/vcpkg.json @@ -1,12 +1,19 @@ { "name": "exiv2", "version": "0.28.7", + "port-version": 1, "description": "Image metadata library and tools", "homepage": "https://exiv2.org", "license": "GPL-2.0-or-later", "supports": "!xbox", "dependencies": [ - "inih", + { + "name": "inih", + "default-features": false, + "features": [ + "cpp" + ] + }, { "name": "libiconv", "platform": "!windows" @@ -46,9 +53,6 @@ "zlib" ] }, - "video": { - "description": "Deprecated. it will be removed in the future." - }, "xmp": { "description": "Build with XMP metadata support", "dependencies": [ diff --git a/scripts/test_ports/vcpkg-ci-exiv2/portfile.cmake b/scripts/test_ports/vcpkg-ci-exiv2/portfile.cmake new file mode 100644 index 0000000000..d40bca19a8 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-exiv2/portfile.cmake @@ -0,0 +1,19 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Exiv2/exiv2 + REF v0.28.7 + SHA512 b53f4989abcd5d346f2a9c726a06707c47e1990ecb2e5e193c963e01d452fefe4dddd14e25eb08ef35e2f8288b8ec4bdee60725aa7dcd6b1c0348ed56c803fc0 + HEAD_REF master +) + +vcpkg_find_acquire_program(PKGCONFIG) + +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" + OPTIONS + "-DSOURCE_PATH=${SOURCE_PATH}" + "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" +) +vcpkg_cmake_build() diff --git a/scripts/test_ports/vcpkg-ci-exiv2/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-exiv2/project/CMakeLists.txt new file mode 100644 index 0000000000..f02d2f2efc --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-exiv2/project/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.10) +project(exiv2-test CXX) + +set(CMAKE_CXX_STANDARD 11) + +block() + find_package(exiv2 CONFIG REQUIRED) + + add_executable(main "${SOURCE_PATH}/samples/exifdata.cpp") + target_link_libraries(main PRIVATE Exiv2::exiv2lib) +endblock() + +block() + find_package(PkgConfig REQUIRED) + pkg_check_modules(exiv2 exiv2 REQUIRED IMPORTED_TARGET) + + add_executable(main-pkgconfig "${SOURCE_PATH}/samples/exifdata.cpp") + target_link_libraries(main-pkgconfig PRIVATE PkgConfig::exiv2) +endblock() diff --git a/scripts/test_ports/vcpkg-ci-exiv2/vcpkg.json b/scripts/test_ports/vcpkg-ci-exiv2/vcpkg.json new file mode 100644 index 0000000000..7d1e244195 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-exiv2/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "vcpkg-ci-exiv2", + "version-string": "ci", + "description": "Port to validate exiv2 within CI", + "homepage": "https://github.com/microsoft/vcpkg", + "license": "MIT", + "dependencies": [ + { + "name": "exiv2", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + "all" + ], + "features": { + "all": { + "description": "Test all features", + "dependencies": [ + { + "name": "exiv2", + "features": [ + "bmff", + "nls", + "png", + "xmp" + ] + } + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index d94b73ccbf..2b6a239689 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2774,7 +2774,7 @@ }, "exiv2": { "baseline": "0.28.7", - "port-version": 0 + "port-version": 1 }, "expat": { "baseline": "2.7.3", diff --git a/versions/e-/exiv2.json b/versions/e-/exiv2.json index d217b59ff8..5337eeb752 100644 --- a/versions/e-/exiv2.json +++ b/versions/e-/exiv2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "cedee9b50efea8688a242e81109bf6d14181e724", + "version": "0.28.7", + "port-version": 1 + }, { "git-tree": "5db23f21afc77595bf8b020dc33fc655abef3b4c", "version": "0.28.7",