Hello community,

here is the log from the commit of package kimageformats for openSUSE:Factory 
checked in at 2016-02-24 18:55:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kimageformats (Old)
 and      /work/SRC/openSUSE:Factory/.kimageformats.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kimageformats"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kimageformats/kimageformats.changes      
2016-01-20 09:50:36.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kimageformats.new/kimageformats.changes 
2016-02-24 18:55:34.000000000 +0100
@@ -1,0 +2,10 @@
+Sat Feb  6 18:03:26 UTC 2016 - [email protected]
+
+- Update to 5.19.0 (boo#967668)
+  * Add kra and ora imageio plugins (read-only)
+  * For more details please see:
+    https://www.kde.org/announcements/kde-frameworks-5.19.0.php
+- Drop upstreamed fix-psd.patch
+- Add cmake(KF5Archive) BuildRequires
+
+-------------------------------------------------------------------

Old:
----
  fix-psd.patch
  kimageformats-5.18.0.tar.xz

New:
----
  kimageformats-5.19.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kimageformats.spec ++++++
--- /var/tmp/diff_new_pack.v0CZaA/_old  2016-02-24 18:55:35.000000000 +0100
+++ /var/tmp/diff_new_pack.v0CZaA/_new  2016-02-24 18:55:35.000000000 +0100
@@ -16,9 +16,9 @@
 #
 
 
-%define _tar_path 5.18
+%define _tar_path 5.19
 Name:           kimageformats
-Version:        5.18.0
+Version:        5.19.0
 Release:        0
 BuildRequires:  cmake >= 2.8.12
 BuildRequires:  extra-cmake-modules >= %{_tar_path}
@@ -26,6 +26,7 @@
 BuildRequires:  kf5-filesystem
 BuildRequires:  openexr
 BuildRequires:  openexr-devel
+BuildRequires:  cmake(KF5Archive) >= %{_tar_path}
 BuildRequires:  cmake(Qt5Gui) >= 5.3.0
 BuildRequires:  cmake(Qt5PrintSupport) >= 5.3.0
 BuildRequires:  cmake(Qt5Test) >= 5.3.0
@@ -38,8 +39,6 @@
 Url:            http://www.kde.org
 Source:         
http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
 Source1:        baselibs.conf
-# PATCH-FIX-UPSTREAM fix-psd.patch kde#354413 -- fixes loading of RLE 
compressed PSD files
-Patch:          fix-psd.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -50,7 +49,6 @@
 
 %prep
 %setup -q
-%patch -p1
 
 %build
   %cmake_kf5 -d build

++++++ kimageformats-5.18.0.tar.xz -> kimageformats-5.19.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/CMakeLists.txt 
new/kimageformats-5.19.0/CMakeLists.txt
--- old/kimageformats-5.18.0/CMakeLists.txt     2016-01-01 20:58:09.000000000 
+0100
+++ new/kimageformats-5.19.0/CMakeLists.txt     2016-02-06 10:37:42.000000000 
+0100
@@ -3,7 +3,7 @@
 project(KImageFormats)
 
 include(FeatureSummary)
-find_package(ECM 5.18.0  NO_MODULE)
+find_package(ECM 5.19.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -20,6 +20,12 @@
 set(REQUIRED_QT_VERSION 5.3.0)
 find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
 
+find_package(KF5Archive)
+set_package_properties(KF5Archive PROPERTIES
+    TYPE OPTIONAL
+    PURPOSE "Required for the QImage plugin for Krita and OpenRaster images"
+)
+
 # EPS support depends on the gs utility; non-UNIX systems are unlikely to have
 # this available in PATH
 set(BUILD_EPS_PLUGIN FALSE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/autotests/CMakeLists.txt 
new/kimageformats-5.19.0/autotests/CMakeLists.txt
--- old/kimageformats-5.18.0/autotests/CMakeLists.txt   2016-01-01 
20:58:09.000000000 +0100
+++ new/kimageformats-5.19.0/autotests/CMakeLists.txt   2016-02-06 
10:37:42.000000000 +0100
@@ -61,6 +61,14 @@
     rgb
     tga
 )
+
+if (KF5Archive_FOUND)
+    kimageformats_read_tests(
+        kra
+        ora
+    )
+endif()
+
 # Allow some fuzziness when reading this formats, to allow for
 # rounding errors (eg: in alpha blending).
 kimageformats_read_tests(FUZZ 1
Files old/kimageformats-5.18.0/autotests/read/kra/src.kra and 
new/kimageformats-5.19.0/autotests/read/kra/src.kra differ
Files old/kimageformats-5.18.0/autotests/read/kra/src.png and 
new/kimageformats-5.19.0/autotests/read/kra/src.png differ
Files old/kimageformats-5.18.0/autotests/read/ora/src.ora and 
new/kimageformats-5.19.0/autotests/read/ora/src.ora differ
Files old/kimageformats-5.18.0/autotests/read/ora/src.png and 
new/kimageformats-5.19.0/autotests/read/ora/src.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/CMakeLists.txt 
new/kimageformats-5.19.0/src/imageformats/CMakeLists.txt
--- old/kimageformats-5.18.0/src/imageformats/CMakeLists.txt    2016-01-01 
20:58:09.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/CMakeLists.txt    2016-02-06 
10:37:42.000000000 +0100
@@ -89,3 +89,20 @@
 install(TARGETS kimg_xcf  DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/imageformats/)
 install(FILES xcf.desktop DESTINATION 
${KDE_INSTALL_KSERVICES5DIR}/qimageioplugins/)
 
+##################################
+
+if (KF5Archive_FOUND)
+
+    add_library(kimg_kra MODULE kra.cpp)
+    target_link_libraries(kimg_kra Qt5::Gui KF5::Archive)
+
+    install(TARGETS kimg_kra  DESTINATION 
${KDE_INSTALL_QTPLUGINDIR}/imageformats/)
+    install(FILES kra.desktop DESTINATION 
${KDE_INSTALL_KSERVICES5DIR}/qimageioplugins/)
+
+    add_library(kimg_ora MODULE ora.cpp)
+    target_link_libraries(kimg_ora Qt5::Gui KF5::Archive)
+
+    install(TARGETS kimg_ora  DESTINATION 
${KDE_INSTALL_QTPLUGINDIR}/imageformats/)
+    install(FILES ora.desktop DESTINATION 
${KDE_INSTALL_KSERVICES5DIR}/qimageioplugins/)
+
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/kra.cpp 
new/kimageformats-5.19.0/src/imageformats/kra.cpp
--- old/kimageformats-5.18.0/src/imageformats/kra.cpp   1970-01-01 
01:00:00.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/kra.cpp   2016-02-06 
10:37:42.000000000 +0100
@@ -0,0 +1,88 @@
+/* This file is part of the KDE project
+   Copyright (C) 2013 Boudewijn Rempt <[email protected]>
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the Lesser GNU General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This code is based on Thacher Ulrich PSD loading code released
+   on public domain. See: http://tulrich.com/geekstuff/
+*/
+
+#include "kra.h"
+
+#include <kzip.h>
+
+#include <QImage>
+#include <QIODevice>
+#include <QFile>
+
+KraHandler::KraHandler()
+{
+}
+
+bool KraHandler::canRead() const
+{
+    if (canRead(device())) {
+        setFormat("kra");
+        return true;
+    }
+    return false;
+}
+
+bool KraHandler::read(QImage *image)
+{
+    KZip zip(device());
+    if (!zip.open(QIODevice::ReadOnly)) return false;
+
+    const KArchiveEntry *entry = 
zip.directory()->entry(QLatin1String("mergedimage.png"));
+    if (!entry || !entry->isFile()) return false;
+
+    const KZipFileEntry* fileZipEntry = static_cast<const 
KZipFileEntry*>(entry);
+
+    image->loadFromData(fileZipEntry->data(), "PNG");
+
+    return true;
+}
+
+bool KraHandler::canRead(QIODevice *device)
+{
+    if (!device) {
+        qWarning("KraHandler::canRead() called with no device");
+        return false;
+    }
+
+    char buff[57];
+    if (device->peek(buff, sizeof(buff)) == sizeof(buff))
+        return qstrcmp(buff + 0x26, "application/x-krita") == 0;
+
+    return false;
+}
+
+QImageIOPlugin::Capabilities KraPlugin::capabilities(QIODevice *device, const 
QByteArray &format) const
+{
+    if (format == "kra" || format == "KRA") {
+        return Capabilities(CanRead);
+    }
+    if (!format.isEmpty()) {
+        return 0;
+    }
+    if (!device->isOpen()) {
+        return 0;
+    }
+
+    Capabilities cap;
+    if (device->isReadable() && KraHandler::canRead(device)) {
+        cap |= CanRead;
+    }
+    return cap;
+}
+
+QImageIOHandler *KraPlugin::create(QIODevice *device, const QByteArray 
&format) const
+{
+    QImageIOHandler *handler = new KraHandler;
+    handler->setDevice(device);
+    handler->setFormat(format);
+    return handler;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/kra.desktop 
new/kimageformats-5.19.0/src/imageformats/kra.desktop
--- old/kimageformats-5.18.0/src/imageformats/kra.desktop       1970-01-01 
01:00:00.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/kra.desktop       2016-02-06 
10:37:42.000000000 +0100
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Service
+X-KDE-ServiceTypes=QImageIOPlugins
+X-KDE-ImageFormat=kra
+X-KDE-MimeType=application/x-krita
+X-KDE-Read=true
+X-KDE-Write=false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/kra.h 
new/kimageformats-5.19.0/src/imageformats/kra.h
--- old/kimageformats-5.18.0/src/imageformats/kra.h     1970-01-01 
01:00:00.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/kra.h     2016-02-06 
10:37:42.000000000 +0100
@@ -0,0 +1,39 @@
+/* This file is part of the KDE project
+   Copyright (c) 2013 Boudewijn Rempt <[email protected]>
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the Lesser GNU General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+*/
+
+#ifndef KIMG_KRA_H
+#define KIMG_KRA_H
+
+#include <QImageIOPlugin>
+
+class KraHandler : public QImageIOHandler
+{
+public:
+    KraHandler();
+
+    bool canRead() const Q_DECL_OVERRIDE;
+    bool read(QImage *image)  Q_DECL_OVERRIDE;
+
+    static bool canRead(QIODevice *device);
+};
+
+class KraPlugin : public QImageIOPlugin
+{
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" 
FILE "kra.json")
+
+public:
+    Capabilities capabilities(QIODevice *device, const QByteArray &format) 
const;
+    QImageIOHandler *create(QIODevice *device, const QByteArray &format = 
QByteArray()) const;
+};
+
+
+
+#endif
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/kra.json 
new/kimageformats-5.19.0/src/imageformats/kra.json
--- old/kimageformats-5.18.0/src/imageformats/kra.json  1970-01-01 
01:00:00.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/kra.json  2016-02-06 
10:37:42.000000000 +0100
@@ -0,0 +1,5 @@
+{
+    "Keys": [ "kra" ],
+    "MimeTypes": [ "application/x-krita", "application/x-krita" ]
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/ora.cpp 
new/kimageformats-5.19.0/src/imageformats/ora.cpp
--- old/kimageformats-5.18.0/src/imageformats/ora.cpp   1970-01-01 
01:00:00.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/ora.cpp   2016-02-06 
10:37:42.000000000 +0100
@@ -0,0 +1,87 @@
+/* This file is part of the KDE project
+   Copyright (C) 2013 Boudewijn Rempt <[email protected]>
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the Lesser GNU General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This code is based on Thacher Ulrich PSD loading code released
+   on public domain. See: http://tulrich.com/geekstuff/
+*/
+
+#include "ora.h"
+
+#include <QImage>
+#include <QScopedPointer>
+
+#include <kzip.h>
+
+OraHandler::OraHandler()
+{
+}
+
+bool OraHandler::canRead() const
+{
+    if (canRead(device())) {
+        setFormat("ora");
+        return true;
+    }
+    return false;
+}
+
+bool OraHandler::read(QImage *image)
+{
+    KZip zip(device());
+    if (!zip.open(QIODevice::ReadOnly)) return false;
+
+    const KArchiveEntry *entry = 
zip.directory()->entry(QLatin1String("mergedimage.png"));
+    if (!entry || !entry->isFile()) return false;
+
+    const KZipFileEntry* fileZipEntry = static_cast<const 
KZipFileEntry*>(entry);
+
+    image->loadFromData(fileZipEntry->data(), "PNG");
+
+    return true;
+}
+
+bool OraHandler::canRead(QIODevice *device)
+{
+    if (!device) {
+        qWarning("OraHandler::canRead() called with no device");
+        return false;
+    }
+
+    char buff[54];
+    if (device->peek(buff, sizeof(buff)) == sizeof(buff))
+        return qstrcmp(buff + 0x26, "image/openraster") == 0;
+
+    return false;
+}
+
+QImageIOPlugin::Capabilities OraPlugin::capabilities(QIODevice *device, const 
QByteArray &format) const
+{
+    if (format == "ora" || format == "ORA") {
+        return Capabilities(CanRead);
+    }
+    if (!format.isEmpty()) {
+        return 0;
+    }
+    if (!device->isOpen()) {
+        return 0;
+    }
+
+    Capabilities cap;
+    if (device->isReadable() && OraHandler::canRead(device)) {
+        cap |= CanRead;
+    }
+    return cap;
+}
+
+QImageIOHandler *OraPlugin::create(QIODevice *device, const QByteArray 
&format) const
+{
+    QImageIOHandler *handler = new OraHandler;
+    handler->setDevice(device);
+    handler->setFormat(format);
+    return handler;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/ora.desktop 
new/kimageformats-5.19.0/src/imageformats/ora.desktop
--- old/kimageformats-5.18.0/src/imageformats/ora.desktop       1970-01-01 
01:00:00.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/ora.desktop       2016-02-06 
10:37:42.000000000 +0100
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Service
+X-KDE-ServiceTypes=QImageIOPlugins
+X-KDE-ImageFormat=ora
+X-KDE-MimeType=image/openraster
+X-KDE-Read=true
+X-KDE-Write=false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/ora.h 
new/kimageformats-5.19.0/src/imageformats/ora.h
--- old/kimageformats-5.18.0/src/imageformats/ora.h     1970-01-01 
01:00:00.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/ora.h     2016-02-06 
10:37:42.000000000 +0100
@@ -0,0 +1,38 @@
+/* This file is part of the KDE project
+   Copyright (c) 2013 Boudewijn Rempt <[email protected]>
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the Lesser GNU General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+*/
+
+#ifndef KIMG_ORA_H
+#define KIMG_ORA_H
+
+#include <QImageIOPlugin>
+
+class OraHandler : public QImageIOHandler
+{
+public:
+    OraHandler();
+
+    bool canRead() const Q_DECL_OVERRIDE;
+    bool read(QImage *image)  Q_DECL_OVERRIDE;
+
+    static bool canRead(QIODevice *device);
+};
+
+
+class OraPlugin : public QImageIOPlugin
+{
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" 
FILE "ora.json")
+public:
+    Capabilities capabilities(QIODevice *device, const QByteArray &format) 
const Q_DECL_OVERRIDE;
+    QImageIOHandler *create(QIODevice *device, const QByteArray &format = 
QByteArray()) const Q_DECL_OVERRIDE;
+};
+
+
+#endif
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/ora.json 
new/kimageformats-5.19.0/src/imageformats/ora.json
--- old/kimageformats-5.18.0/src/imageformats/ora.json  1970-01-01 
01:00:00.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/ora.json  2016-02-06 
10:37:42.000000000 +0100
@@ -0,0 +1,5 @@
+{
+    "Keys": [ "ora" ],
+    "MimeTypes": [ "image/openraster", "image/openraster" ]
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.18.0/src/imageformats/rle_p.h 
new/kimageformats-5.19.0/src/imageformats/rle_p.h
--- old/kimageformats-5.18.0/src/imageformats/rle_p.h   2016-01-01 
20:58:09.000000000 +0100
+++ new/kimageformats-5.19.0/src/imageformats/rle_p.h   2016-02-06 
10:37:42.000000000 +0100
@@ -75,7 +75,7 @@
 static inline bool decodeRLEData(RLEVariant variant,
                                  QDataStream &stream,
                                  Item *dest,
-                                 quint16 length,
+                                 quint32 length,
                                  Func1 readData,
                                  Func2 updateItem)
 {


Reply via email to