diff options
| author | Gilad Bauman <gilad.bau@gmail.com> | 2021-01-05 22:12:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-05 12:12:52 -0800 |
| commit | 109ce457421dbef04011a7e5a4fd482f61e21f62 (patch) | |
| tree | 8bc938a5522aef24b2dc2d5f0718697b50a5da12 | |
| parent | 35e978a884362650c31b5f937598312da9796d38 (diff) | |
| download | vcpkg-109ce457421dbef04011a7e5a4fd482f61e21f62.tar.gz vcpkg-109ce457421dbef04011a7e5a4fd482f61e21f62.zip | |
Fix for FreeImage incorrect image format enum after disabling vendor plugins (#15393)
| -rw-r--r-- | ports/freeimage/CONTROL | 2 | ||||
| -rw-r--r-- | ports/freeimage/portfile.cmake | 1 | ||||
| -rw-r--r-- | ports/freeimage/update_format_enum_values.patch | 33 |
3 files changed, 35 insertions, 1 deletions
diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL index 87435994c..da8782464 100644 --- a/ports/freeimage/CONTROL +++ b/ports/freeimage/CONTROL @@ -1,6 +1,6 @@ Source: freeimage Version: 3.18.0 -Port-Version: 17 +Port-Version: 18 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp (!uwp), libraw, jxrlib, openexr Homepage: https://sourceforge.net/projects/freeimage/ Description: Support library for graphics image formats diff --git a/ports/freeimage/portfile.cmake b/ports/freeimage/portfile.cmake index ce1b86821..26253c715 100644 --- a/ports/freeimage/portfile.cmake +++ b/ports/freeimage/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_from_sourceforge( fix-function-overload.patch use-typedef-as-already-declared.patch use-functions-to-override-libtiff-warning-error-handlers.patch + update_format_enum_values.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/freeimage/update_format_enum_values.patch b/ports/freeimage/update_format_enum_values.patch new file mode 100644 index 000000000..01a0a6b9f --- /dev/null +++ b/ports/freeimage/update_format_enum_values.patch @@ -0,0 +1,33 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 59de277..224877f 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -420,15 +420,19 @@ FI_ENUM(FREE_IMAGE_FORMAT) { + #if 0 + FIF_FAXG3 = 27, + #endif +- FIF_SGI = 28, +- FIF_EXR = 29, +- FIF_J2K = 30, +- FIF_JP2 = 31, +- FIF_PFM = 32, +- FIF_PICT = 33, +- FIF_RAW = 34, +- FIF_WEBP = 35, +- FIF_JXR = 36 ++/* vcpkg: removal of G3 fax format messes up the format enum numbering due to FreeImage ++ relying on the list of plugins as created in AddNode(). Enum values have been ++ corrected to compensate. This is similar to the reported bug: ++ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841089 */ ++ FIF_SGI = 27, ++ FIF_EXR = 28, ++ FIF_J2K = 29, ++ FIF_JP2 = 30, ++ FIF_PFM = 31, ++ FIF_PICT = 32, ++ FIF_RAW = 33, ++ FIF_WEBP = 34, ++ FIF_JXR = 35 + }; + + /** Image type used in FreeImage. |
