From 099fb9250d916511782bf5215f01f2e7141beb3a Mon Sep 17 00:00:00 2001 From: Alfonso Abella <54306291+aabellagm@users.noreply.github.com> Date: Fri, 31 May 2024 12:00:58 +0200 Subject: [PATCH] [freeimage] patch typedef for MacOS (#38261) The idea of the PR is to check if `OBJC_BOOL_DEFINED` is defined to avoid a second redefinition with a different type. Fixes #38260 - [X] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] ~SHA512s are updated for each updated download.~ - [ ] ~The "supports" clause reflects platforms that may be fixed by this new version.~ - [ ] ~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~ - [ ] ~Any patches that are no longer applied are deleted from the port's directory.~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file. --- ports/freeimage/portfile.cmake | 1 + ports/freeimage/typedef-xcode.patch | 14 ++++++++++++++ ports/freeimage/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/f-/freeimage.json | 5 +++++ 5 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 ports/freeimage/typedef-xcode.patch diff --git a/ports/freeimage/portfile.cmake b/ports/freeimage/portfile.cmake index 6409d74853..2c0554e19d 100644 --- a/ports/freeimage/portfile.cmake +++ b/ports/freeimage/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_from_sourceforge( use-functions-to-override-libtiff-warning-error-handlers.patch remove_auto_ptr.patch rawlib-build-fix.patch + typedef-xcode.patch ) file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" diff --git a/ports/freeimage/typedef-xcode.patch b/ports/freeimage/typedef-xcode.patch new file mode 100644 index 0000000000..f50c983f28 --- /dev/null +++ b/ports/freeimage/typedef-xcode.patch @@ -0,0 +1,14 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index ad2574d..9588944 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -155,7 +155,9 @@ FI_STRUCT (FIMULTIBITMAP) { void *data; }; + #ifndef _MSC_VER + // define portable types for 32-bit / 64-bit OS + #include ++#ifndef OBJC_BOOL_DEFINED + typedef int32_t BOOL; ++#endif + typedef uint8_t BYTE; + typedef uint16_t WORD; + typedef uint32_t DWORD; diff --git a/ports/freeimage/vcpkg.json b/ports/freeimage/vcpkg.json index 4b54b806a4..a4d10ce021 100644 --- a/ports/freeimage/vcpkg.json +++ b/ports/freeimage/vcpkg.json @@ -1,7 +1,7 @@ { "name": "freeimage", "version": "3.18.0", - "port-version": 26, + "port-version": 27, "description": "Support library for graphics image formats", "homepage": "https://sourceforge.net/projects/freeimage/", "license": "GPL-2.0-only OR GPL-3.0-only OR FreeImage", diff --git a/versions/baseline.json b/versions/baseline.json index 8154e201a8..ecdc2ec56c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2838,7 +2838,7 @@ }, "freeimage": { "baseline": "3.18.0", - "port-version": 26 + "port-version": 27 }, "freeopcua": { "baseline": "20190125", diff --git a/versions/f-/freeimage.json b/versions/f-/freeimage.json index 162d4e45d7..328c123e12 100644 --- a/versions/f-/freeimage.json +++ b/versions/f-/freeimage.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d1255d729b57a487ed7e6be58bb9feb8b8b3fd44", + "version": "3.18.0", + "port-version": 27 + }, { "git-tree": "e7b2a65974c7375dc69526c2c5390f1c7932aa1b", "version": "3.18.0",