pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/freeimage graphics/freeimage: add patches to ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/743c131adcf0
branches:  trunk
changeset: 381046:743c131adcf0
user:      he <he%pkgsrc.org@localhost>
date:      Sun Jun 26 10:49:54 2022 +0000

description:
graphics/freeimage: add patches to fix build on BE hosts.

Submitted upstream, ref.
https://sourceforge.net/p/freeimage/patches/153/

diffstat:

 graphics/freeimage/distinfo                                     |   4 +-
 graphics/freeimage/patches/patch-Source_FreeImage_PluginBMP.cpp |  34 ++++++++++
 graphics/freeimage/patches/patch-Source_FreeImage_PluginDDS.cpp |  29 ++++++++
 3 files changed, 66 insertions(+), 1 deletions(-)

diffs (89 lines):

diff -r 50be500f9de6 -r 743c131adcf0 graphics/freeimage/distinfo
--- a/graphics/freeimage/distinfo       Sun Jun 26 06:36:36 2022 +0000
+++ b/graphics/freeimage/distinfo       Sun Jun 26 10:49:54 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2022/05/31 11:49:09 gdt Exp $
+$NetBSD: distinfo,v 1.17 2022/06/26 10:49:54 he Exp $
 
 BLAKE2s (FreeImage3180.zip) = 08cd435f40d668418a710a63bebdd02763d4d7abab1b2eb6958d58c35aab4f7f
 SHA512 (FreeImage3180.zip) = 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818
@@ -10,6 +10,8 @@
 SHA1 (patch-Source_FreeImage_J2KHelper.cpp) = a479a373f5a584978129c00d723251a784210603
 SHA1 (patch-Source_FreeImage_PSDParser.cpp) = ee4f3e1bb2b6644033a93ac58e12b9126d0dd060
 SHA1 (patch-Source_FreeImage_Plugin.cpp) = 58f5d7ca78a66ad7109b0e8dff219c26dfe50a86
+SHA1 (patch-Source_FreeImage_PluginBMP.cpp) = 23629bdaf6ca705986a4f2ab5c680020b267793f
+SHA1 (patch-Source_FreeImage_PluginDDS.cpp) = 02fd0eaaf6758a815b6b98080928206e69346bf0
 SHA1 (patch-Source_FreeImage_PluginEXR.cpp) = ce97b25f8968eea7c3216143b766b1c51ccd5e43
 SHA1 (patch-Source_FreeImage_PluginJ2K.cpp) = bbc44884aba8be3af2aa824da5cf788d91c27fb6
 SHA1 (patch-Source_FreeImage_PluginJP2.cpp) = 9a6d27e039b2050004a2d331389bdfa32dffe681
diff -r 50be500f9de6 -r 743c131adcf0 graphics/freeimage/patches/patch-Source_FreeImage_PluginBMP.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/freeimage/patches/patch-Source_FreeImage_PluginBMP.cpp   Sun Jun 26 10:49:54 2022 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-Source_FreeImage_PluginBMP.cpp,v 1.1 2022/06/26 10:49:54 he Exp $
+
+Apparently noone has built this on big-endian hosts in a while...
+Replace bpp (undeclared) with dst_bpp (declared local).
+
+--- Source/FreeImage/PluginBMP.cpp.orig        2016-06-15 10:35:30.000000000 +0000
++++ Source/FreeImage/PluginBMP.cpp
+@@ -1419,7 +1419,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_
+ 
+                       free(buffer);
+ #ifdef FREEIMAGE_BIGENDIAN
+-              } else if (bpp == 16) {
++              } else if (dst_bpp == 16) {
+                       int padding = dst_pitch - dst_width * sizeof(WORD);
+                       WORD pad = 0;
+                       WORD pixel;
+@@ -1440,7 +1440,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_
+                       }
+ #endif
+ #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB
+-              } else if (bpp == 24) {
++              } else if (dst_bpp == 24) {
+                       int padding = dst_pitch - dst_width * sizeof(FILE_BGR);
+                       DWORD pad = 0;
+                       FILE_BGR bgr;
+@@ -1461,7 +1461,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_
+                                       }
+                               }
+                       }
+-              } else if (bpp == 32) {
++              } else if (dst_bpp == 32) {
+                       FILE_BGRA bgra;
+                       for(unsigned y = 0; y < dst_height; y++) {
+                               BYTE *line = FreeImage_GetScanLine(dib, y);
diff -r 50be500f9de6 -r 743c131adcf0 graphics/freeimage/patches/patch-Source_FreeImage_PluginDDS.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/freeimage/patches/patch-Source_FreeImage_PluginDDS.cpp   Sun Jun 26 10:49:54 2022 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-Source_FreeImage_PluginDDS.cpp,v 1.1 2022/06/26 10:49:54 he Exp $
+
+Catch-up for big-endian hosts.
+
+--- Source/FreeImage/PluginDDS.cpp.orig        2018-07-31 15:04:58.000000000 +0000
++++ Source/FreeImage/PluginDDS.cpp
+@@ -356,14 +356,14 @@ SwapHeader(DDSHEADER *header) {
+       for(int i=0; i<11; i++) {
+               SwapLong(&header->surfaceDesc.dwReserved1[i]);
+       }
+-      SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwSize);
+-      SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwFlags);
+-      SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwFourCC);
+-      SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRGBBitCount);
+-      SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRBitMask);
+-      SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwGBitMask);
+-      SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwBBitMask);
+-      SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRGBAlphaBitMask);
++      SwapLong(&header->surfaceDesc.ddspf.dwSize);
++      SwapLong(&header->surfaceDesc.ddspf.dwFlags);
++      SwapLong(&header->surfaceDesc.ddspf.dwFourCC);
++      SwapLong(&header->surfaceDesc.ddspf.dwRGBBitCount);
++      SwapLong(&header->surfaceDesc.ddspf.dwRBitMask);
++      SwapLong(&header->surfaceDesc.ddspf.dwGBitMask);
++      SwapLong(&header->surfaceDesc.ddspf.dwBBitMask);
++      SwapLong(&header->surfaceDesc.ddspf.dwRGBAlphaBitMask);
+       SwapLong(&header->surfaceDesc.ddsCaps.dwCaps1);
+       SwapLong(&header->surfaceDesc.ddsCaps.dwCaps2);
+       SwapLong(&header->surfaceDesc.ddsCaps.dwReserved[0]);



Home | Main Index | Thread Index | Old Index