blob: 3be1f27a6f2adfd5b614cf1d55d6e62f7e4f76b8 [file] [log] [blame]
Andrew Geisslereef63862021-01-29 15:58:13 -06001HOMEPAGE = "https://github.com/mchehab/zbar"
2SUMMARY = "A bar code library"
3DESRIPTION = "ZBar is an open source software suite for reading bar codes \
4from various sources, such as video streams, image files and raw \
5intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, \
6Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code"
Brad Bishope42b3e32020-01-15 22:08:42 -05007SECTION = "graphics"
Andrew Geisslereef63862021-01-29 15:58:13 -06008
Andrew Geissler9aee5002022-03-30 16:27:02 +00009LICENSE = "LGPL-2.1-only"
Andrew Geisslereef63862021-01-29 15:58:13 -060010LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5e9ee833a2118adc7d8b5ea38e5b1cef"
Brad Bishope42b3e32020-01-15 22:08:42 -050011
Andrew Geissler595f6302022-01-24 19:11:47 +000012SRC_URI = "git://github.com/mchehab/zbar.git;branch=master;protocol=https \
Andrew Geisslerac970dd2021-02-12 15:32:45 -060013 file://0001-qt-Create-subdir-in-Makefile.patch \
14 file://0002-zbarcam-Create-subdir-in-Makefile.patch \
Brad Bishope42b3e32020-01-15 22:08:42 -050015"
Andrew Geisslereef63862021-01-29 15:58:13 -060016SRCREV = "89e7900d85dd54ef351a7ed582aec6a5a5d7fa37"
17
Brad Bishope42b3e32020-01-15 22:08:42 -050018S = "${WORKDIR}/git"
Andrew Geisslereef63862021-01-29 15:58:13 -060019PV = "0.23.1+git${SRCPV}"
Brad Bishope42b3e32020-01-15 22:08:42 -050020
Andrew Geisslereef63862021-01-29 15:58:13 -060021DEPENDS += "xmlto-native"
Brad Bishope42b3e32020-01-15 22:08:42 -050022
Andrew Geisslereef63862021-01-29 15:58:13 -060023PACKAGECONFIG ??= "\
Andrew Geisslerac970dd2021-02-12 15:32:45 -060024 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
Andrew Geisslereef63862021-01-29 15:58:13 -060025"
Brad Bishope42b3e32020-01-15 22:08:42 -050026
Andrew Geissler87f5cff2022-09-30 13:13:31 -050027PACKAGECONFIG ??= "video"
Brad Bishope42b3e32020-01-15 22:08:42 -050028
Andrew Geisslereef63862021-01-29 15:58:13 -060029inherit autotools pkgconfig gettext \
Andrew Geisslerac970dd2021-02-12 15:32:45 -060030 ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)} \
31 ${@bb.utils.contains('PACKAGECONFIG', 'gtk3', 'gobject-introspection', '', d)} \
32 ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)}
Brad Bishope42b3e32020-01-15 22:08:42 -050033
Andrew Geisslereef63862021-01-29 15:58:13 -060034PACKAGECONFIG[x11] = "--with-x, --without-x, libxv"
35PACKAGECONFIG[video] = "--enable-video, --disable-video, v4l-utils libv4l"
36PACKAGECONFIG[jpeg] = "--with-jpeg, --without-jpeg, jpeg"
37PACKAGECONFIG[python3] = "--with-python=auto, --without-python, python3"
38PACKAGECONFIG[gtk3] = "--with-gtk=gtk3, --without-gtk, gtk+3"
39PACKAGECONFIG[qt5] = "--with-qt5, --without-qt5, qtbase qtbase-native qtx11extras qtsvg, qtbase"
40PACKAGECONFIG[imagemagick] = "--with-imagemagick, --without-imagemagick, imagemagick"
Brad Bishope42b3e32020-01-15 22:08:42 -050041
Patrick Williams213cb262021-08-07 19:21:33 -050042FILES:${PN} += "${bindir} \
Andrew Geisslerac970dd2021-02-12 15:32:45 -060043 ${@bb.utils.contains('DEPENDS', 'python3-native', '${libdir}', '', d)} \
Andrew Geisslereef63862021-01-29 15:58:13 -060044"
45
Patrick Williams213cb262021-08-07 19:21:33 -050046CPPFLAGS:append = "\
Andrew Geisslerac970dd2021-02-12 15:32:45 -060047 ${@bb.utils.contains('PACKAGECONFIG', 'qt5', '\
48 -I${STAGING_INCDIR}/QtX11Extras \
49 -I${STAGING_INCDIR}/dbus-1.0 \
50 -I${STAGING_LIBDIR}/dbus-1.0/include \
51 ', '', d)} \
Andrew Geisslereef63862021-01-29 15:58:13 -060052"
53
Patrick Williams213cb262021-08-07 19:21:33 -050054TARGET_CXXFLAGS:append = " -fPIC"
Andrew Geisslereef63862021-01-29 15:58:13 -060055
Patrick Williams213cb262021-08-07 19:21:33 -050056do_configure:prepend() {
Andrew Geisslerac970dd2021-02-12 15:32:45 -060057 install -m 755 ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${S}/
Brad Bishope42b3e32020-01-15 22:08:42 -050058}