Projects
home:Aloysius:branches:Extra
iscan
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Difference Between Revision 3 and
Extra
/
iscan
View file
iscan.changes
Changed
@@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Oct 3 13:44:56 UTC 2025 - Luigi Baldoni <aloisio@gmx.com> + +- Added iscan-2.30.4.2-c99.patch and iscan-2.30.4.2-c99.patch + (courtesy of Arch AUR) to fix Leap 16.0 and Tumbleweed builds + +------------------------------------------------------------------- Tue Dec 29 18:09:55 UTC 2020 - malcolmlewis@opensuse.org - Match iscan data version in requires.
View file
iscan.spec
Changed
@@ -1,6 +1,7 @@ # # spec file for package iscan # +# Copyright (C) 2025 Packman Team <packman@links2linux.de> # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties @@ -35,6 +36,8 @@ Patch2: iscan-2.30.4.2-sscanf.patch Patch3: iscan-data.patch Patch4: iscan.patch +Patch5: iscan-2.30.4.2-c99.patch +Patch6: hain01commits2dip-obj.patch BuildRequires: gcc-c++ BuildRequires: gettext-tools BuildRequires: libtool @@ -91,7 +94,7 @@ find -name Makefile.in -print -delete autoreconf -vif -CFLAGS='%optflags -Wno-deprecated-declarations' +CFLAGS='%optflags -Wno-deprecated-declarations -std=gnu89' CXXFLAGS="${CFLAGS}" %configure \ --sbindir=%{_bindir} \
View file
hain01commits2dip-obj.patch
Added
@@ -0,0 +1,95 @@ +--- a/backend/dip-obj.c ++++ b/backend/dip-obj.c +@@ -556,43 +556,72 @@ + } + + /*! \todo Add support for 16 bit color values (#816). ++ Added the commits of https://github.com/hean01/iscan/commit/147edc66ceddb34b5e0c8745a08ce6c96e7e02b5 and https://github.com/hean01/iscan/commit/575468d83bb70d928f5893c4c4b4ce7faa15e3d5 to support 16bit color. + */ + void + dip_apply_color_profile (const void *self, const buffer *buf, + const double profile9) + { + SANE_Int i; +- SANE_Byte *r_buf, *g_buf, *b_buf; + double red, grn, blu; + +- SANE_Byte *data; + SANE_Int size; + + require (dip == self && buf && profile); +- require (8 == buf->ctx.depth); ++ require (buf->ctx.depth == 8 || buf->ctx.depth == 16); + + if (SANE_FRAME_RGB != buf->ctx.format) + return; + +- data = buf->ptr; +- size = buf->end - buf->ptr; ++ if (buf->ctx.depth == 8) ++ { ++ SANE_Byte *r_buf, *g_buf, *b_buf; ++ SANE_Byte *data; + +- for (i = 0; i < size / 3; i++) ++ data = buf->ptr; ++ size = buf->end - buf->ptr; ++ ++ for (i = 0; i < size / 3; i++) ++ { ++ r_buf = data; ++ g_buf = data + 1; ++ b_buf = data + 2; ++ ++ red = ++ profile0 * (*r_buf) + profile1 * (*g_buf) + profile2 * (*b_buf); ++ grn = ++ profile3 * (*r_buf) + profile4 * (*g_buf) + profile5 * (*b_buf); ++ blu = ++ profile6 * (*r_buf) + profile7 * (*g_buf) + profile8 * (*b_buf); ++ ++ *data++ = clamp (red, 0, 255); ++ *data++ = clamp (grn, 0, 255); ++ *data++ = clamp (blu, 0, 255); ++ } ++ } ++ else if (buf->ctx.depth == 16) + { +- r_buf = data; +- g_buf = data + 1; +- b_buf = data + 2; +- +- red = +- profile0 * (*r_buf) + profile1 * (*g_buf) + profile2 * (*b_buf); +- grn = +- profile3 * (*r_buf) + profile4 * (*g_buf) + profile5 * (*b_buf); +- blu = +- profile6 * (*r_buf) + profile7 * (*g_buf) + profile8 * (*b_buf); +- +- *data++ = clamp (red, 0, 255); +- *data++ = clamp (grn, 0, 255); +- *data++ = clamp (blu, 0, 255); ++ uint16_t *r_buf, *g_buf, *b_buf; ++ uint16_t *data; ++ ++ data = (uint16_t *)buf->ptr; ++ while(data < buf->end) ++ { ++ r_buf = data; ++ g_buf = data + 1; ++ b_buf = data + 2; ++ ++ red = ++ profile0 * (*r_buf) + profile1 * (*g_buf) + profile2 * (*b_buf); ++ grn = ++ profile3 * (*r_buf) + profile4 * (*g_buf) + profile5 * (*b_buf); ++ blu = ++ profile6 * (*r_buf) + profile7 * (*g_buf) + profile8 * (*b_buf); ++ ++ *data++ = clamp (red, 0, 65535); ++ *data++ = clamp (grn, 0, 65535); ++ *data++ = clamp (blu, 0, 65535); ++ } + } + } +
View file
iscan-2.30.4.2-c99.patch
Added
@@ -0,0 +1,24 @@ +--- a/backend/defines.h 2021-01-04 08:13:48.995137756 -0000 ++++ b/backend/defines.h 2021-01-04 08:16:00.524563361 -0000 +@@ -31,6 +31,13 @@ + + + #ifndef __cplusplus ++ ++/* Use the C99 bool type if available ++ */ ++#ifdef HAVE_STDBOOL_H ++#include <stdbool.h> ++#else ++ + /*! A C++ Boolean type and corresponding keywords for our C code. + */ + typedef enum { +@@ -38,6 +45,7 @@ + true + } bool; + #endif ++#endif + + + /* Run-time contract validation.
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.