pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/freeimage



Module Name:    pkgsrc
Committed By:   he
Date:           Sun Jun 26 10:49:55 UTC 2022

Modified Files:
        pkgsrc/graphics/freeimage: distinfo
Added Files:
        pkgsrc/graphics/freeimage/patches: patch-Source_FreeImage_PluginBMP.cpp
            patch-Source_FreeImage_PluginDDS.cpp

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

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


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/graphics/freeimage/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginBMP.cpp \
    pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginDDS.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/freeimage/distinfo
diff -u pkgsrc/graphics/freeimage/distinfo:1.16 pkgsrc/graphics/freeimage/distinfo:1.17
--- pkgsrc/graphics/freeimage/distinfo:1.16     Tue May 31 11:49:09 2022
+++ pkgsrc/graphics/freeimage/distinfo  Sun Jun 26 10:49:54 2022
@@ -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_FreeImageToolkit_JPEG
 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

Added files:

Index: pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginBMP.cpp
diff -u /dev/null pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginBMP.cpp:1.1
--- /dev/null   Sun Jun 26 10:49:55 2022
+++ pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginBMP.cpp      Sun Jun 26 10:49:54 2022
@@ -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);
Index: pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginDDS.cpp
diff -u /dev/null pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginDDS.cpp:1.1
--- /dev/null   Sun Jun 26 10:49:55 2022
+++ pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginDDS.cpp      Sun Jun 26 10:49:54 2022
@@ -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