[big endian] Unbreak graphics/sane-backends

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[big endian] Unbreak graphics/sane-backends

Charlene Wendling
Hi,

I've spotted that sane-backends is broken in the current sparc64 bulk:

> genesys/low.cpp:544:9: error: 'depth' was not declared in this scope
>     if (depth == 16) {

Upstream has already a fix for that [0], it's pending merging.

The below diff fixes the build on powerpc [1]. I bumped REVISION, but
the impacted code only impacts BE_ARCHS and sparc64 is the first arch
building that new sane-backends, i guess it can be omitted.

Comments/feedback are welcome,

Charlène.


[0] https://gitlab.com/sane-project/backends/-/merge_requests/329
[1] https://bin.charlenew.xyz/sane-backends.log


Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/sane-backends/Makefile,v
retrieving revision 1.88
diff -u -p -u -p -r1.88 Makefile
--- Makefile 8 Feb 2020 13:35:52 -0000 1.88
+++ Makefile 9 Feb 2020 11:32:09 -0000
@@ -5,6 +5,7 @@ BROKEN-alpha= ICE hp5590.c:1141: error:
 COMMENT= API for accessing scanners, backends
 
 DISTNAME= sane-backends-1.0.29
+REVISION= 0
 
 SHARED_LIBS +=  sane                 2.1      # unknown
 
Index: patches/patch-backend_genesys_low_cpp
===================================================================
RCS file: /cvs/ports/graphics/sane-backends/patches/patch-backend_genesys_low_cpp,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-backend_genesys_low_cpp
--- patches/patch-backend_genesys_low_cpp 8 Feb 2020 13:35:52 -0000 1.1
+++ patches/patch-backend_genesys_low_cpp 9 Feb 2020 11:32:09 -0000
@@ -3,6 +3,10 @@ $OpenBSD: patch-backend_genesys_low_cpp,
 errno.h header is required now that errno is a per-thread variable.
 "undefined symbol 'errno'" at runtime with dlopen()'d modules.
 
+Fix the build on BE_ARCHS:
+genesys/low.cpp:544:9: error: 'depth' was not declared in this scope, see
+https://gitlab.com/sane-project/backends/-/merge_requests/329
+
 Index: backend/genesys/low.cpp
 --- backend/genesys/low.cpp.orig
 +++ backend/genesys/low.cpp
@@ -15,3 +19,12 @@ Index: backend/genesys/low.cpp
  #include "low.h"
  #include "assert.h"
  #include "test_settings.h"
+@@ -539,7 +541,7 @@ Image read_unshuffled_image_from_scanner(Genesys_Devic
+     }
+
+ #ifdef WORDS_BIGENDIAN
+-    if (depth == 16) {
++    if (session.params.depth == 16) {
+         dev->pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
+     }
+ #endif


Reply | Threaded
Open this post in threaded view
|

Re: [big endian] Unbreak graphics/sane-backends

Jeremie Courreges-Anglas-2
On Sun, Feb 09 2020, Charlene Wendling <[hidden email]> wrote:

> Hi,
>
> I've spotted that sane-backends is broken in the current sparc64 bulk:
>
>> genesys/low.cpp:544:9: error: 'depth' was not declared in this scope
>>     if (depth == 16) {
>
> Upstream has already a fix for that [0], it's pending merging.
>
> The below diff fixes the build on powerpc [1]. I bumped REVISION, but
> the impacted code only impacts BE_ARCHS and sparc64 is the first arch
> building that new sane-backends, i guess it can be omitted.
>
> Comments/feedback are welcome,

ok jca@

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE