From fb40eb45a600d420994acb58678b9049bb8d0ca0 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 20 Feb 2021 19:51:36 -0800 Subject: [PATCH 1/2] libv4l: fix glibc compilation There was a typo in the linker flags. Signed-off-by: Rosen Penev (cherry picked from commit b945b0790f8ababf8c36b9327d8d37f2ff90675b) --- libs/libv4l/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/libv4l/Makefile b/libs/libv4l/Makefile index 9755f820d..4f11a0152 100644 --- a/libs/libv4l/Makefile +++ b/libs/libv4l/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v4l-utils PKG_VERSION:=1.20.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils @@ -78,7 +78,7 @@ endef TARGET_CFLAGS += -flto TARGET_CXXFLAGS += -std=c++11 TARGET_LDFLAGS += \ - $(if $(CONFIG_LIBC_USE_GLIBC),,-largp) \ + $(if $(CONFIG_USE_GLIBC),,-largp) \ -Wl,--gc-sections,--as-needed CONFIGURE_ARGS+= \ From 6f2829de2c7a73f2e5976e24449427ac6b22da8c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 20 Feb 2021 18:13:33 -0800 Subject: [PATCH 2/2] sane-backends: update to 1.0.32 Dropped patches: -102-pixma_Restore_old_behaviour_in_case_XML_support_is_missing.patch (merged) -101-fix_uclibc_std_rand.patch std::round was unavailable because of a wrong configure var from the uClibc days. Fixed upstream with 1647790ae6202bd70b199e2aa44f8eb43e8d3af1 Signed-off-by: Luiz Angelo Daros de Luca (cherry picked from commit bf1a138f9276718a76589b3b170648d85bbb8c0b) (cherry picked from commit 49e75e810585a1e173e74fe3b7154a65835675c7) --- utils/sane-backends/Makefile | 6 +- .../patches/002-remove-uneeded.patch | 2 +- .../patches/101-fix_uclibc_std_rand.patch | 16 --- ...viour_in_case_XML_support_is_missing.patch | 99 ------------------- 4 files changed, 4 insertions(+), 119 deletions(-) delete mode 100644 utils/sane-backends/patches/101-fix_uclibc_std_rand.patch delete mode 100644 utils/sane-backends/patches/102-pixma_Restore_old_behaviour_in_case_XML_support_is_missing.patch diff --git a/utils/sane-backends/Makefile b/utils/sane-backends/Makefile index db607171f..214e2269d 100644 --- a/utils/sane-backends/Makefile +++ b/utils/sane-backends/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sane-backends -PKG_VERSION:=1.0.31 +PKG_VERSION:=1.0.32 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://gitlab.com/sane-project/backends/uploads/8bf1cae2e1803aefab9e5331550e5d5d/ -PKG_HASH:=4a3b10fcb398ed854777d979498645edfe66fcac2f2fd2b9117a79ff45e2a5aa +PKG_SOURCE_URL:=https://gitlab.com/sane-project/backends/uploads/104f09c07d35519cc8e72e604f11643f +PKG_HASH:=3a28c237c0a72767086202379f6dc92dbb63ec08dfbab22312cba80e238bb114 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=GPL-2.0 GPL-2.0-or-later diff --git a/utils/sane-backends/patches/002-remove-uneeded.patch b/utils/sane-backends/patches/002-remove-uneeded.patch index e02eed073..65d9cea17 100644 --- a/utils/sane-backends/patches/002-remove-uneeded.patch +++ b/utils/sane-backends/patches/002-remove-uneeded.patch @@ -1,6 +1,6 @@ --- a/Makefile.in +++ b/Makefile.in -@@ -442,7 +442,7 @@ target_alias = @target_alias@ +@@ -451,7 +451,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff --git a/utils/sane-backends/patches/101-fix_uclibc_std_rand.patch b/utils/sane-backends/patches/101-fix_uclibc_std_rand.patch deleted file mode 100644 index 5478a3865..000000000 --- a/utils/sane-backends/patches/101-fix_uclibc_std_rand.patch +++ /dev/null @@ -1,16 +0,0 @@ -https://gitlab.com/sane-project/backends/issues/237 - ---- a/backend/genesys/image_pipeline.cpp -+++ b/backend/genesys/image_pipeline.cpp -@@ -754,7 +754,11 @@ bool ImagePipelineNodeCalibrate::get_nex - - float value_f = static_cast(value) / max_value; - value_f = (value_f - offset_[curr_calib_i]) * multiplier_[curr_calib_i]; -+#if defined(__UCLIBC__) -+ value_f = round(value_f * max_value); -+#else - value_f = std::round(value_f * max_value); -+#endif - value = clamp(static_cast(value_f), 0, max_value); - set_raw_channel_to_row(out_data, x, ch, value, format); - diff --git a/utils/sane-backends/patches/102-pixma_Restore_old_behaviour_in_case_XML_support_is_missing.patch b/utils/sane-backends/patches/102-pixma_Restore_old_behaviour_in_case_XML_support_is_missing.patch deleted file mode 100644 index a2518b7d1..000000000 --- a/utils/sane-backends/patches/102-pixma_Restore_old_behaviour_in_case_XML_support_is_missing.patch +++ /dev/null @@ -1,99 +0,0 @@ -From a380fb089499f6b5192c07ae2feaa3376997382f Mon Sep 17 00:00:00 2001 -From: Olaf Meeuwissen -Date: Sun, 13 Sep 2020 18:47:32 +0900 -Subject: [PATCH] pixma: Restore old behaviour in case XML support is missing - -Fixes #345. ---- - backend/pixma/pixma_common.c | 4 ++-- - backend/pixma/pixma_common.h | 2 ++ - backend/pixma/pixma_mp150.c | 8 ++++++++ - backend/pixma/pixma_mp800.c | 8 ++++++++ - 4 files changed, 20 insertions(+), 2 deletions(-) - ---- a/backend/pixma/pixma_common.c -+++ b/backend/pixma/pixma_common.c -@@ -56,8 +56,6 @@ - - #if defined(HAVE_LIBXML2) - # include --#else --# error "The pixma backend requires libxml2" - #endif - - #include "pixma_rename.h" -@@ -1241,6 +1239,7 @@ pixma_get_device_status (pixma_t * s, pi - return s->ops->get_status (s, status); - } - -+#if defined(HAVE_LIBXML2) - static const char * - format_xml_response(const char *resp_details) - { -@@ -1334,3 +1333,4 @@ clean: - xmlFreeDoc(doc); - return status; - } -+#endif ---- a/backend/pixma/pixma_common.h -+++ b/backend/pixma/pixma_common.h -@@ -205,7 +205,9 @@ uint8_t *pixma_newcmd (pixma_cmdbuf_t *, - int pixma_exec (pixma_t *, pixma_cmdbuf_t *); - int pixma_exec_short_cmd (pixma_t *, pixma_cmdbuf_t *, unsigned cmd); - int pixma_map_status_errno (unsigned status); -+#if defined(HAVE_LIBXML2) - int pixma_parse_xml_response(const char *xml_message); -+#endif - /**@}*/ - - #define pixma_fill_checksum(start, end) do { \ ---- a/backend/pixma/pixma_mp150.c -+++ b/backend/pixma/pixma_mp150.c -@@ -322,6 +322,10 @@ - 00000001\ - " - -+#if !defined(HAVE_LIBXML2) -+#define XML_OK "OK" -+#endif -+ - enum mp150_state_t - { - state_idle, -@@ -459,7 +463,11 @@ send_xml_dialog (pixma_t * s, const char - PDBG (pixma_dbg (10, "XML message sent to scanner:\n%s\n", xml_message)); - PDBG (pixma_dbg (10, "XML response back from scanner:\n%s\n", mp->cb.buf)); - -+#if defined(HAVE_LIBXML2) - return pixma_parse_xml_response((const char*)mp->cb.buf) == PIXMA_STATUS_OK; -+#else -+ return (strcasestr ((const char *) mp->cb.buf, XML_OK) != NULL); -+#endif - } - - static int ---- a/backend/pixma/pixma_mp800.c -+++ b/backend/pixma/pixma_mp800.c -@@ -152,6 +152,10 @@ - 00000001\ - " - -+#if !defined(HAVE_LIBXML2) -+#define XML_OK "OK" -+#endif -+ - enum mp810_state_t - { - state_idle, -@@ -291,7 +295,11 @@ static int send_xml_dialog (pixma_t * s, - PDBG(pixma_dbg (10, "XML message sent to scanner:\n%s\n", xml_message)); - PDBG(pixma_dbg (10, "XML response back from scanner:\n%s\n", mp->cb.buf)); - -+#if defined(HAVE_LIBXML2) - return pixma_parse_xml_response((const char*)mp->cb.buf) == PIXMA_STATUS_OK; -+#else -+ return (strcasestr ((const char *) mp->cb.buf, XML_OK) != NULL); -+#endif - } - - static void new_cmd_tpu_msg (pixma_t *s, pixma_cmdbuf_t * cb, uint16_t cmd)