Accepting request 516205 from Application:Geo
1 OBS-URL: https://build.opensuse.org/request/show/516205 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zbar?expand=0&rev=4
This commit is contained in:
commit
9dab5c22c6
109
zbar-Qt5.patch
Normal file
109
zbar-Qt5.patch
Normal file
@ -0,0 +1,109 @@
|
||||
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}
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 5 19:22:42 UTC 2017 - aloisio@gmx.com
|
||||
|
||||
- Added zbar-Qt5.patch to build against Qt5
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 3 17:10:25 UTC 2017 - jengelh@inai.de
|
||||
|
||||
|
@ -31,15 +31,20 @@ Source98: baselibs.conf
|
||||
Source99: update.sh
|
||||
Patch1: fix_build.patch
|
||||
Patch2: fix-gcc5.patch
|
||||
# PATCH-FEATURE-OPENSUSE zbar-Qt5.patch -- build against Qt5 libraries <aloisio@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 @@ This package provides ZBar Python-Gtk bindings.
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
# for the Mercurial-based archive we need to get proper autoconf files
|
||||
|
Loading…
x
Reference in New Issue
Block a user