Dominique Leuenberger 2019-07-22 10:16:55 +00:00 committed by Git OBS Bridge
commit d9b3441ce5
4 changed files with 50 additions and 0 deletions

16
big-endian.patch Normal file
View File

@ -0,0 +1,16 @@
Index: netpbm-10.86.3/converter/pbm/pbmtozinc.c
===================================================================
--- netpbm-10.86.3.orig/converter/pbm/pbmtozinc.c
+++ netpbm-10.86.3/converter/pbm/pbmtozinc.c
@@ -107,7 +107,10 @@ packer_putitem(Packer * const packerP) {
putchar(' ');
++packerP->itemsperline;
- printf ("0x%02x%02x", packerP->item & 255, packerP->item >> 8);
+ if (BYTE_ORDER == LITTLE_ENDIAN)
+ printf ("0x%02x%02x", packerP->item & 255, packerP->item >> 8);
+ else
+ printf ("0x%02x%02x", packerP->item >> 8, packerP->item & 255);
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jul 8 07:49:42 UTC 2019 - Andreas Schwab <schwab@suse.de>
- signed-char.patch: fix bad use of plain char
- big-endian.patch: fix dependency on byte order
-------------------------------------------------------------------
Fri May 31 09:32:34 UTC 2019 - pgajdos@suse.com

View File

@ -41,6 +41,10 @@ Patch4: %{name}-security-code.patch
Patch5: %{name}-security-scripts.patch
Patch6: %{name}-gcc-warnings.patch
Patch7: makeman-py3.patch
# PATCH-FIX-UPSTREAM fix bad use of plain char
Patch8: signed-char.patch
# PATCH-FIX-UPSTREAM fix dependency on byte order
Patch9: big-endian.patch
BuildRequires: flex
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
@ -94,6 +98,8 @@ source package.
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
mkdir pnmtopalm # for %%doc pnmtopalm
cp -p converter/other/pnmtopalm/{LICENSE,README} pnmtopalm

22
signed-char.patch Normal file
View File

@ -0,0 +1,22 @@
Index: netpbm-10.86.3/converter/other/pnmtopalm/palmtopnm.c
===================================================================
--- netpbm-10.86.3.orig/converter/other/pnmtopalm/palmtopnm.c
+++ netpbm-10.86.3/converter/other/pnmtopalm/palmtopnm.c
@@ -823,7 +823,7 @@ readPackBitsRow16(FILE * const
unsigned int j;
for (j = 0; j < bytesPerRow; ) {
- char incount;
+ signed char incount;
pm_readchar(ifP, &incount);
if (incount < 0) {
/* How do we handle incount == -128 ? */
@@ -865,7 +865,7 @@ readPackBitsRow(FILE * const if
unsigned int j;
for (j = 0; j < bytesPerRow; ) {
- char incount;
+ signed char incount;
pm_readchar(ifP, &incount);
if (incount < 0) {
/* How do we handle incount == -128 ? */