summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/sane/APKBUILD12
-rw-r--r--user/sane/BTS-304.patch30
-rw-r--r--user/sane/network.patch25
3 files changed, 49 insertions, 18 deletions
diff --git a/user/sane/APKBUILD b/user/sane/APKBUILD
index 6a3e19a8c..d9f618013 100644
--- a/user/sane/APKBUILD
+++ b/user/sane/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=sane
_pkgname=sane-backends
-pkgver=1.0.29
+pkgver=1.0.30
pkgrel=0
pkgdesc="Scanner access library"
url="http://www.sane-project.org/"
@@ -37,13 +37,14 @@ done
subpackages="$pkgname-doc $pkgname-dev $subpackages $pkgname-utils saned
saned-openrc:openrc:noarch $pkgname-udev::noarch $_pkgname::noarch
$pkgname-lang"
-source="https://gitlab.com/sane-project/backends/uploads/54f858b20a364fc35d820df935a86478/sane-backends-1.0.29.tar.gz
+source="https://gitlab.com/sane-project/backends/uploads/c3dd60c9e054b5dee1e7b01a7edc98b0/sane-backends-1.0.30.tar.gz
saned.initd
endian.patch
include.patch
network.patch
pidfile.patch
check.patch
+ BTS-304.patch
"
builddir="$srcdir"/$_pkgname-$pkgver
@@ -138,10 +139,11 @@ _backend() {
fi
}
-sha512sums="9ee431b0c048119719e15905f8743c7a0fd8bc6fcee81d75df8459a989cab7e39bf045518976713a7e1d94c816dd1a1e0fa190612d815c0ddb6a51d2abf3fd54 sane-backends-1.0.29.tar.gz
+sha512sums="e9f4ab1f21d5ab0e09b101389c325947824945af968f08b307485f79d4dc4c134b8a1979fb0cf0cfa72435abffe70d0060748a2c2ec46514eb15a0442ee181a5 sane-backends-1.0.30.tar.gz
0a06eaa28b345202f2bdf8361e06f843bb7a010b7d8f80132f742672c94249c43f64031cefa161e415e2e2ab3a53b23070fb63854283f9e040f5ff79394ac7d1 saned.initd
c7523b2684726cf35c0b251fe2e1863120284ff6ea3f93b53feb5dfa020c1e383910ecdd1a0c77a2289912ac4fd355cb3c743ea3706dab1bcf0a3412e1d0fbcc endian.patch
1779ff8beb1ba5f9238c25d819a7f0045f7e257c19b511315feb85650e445ca86450a9e1d7ff8650499d3dae808589a6c2e358d5f3f39a3f40ce4999179b86d6 include.patch
-9cb595841f59b5105ecc85e4c0ad8781c52caa2354fb823c920ec467e88afbe47f2b3f4a7a3980bef5dbf22983c5786f051a9d10aea97b4bf7c4a05378592029 network.patch
+dfeaef3c94c3e66b1cfb27348b8e1f3620143fd9a41e3c0b33d9c16f9bc4af2b20e40c83fec385c5765e8c3a812a00508bccdf8f27d571cfc0d8fac9dee41205 network.patch
8f0a1529a5793bc78422419b674963b543527c932476c9ea2d92ea0ad0a286691da306020824c1aaa0b35929f571480d21d7fc464a9f652e15664854c75a4cea pidfile.patch
-4de6f60452c0451769f5ce41e41ca4c2867a723e0d2bf22796dc8a266359bdc8a9e9542f4ba2dc42b15bd25b1c83d2c339177796043fdbcbc9d73ad4957f723c check.patch"
+4de6f60452c0451769f5ce41e41ca4c2867a723e0d2bf22796dc8a266359bdc8a9e9542f4ba2dc42b15bd25b1c83d2c339177796043fdbcbc9d73ad4957f723c check.patch
+de2bd02d02e9a2d061d7c5783d3e4e64e9a68e83b15adc122946efff369ad5e382bd918a9585f5fe99ede546f002bb3db0f1b54306f4409fde38b2e26c008162 BTS-304.patch"
diff --git a/user/sane/BTS-304.patch b/user/sane/BTS-304.patch
new file mode 100644
index 000000000..64b7dca02
--- /dev/null
+++ b/user/sane/BTS-304.patch
@@ -0,0 +1,30 @@
+diff --git a/backend/genesys/image_pixel.cpp b/backend/genesys/image_pixel.cpp
+index 1b83e127d..1ebba7fe0 100644
+--- a/backend/genesys/image_pixel.cpp
++++ b/backend/genesys/image_pixel.cpp
+@@ -46,6 +46,7 @@
+ #include "image.h"
+
+ #include <array>
++#include <cmath>
+
+ namespace genesys {
+
+@@ -207,7 +208,7 @@ void set_pixel_to_row(std::uint8_t* data, std::size_t x, Pixel pixel, PixelForma
+ float val = (pixel.r >> 8) * 0.3f;
+ val += (pixel.g >> 8) * 0.59f;
+ val += (pixel.b >> 8) * 0.11f;
+- data[x] = static_cast<std::uint16_t>(val);
++ data[x] = static_cast<std::uint16_t>(roundf(val));
+ return;
+ }
+ case PixelFormat::I16: {
+@@ -215,7 +216,7 @@ void set_pixel_to_row(std::uint8_t* data, std::size_t x, Pixel pixel, PixelForma
+ float val = pixel.r * 0.3f;
+ val += pixel.g * 0.59f;
+ val += pixel.b * 0.11f;
+- auto val16 = static_cast<std::uint16_t>(val);
++ auto val16 = static_cast<std::uint16_t>(roundf(val));
+ data[x] = val16 & 0xff;
+ data[x + 1] = (val16 >> 8) & 0xff;
+ return;
diff --git a/user/sane/network.patch b/user/sane/network.patch
index 4e422e28d..845bf9913 100644
--- a/user/sane/network.patch
+++ b/user/sane/network.patch
@@ -1,23 +1,22 @@
-diff --git a/sanei/sanei_tcp.c b/sanei/sanei_tcp.c
-index a57d7c7..d0a1e92 100644
---- a/sanei/sanei_tcp.c
-+++ b/sanei/sanei_tcp.c
-@@ -45,6 +45,7 @@
- #include <unistd.h>
+--- sane-backends-1.0.30/sanei/sanei_tcp.c 2020-05-17 06:54:18.000000000 -0500
++++ sane-backends-1.0.30/sanei/sanei_tcp.c 2020-06-10 14:10:06.980398975 -0500
+@@ -46,6 +46,7 @@
#include <stdlib.h>
#include <string.h>
+ #include <limits.h>
+#include <time.h>
- #ifdef HAVE_WINSOCK2_H
- #include <winsock2.h>
-@@ -123,14 +124,27 @@ sanei_tcp_write(int fd, const u_char * buf, int count)
- ssize_t
- sanei_tcp_read(int fd, u_char * buf, int count)
+ #ifndef SSIZE_MAX
+ #define SSIZE_MAX LONG_MAX
+@@ -130,6 +131,7 @@ sanei_tcp_read(int fd, u_char * buf, siz
{
-- ssize_t bytes_recv = 0, rc = 1;
-+ ssize_t bytes_recv = 0, rc = 1;
+ size_t bytes_recv = 0;
+ ssize_t rc = 1;
+ int retry = 5;
+ if (count > SSIZE_MAX) {
+ errno = EINVAL;
+@@ -139,9 +141,21 @@ sanei_tcp_read(int fd, u_char * buf, siz
while (bytes_recv < count && rc > 0)
{
rc = recv(fd, buf+bytes_recv, count-bytes_recv, 0);