Monday, June 10, 2019

[macppc/arm] Unbreak graphics/ufraw (was: Re: powerpc bulk build report)

Hi :)

> http://build-failures.rhaalovely.net//powerpc/2019-05-19/graphics/ufraw.log
> http://build-failures.rhaalovely.net/aarch64/2019-06-02/graphics/ufraw.log
> http://build-failures.rhaalovely.net/arm/last/graphics/ufraw.log

It's a typical case of code that assumes that char is signed on all
platforms - not much to say.

It has been built and tested on macppc [0] and amd64.

Comments/feedback are welcome!

Charlène.


[0] https://bsd.network/@julianaito/102246978069502521


Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/ufraw/Makefile,v
retrieving revision 1.49
diff -u -p -u -p -r1.49 Makefile
--- Makefile 3 Jun 2019 16:06:51 -0000 1.49
+++ Makefile 10 Jun 2019 11:20:10 -0000
@@ -3,7 +3,7 @@
COMMENT= read and manipulate raw images from digital cameras

DISTNAME= ufraw-0.22
-REVISION= 3
+REVISION= 4

CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ufraw/}
Index: patches/patch-dcraw_cc
===================================================================
RCS file: /cvs/ports/graphics/ufraw/patches/patch-dcraw_cc,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 patch-dcraw_cc
--- patches/patch-dcraw_cc 8 Apr 2018 22:13:54 -0000 1.4
+++ patches/patch-dcraw_cc 10 Jun 2019 11:20:10 -0000
@@ -1,4 +1,5 @@
$OpenBSD: patch-dcraw_cc,v 1.4 2018/04/08 22:13:54 jca Exp $
+- fix narrowing on archs where char is unsigned by default (ppc, arm)
- can't find abs of uint with clang
fix stolen from ufraw-current
- space between literal and identifier
@@ -6,6 +7,15 @@ $OpenBSD: patch-dcraw_cc,v 1.4 2018/04/0
Index: dcraw.cc
--- dcraw.cc.orig
+++ dcraw.cc
+@@ -2285,7 +2285,7 @@ void CLASS quicktake_100_load_raw()
+
+ void CLASS kodak_radc_load_raw()
+ {
+- static const char src[] = {
++ static const signed char src[] = {
+ 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8,
+ 1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8,
+ 2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8,
@@ -9240,13 +9240,13 @@ canon_a5:
filters = 0x16161616;
}

No comments:

Post a Comment