Notification time stamped 2018-07-31 23:12:03 UTC
From 8c428144f5877081848855f8cdb04bf5e5c7db50 Mon Sep 17 00:00:00 2001 From: Sandro Mani manisandro@gmail.com Date: Jul 31 2018 23:11:55 +0000 Subject: Fix bigendian build
---
diff --git a/FreeImage_bigendian.patch b/FreeImage_bigendian.patch new file mode 100644 index 0000000..38cfb63 --- /dev/null +++ b/FreeImage_bigendian.patch @@ -0,0 +1,56 @@ +diff -rupN FreeImage/Source/FreeImage/PluginBMP.cpp FreeImage-new/Source/FreeImage/PluginBMP.cpp +--- FreeImage/Source/FreeImage/PluginBMP.cpp 2016-06-15 12:35:30.000000000 +0200 ++++ FreeImage-new/Source/FreeImage/PluginBMP.cpp 2018-08-01 00:56:37.322692192 +0200 +@@ -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 -rupN FreeImage/Source/FreeImage/PluginDDS.cpp FreeImage-new/Source/FreeImage/PluginDDS.cpp +--- FreeImage/Source/FreeImage/PluginDDS.cpp 2018-07-31 17:04:56.000000000 +0200 ++++ FreeImage-new/Source/FreeImage/PluginDDS.cpp 2018-08-01 01:05:52.724661471 +0200 +@@ -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]); diff --git a/freeimage.spec b/freeimage.spec index 7b69f0c..d01b50e 100644 --- a/freeimage.spec +++ b/freeimage.spec @@ -15,6 +15,8 @@ Source0: http://downloads.sourceforge.net/%%7Bname%7D/FreeImage%(echo %{versi Patch0: FreeImage_unbundle.patch # Fix incorrect path in doxyfile Patch1: FreeImage_doxygen.patch +# Fix incorrect variable names in BIGENDIAN blocks +Patch2: FreeImage_bigendian.patch
BuildRequires: doxygen BuildRequires: gcc-c++
https://src.fedoraproject.org/rpms/freeimage/c/8c428144f5877081848855f8cdb04...
scm-commits@lists.fedoraproject.org