OBS-URL: https://build.opensuse.org/request/show/516083 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/zbar?expand=0&rev=24
110 lines
4.1 KiB
Diff
110 lines
4.1 KiB
Diff
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}
|