1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Marti Raudsepp <marti@juffo.org>
3 # Contributor: Radu Andries <admiral0@tuxfamily.org>
4 # Contributor: Andy Weidenbaum <archbaum@gmail.com>
9 pkgdesc="Application and library for reading bar codes from various sources"
11 url="https://github.com/mchehab/zbar"
13 depends=('dbus' 'imagemagick' 'libsm' 'libxv' 'v4l-utils')
14 makedepends=('gtk3' 'qt5-x11extras' 'python' 'xmlto' 'docbook-xsl' 'gobject-introspection')
15 optdepends=('gtk3: for zbar-gtk'
16 'qt5-x11extras: for zbar-qt'
17 'python: for zbar python bindings')
18 conflicts=('zbar-gtk' 'zbar-qt' 'python-zbar')
19 provides=('zbar-gtk' 'zbar-qt' 'python-zbar')
20 replaces=('zbar-gtk' 'zbar-qt' 'python-zbar')
21 source=("$pkgname-$pkgver.tar.gz::https://github.com/mchehab/zbar/archive/$pkgver.tar.gz"
22 zbar-autoconf-2.70.patch::"https://github.com/mchehab/zbar/commit/89e7900d.patch")
23 sha512sums=('ae7741cf750a10cf53dc11abcd482c3885507153ee37f6e3364ed5ed72184ebb009560b8c40d8090603a551fb681700a962838a59ce77d005d080ee49fbfa54b'
24 'db0006724bb1a51e432c6daa02bef1093886a382db055f00b4d641d28a1ff130425a7e4ff419a97a141b0d012306b12a3aff4f72df1b52a00549d91f9b457094')
28 patch -p1 -i ../zbar-autoconf-2.70.patch # Fix build with autoconf 2.70
31 # Removed in Python 3.9. Ignored in Python 3.0+ anyway.
32 sed -i '/tp_print/d' python/enum.c
37 ./configure --prefix=/usr --with-qt --with-gtk=gtk3 --with-dbusconfdir=/usr/share CFLAGS="$CFLAGS -DNDEBUG"
38 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
44 make DESTDIR="$pkgdir" install
47 # vim:set ts=2 sw=2 et: