summaryrefslogtreecommitdiff
path: root/media-gfx/zbar/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-02-05 18:44:56 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-02-05 18:44:56 +0000
commit29aabba0ea759c6a2864ff5631735b67ee38e5e0 (patch)
treeab466b4dfa7abecb401b2f8039d08af4689306bb /media-gfx/zbar/files
parentd42200bec37eef2a7478d88988ff00addd0a9202 (diff)
gentoo resync : 05.02.2020
Diffstat (limited to 'media-gfx/zbar/files')
-rw-r--r--media-gfx/zbar/files/zbar-0.23_create_correct_pkconfig_file_for_zbar-qt5.patch71
-rw-r--r--media-gfx/zbar/files/zbar-0.23_fix_Qt5X11Extras_detect.patch18
-rw-r--r--media-gfx/zbar/files/zbar-0.23_fix_detection_of_errors_in_the_v4l_read.patch29
-rw-r--r--media-gfx/zbar/files/zbar-0.23_fix_python_detect.patch13
-rw-r--r--media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch25
5 files changed, 156 insertions, 0 deletions
diff --git a/media-gfx/zbar/files/zbar-0.23_create_correct_pkconfig_file_for_zbar-qt5.patch b/media-gfx/zbar/files/zbar-0.23_create_correct_pkconfig_file_for_zbar-qt5.patch
new file mode 100644
index 000000000000..3be9c2222776
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23_create_correct_pkconfig_file_for_zbar-qt5.patch
@@ -0,0 +1,71 @@
+From cac1fffce80f0835e4d8d234023a775b4243b916 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
+Date: Sun, 20 Oct 2019 01:44:02 +0200
+Subject: [PATCH] Create correct pkconfig file for zbar-qt5
+
+Although zbar supports Qt5, the created pkgconfig file always requested
+the Qt(4) components.
+
+Fixes issue #62.
+---
+ configure.ac | 13 ++++++++++---
+ zbar-qt5.pc.in | 12 ++++++++++++
+ 2 files changed, 22 insertions(+), 3 deletions(-)
+ create mode 100644 zbar-qt5.pc.in
+
+diff --git a/configure.ac b/configure.ac
+index 935110a..49ef6a8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -659,15 +659,23 @@ AS_IF([test "x$with_qt" != "xno"],
+ CPPFLAGS="$CPPFLAGS $QT_CPPFLAGS"
+ dnl -fPIC has no effect on Windows and breaks windres
+ AS_IF([test "x$win32" = "xno"], [CPPFLAGS="$CPPFLAGS -fPIC"])
+- AC_MSG_NOTICE([using Qt version $QT_VERSION])],
++ AC_MSG_NOTICE([using Qt version $QT_VERSION])
++ qt_pkgconfig_file="zbar-qt5.pc"
++ ],
+
+ [MOC=`$PKG_CONFIG QtGui --variable=moc_location`
+ AC_MSG_NOTICE([using moc from $MOC])
+ QT_VERSION=`$PKG_CONFIG QtGui --modversion`
+- AC_MSG_NOTICE([using Qt version $QT_VERSION])]))
++ AC_MSG_NOTICE([using Qt version $QT_VERSION])
++ qt_pkgconfig_file="zbar-qt.pc"
++ ]))
+
+ AM_CONDITIONAL([HAVE_QT], [test "x$with_qt" = "xyes"])
+
++AM_COND_IF([HAVE_QT],
++ [AC_CONFIG_FILES([zbar-qt.pc:"${qt_pkgconfig_file}.in"])]
++)
++
+ dnl Java
+ have_java="maybe"
+
+@@ -820,7 +828,6 @@ java/Makefile
+ zbar/Makefile
+ zbar.pc
+ zbar-gtk.pc
+-zbar-qt.pc
+ doc/doxygen.conf])
+
+ AC_CONFIG_FILES([test/test_examples.sh],[chmod 755 test/test_examples.sh])
+diff --git a/zbar-qt5.pc.in b/zbar-qt5.pc.in
+new file mode 100644
+index 0000000..3378993
+--- /dev/null
++++ b/zbar-qt5.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: zbar-qt
++Description: bar code scanning and decoding Qt5 widget
++URL: http://zbar.sourceforge.net
++Version: @VERSION@
++Requires: zbar, Qt5Core >= 5, Qt5Gui >= 5
++Libs: -L${libdir} -lzbarqt
++Cflags: -I${includedir}
diff --git a/media-gfx/zbar/files/zbar-0.23_fix_Qt5X11Extras_detect.patch b/media-gfx/zbar/files/zbar-0.23_fix_Qt5X11Extras_detect.patch
new file mode 100644
index 000000000000..7692db41e0da
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23_fix_Qt5X11Extras_detect.patch
@@ -0,0 +1,18 @@
+diff -ur a/configure.ac b/configure.ac
+--- a/configure.ac 2019-05-23 23:37:12.000000000 +0300
++++ b/configure.ac 2020-01-22 12:27:14.190755156 +0300
+@@ -638,13 +638,9 @@
+
+ AC_ARG_VAR([MOC], [full path to Qt moc program])
+
+-AS_IF([test "x$have_x" = "xyes"],
+- [qt_extra="Qt5X11Extras >= 5.0"],
+- [qt_extra=""])
+-
+ AS_IF([test "x$with_qt" != "xno"],
+ [PKG_CHECK_MODULES([QT],
+- [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra],,
++ [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 Qt5X11Extras >= 5.0],,
+ [with_qt5 = "no"
+ PKG_CHECK_MODULES([QT],
+ [QtCore >= 4 QtGui >= 4],,
diff --git a/media-gfx/zbar/files/zbar-0.23_fix_detection_of_errors_in_the_v4l_read.patch b/media-gfx/zbar/files/zbar-0.23_fix_detection_of_errors_in_the_v4l_read.patch
new file mode 100644
index 000000000000..8484e31b7375
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23_fix_detection_of_errors_in_the_v4l_read.patch
@@ -0,0 +1,29 @@
+From 52a4fa5242af5da770b3cab1713f87e8d899e7ed Mon Sep 17 00:00:00 2001
+From: Dan Fandrich <dan@coneharvesters.com>
+Date: Fri, 27 Dec 2019 18:33:17 +0100
+Subject: [PATCH] Fix detection of errors in the v4l read.
+
+The return type must be signed in order to detect a read failure. Also,
+display an error message after such a failure.
+---
+ zbar/video/v4l2.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/zbar/video/v4l2.c b/zbar/video/v4l2.c
+index daed38b..c0398ea 100644
+--- a/zbar/video/v4l2.c
++++ b/zbar/video/v4l2.c
+@@ -133,9 +133,11 @@ static zbar_image_t *v4l2_dq (zbar_video_t *vdo)
+ return(NULL);
+
+ /* FIXME should read entire image */
+- unsigned long datalen = read(fd, (void*)img->data, img->datalen);
+- if(datalen < 0)
++ ssize_t datalen = read(fd, (void*)img->data, img->datalen);
++ if(datalen < 0) {
++ perror("v4l2_dq read");
+ return(NULL);
++ }
+ else if(datalen != img->datalen)
+ zprintf(0, "WARNING: read() size mismatch: 0x%lx != 0x%lx\n",
+ datalen, img->datalen);
diff --git a/media-gfx/zbar/files/zbar-0.23_fix_python_detect.patch b/media-gfx/zbar/files/zbar-0.23_fix_python_detect.patch
new file mode 100644
index 000000000000..54e10184217e
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23_fix_python_detect.patch
@@ -0,0 +1,13 @@
+diff -ur a/configure.ac b/configure.ac
+--- a/configure.ac 2019-05-23 23:37:12.000000000 +0300
++++ b/configure.ac 2020-01-06 12:30:41.621264633 +0300
+@@ -559,8 +559,7 @@
+ [with_python="no"])
+ ])
+ ]
+- )],
+- [with_python="auto"]
++ )]
+ )
+
+ AS_IF([test "x$with_python" != "xno"],
diff --git a/media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch b/media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch
new file mode 100644
index 000000000000..75d02cb996a5
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch
@@ -0,0 +1,25 @@
+From ba0bcb39c4fa57634c05597464352d4e630f1ea2 Mon Sep 17 00:00:00 2001
+From: hz-mk <51707958+hz-mk@users.noreply.github.com>
+Date: Tue, 11 Jun 2019 16:32:18 +0200
+Subject: [PATCH] Reset conversion descriptor after close (prevent double free)
+
+---
+ zbar/qrcode/qrdectxt.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/zbar/qrcode/qrdectxt.c b/zbar/qrcode/qrdectxt.c
+index 2ab7b9b..4be7635 100644
+--- a/zbar/qrcode/qrdectxt.c
++++ b/zbar/qrcode/qrdectxt.c
+@@ -409,7 +409,10 @@ int qr_code_data_list_extract_text(const qr_code_data_list *_qrlist,
+ /*If eci should be reset between codes, do so.*/
+ if(eci<=QR_ECI_GLI1){
+ eci=-1;
+- if(eci_cd!=(iconv_t)-1)iconv_close(eci_cd);
++ if(eci_cd!=(iconv_t)-1){
++ iconv_close(eci_cd);
++ eci_cd=(iconv_t)-1;
++ }
+ }
+
+ }