From 772fe6cbce530cb3a5f0fee67b57e9861676e5d0 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Thu, 23 Dec 2021 04:55:57 +0100 Subject: [PATCH] [giflib] use a vcpkg wrapper for cmake to circumvent bad cmake integrated module (#22141) * [giflib] create wrapper to circumvent cmake module problems with giflib v5 * [giflib] fix references * [giflib] remove unnecessary REQUIRED tags * [giflib] fix references * reduce wrapper to the minimum * fix references --- ports/giflib/portfile.cmake | 2 ++ ports/giflib/vcpkg-cmake-wrapper.cmake | 3 +++ ports/giflib/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/g-/giflib.json | 5 +++++ 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ports/giflib/vcpkg-cmake-wrapper.cmake diff --git a/ports/giflib/portfile.cmake b/ports/giflib/portfile.cmake index 8a58b690a1..bf9a3b2624 100644 --- a/ports/giflib/portfile.cmake +++ b/ports/giflib/portfile.cmake @@ -29,4 +29,6 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_copy_pdbs() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/gif) + file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/giflib/vcpkg-cmake-wrapper.cmake b/ports/giflib/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000000..f688cff964 --- /dev/null +++ b/ports/giflib/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,3 @@ +find_path(GIF_INCLUDE_DIR gif_lib.h PATH_SUFFIXES include PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + +_find_package(${ARGS}) diff --git a/ports/giflib/vcpkg.json b/ports/giflib/vcpkg.json index 965fa663bc..6cbbf622ce 100644 --- a/ports/giflib/vcpkg.json +++ b/ports/giflib/vcpkg.json @@ -1,6 +1,7 @@ { "name": "giflib", "version": "5.2.1", + "port-version": 1, "description": "A library for reading and writing gif images.", "homepage": "https://sourceforge.net/projects/giflib/", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 20617b429f..1d9956d21b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2438,7 +2438,7 @@ }, "giflib": { "baseline": "5.2.1", - "port-version": 0 + "port-version": 1 }, "ginkgo": { "baseline": "1.4.0", diff --git a/versions/g-/giflib.json b/versions/g-/giflib.json index 8c2fdd37c9..834cde1ea7 100644 --- a/versions/g-/giflib.json +++ b/versions/g-/giflib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "14178ec83d76a40e314adcf9bba75b63e99bc56d", + "version": "5.2.1", + "port-version": 1 + }, { "git-tree": "7cfc37d67d8662dd5fa5bf698a61ebbd657060cc", "version": "5.2.1",