commit b18dc2d5fe8f9a43642954ba5e9d2cc4bb6dbe9b Author: Jakub Bogusz <qbo...@pld-linux.org> Date: Wed Jul 24 20:49:42 2019 +0200
- updated to 0.23 - updated sh patch - removed obsolete imagemagick7 patch - now includes gir files, supports gtk+3 and python3 (as options) imagemagick7.patch | 22 --------------- zbar-sh.patch | 14 +++++----- zbar.spec | 78 ++++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 65 insertions(+), 49 deletions(-) --- diff --git a/zbar.spec b/zbar.spec index 86b66e6..e203574 100644 --- a/zbar.spec +++ b/zbar.spec @@ -2,6 +2,8 @@ # Conditional build: %bcond_with java # Java interface [some file missing] %bcond_with npapi # NPAPI plugin for Firefox/OpenOffice [nothing really yet] +%bcond_with gtk3 # GTK+ 3.x instead of 2.x +%bcond_with python3 # Python 3.x instead of 2.x %bcond_without qt # Qt widget (Qt5 or Qt4) %bcond_with qt4 # Qt4 instead of Qt5 %bcond_with tests # "make test" for Perl module [needs X display] @@ -10,7 +12,7 @@ Summary: ZBar Bar Code Reader Summary(pl.UTF-8): ZBar - czytnik kodów paskowych Name: zbar -Version: 0.22 +Version: 0.23 Release: 1 License: LGPL v2.1+ Group: Libraries @@ -18,18 +20,20 @@ Group: Libraries #Source0: http://downloads.sourceforge.net/zbar/%{name}-%{version}.tar.bz2 # non-maintainer release Source0: https://linuxtv.org/downloads/zbar/%{name}-%{version}.tar.bz2 -# Source0-md5: 5f767d8a237b03988193adcc2a44eecf +# Source0-md5: 99d16dd6ce4d3a180aeb88b8a0880653 Patch0: %{name}-sh.patch Patch1: %{name}-link.patch Patch2: %{name}-npapi.patch -Patch3: imagemagick7.patch URL: http://zbar.sourceforge.net/ BuildRequires: ImageMagick-devel >= 1:6.2.6 BuildRequires: autoconf >= 2.68 BuildRequires: automake >= 1:1.13 BuildRequires: dbus-devel >= 1.0 BuildRequires: gettext-tools -BuildRequires: gtk+2-devel >= 2.0 +BuildRequires: glib2-devel >= 2.0 +BuildRequires: gobject-introspection-devel >= 0.6.7 +%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2.0} +%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0} %{?with_java:BuildRequires: jdk} BuildRequires: libjpeg-devel BuildRequires: libstdc++-devel @@ -38,8 +42,12 @@ BuildRequires: libv4l-devel BuildRequires: perl-devel >= 1:5.8.0 BuildRequires: pkgconfig %{?with_npapi:BuildRequires: pkgconfig(mozilla-plugin)} -BuildRequires: python-devel >= 2.3.5 -BuildRequires: python-pygtk-devel >= 2:2.0 +%if %{with python3} +BuildRequires: python3-devel >= 1:3.2 +%else +BuildRequires: python-devel >= 1:2.7.0 +%{!?with_gtk3:BuildRequires: python-pygtk-devel >= 2:2.0} +%endif BuildRequires: rpm-perlprov >= 4.1-13 BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.357 @@ -129,7 +137,8 @@ Summary(pl.UTF-8): Plik nagłówkowy widgetu GTK+ do skanowania i dekodowania ko Group: X11/Development/Libraries Requires: %{name}-devel = %{version}-%{release} Requires: %{name}-gtk = %{version}-%{release} -Requires: gtk+2-devel >= 2.0 +%{!?with_gtk3:Requires: gtk+2-devel >= 2.0} +%{?with_gtk3:Requires: gtk+3-devel >= 3.0} %description gtk-devel Header file for bar code scanning and decoding GTK+ widget. @@ -212,25 +221,25 @@ Perl interface to ZBar bar code reader. Interfejs Perla do czytnika kodów paskowych ZBar. %package -n python-zbar -Summary: Python interface to ZBar bar code reader -Summary(pl.UTF-8): Interfejs Pythona do czytnika kodów paskowych ZBar +Summary: Python 2 interface to ZBar bar code reader +Summary(pl.UTF-8): Interfejs Pythona 2 do czytnika kodów paskowych ZBar Group: Libraries/Python Requires: %{name} = %{version}-%{release} -%pyrequires_eq python-libs +Requires: python-libs >= 1:2.7.0 %description -n python-zbar -Python interface to ZBar bar code reader. +Python 2 interface to ZBar bar code reader. %description -n python-zbar -l pl.UTF-8 -Interfejs Pythona do czytnika kodów paskowych ZBar. +Interfejs Pythona 2 do czytnika kodów paskowych ZBar. %package -n python-zbar-pygtk Summary: Bar code scanning and decoding PyGTK widget Summary(pl.UTF-8): Widget PyGTK do skanowania i dekodowania kodów paskowych Group: Libraries/Python Requires: %{name}-gtk = %{version}-%{release} +Requires: python-libs >= 1:2.7.0 Requires: python-pygtk-gtk >= 2:2.0 -%pyrequires_eq python-libs %description -n python-zbar-pygtk Bar code scanning and decoding PyGTK widget. @@ -238,6 +247,18 @@ Bar code scanning and decoding PyGTK widget. %description -n python-zbar-pygtk -l pl.UTF-8 Widget PyGTK do skanowania i dekodowania kodów paskowych. +%package -n python3-zbar +Summary: Python 3 interface to ZBar bar code reader +Summary(pl.UTF-8): Interfejs Pythona 3 do czytnika kodów paskowych ZBar +Group: Libraries/Python +Requires: %{name} = %{version}-%{release} + +%description -n python3-zbar +Python 3 interface to ZBar bar code reader. + +%description -n python3-zbar -l pl.UTF-8 +Interfejs Pythona 3 do czytnika kodów paskowych ZBar. + %package -n browser-plugin-zbar Summary: ZBar plugin for Web browsers Summary(pl.UTF-8): Wtyczka ZBar dla przeglądarek WWW @@ -256,9 +277,6 @@ Wtyczka ZBar dla przeglądarek WWW. %patch0 -p1 %patch1 -p1 %patch2 -p1 -%if "%(rpm -q ImageMagick-devel --qf '%{VERSION}')" >= "7" -%patch3 -p1 -%endif %build %{__libtoolize} @@ -270,7 +288,9 @@ Wtyczka ZBar dla przeglądarek WWW. CXXFLAGS="%{rpmcxxflags} -std=c++11" %configure \ --disable-silent-rules \ + %{?with_gtk3:--with-gtk=gtk3} \ %{!?with_java:--without-java} \ + %{?with_python3:--with-python=python3} \ %{!?with_qt:--without-qt} \ %{?with_qt4:--without-qt5} \ %{?with_npapi:--with-npapi} @@ -296,7 +316,16 @@ install -d $RPM_BUILD_ROOT%{_datadir}/%{name} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +# obsoleted by pkg-config +%{__rm} $RPM_BUILD_ROOT%{_libdir}/libzbar*.la +# packaged as %doc +%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/zbar + +%if %{with python3} +%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la +%else %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la +%endif %{__make} -C perl install \ DESTDIR=$RPM_BUILD_ROOT @@ -336,11 +365,12 @@ fi %files %defattr(644,root,root,755) # COPYING contains license summary, not LGPL text -%doc COPYING ChangeLog NEWS README.md TODO +%doc COPYING ChangeLog NEWS.md README.md TODO.md %attr(755,root,root) %{_bindir}/zbarcam %attr(755,root,root) %{_bindir}/zbarimg %attr(755,root,root) %{_libdir}/libzbar.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libzbar.so.0 +%{_libdir}/girepository-1.0/ZBar-1.0.typelib # for zbarcam /etc/dbus-1/system.d/org.linuxtv.Zbar.conf %dir %{_datadir}/%{name} @@ -350,7 +380,7 @@ fi %files devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libzbar.so -%{_libdir}/libzbar.la +%{_datadir}/gir-1.0/ZBar-1.0.gir # C %{_includedir}/zbar.h %dir %{_includedir}/zbar @@ -379,7 +409,6 @@ fi %files gtk-devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libzbargtk.so -%{_libdir}/libzbargtk.la %{_includedir}/zbar/zbargtk.h %{_pkgconfigdir}/zbar-gtk.pc @@ -397,7 +426,6 @@ fi %files qt-devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libzbarqt.so -%{_libdir}/libzbarqt.la %{_includedir}/zbar/QZBar.h %{_includedir}/zbar/QZBarImage.h %{_pkgconfigdir}/zbar-qt.pc @@ -416,13 +444,23 @@ fi %attr(755,root,root) %{perl_vendorarch}/auto/Barcode/ZBar/ZBar.so %{_mandir}/man3/Barcode::ZBar*.3pm* +%if %{without python3} %files -n python-zbar %defattr(644,root,root,755) %attr(755,root,root) %{py_sitedir}/zbar.so +%if %{without gtk3} %files -n python-zbar-pygtk %defattr(644,root,root,755) %attr(755,root,root) %{py_sitedir}/zbarpygtk.so +%endif +%endif + +%if %{with python3} +%files -n python3-zbar +%defattr(644,root,root,755) +%attr(755,root,root) %{py3_sitedir}/zbar.so +%endif %if %{with npapi} %files -n browser-plugin-zbar diff --git a/imagemagick7.patch b/imagemagick7.patch deleted file mode 100644 index 40bd7d7..0000000 --- a/imagemagick7.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- zbar-0.10/configure.ac~ 2016-12-20 09:17:33.000000000 +0100 -+++ zbar-0.10/configure.ac 2016-12-20 09:21:38.906665127 +0100 -@@ -333,7 +333,7 @@ - dnl double check ImageMagick install (bug #2582232) - CPPFLAGS_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $MAGICK_CFLAGS" -- AC_CHECK_HEADER([wand/MagickWand.h], -+ AC_CHECK_HEADER([MagickWand/MagickWand.h], - [have_IM="yes"], - [have_IM="broken"]) - CPPFLAGS="$CPPFLAGS_save"])]) ---- zbar-0.10/zbarimg/zbarimg.c.orig 2016-12-20 09:18:15.924187996 +0100 -+++ zbar-0.10/zbarimg/zbarimg.c 2016-12-20 09:20:27.679129140 +0100 -@@ -44,7 +44,7 @@ - #endif - - #ifdef HAVE_IMAGEMAGICK --# include <wand/MagickWand.h> -+# include <MagickWand/MagickWand.h> - - /* ImageMagick frequently changes API names - just use the original - * (more stable?) names to match GraphicsMagick diff --git a/zbar-sh.patch b/zbar-sh.patch index b68a01c..c2fe15f 100644 --- a/zbar-sh.patch +++ b/zbar-sh.patch @@ -1,11 +1,11 @@ ---- zbar-0.20/configure.ac.orig 2017-05-14 09:01:27.438180076 +0200 -+++ zbar-0.20/configure.ac 2017-05-14 09:04:18.028178129 +0200 -@@ -91,7 +91,7 @@ +--- zbar-0.23/configure.ac.orig 2019-07-24 16:28:37.917511357 +0200 ++++ zbar-0.23/configure.ac 2019-07-24 16:33:05.382729041 +0200 +@@ -693,7 +693,7 @@ + [], + [with_java="check"]) - AC_ARG_VAR([JAVAC], [location of Java language compiler]) - AC_PATH_PROGS([JAVAC], [javac jikes ecj gcj], [:], [$JAVA_PATH]) -JAVAC=${JAVAC/ecj/ecj -1.5} +JAVAC=$(echo "$JAVAC" | sed -e 's/ecj/ecj -1.5/') - AS_IF([test "x$JAVAC" = "x:"], [have_java="no"]) - AC_ARG_VAR([JAVAH], [location of Java header generator]) + # 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 ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/zbar.git/commitdiff/b18dc2d5fe8f9a43642954ba5e9d2cc4bb6dbe9b _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit