aboutsummaryrefslogtreecommitdiff
path: root/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch
blob: 28d0e3a42be9dcb33eb2e1c09407ccc655695d12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff --git a/Source/FreeImage.h b/Source/FreeImage.h
index e2d1c5a..cc66b7d 100644
--- a/Source/FreeImage.h
+++ b/Source/FreeImage.h
@@ -410,7 +410,11 @@ FI_ENUM(FREE_IMAGE_FORMAT) {
 	FIF_DDS		= 24,
 	FIF_GIF     = 25,
 	FIF_HDR		= 26,
-	FIF_FAXG3	= 27,
+/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of
+   FreeImage, since it requires usage of the vendored copy of libtiff. */
+#if 0
+ 	FIF_FAXG3	= 27,
+#endif
 	FIF_SGI		= 28,
 	FIF_EXR		= 29,
 	FIF_J2K		= 30,
@@ -476,6 +480,9 @@ FI_ENUM(FREE_IMAGE_DITHER) {
 /** Lossless JPEG transformations
 Constants used in FreeImage_JPEGTransform
 */
+/* vcpkg: The JPEGTransform functions are deliberately disabled in our build
+   of FreeImage, since they require usage of the vendored copy of libjpeg. */
+#if 0
 FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
 	FIJPEG_OP_NONE			= 0,	//! no transformation
 	FIJPEG_OP_FLIP_H		= 1,	//! horizontal flip
@@ -486,6 +493,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
 	FIJPEG_OP_ROTATE_180	= 6,	//! 180-degree rotation
 	FIJPEG_OP_ROTATE_270	= 7		//! 270-degree clockwise (or 90 ccw)
 };
+#endif
 
 /** Tone mapping operators.
 Constants used in FreeImage_ToneMapping.
@@ -1077,6 +1085,9 @@ DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model,
 // JPEG lossless transformation routines
 // --------------------------------------------------------------------------
 
+/* vcpkg: The JPEGTransform functions are deliberately disabled in our build
+   of FreeImage, since they require usage of the vendored copy of libjpeg. */
+#if 0
 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
@@ -1085,7 +1096,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io,
 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
-
+#endif
 
 // --------------------------------------------------------------------------
 // Image manipulation toolkit
diff --git a/Source/FreeImage/Plugin.cpp b/Source/FreeImage/Plugin.cpp
index 57ebffd..a93440f 100644
--- a/Source/FreeImage/Plugin.cpp
+++ b/Source/FreeImage/Plugin.cpp
@@ -263,7 +263,11 @@ FreeImage_Initialise(BOOL load_local_plugins_only) {
 			s_plugins->AddNode(InitDDS);
 	        s_plugins->AddNode(InitGIF);
 	        s_plugins->AddNode(InitHDR);
-			s_plugins->AddNode(InitG3);
+/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of FreeImage
++   since it requires usage of the vendored copy of libtiff. */
+#if 0
+ 			s_plugins->AddNode(InitG3);
+#endif
 			s_plugins->AddNode(InitSGI);
 			s_plugins->AddNode(InitEXR);
 			s_plugins->AddNode(InitJ2K);