summaryrefslogtreecommitdiff
path: root/media-gfx/sane-airscan
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-21 07:00:13 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-21 07:00:13 +0000
commit3faa6ebe0068b432ee5a9390c47ceca068ea7fe9 (patch)
treec571245b455a9a5dd80022270c5ac943532620b9 /media-gfx/sane-airscan
parentee93fbc2bb111cf895ae00cc1877c68f0eafaf2a (diff)
gentoo auto-resync : 21:03:2024 - 07:00:13
Diffstat (limited to 'media-gfx/sane-airscan')
-rw-r--r--media-gfx/sane-airscan/Manifest2
-rw-r--r--media-gfx/sane-airscan/files/sane-airscan-0.99.27-c99-fixes.patch61
-rw-r--r--media-gfx/sane-airscan/sane-airscan-0.99.27-r1.ebuild43
3 files changed, 106 insertions, 0 deletions
diff --git a/media-gfx/sane-airscan/Manifest b/media-gfx/sane-airscan/Manifest
index d9b81a529f08..bbd5065f32e6 100644
--- a/media-gfx/sane-airscan/Manifest
+++ b/media-gfx/sane-airscan/Manifest
@@ -1,4 +1,6 @@
+AUX sane-airscan-0.99.27-c99-fixes.patch 1834 BLAKE2B d0012e462e0fb04158e0705fd3d43cb645e7061df2e24a557d2f97c38509635248d235ee7eb67d8945c4a8a66da81019c86901fab010b3b2fac8275360d86a74 SHA512 45e2c8797301bc96b1d7736795dc7a4e7ea4fa72bbfd38ba787c7dfa0051dba353d722d801a6bfcc8e9d93141dde87cfcea601234d2286f157a61d8252496481
AUX sane-airscan-0.99.27-makefile-fixes.patch 1913 BLAKE2B 1fe9fc148e3ac4f9928cb46a9ef35d2b94104dca39ffec09617d6143ce619c8739afad2811d7c5455ce4c0f190a88c68069a800607926009d2121c90aa8bca8b SHA512 8ed38a9debaf0520d7576f1874dd05b634a43825fb258fa3a0df0f3a93ebac6391d5a7e30ba460221d4174b7865f0372e91ff88f430baeca567dd4f633c0099a
DIST sane-airscan-0.99.27.tar.gz 198418 BLAKE2B bcf2aff08feb90a65c10a4abaca67939874ad7c9376745b572f18ebfdaf7bff3e344d1379b00c73904a6892731a75f4632a90ea7c20f7cb4e30eab43413b829d SHA512 a35a92e26a4e3831f127e59bc520248abde8a7b304eb63ecf1d68092f51a8bc49bbc7503bead47ac84d0333d59ae0045d6d7a9f7b89d95f3ddfa2458f3781256
+EBUILD sane-airscan-0.99.27-r1.ebuild 867 BLAKE2B 566b78aa7268725f71aed1ac8a6de2186dfd2870273ed1494c547410368060f63fd6c677ec948d8fb37dafa31bb9577d83d8c270afc3fbbdcda09b926d6ede64 SHA512 e722adf97b989f50a2b1034e4d6689a04b240a616d69a602f5bf96f6e42171a19addea91ff00e591593aaa26d50cafa3ad70c6400f362bc0217c1d8bbfe2b834
EBUILD sane-airscan-0.99.27.ebuild 808 BLAKE2B a079180be74226fe5f3b535943b29f249552931a0a48bec2061ebc750997382988d79d43317095fe4bc2ae0f7c9556cfe08d909d601237be8989049e0abf37d0 SHA512 53cfcc46cbc2d9eef3a5f2161df7e0cd9b8aa5b3c22dd08664df3bf9dc1949eaa9ea6d760f0c298331fd6b84ff01393dbc479c86b2addb7430c19e111cbad721
MISC metadata.xml 340 BLAKE2B c9c2c847ab7adb2109f7fee5346019acfbdbac25394c052ecef5dd263de2991388c272b37c46bd405078f93a0fdaa4a47ddbd976f468d1acb37fc6b8c9014e99 SHA512 92ba711173b57be840567bf539ad1c6a99698a267994dfbedb8067e25edeed38a87bb142e1a34dc16752afb65a134ce6af338cbbc5a69cdd652d5dc96fd234c7
diff --git a/media-gfx/sane-airscan/files/sane-airscan-0.99.27-c99-fixes.patch b/media-gfx/sane-airscan/files/sane-airscan-0.99.27-c99-fixes.patch
new file mode 100644
index 000000000000..6b4b07d4a9ac
--- /dev/null
+++ b/media-gfx/sane-airscan/files/sane-airscan-0.99.27-c99-fixes.patch
@@ -0,0 +1,61 @@
+From c042a6895fe6f663d4bcb8c27d1c7b34fbd68b48 Mon Sep 17 00:00:00 2001
+From: Alexander Pevzner <pzz@apevzner.com>
+Date: Sat, 2 Dec 2023 21:49:40 +0300
+Subject: [PATCH 1/2] Fixed missed #include <stdlib.h> (see #305)
+
+This code used to compile on everywhere, but explicit #include <stdlib.h>
+was actually missed. Seems that sometimes it can cause problems.
+---
+ airscan-xml.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/airscan-xml.c b/airscan-xml.c
+index f376f31..5071ca9 100644
+--- a/airscan-xml.c
++++ b/airscan-xml.c
+@@ -9,6 +9,7 @@
+ #include "airscan.h"
+
+ #include <fnmatch.h>
++#include <stdlib.h>
+
+ #include <libxml/parser.h>
+ #include <libxml/tree.h>
+--
+2.43.0
+
+From 144e7d4187c73566ffc2780ac91ab7e1826826e0 Mon Sep 17 00:00:00 2001
+From: Alexander Pevzner <pzz@apevzner.com>
+Date: Sat, 2 Dec 2023 22:29:55 +0300
+Subject: [PATCH 2/2] Fixed build with recent versions of libxml2 (fixes #305)
+
+libxml2 recently changed a prototype of the xmlStructuredErrorFunc callback,
+adding const modifier to the second parameter.
+
+Adding an explicit cast seems to fix the problem (but I will not be surprised, if
+this fix will not work equally well on all distros).
+
+Found for a first time and fixed on Arch linux on about 2 Dec 2023 (Arch is rolling
+release, so there is no explicit release number)
+---
+ airscan-xml.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/airscan-xml.c b/airscan-xml.c
+index 5071ca9..10f290c 100644
+--- a/airscan-xml.c
++++ b/airscan-xml.c
+@@ -124,7 +124,7 @@ xml_rd_parse (xmlDoc **doc, const char *xml_text, size_t xml_len)
+ goto DONE;
+ }
+
+- ctxt->sax->serror = xml_rd_error_callback;
++ ctxt->sax->serror = (xmlStructuredErrorFunc) xml_rd_error_callback;
+
+ /* Parse the document */
+ if (xmlCtxtResetPush(ctxt, xml_text, xml_len, NULL, NULL)) {
+--
+2.43.0
+
+
+
diff --git a/media-gfx/sane-airscan/sane-airscan-0.99.27-r1.ebuild b/media-gfx/sane-airscan/sane-airscan-0.99.27-r1.ebuild
new file mode 100644
index 000000000000..1b8168dae0cd
--- /dev/null
+++ b/media-gfx/sane-airscan/sane-airscan-0.99.27-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="SANE backend for AirScan (eSCL) and WSD document scanners"
+HOMEPAGE="https://github.com/alexpevzner/sane-airscan"
+SRC_URI="https://github.com/alexpevzner/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ net-dns/avahi
+ net-libs/gnutls
+ dev-libs/libxml2
+ media-libs/libjpeg-turbo
+ media-libs/libpng
+"
+RDEPEND="${DEPEND}
+ media-gfx/sane-backends
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.27-makefile-fixes.patch"
+ "${FILESDIR}/${PN}-0.99.27-c99-fixes.patch"
+)
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" COMPRESS= STRIP= install
+}