summaryrefslogtreecommitdiff
path: root/media-gfx/zbar/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /media-gfx/zbar/files
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'media-gfx/zbar/files')
-rw-r--r--media-gfx/zbar/files/zbar-0.10-errors.patch10
-rw-r--r--media-gfx/zbar/files/zbar-0.23-r1-nonbash.patch120
-rw-r--r--media-gfx/zbar/files/zbar-0.23.1_python_tp_print.patch55
-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_detection_of_errors_in_the_v4l_read.patch29
-rw-r--r--media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch25
6 files changed, 55 insertions, 255 deletions
diff --git a/media-gfx/zbar/files/zbar-0.10-errors.patch b/media-gfx/zbar/files/zbar-0.10-errors.patch
deleted file mode 100644
index 63328ce664bb..000000000000
--- a/media-gfx/zbar/files/zbar-0.10-errors.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- zbar-0.10/include/zbar/Exception.h
-+++ zbar-0.10/include/zbar/Exception.h
-@@ -32,6 +32,7 @@
-
- #include <exception>
- #include <new>
-+#include <cstddef>
-
- namespace zbar {
-
diff --git a/media-gfx/zbar/files/zbar-0.23-r1-nonbash.patch b/media-gfx/zbar/files/zbar-0.23-r1-nonbash.patch
deleted file mode 100644
index 1206a209d458..000000000000
--- a/media-gfx/zbar/files/zbar-0.23-r1-nonbash.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-https://bugs.gentoo.org/769716
-
-From 4bd586181dde6196cb60602f228c4deb07818989 Mon Sep 17 00:00:00 2001
-From: Klaus Ethgen <Klaus@Ethgen.de>
-Date: Sun, 7 Feb 2021 14:22:52 +0100
-Subject: [PATCH] =?iso8859-1?q?Configure-Patch=20f=FCr=20nicht-bash?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=iso8859-1
-Content-Transfer-Encoding: 8bit
-
----
- configure.ac | 26 +++++++++++++-------------
- 1 file changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index c2b7819..f6224a1 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -489,7 +489,7 @@ AC_ARG_WITH([gtk],
- AC_ARG_VAR([GLIB_GENMARSHAL], [full path to glib-genmarshal])
- AC_ARG_VAR([GTK_VERSION_MAJOR])
-
--AS_IF([test "x$with_gtk" == "xgtk3" || test "x$with_gtk" == "xauto"],
-+AS_IF([test "x$with_gtk" = "xgtk3" || test "x$with_gtk" = "xauto"],
- [PKG_CHECK_MODULES([GTK3], [gtk+-3.0],
- [GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
- GTK_VERSION=`$PKG_CONFIG gtk+-3.0 --modversion`
-@@ -501,7 +501,7 @@ AS_IF([test "x$with_gtk" == "xgtk3" || test "x$with_gtk" == "xauto"],
- ])
- ])
-
--AS_IF([test "x$with_gtk" == "xgtk2" || test "x$with_gtk" == "xauto"],
-+AS_IF([test "x$with_gtk" = "xgtk2" || test "x$with_gtk" = "xauto"],
- [PKG_CHECK_MODULES([GTK2], [gtk+-2.0],
- [GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
- GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion`
-@@ -550,11 +550,11 @@ AC_ARG_VAR([PYGTK_CODEGEN], [full path to pygtk-codegen program (python2 only)])
- AC_ARG_VAR([PYGTK_DEFS], [directory where PyGTK definitions may be found (python2 only)])
-
- AS_IF([test -z "$PYTHON"],
-- [AS_IF([test "x$with_python" == "xauto"],
-+ [AS_IF([test "x$with_python" = "xauto"],
- [AC_PATH_PROGS([PYTHON], [python3 python2 python], [:], [$PATH])],
-- [AS_IF([test "x$with_python" == "xpython3"],
-+ [AS_IF([test "x$with_python" = "xpython3"],
- [AC_PATH_PROGS([PYTHON], [python3 python], [:], [$PATH])],
-- [AS_IF([test "x$with_python" == "xpython2"],
-+ [AS_IF([test "x$with_python" = "xpython2"],
- [AC_PATH_PROGS([PYTHON], [python2 python], [:], [$PATH])],
- [with_python="no"])
- ])
-@@ -608,7 +608,7 @@ AM_CONDITIONAL([HAVE_PYGTK2], [test "x$with_pygtk2" != "xno"])
-
- dnl GObject Introspection (GIR)
-
--AS_IF([test "x$with_gir" == "xyes" && test "x$with_gtk" != "xno"],
-+AS_IF([test "x$with_gir" = "xyes" && test "x$with_gtk" != "xno"],
- [m4_ifdef([GOBJECT_INTROSPECTION_CHECK],
- [GOBJECT_INTROSPECTION_CHECK([0.6.7])
- AS_IF([test "x$found_introspection" = "xyes"],
-@@ -696,7 +696,7 @@ AC_ARG_WITH([java],
- [],
- [with_java="check"])
-
--JAVAC=${JAVAC/ecj/ecj -1.5}
-+JAVAC="$(echo $JAVAC | sed 's/ecj/ecj -1.5/')"
-
- # Javah was obsoleted on Java 8 and removed on Java 11. So, we need to
- # look strictly at the $JAVA_HOME in order to avoid mixing different versions
-@@ -707,13 +707,13 @@ AM_CONDITIONAL([HAVE_JAVAH], [test "x$JAVAH" != "x"])
-
- AC_ARG_VAR([JAR], [location of Java archive tool])
- AC_PATH_PROGS([JAR], [jar], [:], [$JAVA_PATH])
--AS_IF([test "x$JAR" == "x:"], [have_java="no"])
-+AS_IF([test "x$JAR" = "x:"], [have_java="no"])
-
- AC_ARG_VAR([JAVA], [location of Java application launcher])
- AC_PATH_PROGS([JAVA], [java], [/bin/false], [$JAVA_PATH])
-
- AC_ARG_VAR([CLASSPATH], [Java class path (include JUnit to run java tests)])
--AS_IF([test "x$CLASSPATH" == "x"], [CLASSPATH="."])
-+AS_IF([test "x$CLASSPATH" = "x"], [CLASSPATH="."])
-
- dnl Search for Java unit test library
- AS_IF([test -z "$JUNIT_HOME"],
-@@ -850,7 +850,7 @@ echo "GTK --with-gtk=$with_gtk Gtk${GTK_VERSION}"
- echo "GObject introspection --with-gir=$with_gir"
- echo "Qt --with-qt=$with_qt Qt${QT_VERSION}"
- echo "Java --with-java=$with_java"
--AS_IF([test "x$win32" == "xno"],
-+AS_IF([test "x$win32" = "xno"],
- [echo "Dbus --with-dbus=$with_dbus"])
- AS_IF([test "x$have_GM" = "xyes"],
- [echo "GraphicsMagick --with-graphicsmagick=yes"],
-@@ -873,13 +873,13 @@ AS_IF([test "x$have_IM" != "xyes" && test "x$have_GM" != "xyes"],
- [echo " => the zbarimg file scanner will *NOT* be built"])
- AS_IF([test "x$have_GM" = "xyes"],
- [echo " => ImageMagick is preferred, as GraphicsMagick doesn't support https"])
--AS_IF([test "x$with_gtk" == "xno"],
-+AS_IF([test "x$with_gtk" = "xno"],
- [echo " => GTK support will *NOT* be built"])
- AS_IF([test "x$with_pygtk2" != "xyes" && test "xPYTHON_VERSION_MAJOR" = "x2"],
- [echo " => the Python 2 GTK widget wrapper will *NOT* be built"])
- AS_IF([test "x$with_qt" != "xyes"],
- [echo " => the Qt widget will *NOT* be built"])
--AS_IF([test "x$with_qt" == "xyes" && test "x$enable_static_qt" == "xyes" ],
-+AS_IF([test "x$with_qt" = "xyes" && test "x$enable_static_qt" = "xyes" ],
- [echo " => Building a static Qt library"])
- AS_IF([test "x$with_java" != "xyes"],
- [echo " => the Java interface will *NOT* be built"])
-@@ -888,5 +888,5 @@ AS_IF([test "x$with_java_unit" != "xyes"],
- #echo "NPAPI Plugin --with-npapi=$with_npapi"
- #AS_IF([test "x$with_mozilla" != "xyes"],
- # [echo " => the Mozilla/Firefox/OpenOffice plugin will *NOT* be built"])
--AS_IF([test "x$enable_pdf417" == "xyes"],
-+AS_IF([test "x$enable_pdf417" = "xyes"],
- [echo " => the pdf417 code support is incomplete!"])
---
-2.30.0
-
diff --git a/media-gfx/zbar/files/zbar-0.23.1_python_tp_print.patch b/media-gfx/zbar/files/zbar-0.23.1_python_tp_print.patch
new file mode 100644
index 000000000000..8d4d821426d2
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23.1_python_tp_print.patch
@@ -0,0 +1,55 @@
+From 938d39716488b545b92c28f48acc94a7b8fc9138 Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Date: Tue, 28 Jul 2020 10:27:30 +0200
+Subject: [PATCH] python: enum: make it compatible with Python 3.9
+
+As reported by:
+ https://github.com/mchehab/zbar/issues/92
+
+python bindings don't build with Python 3.9, because it is
+using tp_print, which has been silently ignored since Python
+3.0, according with[1]:
+
+ "The tp_print slot of PyTypeObject has been removed.
+ It was used for printing objects to files in Python 2.7
+ and before.
+ Since Python 3.0, it has been ignored and unused."
+
+[1] https://docs.python.org/3.9/whatsnew/3.9.html#id3
+
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+---
+ python/enum.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/python/enum.c b/python/enum.c
+index a1135531..dfe1b1ef 100644
+--- a/python/enum.c
++++ b/python/enum.c
+@@ -76,6 +76,8 @@ enumitem_str (zbarEnumItem *self)
+ return(self->name);
+ }
+
++#if PY_MAJOR_VERSION < 3
++/* tp_print was dropped on Python 3.9 */
+ static int
+ enumitem_print (zbarEnumItem *self,
+ FILE *fp,
+@@ -83,6 +85,7 @@ enumitem_print (zbarEnumItem *self,
+ {
+ return(self->name->ob_type->tp_print(self->name, fp, flags));
+ }
++#endif
+
+ static PyObject*
+ enumitem_repr (zbarEnumItem *self)
+@@ -115,7 +118,9 @@ PyTypeObject zbarEnumItem_Type = {
+ .tp_new = (newfunc)enumitem_new,
+ .tp_dealloc = (destructor)enumitem_dealloc,
+ .tp_str = (reprfunc)enumitem_str,
++#if PY_MAJOR_VERSION < 3
+ .tp_print = (printfunc)enumitem_print,
++#endif
+ .tp_repr = (reprfunc)enumitem_repr,
+ };
+
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
deleted file mode 100644
index 3be9c2222776..000000000000
--- a/media-gfx/zbar/files/zbar-0.23_create_correct_pkconfig_file_for_zbar-qt5.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-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_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
deleted file mode 100644
index 8484e31b7375..000000000000
--- a/media-gfx/zbar/files/zbar-0.23_fix_detection_of_errors_in_the_v4l_read.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-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_reset_conversion_descriptor_after_close.patch b/media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch
deleted file mode 100644
index 75d02cb996a5..000000000000
--- a/media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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;
-+ }
- }
-
- }