Date: Tuesday, March 17, 2020 @ 10:00:26 Author: felixonmars Revision: 377802
upgpkg: zbar 0.23-3 - enable gir - build python3 instead of python2 bindings Modified: zbar/trunk/PKGBUILD ----------+ PKGBUILD | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-03-17 10:00:11 UTC (rev 377801) +++ PKGBUILD 2020-03-17 10:00:26 UTC (rev 377802) @@ -4,14 +4,15 @@ # Contributor: Andy Weidenbaum <archb...@gmail.com> pkgbase=zbar -pkgname=(zbar zbar-gtk zbar-qt python2-zbar) +pkgname=(zbar zbar-gtk zbar-qt python-zbar) pkgver=0.23 -pkgrel=2 +pkgrel=3 pkgdesc="Application and library for reading bar codes from various sources" arch=('x86_64') url="https://github.com/mchehab/zbar" license=('LGPL') -makedepends=('gtk3' 'imagemagick' 'libxv' 'v4l-utils' 'qt5-x11extras' 'pygtk' 'python' 'xmlto' 'docbook-xsl') +makedepends=('gtk3' 'imagemagick' 'libxv' 'v4l-utils' 'qt5-x11extras' 'python' 'xmlto' + 'docbook-xsl' 'gobject-introspection') source=("$pkgname-$pkgver.tar.gz::https://github.com/mchehab/zbar/archive/$pkgver.tar.gz") sha512sums=('bc2667a2a5a5f2e9fd3f39e57bf1d7f860b20a0b5faffc38791d222a6ff0414aff880295ce5ccb92acce7250503f2a7f48ac12651cf82cfb1933b302da26e393') @@ -18,7 +19,6 @@ build() { cd zbar-$pkgver autoreconf -vfi - PYTHON="/usr/bin/python2" \ ./configure --prefix=/usr --with-qt --with-gtk=gtk3 CFLAGS="$CFLAGS -DNDEBUG" sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make @@ -38,8 +38,10 @@ "$pkgdir"/usr/include/zbar/zbargtk.h \ "$pkgdir"/usr/include/zbar/QZBar*.h \ "$pkgdir"/usr/lib/pkgconfig/zbar-{gtk,qt}.pc \ - "$pkgdir"/usr/lib/python2.7 \ - "$pkgdir"/usr/bin/zbarcam-* + "$pkgdir"/usr/lib/python3.8 \ + "$pkgdir"/usr/bin/zbarcam-* \ + "$pkgdir"/usr/share/gir-1.0 \ + "$pkgdir"/usr/lib/girepository-1.0 rmdir "$pkgdir"/etc{/dbus-1/system.d,/dbus-1,} } @@ -57,8 +59,8 @@ "$pkgdir"/usr/include/zbar/*.h \ "$pkgdir"/usr/include/zbar.h \ "$pkgdir"/usr/lib/pkgconfig/zbar{,-qt}.pc \ - "$pkgdir"/usr/lib/python2.7 \ - "$pkgdir"/usr/share \ + "$pkgdir"/usr/lib/python3.8 \ + "$pkgdir"/usr/share/{doc,man} \ "$pkgdir"/usr/bin/{zbarimg,zbarcam,zbarcam-qt} \ "$pkgdir"/etc @@ -78,25 +80,28 @@ "$pkgdir"/usr/include/zbar/*.h \ "$pkgdir"/usr/include/zbar.h \ "$pkgdir"/usr/lib/pkgconfig/zbar{,-gtk}.pc \ - "$pkgdir"/usr/lib/python2.7 \ + "$pkgdir"/usr/lib/python3.8 \ "$pkgdir"/usr/share \ "$pkgdir"/usr/bin/{zbarimg,zbarcam,zbarcam-gtk} \ - "$pkgdir"/etc + "$pkgdir"/etc \ + "$pkgdir"/usr/lib/girepository-1.0 mv ./QZBar*.h "$pkgdir"/usr/include/zbar/ } -package_python2-zbar() { - depends=('zbar-gtk' 'pygtk') +package_python-zbar() { + depends=('python' 'zbar') cd zbar-$pkgver make DESTDIR="$pkgdir" install rm -r "$pkgdir"/usr/lib/*.so* \ + "$pkgdir"/usr/lib/*.a \ "$pkgdir"/usr/include \ "$pkgdir"/usr/lib/pkgconfig \ "$pkgdir"/usr/{bin,share} \ - "$pkgdir"/etc + "$pkgdir"/etc \ + "$pkgdir"/usr/lib/girepository-1.0 } # vim:set ts=2 sw=2 et: