Skip to contentSkip to conversation

zbar: Add support for mchehab/zbar

PATCH In review Daniel Gomez 2 participants 3 messages Jan 22, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 zbar: Add support for mchehab/zbar

ZBar project development stopped in 2012 but it was forked and maintained by Mauro Carvalho Chehab to keep it up to date with V4L2 api.

Main repository:
https://github.com/mchehab/zbar

Add support for zbar library mantained by mchehab. Use latest version available 0.23.1.

Compile by default with options: video & python3.

---
 .../0001-make-relies-GNU-extentions.patch     | 36 -----------
 .../0001-qt-Create-subdir-in-Makefile.patch   | 35 +++++++++++
 ...02-zbarcam-Create-subdir-in-Makefile.patch | 40 ++++++++++++
 meta-oe/recipes-support/zbar/zbar_git.bb      | 62 ++++++++++++++-----
 4 files changed, 120 insertions(+), 53 deletions(-)
 delete mode 100644 meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch
 create mode 100644 meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch
 create mode 100644 meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch
meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch deleted +0 -36
deleted file mode 100644
index c93af3296..000000000
@@ -1,36 +0,0 @@
-From 224507bc4b6e58f7a6e445bfebfb59d6b8d78bd6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Fri, 2 Dec 2016 17:38:51 -0800
-Subject: [PATCH] make relies GNU extentions
-
-We get errors like
-`%'-style pattern rules are a GNU make extension
-
-Disable this warning, since we use gmake with OE
-anyway
-
-Signed-off-by: Khem Raj <[email protected]>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -3,7 +3,7 @@ AC_PREREQ([2.61])
- AC_INIT([zbar], [0.10], [[email protected]])
- AC_CONFIG_AUX_DIR(config)
- AC_CONFIG_MACRO_DIR(config)
--AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects std-options dist-bzip2])
-+AM_INIT_AUTOMAKE([1.10 -Wall -Wno-error foreign subdir-objects std-options dist-bzip2])
- AC_CONFIG_HEADERS([include/config.h])
- AC_CONFIG_SRCDIR(zbar/scanner.c)
- LT_PREREQ([2.2])
-@@ -47,7 +47,7 @@ AC_DEFINE_UNQUOTED([LIB_VERSION_REVISION
-   [Library revision])
- 
- AM_CPPFLAGS="-I$srcdir/include"
--AM_CFLAGS="-Wall -Wno-parentheses -Werror"
-+AM_CFLAGS="-Wall -Wno-parentheses"
- AM_CXXFLAGS="$AM_CFLAGS"
- AC_SUBST([AM_CPPFLAGS])
- AC_SUBST([AM_CFLAGS])
meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch new file +35 -0
new file mode 100644
index 000000000..5e614f1fc
@@ -0,0 +1,35 @@
+From 9c67f377477a07495a712f478eabfa8d33164c45 Mon Sep 17 00:00:00 2001
+From: Daniel Gomez <[email protected]>
+Date: Sun, 17 Jan 2021 23:32:51 +0100
+Subject: [PATCH 1/2] qt: Create subdir in Makefile
+
+Create builddir/qt subdir when --with-qt5 is enabled.
+
+Fixes the following error:
+
+moc -Iqt -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtWidgets
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtGui
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtCore
+-I../git/include ../git/include/zbar/QZBar.h -o qt/moc_QZBar.cpp
+moc: Cannot create qt/moc_QZBar.cpp
+make: *** [Makefile:2459: qt/moc_QZBar.cpp] Error 1
+
+Signed-off-by: Daniel Gomez <[email protected]>
+---
+ qt/Makefile.am.inc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/qt/Makefile.am.inc b/qt/Makefile.am.inc
+index b099c2b..c98fbeb 100644
+--- a/qt/Makefile.am.inc
++++ b/qt/Makefile.am.inc
+@@ -15,4 +15,5 @@ qt/moc_%.cpp: qt/%.h
+ 	$(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@
+
+ qt/moc_%.cpp: include/zbar/%.h
++	@$(mkdir_p) qt 2>/dev/null
+ 	$(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@
+--
+2.29.2
+
meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch new file +40 -0
new file mode 100644
index 000000000..a1c27b8b4
@@ -0,0 +1,40 @@
+From fe751929ccc8fd75e350ed6db9d28d04bd31fc79 Mon Sep 17 00:00:00 2001
+From: Daniel Gomez <[email protected]>
+Date: Sun, 17 Jan 2021 23:33:19 +0100
+Subject: [PATCH 2/2] zbarcam: Create subdir in Makefile
+
+Create builddir/zbarcam when --with-qt5 is enabled.
+
+Fixes the following error:
+
+moc -i -Izbarcam -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB
+-DQT_CORE_LIB
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtWidgets
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtX11Extras
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtGui
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtCore
+-I../git/include ../git/zbarcam/zbarcam-qt.cpp -o
+zbarcam/moc_zbarcam_qt.h
+moc: Cannot create zbarcam/moc_zbarcam_qt.h
+make: *** [Makefile:2438: zbarcam/moc_zbarcam_qt.h] Error 1
+
+Signed-off-by: Daniel Gomez <[email protected]>
+---
+ zbarcam/Makefile.am.inc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/zbarcam/Makefile.am.inc b/zbarcam/Makefile.am.inc
+index b6de82c..e90c50c 100644
+--- a/zbarcam/Makefile.am.inc
++++ b/zbarcam/Makefile.am.inc
+@@ -28,6 +28,7 @@ DISTCLEANFILES += $(nodist_zbarcam_zbarcam_qt_SOURCES) zbarcam/moc_zbarcam_qt.h
+ 
+ 
+ zbarcam/moc_zbarcam_qt.h: zbarcam/zbarcam-qt.cpp
++	@$(mkdir_p) zbarcam 2>/dev/null
+ 	$(MOC) -i $(zbarcam_zbarcam_qt_CPPFLAGS) $< -o $@
+ endif
+ 
+-- 
+2.29.2
+
meta-oe/recipes-support/zbar/zbar_git.bb +45 -17

76 lines not on this page · raw message

Signature · 1 line
2.29.2
#1 lore raw

Thanks Daniel

Can you rebase it on latest master and resend ?

Quoted 239 lines · Daniel Gomez

ZBar project development stopped in 2012 but it was forked and maintained by Mauro Carvalho Chehab to keep it up to date with V4L2 api.

Main repository:
https://github.com/mchehab/zbar

Add support for zbar library mantained by mchehab. Use latest version available 0.23.1.

Compile by default with options: video & python3.

---
 .../0001-make-relies-GNU-extentions.patch     | 36 -----------
 .../0001-qt-Create-subdir-in-Makefile.patch   | 35 +++++++++++
 ...02-zbarcam-Create-subdir-in-Makefile.patch | 40 ++++++++++++
 meta-oe/recipes-support/zbar/zbar_git.bb      | 62 ++++++++++++++-----
 4 files changed, 120 insertions(+), 53 deletions(-)
 delete mode 100644 meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch
 create mode 100644 meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch
 create mode 100644 meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch
meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch deleted +0 -36
deleted file mode 100644
index c93af3296..000000000
@@ -1,36 +0,0 @@
-From 224507bc4b6e58f7a6e445bfebfb59d6b8d78bd6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Fri, 2 Dec 2016 17:38:51 -0800
-Subject: [PATCH] make relies GNU extentions
-
-We get errors like
-`%'-style pattern rules are a GNU make extension
-
-Disable this warning, since we use gmake with OE
-anyway
-
-Signed-off-by: Khem Raj <[email protected]>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -3,7 +3,7 @@ AC_PREREQ([2.61])
- AC_INIT([zbar], [0.10], [[email protected]])
- AC_CONFIG_AUX_DIR(config)
- AC_CONFIG_MACRO_DIR(config)
--AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects std-options dist-bzip2])
-+AM_INIT_AUTOMAKE([1.10 -Wall -Wno-error foreign subdir-objects std-options dist-bzip2])
- AC_CONFIG_HEADERS([include/config.h])
- AC_CONFIG_SRCDIR(zbar/scanner.c)
- LT_PREREQ([2.2])
-@@ -47,7 +47,7 @@ AC_DEFINE_UNQUOTED([LIB_VERSION_REVISION
-   [Library revision])
-
- AM_CPPFLAGS="-I$srcdir/include"
--AM_CFLAGS="-Wall -Wno-parentheses -Werror"
-+AM_CFLAGS="-Wall -Wno-parentheses"
- AM_CXXFLAGS="$AM_CFLAGS"
- AC_SUBST([AM_CPPFLAGS])
- AC_SUBST([AM_CFLAGS])
meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch new file +35 -0
new file mode 100644
index 000000000..5e614f1fc
@@ -0,0 +1,35 @@
+From 9c67f377477a07495a712f478eabfa8d33164c45 Mon Sep 17 00:00:00 2001
+From: Daniel Gomez <[email protected]>
+Date: Sun, 17 Jan 2021 23:32:51 +0100
+Subject: [PATCH 1/2] qt: Create subdir in Makefile
+
+Create builddir/qt subdir when --with-qt5 is enabled.
+
+Fixes the following error:
+
+moc -Iqt -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtWidgets
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtGui
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtCore
+-I../git/include ../git/include/zbar/QZBar.h -o qt/moc_QZBar.cpp
+moc: Cannot create qt/moc_QZBar.cpp
+make: *** [Makefile:2459: qt/moc_QZBar.cpp] Error 1
+
+Signed-off-by: Daniel Gomez <[email protected]>
+---
+ qt/Makefile.am.inc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/qt/Makefile.am.inc b/qt/Makefile.am.inc
+index b099c2b..c98fbeb 100644
+--- a/qt/Makefile.am.inc
++++ b/qt/Makefile.am.inc
+@@ -15,4 +15,5 @@ qt/moc_%.cpp: qt/%.h
+       $(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@
+
+ qt/moc_%.cpp: include/zbar/%.h
++      @$(mkdir_p) qt 2>/dev/null
+       $(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@
+--
+2.29.2
+
meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch new file +40 -0
new file mode 100644
index 000000000..a1c27b8b4
@@ -0,0 +1,40 @@
+From fe751929ccc8fd75e350ed6db9d28d04bd31fc79 Mon Sep 17 00:00:00 2001
+From: Daniel Gomez <[email protected]>
+Date: Sun, 17 Jan 2021 23:33:19 +0100
+Subject: [PATCH 2/2] zbarcam: Create subdir in Makefile
+
+Create builddir/zbarcam when --with-qt5 is enabled.
+
+Fixes the following error:
+
+moc -i -Izbarcam -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB
+-DQT_CORE_LIB
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtWidgets
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtX11Extras
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtGui
+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtCore
+-I../git/include ../git/zbarcam/zbarcam-qt.cpp -o
+zbarcam/moc_zbarcam_qt.h
+moc: Cannot create zbarcam/moc_zbarcam_qt.h
+make: *** [Makefile:2438: zbarcam/moc_zbarcam_qt.h] Error 1
+
+Signed-off-by: Daniel Gomez <[email protected]>
+---
+ zbarcam/Makefile.am.inc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/zbarcam/Makefile.am.inc b/zbarcam/Makefile.am.inc
+index b6de82c..e90c50c 100644
+--- a/zbarcam/Makefile.am.inc
++++ b/zbarcam/Makefile.am.inc
+@@ -28,6 +28,7 @@ DISTCLEANFILES += $(nodist_zbarcam_zbarcam_qt_SOURCES) zbarcam/moc_zbarcam_qt.h
+
+
+ zbarcam/moc_zbarcam_qt.h: zbarcam/zbarcam-qt.cpp
++      @$(mkdir_p) zbarcam 2>/dev/null
+       $(MOC) -i $(zbarcam_zbarcam_qt_CPPFLAGS) $< -o $@
+ endif
+
+--
+2.29.2
+
meta-oe/recipes-support/zbar/zbar_git.bb +45 -18
index 181d7ae43..0bb0699a1 100644
@@ -1,31 +1,59 @@
-DESCRIPTION = "2D barcode scanner toolkit."
+HOMEPAGE = "https://github.com/mchehab/zbar"
+SUMMARY = "A bar code library"
+DESRIPTION = "ZBar is an open source software suite for reading bar codes \
+from various sources, such as video streams, image files and raw \
+intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, \
+Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code"
 SECTION = "graphics"
+
 LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5e9ee833a2118adc7d8b5ea38e5b1cef"
 
-DEPENDS = "pkgconfig intltool-native libpng jpeg"
+SRC_URI = "git://github.com/mchehab/zbar.git;branch=master \
+           file://0001-qt-Create-subdir-in-Makefile.patch \
+           file://0002-zbarcam-Create-subdir-in-Makefile.patch \
+"
+SRCREV = "89e7900d85dd54ef351a7ed582aec6a5a5d7fa37"
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=4015840237ca7f0175cd626f78714ca8"
+S = "${WORKDIR}/git"
+PV = "0.23.1+git${SRCPV}"
 
-PV = "0.10+git${SRCPV}"
+DEPENDS += "xmlto-native"
 
-#  iPhoneSDK-1.3.1 tag
-SRCREV = "67003d2a985b5f9627bee2d8e3e0b26d0c474b57"
-SRC_URI = "git://github.com/ZBar/Zbar \
-           file://0001-make-relies-GNU-extentions.patch \
+PACKAGECONFIG ??= "\
+        ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
 "
-S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+PACKAGECONFIG ??= "video python3"
 
-PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+inherit autotools pkgconfig gettext \
+        ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)} \
+        ${@bb.utils.contains('PACKAGECONFIG', 'gtk3', 'gobject-introspection', '', d)} \
+        ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)}
 
-PACKAGECONFIG[x11] = "--with-x,-without-x,libxcb libx11 libsm libxau libxext libxv libice libxdmcp"
+PACKAGECONFIG[x11] = "--with-x, --without-x, libxv"
+PACKAGECONFIG[video] = "--enable-video, --disable-video, v4l-utils libv4l"
+PACKAGECONFIG[jpeg] = "--with-jpeg, --without-jpeg, jpeg"
+PACKAGECONFIG[python3] = "--with-python=auto, --without-python, python3"
+PACKAGECONFIG[gtk3] = "--with-gtk=gtk3, --without-gtk, gtk+3"
+PACKAGECONFIG[qt5] = "--with-qt5, --without-qt5, qtbase qtbase-native qtx11extras qtsvg, qtbase"
+PACKAGECONFIG[imagemagick] = "--with-imagemagick, --without-imagemagick, imagemagick"
 
-EXTRA_OECONF = "--without-imagemagick --without-qt --without-python --disable-video --without-gtk"
+FILES_${PN} += "${bindir} \
+        ${@bb.utils.contains('DEPENDS', 'python3-native', '${libdir}', '', d)} \
+"
+
+CPPFLAGS_append = "\
+        ${@bb.utils.contains('PACKAGECONFIG', 'qt5', '\
+        -I${STAGING_INCDIR}/QtX11Extras \
+        -I${STAGING_INCDIR}/dbus-1.0 \
+        -I${STAGING_LIBDIR}/dbus-1.0/include \
+        ', '', d)} \
+"
 
-CPPFLAGS += "-Wno-error"
+TARGET_CXXFLAGS_append = " -fPIC"
 
-do_install_append() {
-    #remove usr/bin if empty
-    rmdir ${D}${bindir}
+do_prepare_recipe_sysroot_gettext() {
+        install -m 755 ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${S}/
 }
+addtask do_prepare_recipe_sysroot_gettext after do_prepare_recipe_sysroot before do_configure
--

2.29.2

#2 lore raw
Quoted 4 lines · Khem Raj

Thanks Daniel

Can you rebase it on latest master and resend ?

Done. Thanks!

Quoted 277 lines · Daniel Gomez
Quoted 12 lines

ZBar project development stopped in 2012 but it was forked and maintained by Mauro Carvalho Chehab to keep it up to date with V4L2 api.

Main repository:
https://github.com/mchehab/zbar

Add support for zbar library mantained by mchehab. Use latest version available 0.23.1.

Compile by default with options: video & python3.

Quoted 8 lines
---
 .../0001-make-relies-GNU-extentions.patch     | 36 -----------
 .../0001-qt-Create-subdir-in-Makefile.patch   | 35 +++++++++++
 ...02-zbarcam-Create-subdir-in-Makefile.patch | 40 ++++++++++++
 meta-oe/recipes-support/zbar/zbar_git.bb      | 62 ++++++++++++++-----
 4 files changed, 120 insertions(+), 53 deletions(-)
 delete mode 100644

meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch

Quoted 1 line
 create mode 100644

meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch

Quoted 1 line
 create mode 100644

meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch

Quoted 2 lines

diff --git

a/meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch b/meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch

Quoted 3 lines

deleted file mode 100644
index c93af3296..000000000
---

a/meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch

Quoted 15 lines

+++ /dev/null

meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch deleted +0 -13
@@ -1,36 +0,0 @@
-From 224507bc4b6e58f7a6e445bfebfb59d6b8d78bd6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Fri, 2 Dec 2016 17:38:51 -0800
-Subject: [PATCH] make relies GNU extentions
-
-We get errors like
-`%'-style pattern rules are a GNU make extension
-
-Disable this warning, since we use gmake with OE
-anyway
-
-Signed-off-by: Khem Raj <[email protected]>
----

meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch line 23

Quoted 10 lines
meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch deleted +0 -10
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -3,7 +3,7 @@ AC_PREREQ([2.61])
- AC_INIT([zbar], [0.10], [[email protected]])
- AC_CONFIG_AUX_DIR(config)
- AC_CONFIG_MACRO_DIR(config)
--AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects

std-options dist-bzip2])

Review line 24

Quoted 1 line
(quoted diff) +0 -1
-+AM_INIT_AUTOMAKE([1.10 -Wall -Wno-error foreign subdir-objects

std-options dist-bzip2])

Quoted 12 lines
meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch deleted +0 -12
- AC_CONFIG_HEADERS([include/config.h])
- AC_CONFIG_SRCDIR(zbar/scanner.c)
- LT_PREREQ([2.2])
-@@ -47,7 +47,7 @@ AC_DEFINE_UNQUOTED([LIB_VERSION_REVISION
-   [Library revision])
-
- AM_CPPFLAGS="-I$srcdir/include"
--AM_CFLAGS="-Wall -Wno-parentheses -Werror"
-+AM_CFLAGS="-Wall -Wno-parentheses"
- AM_CXXFLAGS="$AM_CFLAGS"
- AC_SUBST([AM_CPPFLAGS])
- AC_SUBST([AM_CFLAGS])
Quoted 1 line

diff --git

a/meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch b/meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch

Quoted 4 lines

new file mode 100644
index 000000000..5e614f1fc
--- /dev/null
+++

b/meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch

meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch line 10

Quoted 12 lines
meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch new file +10 -0
@@ -0,0 +1,35 @@
+From 9c67f377477a07495a712f478eabfa8d33164c45 Mon Sep 17 00:00:00 2001
+From: Daniel Gomez <[email protected]>
+Date: Sun, 17 Jan 2021 23:32:51 +0100
+Subject: [PATCH 1/2] qt: Create subdir in Makefile
+
+Create builddir/qt subdir when --with-qt5 is enabled.
+
+Fixes the following error:
+
+moc -Iqt -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB

+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtWidgets

Quoted 1 line

+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtGui

Quoted 1 line

+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtCore

Quoted 22 lines

+-I../git/include ../git/include/zbar/QZBar.h -o qt/moc_QZBar.cpp

meta-oe/recipes-support/zbar/zbar/0001-qt-Create-subdir-in-Makefile.patch new file +21 -0
+moc: Cannot create qt/moc_QZBar.cpp
+make: *** [Makefile:2459: qt/moc_QZBar.cpp] Error 1
+
+Signed-off-by: Daniel Gomez <[email protected]>
+---
+ qt/Makefile.am.inc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/qt/Makefile.am.inc b/qt/Makefile.am.inc
+index b099c2b..c98fbeb 100644
+--- a/qt/Makefile.am.inc
++++ b/qt/Makefile.am.inc
+@@ -15,4 +15,5 @@ qt/moc_%.cpp: qt/%.h
+       $(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@
+
+ qt/moc_%.cpp: include/zbar/%.h
++      @$(mkdir_p) qt 2>/dev/null
+       $(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@
+--
+2.29.2
+
Quoted 1 line

diff --git

a/meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch b/meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch

Quoted 4 lines

new file mode 100644
index 000000000..a1c27b8b4
--- /dev/null
+++

b/meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch

meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch line 11

Quoted 13 lines
meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch new file +11 -0
@@ -0,0 +1,40 @@
+From fe751929ccc8fd75e350ed6db9d28d04bd31fc79 Mon Sep 17 00:00:00 2001
+From: Daniel Gomez <[email protected]>
+Date: Sun, 17 Jan 2021 23:33:19 +0100
+Subject: [PATCH 2/2] zbarcam: Create subdir in Makefile
+
+Create builddir/zbarcam when --with-qt5 is enabled.
+
+Fixes the following error:
+
+moc -i -Izbarcam -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB
+-DQT_CORE_LIB

+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtWidgets

Quoted 1 line

+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtX11Extras

Quoted 1 line

+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtGui

Quoted 1 line

+-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtCore

Quoted 5 lines

+-I../git/include ../git/zbarcam/zbarcam-qt.cpp -o

meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch new file +4 -0
+zbarcam/moc_zbarcam_qt.h
+moc: Cannot create zbarcam/moc_zbarcam_qt.h
+make: *** [Makefile:2438: zbarcam/moc_zbarcam_qt.h] Error 1
+

meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch

Quoted 10 lines
meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch new file +10 -0
+Signed-off-by: Daniel Gomez <[email protected]>
+---
+ zbarcam/Makefile.am.inc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/zbarcam/Makefile.am.inc b/zbarcam/Makefile.am.inc
+index b6de82c..e90c50c 100644
+--- a/zbarcam/Makefile.am.inc
++++ b/zbarcam/Makefile.am.inc
+@@ -28,6 +28,7 @@ DISTCLEANFILES +=

$(nodist_zbarcam_zbarcam_qt_SOURCES) zbarcam/moc_zbarcam_qt.h

Review

Quoted 11 lines
meta-oe/recipes-support/zbar/zbar/0002-zbarcam-Create-subdir-in-Makefile.patch new file +10 -0
+
+
+ zbarcam/moc_zbarcam_qt.h: zbarcam/zbarcam-qt.cpp
++      @$(mkdir_p) zbarcam 2>/dev/null
+       $(MOC) -i $(zbarcam_zbarcam_qt_CPPFLAGS) $< -o $@
+ endif
+
+--
+2.29.2
+
(quoted diff) +0 -0

b/meta-oe/recipes-support/zbar/zbar_git.bb

meta-oe/recipes-support/zbar/zbar_git.bb line 3

Quoted 8 lines

index 181d7ae43..0bb0699a1 100644

meta-oe/recipes-support/zbar/zbar_git.bb +3 -1
@@ -1,31 +1,59 @@
-DESCRIPTION = "2D barcode scanner toolkit."
+HOMEPAGE = "https://github.com/mchehab/zbar"
+SUMMARY = "A bar code library"
+DESRIPTION = "ZBar is an open source software suite for reading bar

codes \

meta-oe/recipes-support/zbar/zbar_git.bb

Quoted 7 lines
meta-oe/recipes-support/zbar/zbar_git.bb +5 -0
+from various sources, such as video streams, image files and raw \
+intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, \
+Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code"
 SECTION = "graphics"
+
 LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM =

"file://LICENSE.md;md5=5e9ee833a2118adc7d8b5ea38e5b1cef"

Quoted 20 lines
meta-oe/recipes-support/zbar/zbar_git.bb +9 -7
-DEPENDS = "pkgconfig intltool-native libpng jpeg"
+SRC_URI = "git://github.com/mchehab/zbar.git;branch=master \
+           file://0001-qt-Create-subdir-in-Makefile.patch \
+           file://0002-zbarcam-Create-subdir-in-Makefile.patch \
+"
+SRCREV = "89e7900d85dd54ef351a7ed582aec6a5a5d7fa37"
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=4015840237ca7f0175cd626f78714ca8"
+S = "${WORKDIR}/git"
+PV = "0.23.1+git${SRCPV}"
 
-PV = "0.10+git${SRCPV}"
+DEPENDS += "xmlto-native"
 
-#  iPhoneSDK-1.3.1 tag
-SRCREV = "67003d2a985b5f9627bee2d8e3e0b26d0c474b57"
-SRC_URI = "git://github.com/ZBar/Zbar \
-           file://0001-make-relies-GNU-extentions.patch \
+PACKAGECONFIG ??= "\

meta-oe/recipes-support/zbar/zbar_git.bb

Quoted 10 lines
meta-oe/recipes-support/zbar/zbar_git.bb +4 -3
+        ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
 "
-S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+PACKAGECONFIG ??= "video python3"
 
-PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+inherit autotools pkgconfig gettext \
+        ${@bb.utils.contains('PACKAGECONFIG', 'python3',

'python3native', '', d)} \

meta-oe/recipes-support/zbar/zbar_git.bb line 30

Quoted 1 line
meta-oe/recipes-support/zbar/zbar_git.bb +1 -0
+        ${@bb.utils.contains('PACKAGECONFIG', 'gtk3',

'gobject-introspection', '', d)} \

meta-oe/recipes-support/zbar/zbar_git.bb line 31

Quoted 1 line
meta-oe/recipes-support/zbar/zbar_git.bb +1 -0
+        ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths',

'', d)}

meta-oe/recipes-support/zbar/zbar_git.bb line 20

Quoted 2 lines
meta-oe/recipes-support/zbar/zbar_git.bb +0 -1
-PACKAGECONFIG[x11] = "--with-x,-without-x,libxcb libx11 libsm libxau

libxext libxv libice libxdmcp"

meta-oe/recipes-support/zbar/zbar_git.bb line 33

Quoted 2 lines
meta-oe/recipes-support/zbar/zbar_git.bb +2 -0
+PACKAGECONFIG[x11] = "--with-x, --without-x, libxv"
+PACKAGECONFIG[video] = "--enable-video, --disable-video, v4l-utils

libv4l"

meta-oe/recipes-support/zbar/zbar_git.bb

Quoted 4 lines
meta-oe/recipes-support/zbar/zbar_git.bb +4 -0
+PACKAGECONFIG[jpeg] = "--with-jpeg, --without-jpeg, jpeg"
+PACKAGECONFIG[python3] = "--with-python=auto, --without-python, python3"
+PACKAGECONFIG[gtk3] = "--with-gtk=gtk3, --without-gtk, gtk+3"
+PACKAGECONFIG[qt5] = "--with-qt5, --without-qt5, qtbase qtbase-native

qtx11extras qtsvg, qtbase"

meta-oe/recipes-support/zbar/zbar_git.bb line 38

Quoted 1 line
meta-oe/recipes-support/zbar/zbar_git.bb +1 -0
+PACKAGECONFIG[imagemagick] = "--with-imagemagick,

--without-imagemagick, imagemagick"

meta-oe/recipes-support/zbar/zbar_git.bb line 21

Quoted 2 lines
meta-oe/recipes-support/zbar/zbar_git.bb +0 -1
-EXTRA_OECONF = "--without-imagemagick --without-qt --without-python

--disable-video --without-gtk"

meta-oe/recipes-support/zbar/zbar_git.bb line 40

Quoted 2 lines
meta-oe/recipes-support/zbar/zbar_git.bb +2 -0
+FILES_${PN} += "${bindir} \
+        ${@bb.utils.contains('DEPENDS', 'python3-native', '${libdir}',

'', d)} \

Quoted 10 lines
meta-oe/recipes-support/zbar/zbar_git.bb +9 -0
+"
+
+CPPFLAGS_append = "\
+        ${@bb.utils.contains('PACKAGECONFIG', 'qt5', '\
+        -I${STAGING_INCDIR}/QtX11Extras \
+        -I${STAGING_INCDIR}/dbus-1.0 \
+        -I${STAGING_LIBDIR}/dbus-1.0/include \
+        ', '', d)} \
+"
 

meta-oe/recipes-support/zbar/zbar_git.bb

Quoted 10 lines
meta-oe/recipes-support/zbar/zbar_git.bb +4 -4
-CPPFLAGS += "-Wno-error"
+TARGET_CXXFLAGS_append = " -fPIC"
 
-do_install_append() {
-    #remove usr/bin if empty
-    rmdir ${D}${bindir}
+do_prepare_recipe_sysroot_gettext() {
+        install -m 755 ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${S}/
 }
+addtask do_prepare_recipe_sysroot_gettext after

do_prepare_recipe_sysroot before do_configure

Quoted 6 lines
meta-oe/recipes-support/zbar/zbar_git.bb +0 -1
--

2.29.2