public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sandro Mani <manisandro@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/freeimage] epel10.3: Fix bigendian build
Date: Wed, 18 Nov 2026 02:41:53 GMT	[thread overview]
Message-ID: <179496971348.1.2170549017824611455.rpms-freeimage-8c428144f587@fedoraproject.org> (raw)

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++

                 reply	other threads:[~2026-11-18  2:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179496971348.1.2170549017824611455.rpms-freeimage-8c428144f587@fedoraproject.org \
    --to=manisandro@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox