public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/freeimage] epel10.3: Fix bigendian build
@ 2026-11-18  2:41 Sandro Mani
  0 siblings, 0 replies; only message in thread
From: Sandro Mani @ 2026-11-18  2:41 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/freeimage
Branch : epel10.3
Commit : 8c428144f5877081848855f8cdb04bf5e5c7db50
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2018-08-01T01:11:55+02:00
Stats  : +58/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/freeimage/c/8c428144f5877081848855f8cdb04bf5e5c7db50?branch=epel10.3

Log:
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/%{name}/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++

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-18  2:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18  2:41 [rpms/freeimage] epel10.3: Fix bigendian build Sandro Mani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox