aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTsukasaSugiura <t.sugiura0204@gmail.com>2018-11-11 23:19:42 +0900
committerTsukasaSugiura <t.sugiura0204@gmail.com>2018-11-11 23:21:24 +0900
commitad65638eb3c015aa20743ca4140b1a274cef6659 (patch)
tree389e0f2e4724d68c59becc1b71ac8de4346ef5b5
parent82d65261da9e01572ccb5e19044d03da5b69c8ff (diff)
downloadvcpkg-ad65638eb3c015aa20743ca4140b1a274cef6659.tar.gz
vcpkg-ad65638eb3c015aa20743ca4140b1a274cef6659.zip
[freeimage] Fix function overload with libjpeg-turbo 2.0.0
Fix function overload with libjpeg-turbo 2.0.0 (jpeg_read_icc_profile and jpeg_write_icc_profile).
-rw-r--r--ports/freeimage/CMakeLists.txt3
-rw-r--r--ports/freeimage/CONTROL2
-rw-r--r--ports/freeimage/fix-function-overload.patch40
-rw-r--r--ports/freeimage/portfile.cmake1
4 files changed, 45 insertions, 1 deletions
diff --git a/ports/freeimage/CMakeLists.txt b/ports/freeimage/CMakeLists.txt
index 2d3e3cb57..997fba37a 100644
--- a/ports/freeimage/CMakeLists.txt
+++ b/ports/freeimage/CMakeLists.txt
@@ -7,6 +7,9 @@ project(FreeImage C CXX)
find_package(zlib REQUIRED)
find_package(PNG REQUIRED)
find_package(JPEG REQUIRED)
+if(NOT JPEG_LIBRARY_DEBUG)
+ set(JPEG_LIBRARY_DEBUG ${JPEG_LIBRARY_RELEASE})
+endif()
find_package(TIFF REQUIRED)
find_package(OPENJPEG REQUIRED)
diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL
index 844e13ae2..d8bd820e6 100644
--- a/ports/freeimage/CONTROL
+++ b/ports/freeimage/CONTROL
@@ -1,4 +1,4 @@
Source: freeimage
-Version: 3.18.0-1
+Version: 3.18.0-2
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr
Description: Support library for graphics image formats
diff --git a/ports/freeimage/fix-function-overload.patch b/ports/freeimage/fix-function-overload.patch
new file mode 100644
index 000000000..adb1164f6
--- /dev/null
+++ b/ports/freeimage/fix-function-overload.patch
@@ -0,0 +1,40 @@
+diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp
+index 8db177d..efa2c4e 100644
+--- a/Source/FreeImage/PluginJPEG.cpp
++++ b/Source/FreeImage/PluginJPEG.cpp
+@@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr marker) {
+ return FALSE. You might want to issue an error message instead.
+ */
+ static BOOL
+-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
++jpeg_read_icc_profile_(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
+ jpeg_saved_marker_ptr marker;
+ int num_markers = 0;
+ int seq_no;
+@@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) {
+ BYTE *icc_profile = NULL;
+ unsigned icc_length = 0;
+
+- if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) {
++ if( jpeg_read_icc_profile_(cinfo, &icc_profile, &icc_length) ) {
+ // copy ICC profile data
+ FreeImage_CreateICCProfile(dib, icc_profile, icc_length);
+ // clean up
+@@ -785,7 +785,7 @@ jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) {
+ Write JPEG_APP2 marker (ICC profile)
+ */
+ static BOOL
+-jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) {
++jpeg_write_icc_profile_(j_compress_ptr cinfo, FIBITMAP *dib) {
+ // marker identifying string "ICC_PROFILE" (null-terminated)
+ BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 };
+
+@@ -1038,7 +1038,7 @@ write_markers(j_compress_ptr cinfo, FIBITMAP *dib) {
+ jpeg_write_comment(cinfo, dib);
+
+ // write ICC profile
+- jpeg_write_icc_profile(cinfo, dib);
++ jpeg_write_icc_profile_(cinfo, dib);
+
+ // write IPTC profile
+ jpeg_write_iptc_profile(cinfo, dib);
diff --git a/ports/freeimage/portfile.cmake b/ports/freeimage/portfile.cmake
index 8713f5ba5..6f3cfaebe 100644
--- a/ports/freeimage/portfile.cmake
+++ b/ports/freeimage/portfile.cmake
@@ -40,6 +40,7 @@ vcpkg_apply_patches(
"${CMAKE_CURRENT_LIST_DIR}/use-external-webp.patch"
"${CMAKE_CURRENT_LIST_DIR}/use-external-openexr.patch"
"${CMAKE_CURRENT_LIST_DIR}/use-freeimage-config-include.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/fix-function-overload.patch"
)
vcpkg_configure_cmake(