Hello community, here is the log from the commit of package zbar for openSUSE:Factory checked in at 2017-08-23 11:52:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/zbar (Old) and /work/SRC/openSUSE:Factory/.zbar.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zbar" Wed Aug 23 11:52:43 2017 rev:4 rq:516205 version:0.10_2013_02_28 Changes: -------- --- /work/SRC/openSUSE:Factory/zbar/zbar.changes 2017-02-08 10:45:25.857613406 +0100 +++ /work/SRC/openSUSE:Factory/.zbar.new/zbar.changes 2017-08-23 11:52:44.727187162 +0200 @@ -1,0 +2,5 @@ +Sat Aug 5 19:22:42 UTC 2017 - aloi...@gmx.com + +- Added zbar-Qt5.patch to build against Qt5 + +------------------------------------------------------------------- New: ---- zbar-Qt5.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ zbar.spec ++++++ --- /var/tmp/diff_new_pack.5mBVtW/_old 2017-08-23 11:52:45.783038530 +0200 +++ /var/tmp/diff_new_pack.5mBVtW/_new 2017-08-23 11:52:45.787037967 +0200 @@ -31,15 +31,20 @@ Source99: update.sh Patch1: fix_build.patch Patch2: fix-gcc5.patch +# PATCH-FEATURE-OPENSUSE zbar-Qt5.patch -- build against Qt5 libraries <aloi...@gmx.com> +Patch3: zbar-Qt5.patch BuildRequires: ImageMagick-devel # required by mercurial archive only BuildRequires: autoconf BuildRequires: automake BuildRequires: gtk2-devel -BuildRequires: libqt4-devel BuildRequires: libtool BuildRequires: python-gtk-devel BuildRequires: xmlto +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5X11Extras) BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -128,6 +133,7 @@ %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build # for the Mercurial-based archive we need to get proper autoconf files ++++++ zbar-Qt5.patch ++++++ Index: zbar-0.10_2013_02_28/configure.ac =================================================================== --- zbar-0.10_2013_02_28.orig/configure.ac +++ zbar-0.10_2013_02_28/configure.ac @@ -468,17 +468,17 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$w dnl Qt AC_ARG_WITH([qt], [AS_HELP_STRING([--without-qt], - [disable support for Qt4 widget])], + [disable support for Qt5 widget])], [], [with_qt="yes"]) AC_ARG_VAR([MOC], [full path to Qt moc program]) AS_IF([test "x$with_qt" != "xno"], - [PKG_CHECK_MODULES([QT], [QtCore >= 4 QtGui >= 4]) - MOC=`$PKG_CONFIG QtGui --variable=moc_location` + [PKG_CHECK_MODULES([QT], [Qt5Core Qt5Gui Qt5Widgets Qt5X11Extras]) + MOC=`$PKG_CONFIG Qt5Core --variable=host_bins`/moc AC_MSG_NOTICE([using moc from $MOC]) - QT_VERSION=`$PKG_CONFIG QtGui --modversion` + QT_VERSION=`$PKG_CONFIG Qt5Core --modversion` AC_MSG_NOTICE([using Qt version $QT_VERSION])]) AM_CONDITIONAL([HAVE_QT], [test "x$with_qt" = "xyes"]) @@ -586,9 +586,9 @@ AS_IF([test "x$with_gtk" != "xyes"], [echo " => the GTK+ widget will *NOT* be built"], [AS_IF([test "x$with_python" != "xyes"], [echo " => the PyGTK widget wrapper will *NOT* be built"])]) -echo "Qt4 --with-qt=$with_qt" +echo "Qt5 --with-qt=$with_qt" AS_IF([test "x$with_qt" != "xyes"], - [echo " => the Qt4 widget will *NOT* be built"]) + [echo " => the Qt5 widget will *NOT* be built"]) echo "Java --with-java=$with_java" AS_IF([test "x$with_java" != "xyes"], [echo " => the Java interface will *NOT* be built"]) Index: zbar-0.10_2013_02_28/include/zbar/QZBarImage.h =================================================================== --- zbar-0.10_2013_02_28.orig/include/zbar/QZBarImage.h +++ zbar-0.10_2013_02_28/include/zbar/QZBarImage.h @@ -54,7 +54,7 @@ public: unsigned height = qimg.height(); set_size(width, height); set_format(zbar_fourcc('B','G','R','4')); - unsigned long datalen = qimg.numBytes(); + unsigned long datalen = qimg.byteCount(); set_data(qimg.bits(), datalen); if((width * 4 != bpl) || Index: zbar-0.10_2013_02_28/qt/QZBar.cpp =================================================================== --- zbar-0.10_2013_02_28.orig/qt/QZBar.cpp +++ zbar-0.10_2013_02_28/qt/QZBar.cpp @@ -21,8 +21,8 @@ // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ -#include <qevent.h> -#include <qurl.h> +#include <QtCore> +#include <QtGui> #include <qx11info_x11.h> #include <zbar/QZBar.h> #include "QZBarThread.h" @@ -49,7 +49,7 @@ QZBar::QZBar (QWidget *parent) thread = new QZBarThread; if(testAttribute(Qt::WA_WState_Created)) { - thread->window.attach(x11Info().display(), winId()); + thread->window.attach(QX11Info::display(), winId()); _attached = 1; } connect(thread, SIGNAL(videoOpened(bool)), @@ -204,7 +204,7 @@ void QZBar::changeEvent(QEvent *event) try { QMutexLocker locker(&thread->mutex); if(event->type() == QEvent::ParentChange) - thread->window.attach(x11Info().display(), winId()); + thread->window.attach(QX11Info::display(), winId()); } catch(Exception) { /* ignore (FIXME do something w/error) */ } } @@ -215,7 +215,7 @@ void QZBar::attach () return; try { - thread->window.attach(x11Info().display(), winId()); + thread->window.attach(QX11Info::display(), winId()); _attached = 1; _videoEnabled = !_videoDevice.isEmpty(); Index: zbar-0.10_2013_02_28/zbar-qt.pc.in =================================================================== --- zbar-0.10_2013_02_28.orig/zbar-qt.pc.in +++ zbar-0.10_2013_02_28/zbar-qt.pc.in @@ -4,9 +4,9 @@ libdir=@libdir@ includedir=@includedir@ Name: zbar-qt -Description: bar code scanning and decoding Qt4 widget +Description: bar code scanning and decoding Qt5 widget URL: http://zbar.sourceforge.net Version: @VERSION@ -Requires: zbar, QtCore >= 4, QtGui >= 4 +Requires: zbar, Qt5Widgets, Qt5X11Extras, Qt5Gui, Qt5Core Libs: -L${libdir} -lzbarqt Cflags: -I${includedir}