diff --git a/big-endian.patch b/big-endian.patch new file mode 100644 index 0000000..6ec948c --- /dev/null +++ b/big-endian.patch @@ -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); + + } + diff --git a/netpbm.changes b/netpbm.changes index 0ed0285..7d51a8f 100644 --- a/netpbm.changes +++ b/netpbm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 8 07:49:42 UTC 2019 - Andreas Schwab + +- 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 diff --git a/netpbm.spec b/netpbm.spec index 962ab83..dadbe57 100644 --- a/netpbm.spec +++ b/netpbm.spec @@ -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 diff --git a/signed-char.patch b/signed-char.patch new file mode 100644 index 0000000..5d54af2 --- /dev/null +++ b/signed-char.patch @@ -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 ? */