public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/
@ 2015-08-10 23:06 Michael Weber
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Weber @ 2015-08-10 23:06 UTC (permalink / raw
  To: gentoo-commits

commit:     6bb3d1e8458fc0872b4d01349fcb8e74e02f3566
Author:     Michael Weber <xmw <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 10 23:05:44 2015 +0000
Commit:     Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Mon Aug 10 23:05:57 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bb3d1e8

media-gfx/zbar: fix UVC webcam compatibility (bug 548034, thanks Scott Alfter).

Package-Manager: portage-2.2.20

 media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch | 49 ++++++++++++++++++++++
 media-gfx/zbar/zbar-0.10-r5.ebuild                 |  7 ++--
 media-gfx/zbar/zbar-0.10_p20121015.ebuild          |  6 +--
 3 files changed, 56 insertions(+), 6 deletions(-)

diff --git a/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch b/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch
new file mode 100644
index 0000000..4fde95e
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch
@@ -0,0 +1,49 @@
+--- zbar-0.10/zbar/video/v4l2.c	2009-10-23 18:16:44.000000000 +0000
++++ zbar-0.10/zbar/video/v4l2.c	2015-03-07 05:46:36.000000000 +0000
+@@ -241,6 +241,21 @@
+     return(0);
+ }
+ 
++static int v4l2_request_buffers (zbar_video_t *vdo)
++{
++    struct v4l2_requestbuffers rb;
++    memset(&rb, 0, sizeof(rb));
++    rb.count = vdo->num_images;
++    rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++    rb.memory = V4L2_MEMORY_USERPTR;
++    if(ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
++        return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
++                           "requesting video frame buffers (VIDIOC_REQBUFS)"));
++    if(rb.count) 
++        vdo->num_images = rb.count;
++    return(0);
++}
++
+ static int v4l2_set_format (zbar_video_t *vdo,
+                             uint32_t fmt)
+ {
+@@ -308,6 +323,8 @@
+         return(-1);
+     if(vdo->iomode == VIDEO_MMAP)
+         return(v4l2_mmap_buffers(vdo));
++    if(vdo->iomode == VIDEO_USERPTR)
++        return(v4l2_request_buffers(vdo));
+     return(0);
+ }
+ 
+@@ -337,8 +354,13 @@
+     else {
+         if(!vdo->iomode)
+             vdo->iomode = VIDEO_USERPTR;
+-        if(rb.count)
+-            vdo->num_images = rb.count;
++        /* releasing buffers 
++         * lest the driver may later refuse to change format
++         */
++        rb.count = 0;
++        if (ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
++            zprintf(0, "WARNING: releasing video buffers failed: error %d\n",
++                errno);
+     }
+     return(0);
+ }

diff --git a/media-gfx/zbar/zbar-0.10-r5.ebuild b/media-gfx/zbar/zbar-0.10-r5.ebuild
index 96d5787..c9873c2 100644
--- a/media-gfx/zbar/zbar-0.10-r5.ebuild
+++ b/media-gfx/zbar/zbar-0.10-r5.ebuild
@@ -38,9 +38,10 @@ pkg_setup() {
 }
 
 src_prepare() {
-	epatch "${FILESDIR}"/${P}-no-v4l1-check.patch
-	epatch "${FILESDIR}"/${P}-errors.patch
-	epatch "${FILESDIR}"/${P}-python-crash.patch
+	epatch "${FILESDIR}"/${P}-no-v4l1-check.patch \
+		"${FILESDIR}"/${P}-errors.patch \
+		"${FILESDIR}"/${P}-python-crash.patch \
+		"${FILESDIR}"/${P}-v4l2-uvcvideo.patch
 
 	use python && python_fix_shebang examples/upcrpc.py test/*.py
 

diff --git a/media-gfx/zbar/zbar-0.10_p20121015.ebuild b/media-gfx/zbar/zbar-0.10_p20121015.ebuild
index 7beedc9..c6f6de1 100644
--- a/media-gfx/zbar/zbar-0.10_p20121015.ebuild
+++ b/media-gfx/zbar/zbar-0.10_p20121015.ebuild
@@ -44,9 +44,9 @@ src_unpack() {
 }
 
 src_prepare() {
-	#epatch "${FILESDIR}"/${P}-no-v4l1-check.patch
-	epatch "${FILESDIR}"/${PN}-0.10-errors.patch
-	epatch "${FILESDIR}"/${PN}-0.10-python-crash.patch
+	epatch "${FILESDIR}"/${PN}-0.10-errors.patch \
+		"${FILESDIR}"/${PN}-0.10-python-crash.patch \
+		"${FILESDIR}"/${PN}-0.10-v4l2-uvcvideo.patch
 
 	use python && python_fix_shebang examples/upcrpc.py test/*.py
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/
@ 2018-05-10 10:08 Andreas Sturmlechner
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Sturmlechner @ 2018-05-10 10:08 UTC (permalink / raw
  To: gentoo-commits

commit:     a660f40c63bfba4fd9eb24134dac99fb25387e3f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu May 10 10:05:27 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu May 10 10:08:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a660f40c

media-gfx/zbar: Drop old

Bug: https://bugs.gentoo.org/641920
Package-Manager: Portage-2.3.36, Repoman-2.3.9

 media-gfx/zbar/Manifest                            |   1 -
 media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch |  74 ---------------
 media-gfx/zbar/zbar-0.10-r6.ebuild                 |  72 ---------------
 media-gfx/zbar/zbar-0.10_p20121015-r1.ebuild       | 100 ---------------------
 4 files changed, 247 deletions(-)

diff --git a/media-gfx/zbar/Manifest b/media-gfx/zbar/Manifest
index 88e2bb7fdc2..eae44cfe62f 100644
--- a/media-gfx/zbar/Manifest
+++ b/media-gfx/zbar/Manifest
@@ -1,2 +1 @@
-DIST zbar-0.10.tar.bz2 592602 BLAKE2B e3379bb915d52912e9d64b4166c60e0625b1c3aae06492040b958b822e14cb9d5974e1e6b1dc69ef3cc4db11115aae76c98359198f1d0fad81312da3e6226e16 SHA512 76cb8a469e3ac9ea7932a95c500cf933501249cdb8dce4df558bf5681bd44c62111327b494e6e887079a5fd30b32154887dcc12962e6d27b1453f55457483db4
 DIST zbar-0.10_p20121015.zip 991578 BLAKE2B 021dfa3920a838fd7bab12b09600ac6949c1495045691c4cc547bfb6ec647658c60984da248b882eabfc0bb123b90401dd3a32adcd66726b1e7072662e303d18 SHA512 7bb74ea5b096093b283c44787547ad0b886281628d012aa7b03ddb477732feb1e12d4d5a661191d34b53b7b272a237f67840e219b0ac5e2803da478a1ddba7a1

diff --git a/media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch b/media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch
deleted file mode 100644
index b25827a0b99..00000000000
--- a/media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- zbar-0.10/configure.ac
-+++ zbar-0.10/configure.ac
-@@ -147,19 +147,13 @@ 
- with_video="no"
- AS_IF([test "x$enable_video" != "xno"],
-   [AS_IF([test "x$win32" = "xno"],
--    [AC_CHECK_HEADERS([linux/videodev.h], [with_video="v4l1"],
--      [AC_MSG_FAILURE([test for video support failed!
--rebuild your kernel to include video4linux support or
--configure --disable-video to skip building video support.])])
--       AC_CHECK_HEADERS([linux/videodev2.h], [with_video="v4l2"],
-+    [AC_CHECK_HEADERS([linux/videodev2.h], [with_video="v4l2"],
-          [AC_MSG_WARN([v4l2 API not detected, upgrade your kernel!])])],
-     [AC_CHECK_HEADERS([vfw.h], [with_video="vfw"],
-       [AC_MSG_FAILURE([test for VfW video support failed!
- configure --disable-video to skip building vidoe support.])])])
- ])
- AM_CONDITIONAL([HAVE_VIDEO], [test "x$enable_video" != "xno"])
--AM_CONDITIONAL([HAVE_V4L1],
--  [test "x$with_video" = "xv4l1" || test "x$with_video" = "xv4l2"])
- AM_CONDITIONAL([HAVE_V4L2], [test "x$with_video" = "xv4l2"])
- 
- dnl X
---- zbar-0.10/zbar/Makefile.am.inc
-+++ zbar-0.10/zbar/Makefile.am.inc
-@@ -53,12 +53,9 @@ 
- zbar_libzbar_la_SOURCES += zbar/processor/posix.h zbar/processor/posix.c
- endif
- 
--if HAVE_V4L1
--zbar_libzbar_la_SOURCES += zbar/video/v4l1.c
- if HAVE_V4L2
- zbar_libzbar_la_SOURCES += zbar/video/v4l2.c
- endif
--endif
- if WIN32
- if HAVE_VIDEO
- zbar_libzbar_la_SOURCES += zbar/video/vfw.c
---- zbar-0.10/zbar/video/v4l2.c
-+++ zbar-0.10/zbar/video/v4l2.c
-@@ -39,6 +39,9 @@ 
- # include <sys/mman.h>
- #endif
- #include <linux/videodev2.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#include <fcntl.h>
- 
- #include "video.h"
- #include "image.h"
-@@ -507,3 +507,23 @@ 
-     vdo->dq = v4l2_dq;
-     return(0);
- }
-+
-+int _zbar_video_open (zbar_video_t *vdo,
-+                      const char *dev)
-+{
-+    vdo->fd = open(dev, O_RDWR);
-+    if(vdo->fd < 0)
-+        return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
-+                               "opening video device '%s'", dev));
-+    zprintf(1, "opened camera device %s (fd=%d)\n", dev, vdo->fd);
-+
-+    int rc = -1;
-+    if(vdo->intf != VIDEO_V4L1)
-+        rc = _zbar_v4l2_probe(vdo);
-+
-+    if(rc && vdo->fd >= 0) {
-+        close(vdo->fd);
-+        vdo->fd = -1;
-+    }
-+    return(rc);
-+}

diff --git a/media-gfx/zbar/zbar-0.10-r6.ebuild b/media-gfx/zbar/zbar-0.10-r6.ebuild
deleted file mode 100644
index 618e4f0f1ff..00000000000
--- a/media-gfx/zbar/zbar-0.10-r6.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools eutils flag-o-matic python-single-r1
-
-DESCRIPTION="Library and tools for reading barcodes from images or video"
-HOMEPAGE="http://zbar.sourceforge.net/"
-SRC_URI="mirror://sourceforge/zbar/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 ~arm x86"
-IUSE="gtk imagemagick jpeg python qt4 static-libs +threads v4l X xv"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="gtk? ( dev-libs/glib:2 x11-libs/gtk+:2 )
-	imagemagick? ( virtual/imagemagick-tools )
-	jpeg? ( virtual/jpeg:0 )
-	python? (
-		${PYTHON_DEPS}
-		gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] )
-	)
-	qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 )
-	X? (
-		x11-libs/libXext
-		xv? ( x11-libs/libXv )
-	)"
-DEPEND="${RDEPEND}
-	sys-devel/gettext
-	virtual/pkgconfig"
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-no-v4l1-check.patch \
-		"${FILESDIR}"/${P}-errors.patch \
-		"${FILESDIR}"/${P}-python-crash.patch \
-		"${FILESDIR}"/${P}-v4l2-uvcvideo.patch
-
-	use python && python_fix_shebang examples/upcrpc.py test/*.py
-
-	sed -i -e '/AM_INIT_AUTOMAKE/s:-Werror ::' configure.ac || die #423581
-	eautoreconf
-}
-
-src_configure() {
-	append-cppflags -DNDEBUG
-	econf \
-		$(use_with jpeg) \
-		$(use_with gtk) \
-		$(use_with imagemagick) \
-		$(use_with python) \
-		$(use_with qt4 qt) \
-		$(use_enable static-libs static) \
-		$(use_enable threads pthread) \
-		$(use_with X x) \
-		$(use_with xv xv) \
-		$(use_enable v4l video)
-}
-
-src_install() {
-	emake DESTDIR="${D}" install
-	dodoc HACKING NEWS README TODO
-	rm -r "${ED}"/usr/share/doc/${PN}
-	prune_libtool_files --all
-}

diff --git a/media-gfx/zbar/zbar-0.10_p20121015-r1.ebuild b/media-gfx/zbar/zbar-0.10_p20121015-r1.ebuild
deleted file mode 100644
index d07b29d8905..00000000000
--- a/media-gfx/zbar/zbar-0.10_p20121015-r1.ebuild
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1
-
-DESCRIPTION="Library and tools for reading barcodes from images or video"
-HOMEPAGE="http://zbar.sourceforge.net/"
-SRC_URI="https://dev.gentoo.org/~xmw/zbar-0.10_p20121015.zip"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
-IUSE="gtk imagemagick java jpeg python qt4 static-libs +threads v4l X xv"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="gtk? ( dev-libs/glib:2 x11-libs/gtk+:2 )
-	imagemagick? ( virtual/imagemagick-tools )
-	jpeg? ( virtual/jpeg:0 )
-	python? (
-		${PYTHON_DEPS}
-		gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] )
-	)
-	qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 )
-	X? (
-		x11-libs/libXext
-		xv? ( x11-libs/libXv )
-	)"
-RDEPEND="${CDEPEND}
-	java? ( >=virtual/jre-1.4 )"
-DEPEND="${CDEPEND}
-	java? ( >=virtual/jdk-1.4 )
-	sys-devel/gettext
-	virtual/pkgconfig"
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	java-pkg-opt-2_pkg_setup
-}
-
-src_unpack() {
-	#vcs-snapshot doesn't work on .zip
-	default
-	mv * ${P} || die
-}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-0.10-errors.patch \
-		"${FILESDIR}"/${PN}-0.10-python-crash.patch \
-		"${FILESDIR}"/${PN}-0.10-v4l2-uvcvideo.patch
-
-	if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then
-		epatch "${FILESDIR}/${P}-ImageMagick-7.diff"
-	fi
-
-	use python && python_fix_shebang examples/upcrpc.py test/*.py
-	java-pkg-opt-2_src_prepare
-
-	sed -e '/AM_INIT_AUTOMAKE/s: -Werror : :' \
-		-e '/^AM_CFLAGS=/s: -Werror::' \
-		-i configure.ac || die
-	sed "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \
-		-i java/Makefile.am
-	eautoreconf
-}
-
-src_configure() {
-	if use java; then
-		export JAVACFLAGS="$(java-pkg_javac-args)"
-		export JAVA_CFLAGS="$(java-pkg_get-jni-cflags)"
-	fi
-
-	append-cppflags -DNDEBUG
-	econf \
-		$(use_with java) \
-		$(use_with jpeg) \
-		$(use_with gtk) \
-		$(use_with imagemagick) \
-		$(use_with python) \
-		$(use_with qt4 qt) \
-		$(use_enable static-libs static) \
-		$(use_enable threads pthread) \
-		$(use_with X x) \
-		$(use_with xv xv) \
-		$(use_enable v4l video)
-}
-
-src_install() {
-	emake DESTDIR="${D}" install
-	dodoc HACKING NEWS README TODO
-	rm -r "${ED}"/usr/share/doc/${PN}
-	prune_libtool_files --all
-}
-
-pkg_preinst() {
-	java-pkg-opt-2_pkg_preinst
-}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/
@ 2018-11-25 17:36 Andreas Sturmlechner
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Sturmlechner @ 2018-11-25 17:36 UTC (permalink / raw
  To: gentoo-commits

commit:     1f2f3092a6bb667be97b3d8dd35a76ab251d72e0
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 25 17:28:48 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Nov 25 17:35:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f2f3092

media-gfx/zbar: Drop 0.10_p20121015-r3

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-gfx/zbar/Manifest                            |   1 -
 media-gfx/zbar/files/zbar-0.10-python-crash.patch  |  19 ---
 media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch |  49 --------
 media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild       | 132 ---------------------
 4 files changed, 201 deletions(-)

diff --git a/media-gfx/zbar/Manifest b/media-gfx/zbar/Manifest
index b5bf4950fae..00a21a631d2 100644
--- a/media-gfx/zbar/Manifest
+++ b/media-gfx/zbar/Manifest
@@ -1,2 +1 @@
-DIST zbar-0.10_p20121015.zip 991578 BLAKE2B 021dfa3920a838fd7bab12b09600ac6949c1495045691c4cc547bfb6ec647658c60984da248b882eabfc0bb123b90401dd3a32adcd66726b1e7072662e303d18 SHA512 7bb74ea5b096093b283c44787547ad0b886281628d012aa7b03ddb477732feb1e12d4d5a661191d34b53b7b272a237f67840e219b0ac5e2803da478a1ddba7a1
 DIST zbar-0.20.1.tar.gz 555199 BLAKE2B f224a2207fa0603da4cc3a0e1d05bc73f3cf0cc9d13c26b3b801d3418f4f6a001b52e468b721552af61f4c8d7357934abd0560c24d3b233107785c69cfe14753 SHA512 21ad9d8fcdecb41bd4b8979366ab8ec6e8eac815f52270b0dc72ce6a126ccef933d048ce8bbe28f46ada5defadf85ba8c97c5c1870c9560a9dab28c585dfaf42

diff --git a/media-gfx/zbar/files/zbar-0.10-python-crash.patch b/media-gfx/zbar/files/zbar-0.10-python-crash.patch
deleted file mode 100644
index a6f7a96e34d..00000000000
--- a/media-gfx/zbar/files/zbar-0.10-python-crash.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-https://sourceforge.net/p/zbar/patches/37/
-
-fix from Debian for crashes when importing the python module.
-http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702499
-
-this doesn't happen on some arches as the data naturally ends up with zero
-data after the structure, but on some (like arm), it isn't so we crash when
-python walks the list.
-
---- a/python/imagescanner.c
-+++ b/python/imagescanner.c
-@@ -68,6 +68,7 @@ imagescanner_get_results (zbarImageScanner *self,
- 
- static PyGetSetDef imagescanner_getset[] = {
-     { "results", (getter)imagescanner_get_results, },
-+    { NULL },
- };
- 
- static PyObject*

diff --git a/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch b/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch
deleted file mode 100644
index 4fde95e2b56..00000000000
--- a/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- zbar-0.10/zbar/video/v4l2.c	2009-10-23 18:16:44.000000000 +0000
-+++ zbar-0.10/zbar/video/v4l2.c	2015-03-07 05:46:36.000000000 +0000
-@@ -241,6 +241,21 @@
-     return(0);
- }
- 
-+static int v4l2_request_buffers (zbar_video_t *vdo)
-+{
-+    struct v4l2_requestbuffers rb;
-+    memset(&rb, 0, sizeof(rb));
-+    rb.count = vdo->num_images;
-+    rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-+    rb.memory = V4L2_MEMORY_USERPTR;
-+    if(ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
-+        return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
-+                           "requesting video frame buffers (VIDIOC_REQBUFS)"));
-+    if(rb.count) 
-+        vdo->num_images = rb.count;
-+    return(0);
-+}
-+
- static int v4l2_set_format (zbar_video_t *vdo,
-                             uint32_t fmt)
- {
-@@ -308,6 +323,8 @@
-         return(-1);
-     if(vdo->iomode == VIDEO_MMAP)
-         return(v4l2_mmap_buffers(vdo));
-+    if(vdo->iomode == VIDEO_USERPTR)
-+        return(v4l2_request_buffers(vdo));
-     return(0);
- }
- 
-@@ -337,8 +354,13 @@
-     else {
-         if(!vdo->iomode)
-             vdo->iomode = VIDEO_USERPTR;
--        if(rb.count)
--            vdo->num_images = rb.count;
-+        /* releasing buffers 
-+         * lest the driver may later refuse to change format
-+         */
-+        rb.count = 0;
-+        if (ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
-+            zprintf(0, "WARNING: releasing video buffers failed: error %d\n",
-+                errno);
-     }
-     return(0);
- }

diff --git a/media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild b/media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild
deleted file mode 100644
index ecdd0ad2dbf..00000000000
--- a/media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools flag-o-matic java-pkg-opt-2 multilib-minimal \
-	python-single-r1 virtualx
-
-DESCRIPTION="Library and tools for reading barcodes from images or video"
-HOMEPAGE="http://zbar.sourceforge.net/"
-SRC_URI="https://dev.gentoo.org/~xmw/zbar-0.10_p20121015.zip"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 ~arm x86"
-IUSE="gtk imagemagick java jpeg python static-libs test +threads v4l X xv"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
-	test? ( X ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="gtk? ( dev-libs/glib:2[${MULTILIB_USEDEP}]
-		x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
-	imagemagick? ( virtual/imagemagick-tools )
-	jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
-	python? (
-		${PYTHON_DEPS}
-		gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] )
-	)
-	X? (
-		x11-libs/libXext[${MULTILIB_USEDEP}]
-		xv? ( x11-libs/libXv[${MULTILIB_USEDEP}] )
-	)"
-RDEPEND="${CDEPEND}
-	java? ( >=virtual/jre-1.4 )"
-DEPEND="${CDEPEND}
-	java? ( >=virtual/jdk-1.4
-		test? ( dev-java/junit:4
-			dev-java/hamcrest-core:1.3 ) )
-	test? ( ${PYTHON_DEPS} )
-	app-arch/unzip
-	sys-devel/gettext
-	virtual/pkgconfig"
-
-pkg_setup() {
-	if use python || use test; then
-		python-single-r1_pkg_setup
-	fi
-	java-pkg-opt-2_pkg_setup
-}
-
-src_unpack() {
-	#vcs-snapshot doesn't work on .zip
-	default
-	mv * ${P} || die
-}
-
-src_prepare() {
-	eapply "${FILESDIR}"/${PN}-0.10-errors.patch \
-		"${FILESDIR}"/${PN}-0.10-python-crash.patch \
-		"${FILESDIR}"/${PN}-0.10-v4l2-uvcvideo.patch
-
-	# fix use of deprecated qt4 function, bug 572488
-	sed -e 's:numBytes:byteCount:g' \
-		-i "${S}"/include/zbar/QZBarImage.h || die
-
-	if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then
-		eapply "${FILESDIR}/${P}-ImageMagick-7.diff"
-	fi
-
-	use python && python_fix_shebang examples/upcrpc.py test/*.py
-	java-pkg-opt-2_src_prepare
-
-	sed -e '/AM_INIT_AUTOMAKE/s: -Werror : :' \
-		-e '/^AM_CFLAGS=/s: -Werror::' \
-		-i configure.ac || die
-	sed "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \
-		-i java/Makefile.am
-	eautoreconf
-}
-
-multilib_src_configure() {
-	if multilib_is_native_abi && use java; then
-		export JAVACFLAGS="$(java-pkg_javac-args)"
-		export JAVA_CFLAGS="$(java-pkg_get-jni-cflags)"
-		if use test ; then # bug 629078
-			java-pkg_append_ CLASSPATH .
-			java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only junit-4 junit.jar)
-			java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only hamcrest-core-1.3 hamcrest-core.jar)
-		fi
-	fi
-
-	append-cppflags -DNDEBUG
-
-	# different flags for image/graphics magick (bug 552350)
-	myimagemagick="--without-imagemagick"
-	has_version media-gfx/imagemagick &&
-		myimagemagick="$(multilib_native_use_with imagemagick)"
-	mygraphicsmagick="--without-graphicsmagick"
-	has_version media-gfx/graphicsmagick &&
-		mygraphicsmagick="$(multilib_native_use_with imagemagick graphicsmagick)"
-	ECONF_SOURCE=${S} \
-	econf \
-		$(multilib_native_use_with java) \
-		$(use_with jpeg) \
-		$(use_with gtk) \
-		${myimagemagick} \
-		${mygraphicsmagick} \
-		$(multilib_native_use_with python) \
-		--without-qt \
-		$(use_enable static-libs static) \
-		$(use_enable threads pthread) \
-		$(use_with X x) \
-		$(use_with xv xv) \
-		$(use_enable v4l video)
-
-	# work-around out-of-source build issue
-	mkdir gtk pygtk qt test || die
-}
-
-src_test() {
-	virtx multilib-minimal_src_test
-}
-
-multilib_src_install_all() {
-	dodoc HACKING NEWS README TODO
-	find "${D}" -name '*.la' -delete || die
-}
-
-pkg_preinst() {
-	java-pkg-opt-2_pkg_preinst
-}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/
@ 2018-11-25 18:00 Andreas Sturmlechner
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Sturmlechner @ 2018-11-25 18:00 UTC (permalink / raw
  To: gentoo-commits

commit:     c8cae200f832c7d05452540a32a925d1e6f16112
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 25 17:59:41 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Nov 25 18:00:16 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8cae200

media-gfx/zbar: Can't drop 0.10_p20121015-r3 yet

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-gfx/zbar/Manifest                            |   1 +
 media-gfx/zbar/files/zbar-0.10-python-crash.patch  |  19 +++
 media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch |  49 ++++++++
 media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild       | 130 +++++++++++++++++++++
 4 files changed, 199 insertions(+)

diff --git a/media-gfx/zbar/Manifest b/media-gfx/zbar/Manifest
index 00a21a631d2..b5bf4950fae 100644
--- a/media-gfx/zbar/Manifest
+++ b/media-gfx/zbar/Manifest
@@ -1 +1,2 @@
+DIST zbar-0.10_p20121015.zip 991578 BLAKE2B 021dfa3920a838fd7bab12b09600ac6949c1495045691c4cc547bfb6ec647658c60984da248b882eabfc0bb123b90401dd3a32adcd66726b1e7072662e303d18 SHA512 7bb74ea5b096093b283c44787547ad0b886281628d012aa7b03ddb477732feb1e12d4d5a661191d34b53b7b272a237f67840e219b0ac5e2803da478a1ddba7a1
 DIST zbar-0.20.1.tar.gz 555199 BLAKE2B f224a2207fa0603da4cc3a0e1d05bc73f3cf0cc9d13c26b3b801d3418f4f6a001b52e468b721552af61f4c8d7357934abd0560c24d3b233107785c69cfe14753 SHA512 21ad9d8fcdecb41bd4b8979366ab8ec6e8eac815f52270b0dc72ce6a126ccef933d048ce8bbe28f46ada5defadf85ba8c97c5c1870c9560a9dab28c585dfaf42

diff --git a/media-gfx/zbar/files/zbar-0.10-python-crash.patch b/media-gfx/zbar/files/zbar-0.10-python-crash.patch
new file mode 100644
index 00000000000..a6f7a96e34d
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.10-python-crash.patch
@@ -0,0 +1,19 @@
+https://sourceforge.net/p/zbar/patches/37/
+
+fix from Debian for crashes when importing the python module.
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702499
+
+this doesn't happen on some arches as the data naturally ends up with zero
+data after the structure, but on some (like arm), it isn't so we crash when
+python walks the list.
+
+--- a/python/imagescanner.c
++++ b/python/imagescanner.c
+@@ -68,6 +68,7 @@ imagescanner_get_results (zbarImageScanner *self,
+ 
+ static PyGetSetDef imagescanner_getset[] = {
+     { "results", (getter)imagescanner_get_results, },
++    { NULL },
+ };
+ 
+ static PyObject*

diff --git a/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch b/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch
new file mode 100644
index 00000000000..4fde95e2b56
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch
@@ -0,0 +1,49 @@
+--- zbar-0.10/zbar/video/v4l2.c	2009-10-23 18:16:44.000000000 +0000
++++ zbar-0.10/zbar/video/v4l2.c	2015-03-07 05:46:36.000000000 +0000
+@@ -241,6 +241,21 @@
+     return(0);
+ }
+ 
++static int v4l2_request_buffers (zbar_video_t *vdo)
++{
++    struct v4l2_requestbuffers rb;
++    memset(&rb, 0, sizeof(rb));
++    rb.count = vdo->num_images;
++    rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++    rb.memory = V4L2_MEMORY_USERPTR;
++    if(ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
++        return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
++                           "requesting video frame buffers (VIDIOC_REQBUFS)"));
++    if(rb.count) 
++        vdo->num_images = rb.count;
++    return(0);
++}
++
+ static int v4l2_set_format (zbar_video_t *vdo,
+                             uint32_t fmt)
+ {
+@@ -308,6 +323,8 @@
+         return(-1);
+     if(vdo->iomode == VIDEO_MMAP)
+         return(v4l2_mmap_buffers(vdo));
++    if(vdo->iomode == VIDEO_USERPTR)
++        return(v4l2_request_buffers(vdo));
+     return(0);
+ }
+ 
+@@ -337,8 +354,13 @@
+     else {
+         if(!vdo->iomode)
+             vdo->iomode = VIDEO_USERPTR;
+-        if(rb.count)
+-            vdo->num_images = rb.count;
++        /* releasing buffers 
++         * lest the driver may later refuse to change format
++         */
++        rb.count = 0;
++        if (ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
++            zprintf(0, "WARNING: releasing video buffers failed: error %d\n",
++                errno);
+     }
+     return(0);
+ }

diff --git a/media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild b/media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild
new file mode 100644
index 00000000000..719be7784d5
--- /dev/null
+++ b/media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit autotools flag-o-matic java-pkg-opt-2 multilib-minimal python-single-r1 virtualx
+
+DESCRIPTION="Library and tools for reading barcodes from images or video"
+HOMEPAGE="http://zbar.sourceforge.net/"
+SRC_URI="https://dev.gentoo.org/~xmw/zbar-0.10_p20121015.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk imagemagick java jpeg python static-libs test +threads v4l X xv"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+	test? ( X ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="gtk? ( dev-libs/glib:2[${MULTILIB_USEDEP}]
+		x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+	imagemagick? ( virtual/imagemagick-tools )
+	jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
+	python? (
+		${PYTHON_DEPS}
+		gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] )
+	)
+	X? (
+		x11-libs/libXext[${MULTILIB_USEDEP}]
+		xv? ( x11-libs/libXv[${MULTILIB_USEDEP}] )
+	)"
+RDEPEND="${CDEPEND}
+	java? ( >=virtual/jre-1.4 )"
+DEPEND="${CDEPEND}
+	java? ( >=virtual/jdk-1.4
+		test? ( dev-java/junit:4
+			dev-java/hamcrest-core:1.3 ) )
+	test? ( ${PYTHON_DEPS} )
+	app-arch/unzip
+	sys-devel/gettext
+	virtual/pkgconfig"
+
+pkg_setup() {
+	if use python || use test; then
+		python-single-r1_pkg_setup
+	fi
+	java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+	#vcs-snapshot doesn't work on .zip
+	default
+	mv * ${P} || die
+}
+
+src_prepare() {
+	eapply "${FILESDIR}"/${PN}-0.10-errors.patch \
+		"${FILESDIR}"/${PN}-0.10-python-crash.patch \
+		"${FILESDIR}"/${PN}-0.10-v4l2-uvcvideo.patch
+
+	# fix use of deprecated qt4 function, bug 572488
+	sed -e 's:numBytes:byteCount:g' \
+		-i "${S}"/include/zbar/QZBarImage.h || die
+
+	if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then
+		eapply "${FILESDIR}/${P}-ImageMagick-7.patch"
+	fi
+
+	use python && python_fix_shebang examples/upcrpc.py test/*.py
+	java-pkg-opt-2_src_prepare
+
+	sed -e '/AM_INIT_AUTOMAKE/s: -Werror : :' \
+		-e '/^AM_CFLAGS=/s: -Werror::' \
+		-i configure.ac || die
+	sed "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \
+		-i java/Makefile.am
+	eautoreconf
+}
+
+multilib_src_configure() {
+	if multilib_is_native_abi && use java; then
+		export JAVACFLAGS="$(java-pkg_javac-args)"
+		export JAVA_CFLAGS="$(java-pkg_get-jni-cflags)"
+		if use test ; then # bug 629078
+			java-pkg_append_ CLASSPATH .
+			java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only junit-4 junit.jar)
+			java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only hamcrest-core-1.3 hamcrest-core.jar)
+		fi
+	fi
+
+	append-cppflags -DNDEBUG
+
+	# different flags for image/graphics magick (bug 552350)
+	myimagemagick="--without-imagemagick"
+	has_version media-gfx/imagemagick &&
+		myimagemagick="$(multilib_native_use_with imagemagick)"
+	mygraphicsmagick="--without-graphicsmagick"
+	has_version media-gfx/graphicsmagick &&
+		mygraphicsmagick="$(multilib_native_use_with imagemagick graphicsmagick)"
+	ECONF_SOURCE=${S} \
+	econf \
+		$(multilib_native_use_with java) \
+		$(use_with jpeg) \
+		$(use_with gtk) \
+		${myimagemagick} \
+		${mygraphicsmagick} \
+		$(multilib_native_use_with python) \
+		--without-qt \
+		$(use_enable static-libs static) \
+		$(use_enable threads pthread) \
+		$(use_with X x) \
+		$(use_with xv xv) \
+		$(use_enable v4l video)
+
+	# work-around out-of-source build issue
+	mkdir gtk pygtk qt test || die
+}
+
+src_test() {
+	virtx multilib-minimal_src_test
+}
+
+multilib_src_install_all() {
+	dodoc HACKING NEWS README TODO
+	find "${D}" -name '*.la' -delete || die
+}
+
+pkg_preinst() {
+	java-pkg-opt-2_pkg_preinst
+}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/
@ 2021-02-27 16:35 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2021-02-27 16:35 UTC (permalink / raw
  To: gentoo-commits

commit:     21481b475595cb9affd1c6b87b648321378c9547
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 27 16:33:03 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 27 16:33:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21481b47

media-gfx/zbar: add nonbash patch to 0.23-r1

Thanks-to: Klaus Ethgen <Klaus+gentoo <AT> Ethgen.de>
Closes: https://bugs.gentoo.org/769716
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/zbar/files/zbar-0.23-r1-nonbash.patch | 120 ++++++++++++++++++++++++
 media-gfx/zbar/zbar-0.23-r1.ebuild              |   1 +
 2 files changed, 121 insertions(+)

diff --git a/media-gfx/zbar/files/zbar-0.23-r1-nonbash.patch b/media-gfx/zbar/files/zbar-0.23-r1-nonbash.patch
new file mode 100644
index 00000000000..1206a209d45
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23-r1-nonbash.patch
@@ -0,0 +1,120 @@
+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/zbar-0.23-r1.ebuild b/media-gfx/zbar/zbar-0.23-r1.ebuild
index 6330b914ce1..d51457a9e1d 100644
--- a/media-gfx/zbar/zbar-0.23-r1.ebuild
+++ b/media-gfx/zbar/zbar-0.23-r1.ebuild
@@ -78,6 +78,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}/${PN}-0.10-errors.patch"
+	"${FILESDIR}/${PN}-0.23-r1-nonbash.patch"
 	"${FILESDIR}/${P}_create_correct_pkconfig_file_for_zbar-qt5.patch"
 	"${FILESDIR}/${P}_fix_detection_of_errors_in_the_v4l_read.patch"
 	"${FILESDIR}/${P}_fix_python_detect.patch"


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/
@ 2021-02-27 16:35 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2021-02-27 16:35 UTC (permalink / raw
  To: gentoo-commits

commit:     91ca0c194e16f0a710264f0c6e09b9210160e845
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Sat Feb 27 16:05:01 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 27 16:28:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91ca0c19

media-gfx/zbar: fix musl build

The patch is taken from upstream
https://github.com/mchehab/zbar/pull/115

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/19688
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/zbar-0.23.1_musl_include_locale_h.patch  | 26 ++++++++++++++++++++++
 media-gfx/zbar/zbar-0.23.1.ebuild                  |  1 +
 2 files changed, 27 insertions(+)

diff --git a/media-gfx/zbar/files/zbar-0.23.1_musl_include_locale_h.patch b/media-gfx/zbar/files/zbar-0.23.1_musl_include_locale_h.patch
new file mode 100644
index 00000000000..3262dd1abcb
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23.1_musl_include_locale_h.patch
@@ -0,0 +1,26 @@
+diff --git a/zbarcam/zbarcam.c b/zbarcam/zbarcam.c
+index f7ea281..2452613 100644
+--- a/zbarcam/zbarcam.c
++++ b/zbarcam/zbarcam.c
+@@ -37,6 +37,7 @@
+ #ifdef ENABLE_NLS
+ #include "../zbar/gettext.h"
+ # include <libintl.h>
++# include <locale.h>
+ # define _(string) gettext(string)
+ #else
+ # define _(string) string
+diff --git a/zbarimg/zbarimg.c b/zbarimg/zbarimg.c
+index 0796fd8..3192ec1 100644
+--- a/zbarimg/zbarimg.c
++++ b/zbarimg/zbarimg.c
+@@ -42,6 +42,7 @@
+ #ifdef ENABLE_NLS
+ #include "../zbar/gettext.h"
+ # include <libintl.h>
++# include <locale.h>
+ # define _(string) gettext(string)
+ #else
+ # define _(string) string
+-- 
+2.26.2

diff --git a/media-gfx/zbar/zbar-0.23.1.ebuild b/media-gfx/zbar/zbar-0.23.1.ebuild
index d5805ede1de..2f529efbe04 100644
--- a/media-gfx/zbar/zbar-0.23.1.ebuild
+++ b/media-gfx/zbar/zbar-0.23.1.ebuild
@@ -83,6 +83,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}/${P}_fix_leftover_on_shell_compatibility.patch"
 	"${FILESDIR}/${P}_fix_unittest.patch"
+	"${FILESDIR}/${P}_musl_include_locale_h.patch"
 	"${FILESDIR}/zbar-0.23_fix_Qt5X11Extras_detect.patch"
 	"${FILESDIR}/zbar-0.23_fix_python_detect.patch"
 )


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/
@ 2021-03-16 15:06 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2021-03-16 15:06 UTC (permalink / raw
  To: gentoo-commits

commit:     a9dfcd0754e2988c0cc78b996238c2d7d429d8a1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 16 15:06:32 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 16 15:06:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9dfcd07

media-gfx/zbar: add autoconf 2.70 patch

Closes: https://bugs.gentoo.org/775656
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../zbar/files/zbar-0.23.1-autoconf-2.70.patch     | 38 ++++++++++++++++++++++
 media-gfx/zbar/zbar-0.23.1.ebuild                  |  5 +--
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/media-gfx/zbar/files/zbar-0.23.1-autoconf-2.70.patch b/media-gfx/zbar/files/zbar-0.23.1-autoconf-2.70.patch
new file mode 100644
index 00000000000..be9547ead11
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23.1-autoconf-2.70.patch
@@ -0,0 +1,38 @@
+https://github.com/mchehab/zbar/commit/89e7900d85dd54ef351a7ed582aec6a5a5d7fa37
+https://bugs.gentoo.org/775656
+
+From 89e7900d85dd54ef351a7ed582aec6a5a5d7fa37 Mon Sep 17 00:00:00 2001
+From: Boyuan Yang <byang@debian.org>
+Date: Thu, 31 Dec 2020 12:56:26 -0500
+Subject: [PATCH] configure.ac: Fix quote issue (autoconf 2.70 compat)
+
+One of the AS_IF() macro was not properly quoted. This commit
+fixes that issue.
+
+This patch closes: #132 (fixes this bug report).
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index df0220a8..db4bc902 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -656,7 +656,7 @@ AS_IF([test "x$with_qt" != "xno"],
+ 					    [with_qt="no"])])])
+ 
+ AS_IF([test "x$with_qt" != "xno"],
+-   AS_IF([test "x$with_qt5" != "xno"],
++   [AS_IF([test "x$with_qt5" != "xno"],
+     [AC_CHECK_PROGS(MOC, [moc-qt5 moc])
+      AC_MSG_NOTICE([using moc from $MOC])
+      QT_VERSION=`$PKG_CONFIG Qt5Gui --modversion`
+@@ -672,7 +672,7 @@ dnl -fPIC has no effect on Windows and breaks windres
+      QT_VERSION=`$PKG_CONFIG QtGui --modversion`
+      AC_MSG_NOTICE([using Qt version $QT_VERSION])
+      qt_pkgconfig_file="zbar-qt.pc"
+-     ]))
++     ])])
+ 
+ AM_CONDITIONAL([HAVE_QT], [test "x$with_qt" = "xyes"])
+ 

diff --git a/media-gfx/zbar/zbar-0.23.1.ebuild b/media-gfx/zbar/zbar-0.23.1.ebuild
index 2f529efbe04..d74a878a969 100644
--- a/media-gfx/zbar/zbar-0.23.1.ebuild
+++ b/media-gfx/zbar/zbar-0.23.1.ebuild
@@ -84,8 +84,9 @@ PATCHES=(
 	"${FILESDIR}/${P}_fix_leftover_on_shell_compatibility.patch"
 	"${FILESDIR}/${P}_fix_unittest.patch"
 	"${FILESDIR}/${P}_musl_include_locale_h.patch"
-	"${FILESDIR}/zbar-0.23_fix_Qt5X11Extras_detect.patch"
-	"${FILESDIR}/zbar-0.23_fix_python_detect.patch"
+	"${FILESDIR}/${PN}-0.23_fix_Qt5X11Extras_detect.patch"
+	"${FILESDIR}/${PN}-0.23_fix_python_detect.patch"
+	"${FILESDIR}/${P}-autoconf-2.70.patch"
 )
 
 DOCS=( README.md NEWS.md TODO.md HACKING.md TODO.md ChangeLog )


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/
@ 2022-04-05 16:35 Andreas Sturmlechner
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Sturmlechner @ 2022-04-05 16:35 UTC (permalink / raw
  To: gentoo-commits

commit:     f108b95e0cc1025f4c6d8119b14e779ff843230e
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  5 15:30:03 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Apr  5 16:33:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f108b95e

media-gfx/zbar: 0.23.90 version bump, EAPI-8 bump

Fix build without dev-qt/qtchooser's unversioned Qt5 binaries in PATH.

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-gfx/zbar/Manifest                            |   1 +
 .../zbar/files/zbar-0.23.90-fix-gtk-default.patch  |  35 ++++
 .../zbar-0.23.90-fix-qt5x11extras-detect.patch     |  18 ++
 .../zbar/files/zbar-0.23.90-fix-unittest.patch     |  78 +++++++
 media-gfx/zbar/zbar-0.23.90.ebuild                 | 228 +++++++++++++++++++++
 5 files changed, 360 insertions(+)

diff --git a/media-gfx/zbar/Manifest b/media-gfx/zbar/Manifest
index a72b685b4bf3..60c7d029a61a 100644
--- a/media-gfx/zbar/Manifest
+++ b/media-gfx/zbar/Manifest
@@ -1 +1,2 @@
 DIST zbar-0.23.1.tar.gz 1019268 BLAKE2B 5aa8725a0945b6f50eb78bb7b8a61e5b46356b18f07e8af778a63d46b94c894d9e827ed71bd89060898ecbdaebc5b4bb6e638939d7bc0dede390f7137770049f SHA512 ae7741cf750a10cf53dc11abcd482c3885507153ee37f6e3364ed5ed72184ebb009560b8c40d8090603a551fb681700a962838a59ce77d005d080ee49fbfa54b
+DIST zbar-0.23.90.tar.gz 1005314 BLAKE2B 5d0c193509602dfb55741b421e1d28f1424ecec50aa3be584912544a587922c053284c41cf14ff0b4824095d0d376381ed055e7faf9ff394bd8d44fd9ed2971d SHA512 d73d71873bec68ee021997512a9edbd223f5f5fe43c66c4dd3502224ba6009be2e5e1714766cb8e1056244673e87e0939ed0319116f61d7371b5ab79fb5e04eb

diff --git a/media-gfx/zbar/files/zbar-0.23.90-fix-gtk-default.patch b/media-gfx/zbar/files/zbar-0.23.90-fix-gtk-default.patch
new file mode 100644
index 000000000000..b1316243dd24
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23.90-fix-gtk-default.patch
@@ -0,0 +1,35 @@
+From 468f6bda627d683b3f40dbaf242c158409666f7e Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Date: Sat, 13 Mar 2021 18:04:57 +0100
+Subject: [PATCH] configure.ac: fix some issues with gtk parameter
+
+By default, it uses Gtk3. Also, the with_gtk set to "no"
+is wrong.
+
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b6f87531..30a59f72 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -492,7 +492,7 @@ AS_IF([test "x$with_npapi" != "xno"],
+ AM_CONDITIONAL([HAVE_NPAPI], [test "x$with_npapi" = "xyes"])
+ 
+ dnl GTK
+-dnl For now, defaults to GTK version 2
++dnl For now, defaults to GTK version 3
+ 
+ AC_ARG_WITH([gtk],
+   [AS_HELP_STRING([--with-gtk],
+@@ -500,7 +500,7 @@ AC_ARG_WITH([gtk],
+   [AS_IF([test "x$with_gtk" != "xno"   && test "x$with_gtk" != "xauto" &&
+           test "x$with_gtk" != "xgtk2" && test "x$with_gtk" != "xgtk3"],
+          [echo "Invalid value for --with-gtk. Falling back to 'no'"
+-          with_gtk="xno"])],
++          with_gtk="no"])],
+   [with_gtk="auto"])
+ 
+ AC_ARG_VAR([GLIB_GENMARSHAL], [full path to glib-genmarshal])

diff --git a/media-gfx/zbar/files/zbar-0.23.90-fix-qt5x11extras-detect.patch b/media-gfx/zbar/files/zbar-0.23.90-fix-qt5x11extras-detect.patch
new file mode 100644
index 000000000000..e8f6357eb486
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23.90-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.90-fix-unittest.patch b/media-gfx/zbar/files/zbar-0.23.90-fix-unittest.patch
new file mode 100644
index 000000000000..589ebd4e287c
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23.90-fix-unittest.patch
@@ -0,0 +1,78 @@
+diff -ur a/configure.ac b/configure.ac
+--- a/configure.ac	2020-04-21 00:09:21.000000000 +0300
++++ b/configure.ac	2020-04-23 16:53:06.654339488 +0300
+@@ -336,6 +336,14 @@
+   AC_SUBST(DBUS_CONFDIR)
+ ])
+ 
++dnl zbarimg tests
++AC_ARG_WITH([zbarimg_tests],
++  [AS_HELP_STRING([--without-zbarimg-tests],
++    [disable tests for zbarimg])],
++  [],
++  [with_zbarimg_tests="yes"])
++AM_CONDITIONAL([HAVE_ZBARIMG_TESTS], [test "x$with_zbarimg_tests" = "xyes"])
++
+ dnl libjpeg
+ AC_ARG_WITH([jpeg],
+   [AS_HELP_STRING([--without-jpeg],
+@@ -724,25 +732,12 @@
+ 
+ AC_ARG_VAR([CLASSPATH], [Java class path (include JUnit to run java tests)])
+ AS_IF([test "x$CLASSPATH" = "x"], [CLASSPATH="."])
++AC_SUBST(CLASSPATH)
+ 
+-dnl Search for Java unit test library
+-AS_IF([test -z "$JUNIT_HOME"],
+-      [JUNIT_HOME="/usr/share/java"])
+-
+-AS_IF([test -f "$JUNIT_HOME/junit4.jar"],
+-      [JUNIT="$JUNIT_HOME/junit4.jar"],
+-      [AS_IF([test -f "$JUNIT_HOME/junit.jar"],
+-	    [JUNIT="$JUNIT_HOME/junit.jar"])])
+-
+-AS_IF([test "x$JUNIT" != "x"],
+-      [AS_IF([test -f "/usr/share/java/hamcrest/all.jar"],
+-	     [CLASSPATH="$JUNIT:/usr/share/java/hamcrest/all.jar:$CLASSPATH"
+-              AC_SUBST(CLASSPATH)
+-              with_java_unit="yes"])],
+-      [AS_IF([test -f "/usr/share/java/hamcrest-all.jar"],
+-             [CLASSPATH="$JUNIT:/usr/share/java/hamcrest-all.jar:$CLASSPATH"
+-              AC_SUBST(CLASSPATH)
+-              with_java_unit="yes"])])
++AC_ARG_WITH([java_unit],
++  [AS_HELP_STRING([--without-java-unit],
++    [Enable java unittest])],
++  [with_java_unit="yes"])
+ 
+ AM_CONDITIONAL([HAVE_JAVA_UNIT], [test "x$with_java_unit" = "xyes"])
+ 
+@@ -905,6 +900,8 @@
+   [echo "        => the Java interface will *NOT* be built"])
+ AS_IF([test "x$with_java_unit" != "xyes"],
+   [echo "        => the Java unit test will *NOT* be enabled"])
++AS_IF([test "x$with_zbarimg_tests" != "xyes"],
++  [echo "        => zbarimg tests will *NOT* be enabled"])
+ dnl echo "NPAPI Plugin     --with-npapi=$with_npapi"
+ dnl AS_IF([test "x$with_mozilla" != "xyes"],
+ dnl  [echo "       => the Mozilla/Firefox/OpenOffice plugin will *NOT* be built"])
+diff -ur a/test/Makefile.am.inc b/test/Makefile.am.inc
+--- a/test/Makefile.am.inc	2020-04-21 00:09:21.000000000 +0300
++++ b/test/Makefile.am.inc	2020-04-23 17:03:07.819999370 +0300
+@@ -91,11 +91,16 @@
+ regress-decoder: test/test_decode
+ 	@abs_top_builddir@/test/test_decode -q -n 100000
+ 
++if HAVE_ZBARIMG_TESTS
+ check-images-py: zbarimg/zbarimg
+ 	@PYTHON@ @abs_top_srcdir@/test/barcodetest.py
+ 
+ check-images: zbarimg/zbarimg
+ 	@abs_top_builddir@/test/test_examples.sh
++else
++check-images-py:
++check-images:
++endif
+ 
+ check-convert: test/test_convert
+ 	@abs_top_srcdir@/test/test_convert

diff --git a/media-gfx/zbar/zbar-0.23.90.ebuild b/media-gfx/zbar/zbar-0.23.90.ebuild
new file mode 100644
index 000000000000..91cdcabb9f33
--- /dev/null
+++ b/media-gfx/zbar/zbar-0.23.90.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit autotools flag-o-matic java-pkg-opt-2 multilib-minimal python-single-r1 qmake-utils virtualx
+
+DESCRIPTION="Library and tools for reading barcodes from images or video"
+HOMEPAGE="https://github.com/mchehab/zbar"
+SRC_URI="https://github.com/mchehab/zbar/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="dbus graphicsmagick gtk +imagemagick introspection java jpeg nls python qt5 static-libs test +threads v4l X xv"
+
+REQUIRED_USE="
+	introspection? ( gtk )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	test? (
+		${PYTHON_REQUIRED_USE}
+		X? ( imagemagick )
+	)
+	xv? ( X )"
+
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+	dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	gtk? (
+		dev-libs/glib:2[${MULTILIB_USEDEP}]
+		x11-libs/gtk+:3[${MULTILIB_USEDEP}]
+		introspection? ( dev-libs/gobject-introspection )
+	)
+	imagemagick? (
+		!graphicsmagick? ( media-gfx/imagemagick:=[png,jpeg?] )
+		graphicsmagick? ( media-gfx/graphicsmagick:=[png,jpeg?] )
+	)
+	jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
+	python? ( ${PYTHON_DEPS} )
+	qt5? (
+		dev-qt/qtcore:5
+		dev-qt/qtgui:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+	)
+	v4l? ( media-libs/libv4l:0=[${MULTILIB_USEDEP}] )
+	X? (
+		x11-libs/libX11[${MULTILIB_USEDEP}]
+		x11-libs/libXext[${MULTILIB_USEDEP}]
+		xv? ( x11-libs/libXv[${MULTILIB_USEDEP}] )
+	)"
+
+RDEPEND="${COMMON_DEPEND}
+	java? ( >=virtual/jre-1.8 )"
+
+DEPEND="${COMMON_DEPEND}
+	java? (
+		>=virtual/jdk-1.8
+		test? (
+			dev-java/hamcrest-core:1.3
+			dev-java/junit:4
+		)
+	)
+	test? (
+		${PYTHON_DEPS}
+		$(python_gen_cond_dep '
+			dev-python/pillow[${PYTHON_USEDEP}]
+		')
+	)"
+
+BDEPEND="
+	app-text/xmlto
+	virtual/pkgconfig
+	gtk? ( dev-util/glib-utils )
+	nls? (
+		sys-devel/gettext
+		virtual/libiconv
+	)"
+
+DOCS=( README.md NEWS.md TODO.md HACKING.md TODO.md ChangeLog )
+
+PATCHES=(
+	# git master
+	"${FILESDIR}/${P}-fix-gtk-default.patch"
+	# TODO: upstream?
+	"${FILESDIR}/${PN}-0.23_fix_python_detect.patch"
+	"${FILESDIR}/${P}-fix-unittest.patch"
+	"${FILESDIR}/${P}-fix-qt5x11extras-detect.patch"
+)
+
+pkg_setup() {
+	if use python || use test; then
+		python-single-r1_pkg_setup
+	fi
+	use java && java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	if use python || use test; then
+		if use test; then
+			# make tests happy
+			# because one of the test requires loadable py module from the current ${BUILD_DIR}
+			sed -e "s|PYTHONPATH=@abs_top_srcdir@|PYTHONPATH=@builddir@|g" \
+				-i test/Makefile.am.inc || die
+		fi
+
+		python_fix_shebang \
+			examples/*.py \
+			test/{test_python,barcodetest}.py # test_pygtk.py — py2 only
+	fi
+
+	if use java; then
+		java-pkg-opt-2_src_prepare
+		sed -e "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \
+			-i java/Makefile.am || die
+	fi
+
+	# do not install {LICENSE,INSTALL,etc} doc files with 'make install' (use DOCS=() instead)
+	sed -e "s|^dist_doc_DATA =\(.*\)|dist_doc_DATA =|" -i Makefile.am || die
+
+	eautoreconf
+}
+
+multilib_src_configure() {
+	append-cppflags -DNDEBUG
+
+	local myeconfargs=(
+		$(use_with dbus)
+		$(use_with gtk gtk gtk3) # avoid 'auto'
+		$(use_with jpeg)
+		$(multilib_native_use_with introspection gir)
+		$(multilib_native_use_with java)
+		$(multilib_native_use_with python python auto)
+		$(use_enable nls)
+		$(use_enable static-libs static)
+		$(use_enable threads pthread)
+		$(use_enable v4l video)
+		$(use_with X x)
+		$(use_with X xshm)
+		$(use_with xv xv)
+	)
+
+	if multilib_is_native_abi; then
+		# both must be enabled to use GraphicsMagick
+		if use graphicsmagick; then
+			myeconfargs+=(
+				--with-graphicsmagick
+				--without-imagemagick
+			)
+		elif use imagemagick; then
+			myeconfargs+=(
+				--with-imagemagick
+				--without-graphicsmagick
+			)
+		else
+			myeconfargs+=(
+				--without-imagemagick
+				--without-graphicsmagick
+			)
+		fi
+
+		if use java; then
+			export JAVACFLAGS="$(java-pkg_javac-args)"
+			append-cflags "$(java-pkg_get-jni-cflags)"
+			if use test; then # bug 629078
+				myeconfargs+=( --with-java-unit )
+				java-pkg_append_ CLASSPATH .
+				java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only junit-4 junit.jar)
+				java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only hamcrest-core-1.3 hamcrest-core.jar)
+			fi
+		fi
+
+		if use qt5; then
+			myeconfargs+=(
+				--with-qt
+				--with-qt5
+			)
+		else
+			myeconfargs+=( --without-qt )
+		fi
+	else
+		myeconfargs+=(
+			--without-graphicsmagick
+			--without-imagemagick
+			--without-qt
+		)
+
+		# zbarimg tests with native abi only
+		# (this option from the patch above, stay up to date)
+		use test && myeconfargs+=( --without-zbarimg-tests )
+	fi
+
+	# use bash (bug 721370)
+	CONFIG_SHELL='/bin/bash' \
+	ECONF_SOURCE="${S}" \
+	MOC="$(qt5_get_bindir)"/moc \
+		econf "${myeconfargs[@]}"
+
+	# work around out-of-source build issues for multilib systems (bug 672184)
+	mkdir qt zbarcam || die
+}
+
+src_test() {
+	virtx multilib-minimal_src_test
+}
+
+src_install() {
+	if use qt5; then
+		local MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/zbar/QZBar.h
+			/usr/include/zbar/QZBarImage.h
+		)
+	fi
+	multilib-minimal_src_install
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	find "${D}" -name '*.la' -delete || die
+}
+
+pkg_preinst() {
+	use java && java-pkg-opt-2_pkg_preinst
+}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/
@ 2024-08-05  7:35 Joonas Niilola
  0 siblings, 0 replies; 9+ messages in thread
From: Joonas Niilola @ 2024-08-05  7:35 UTC (permalink / raw
  To: gentoo-commits

commit:     973ecc31e61e26f69cc508250188b2dff5b910f6
Author:     Alan Swanson <reiver <AT> improbability <DOT> net>
AuthorDate: Tue Jul 30 15:23:10 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Aug  5 07:34:42 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=973ecc31

media-gfx/zbar: add 0.23.93 with python3_12 support

Closes: https://bugs.gentoo.org/929630
Signed-off-by: Alan Swanson <reiver <AT> improbability.net>
Closes: https://github.com/gentoo/gentoo/pull/37432
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-gfx/zbar/Manifest                            |   1 +
 ...c-do-not-use-hardcoded-pkg-config-command.patch |  49 +++++
 ...93-configure-ac-use-old-way-to-detect-qt5.patch |  26 +++
 media-gfx/zbar/zbar-0.23.93.ebuild                 | 232 +++++++++++++++++++++
 4 files changed, 308 insertions(+)

diff --git a/media-gfx/zbar/Manifest b/media-gfx/zbar/Manifest
index bad02d9095d4..4ddf45df9813 100644
--- a/media-gfx/zbar/Manifest
+++ b/media-gfx/zbar/Manifest
@@ -1 +1,2 @@
 DIST zbar-0.23.92.tar.gz 1005358 BLAKE2B 97af3c399333abfcd64e45e6c4f38e5da6ed1540447f35f0efe9bc0fb8d296d80c964452afa29d26d22bddd8de31bc3ca6582db38afe8416e9480f11b939e040 SHA512 cae47fb199173fc1c052984865ca0e6aeab330bd6d77506a0937994d459deb4419a3e54e2dcd2e9830ffb8acf14f29e22e0a6becc9e4cfe19b07dad1babe9513
+DIST zbar-0.23.93.tar.gz 1009320 BLAKE2B 7476776fbb2b2dca4fb94e4eb8c6c5ca7795e32881e93c45002679bdc048cb0bf8d880d2b31f1469a95d718c6d027b7ee0da195951645478493d6f638ae186b5 SHA512 2dd607afbb1e52346bfb740f916c8616112d14153f071f82458b7c653f647b332290a5089543abebfe1c7679eae98b349a84777185d61cfb9ff275bfecc6e08f

diff --git a/media-gfx/zbar/files/zbar-0.23.93-configure-ac-do-not-use-hardcoded-pkg-config-command.patch b/media-gfx/zbar/files/zbar-0.23.93-configure-ac-do-not-use-hardcoded-pkg-config-command.patch
new file mode 100644
index 000000000000..397ad6dd6fbf
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23.93-configure-ac-do-not-use-hardcoded-pkg-config-command.patch
@@ -0,0 +1,49 @@
+From 368571ffa1a0f6cc41f708dd0d27f9b6e9409df8 Mon Sep 17 00:00:00 2001
+From: Boyuan Yang <byang@debian.org>
+Date: Tue, 9 Jan 2024 07:56:32 -0500
+Subject: [PATCH] configure.ac: Do not use hardcoded pkg-config command
+
+Use overridable $PKG_CONFIG instead.
+
+Also fixes some M4 grammar errors in configure.ac.
+
+Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
+---
+ configure.ac | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f0f9723c..a2251e3d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -663,23 +663,23 @@ AC_ARG_WITH([qt6],
+ 
+ AS_IF([test "x$with_qt" != "xno"],
+       [AS_IF([test "x$with_qt6" != "xno"],
+-	     PKG_CHECK_MODULES([QT],
++	     [PKG_CHECK_MODULES([QT],
+                                [Qt6],
+-                               [MOC=`pkg-config Qt6 --variable=moc`
++                               [MOC=`$PKG_CONFIG Qt6 --variable=moc`
+                                 QT_VERSION=`$PKG_CONFIG Qt6 --modversion`
+-                                QT6_HEADERS=`pkg-config Qt6 --variable=headerdir`
++                                QT6_HEADERS=`$PKG_CONFIG Qt6 --variable=headerdir`
+                                 CPPFLAGS="$CPPFLAGS -I$QT6_HEADERS -I$QT6_HEADERS/QtWidgets -I$QT6_HEADERS/QtCore -I$QT6_HEADERS/QtGui"
+                                 qt_pkgconfig_file="zbar-qt5.pc"
+                                ],
+-                               [with_qt6="no"]))
++                               [with_qt6="no"])])
+        AS_IF([test "x$with_qt6" = "xno"],
+-             PKG_CHECK_MODULES([QT],
++             [PKG_CHECK_MODULES([QT],
+                                [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 Qt5X11Extras >= 5.0],
+-                               [MOC=`pkg-config Qt5 --variable=moc`
++                               [MOC=`$PKG_CONFIG Qt5 --variable=moc`
+                                 QT_VERSION=`$PKG_CONFIG Qt5 --modversion`
+                                 qt_pkgconfig_file="zbar-qt5.pc"
+                                ],
+-                               [with_qt="no"]))
++                               [with_qt="no"])])
+       ])
+ 
+ AC_ARG_VAR([MOC], [full path to Qt moc program])

diff --git a/media-gfx/zbar/files/zbar-0.23.93-configure-ac-use-old-way-to-detect-qt5.patch b/media-gfx/zbar/files/zbar-0.23.93-configure-ac-use-old-way-to-detect-qt5.patch
new file mode 100644
index 000000000000..a5e9dba8ebea
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.23.93-configure-ac-use-old-way-to-detect-qt5.patch
@@ -0,0 +1,26 @@
+From a549566ea11eb03622bd4458a1728ffe3f589163 Mon Sep 17 00:00:00 2001
+From: Boyuan Yang <byang@debian.org>
+Date: Wed, 10 Jan 2024 10:57:29 -0500
+Subject: [PATCH] configure.ac: Use old way to detect Qt5
+
+Bug: https://github.com/mchehab/zbar/issues/277
+Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a2251e3d..0e5641e5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -675,8 +675,8 @@ AS_IF([test "x$with_qt" != "xno"],
+        AS_IF([test "x$with_qt6" = "xno"],
+              [PKG_CHECK_MODULES([QT],
+                                [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 Qt5X11Extras >= 5.0],
+-                               [MOC=`$PKG_CONFIG Qt5 --variable=moc`
+-                                QT_VERSION=`$PKG_CONFIG Qt5 --modversion`
++                               [AC_CHECK_PROGS([MOC], [moc-qt5 moc])
++                                QT_VERSION=`$PKG_CONFIG Qt5Gui --modversion`;
+                                 qt_pkgconfig_file="zbar-qt5.pc"
+                                ],
+                                [with_qt="no"])])

diff --git a/media-gfx/zbar/zbar-0.23.93.ebuild b/media-gfx/zbar/zbar-0.23.93.ebuild
new file mode 100644
index 000000000000..2de79e7129ae
--- /dev/null
+++ b/media-gfx/zbar/zbar-0.23.93.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit autotools flag-o-matic java-pkg-opt-2 multilib-minimal python-single-r1 qmake-utils virtualx
+
+DESCRIPTION="Library and tools for reading barcodes from images or video"
+HOMEPAGE="https://github.com/mchehab/zbar"
+SRC_URI="https://github.com/mchehab/zbar/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="dbus graphicsmagick gtk +imagemagick introspection java jpeg nls python qt5 static-libs test +threads v4l X xv"
+
+REQUIRED_USE="
+	introspection? ( gtk )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	test? (
+		${PYTHON_REQUIRED_USE}
+		X? ( imagemagick )
+	)
+	xv? ( X )"
+
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+	dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	gtk? (
+		dev-libs/glib:2[${MULTILIB_USEDEP}]
+		x11-libs/gtk+:3[${MULTILIB_USEDEP}]
+		introspection? ( dev-libs/gobject-introspection )
+	)
+	imagemagick? (
+		!graphicsmagick? ( media-gfx/imagemagick:=[png,jpeg?] )
+		graphicsmagick? ( media-gfx/graphicsmagick:=[png,jpeg?] )
+	)
+	jpeg? ( media-libs/libjpeg-turbo:0[${MULTILIB_USEDEP}] )
+	python? ( ${PYTHON_DEPS} )
+	qt5? (
+		dev-qt/qtcore:5
+		dev-qt/qtgui:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+	)
+	v4l? ( media-libs/libv4l:0=[${MULTILIB_USEDEP}] )
+	X? (
+		x11-libs/libX11[${MULTILIB_USEDEP}]
+		x11-libs/libXext[${MULTILIB_USEDEP}]
+		xv? ( x11-libs/libXv[${MULTILIB_USEDEP}] )
+	)"
+
+RDEPEND="${COMMON_DEPEND}
+	java? ( >=virtual/jre-1.8 )"
+
+DEPEND="${COMMON_DEPEND}
+	java? (
+		>=virtual/jdk-1.8
+		test? (
+			dev-java/hamcrest-core:1.3
+			dev-java/junit:4
+		)
+	)
+	test? (
+		${PYTHON_DEPS}
+		$(python_gen_cond_dep '
+			dev-python/pillow[${PYTHON_USEDEP}]
+		')
+		elibc_musl? ( sys-libs/argp-standalone )
+	)"
+
+BDEPEND="
+	app-text/xmlto
+	sys-devel/gettext
+	virtual/pkgconfig
+	gtk? ( dev-util/glib-utils )
+	nls? (
+		sys-devel/gettext
+		virtual/libiconv
+	)"
+
+DOCS=( README.md NEWS.md TODO.md HACKING.md TODO.md ChangeLog )
+
+PATCHES=(
+	# TODO: upstream?
+	"${FILESDIR}/${PN}-0.23_fix_python_detect.patch"
+	"${FILESDIR}/${PN}-0.23.90-fix-unittest.patch"
+	"${FILESDIR}/${PN}-0.23.93-configure-ac-do-not-use-hardcoded-pkg-config-command.patch"
+	"${FILESDIR}/${PN}-0.23.93-configure-ac-use-old-way-to-detect-qt5.patch"
+)
+
+pkg_setup() {
+	if use python || use test; then
+		python-single-r1_pkg_setup
+	fi
+	use java && java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	if use python || use test; then
+		if use test; then
+			# make tests happy
+			# because one of the test requires loadable py module from the current ${BUILD_DIR}
+			sed -e "s|PYTHONPATH=@abs_top_srcdir@|PYTHONPATH=@builddir@|g" \
+				-i test/Makefile.am.inc || die
+		fi
+
+		python_fix_shebang \
+			examples/*.py \
+			test/{test_python,barcodetest}.py # test_pygtk.py — py2 only
+	fi
+
+	if use java; then
+		java-pkg-opt-2_src_prepare
+		sed -e "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \
+			-i java/Makefile.am || die
+	fi
+
+	# do not install {LICENSE,INSTALL,etc} doc files with 'make install' (use DOCS=() instead)
+	sed -e "s|^dist_doc_DATA =\(.*\)|dist_doc_DATA =|" -i Makefile.am || die
+
+	eautoreconf
+}
+
+multilib_src_configure() {
+	append-cppflags -DNDEBUG
+
+	local myeconfargs=(
+		$(use_with dbus)
+		$(use_with gtk gtk gtk3) # avoid 'auto'
+		$(use_with jpeg)
+		$(multilib_native_use_with introspection gir)
+		$(multilib_native_use_with java)
+		$(multilib_native_use_with python python auto)
+		$(use_enable nls)
+		$(use_enable static-libs static)
+		$(use_enable threads pthread)
+		$(use_enable v4l video)
+		$(use_with X x)
+		$(use_with X xshm)
+		$(use_with xv xv)
+	)
+
+	if multilib_is_native_abi; then
+		# both must be enabled to use GraphicsMagick
+		if use imagemagick && use graphicsmagick; then
+			myeconfargs+=(
+				--with-graphicsmagick
+				--without-imagemagick
+			)
+		elif ! use graphicsmagick && use imagemagick; then
+			myeconfargs+=(
+				--with-imagemagick
+				--without-graphicsmagick
+			)
+		else
+			myeconfargs+=(
+				--without-imagemagick
+				--without-graphicsmagick
+			)
+		fi
+
+		if use java; then
+			export JAVACFLAGS="$(java-pkg_javac-args)"
+			append-cflags "$(java-pkg_get-jni-cflags)"
+			if use test; then # bug 629078
+				myeconfargs+=( --with-java-unit )
+				CLASSPATH+=":$(java-pkg_getjar --build-only junit-4 junit.jar)"
+				CLASSPATH+=":$(java-pkg_getjar --build-only hamcrest-core-1.3 hamcrest-core.jar)"
+			fi
+		fi
+
+		if use qt5; then
+			myeconfargs+=(
+				--with-qt
+			)
+		else
+			myeconfargs+=( --without-qt )
+		fi
+
+		if use test && use elibc_musl; then
+			append-ldflags -largp
+		fi
+
+	else
+		myeconfargs+=(
+			--without-graphicsmagick
+			--without-imagemagick
+			--without-qt
+		)
+
+		# zbarimg tests with native abi only
+		# (this option from the patch above, stay up to date)
+		use test && myeconfargs+=( --without-zbarimg-tests )
+	fi
+
+	# use bash (bug 721370)
+	CONFIG_SHELL='/bin/bash' \
+	ECONF_SOURCE="${S}" \
+	MOC="$(qt5_get_bindir)"/moc \
+		econf "${myeconfargs[@]}"
+
+	# work around out-of-source build issues for multilib systems (bug 672184)
+	mkdir qt zbarcam || die
+}
+
+src_test() {
+	virtx multilib-minimal_src_test
+}
+
+src_install() {
+	if use qt5; then
+		local MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/zbar/QZBar.h
+			/usr/include/zbar/QZBarImage.h
+		)
+	fi
+	multilib-minimal_src_install
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	find "${D}" -name '*.la' -delete || die
+}
+
+pkg_preinst() {
+	use java && java-pkg-opt-2_pkg_preinst
+}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-08-05  7:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-27 16:35 [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/, media-gfx/zbar/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-08-05  7:35 Joonas Niilola
2022-04-05 16:35 Andreas Sturmlechner
2021-03-16 15:06 Sam James
2021-02-27 16:35 Sam James
2018-11-25 18:00 Andreas Sturmlechner
2018-11-25 17:36 Andreas Sturmlechner
2018-05-10 10:08 Andreas Sturmlechner
2015-08-10 23:06 Michael Weber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox