Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nomacs for openSUSE:Factory checked in at 2023-10-05 20:05:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nomacs (Old) and /work/SRC/openSUSE:Factory/.nomacs.new.28202 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nomacs" Thu Oct 5 20:05:19 2023 rev:26 rq:1115846 version:3.16.224 Changes: -------- --- /work/SRC/openSUSE:Factory/nomacs/nomacs.changes 2020-11-09 13:58:51.455774863 +0100 +++ /work/SRC/openSUSE:Factory/.nomacs.new.28202/nomacs.changes 2023-10-05 20:06:46.602567534 +0200 @@ -1,0 +2,5 @@ +Wed Aug 2 12:04:42 UTC 2023 - Jorik Cronenberg <[email protected]> + +- Add nomacs-fix-exiv2-0.28.patch to fix libexiv2 build errors + +------------------------------------------------------------------- New: ---- nomacs-fix-exiv2-0.28.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nomacs.spec ++++++ --- /var/tmp/diff_new_pack.y28LPd/_old 2023-10-05 20:06:47.742608721 +0200 +++ /var/tmp/diff_new_pack.y28LPd/_new 2023-10-05 20:06:47.742608721 +0200 @@ -1,7 +1,7 @@ # # spec file for package nomacs # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,7 @@ URL: https://nomacs.org/ Source: https://github.com/nomacs/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch0: quazip1_cmake_remove_after_new_version.diff +Patch1: nomacs-fix-exiv2-0.28.patch BuildRequires: cmake >= 2.8 BuildRequires: fdupes BuildRequires: gcc-c++ @@ -56,8 +57,7 @@ %lang_package %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build pushd ImageLounge/ ++++++ nomacs-fix-exiv2-0.28.patch ++++++ Index: nomacs-3.16.224/ImageLounge/src/DkCore/DkMetaData.cpp =================================================================== --- nomacs-3.16.224.orig/ImageLounge/src/DkCore/DkMetaData.cpp +++ nomacs-3.16.224/ImageLounge/src/DkCore/DkMetaData.cpp @@ -73,8 +73,7 @@ void DkMetaDataT::readMetaData(const QSt mExifImg = Exiv2::ImageFactory::open(strFilePath); } else { - Exiv2::BasicIo::AutoPtr exifBuffer(new Exiv2::MemIo((const byte*)ba->constData(), ba->size())); - mExifImg = Exiv2::ImageFactory::open(exifBuffer); + mExifImg = Exiv2::ImageFactory::open((const byte *)ba->constData(), ba->size()); } } catch (...) { @@ -156,13 +155,11 @@ bool DkMetaDataT::saveMetaData(QSharedPo Exiv2::XmpData &xmpData = mExifImg->xmpData(); Exiv2::IptcData &iptcData = mExifImg->iptcData(); - Exiv2::Image::AutoPtr exifImgN; - Exiv2::MemIo::AutoPtr exifMem; + Exiv2::Image::UniquePtr exifImgN; try { - exifMem = Exiv2::MemIo::AutoPtr(new Exiv2::MemIo((byte*)ba->data(), ba->size())); - exifImgN = Exiv2::ImageFactory::open(exifMem); + exifImgN = Exiv2::ImageFactory::open((byte *)ba->data(), ba->size()); } catch (...) { @@ -186,8 +183,8 @@ bool DkMetaDataT::saveMetaData(QSharedPo // now get the data again Exiv2::DataBuf exifBuf = exifImgN->io().read((long)exifImgN->io().size()); - if (exifBuf.pData_) { - QSharedPointer<QByteArray> tmp = QSharedPointer<QByteArray>(new QByteArray((const char*)exifBuf.pData_, exifBuf.size_)); + if (!exifBuf.empty()) { + QSharedPointer<QByteArray> tmp = QSharedPointer<QByteArray>(new QByteArray((const char *)exifBuf.c_data(), exifBuf.size())); if (tmp->size() > qRound(ba->size()*0.5f)) ba = tmp; @@ -197,7 +194,7 @@ bool DkMetaDataT::saveMetaData(QSharedPo else return false; - mExifImg = exifImgN; + mExifImg.swap(exifImgN); mExifState = loaded; return true; @@ -250,7 +247,7 @@ int DkMetaDataT::getOrientationDegree() if (pos != exifData.end() && pos->count() != 0) { - Exiv2::Value::AutoPtr v = pos->getValue(); + Exiv2::Value::UniquePtr v = pos->getValue(); orientation = (int)pos->toFloat(); switch (orientation) { @@ -315,7 +312,7 @@ int DkMetaDataT::getRating() const { Exiv2::ExifData::iterator pos = exifData.findKey(key); if (pos != exifData.end() && pos->count() != 0) { - Exiv2::Value::AutoPtr v = pos->getValue(); + Exiv2::Value::UniquePtr v = pos->getValue(); exifRating = v->toFloat(); } } @@ -327,7 +324,7 @@ int DkMetaDataT::getRating() const { //xmp Rating tag if (pos != xmpData.end() && pos->count() != 0) { - Exiv2::Value::AutoPtr v = pos->getValue(); + Exiv2::Value::UniquePtr v = pos->getValue(); xmpRating = v->toFloat(); } @@ -336,7 +333,7 @@ int DkMetaDataT::getRating() const { key = Exiv2::XmpKey("Xmp.MicrosoftPhoto.Rating"); pos = xmpData.findKey(key); if (pos != xmpData.end() && pos->count() != 0) { - Exiv2::Value::AutoPtr v = pos->getValue(); + Exiv2::Value::UniquePtr v = pos->getValue(); xmpRating = v->toFloat(); } } @@ -436,7 +433,7 @@ QString DkMetaDataT::getXmpValue(const Q } if (pos != xmpData.end() && pos->count() != 0) { - Exiv2::Value::AutoPtr v = pos->getValue(); + Exiv2::Value::UniquePtr v = pos->getValue(); info = exiv2ToQString(pos->toString()); } } @@ -508,7 +505,7 @@ QString DkMetaDataT::getIptcValue(const } if (pos != iptcData.end() && pos->count() != 0) { - Exiv2::Value::AutoPtr v = pos->getValue(); + Exiv2::Value::UniquePtr v = pos->getValue(); info = exiv2ToQString(pos->toString()); } } @@ -654,7 +651,7 @@ QImage DkMetaDataT::getThumbnail() const Exiv2::ExifThumb thumb(exifData); Exiv2::DataBuf buffer = thumb.copy(); - QByteArray ba = QByteArray((char*)buffer.pData_, buffer.size_); + QByteArray ba = QByteArray((char*)buffer.c_data(), buffer.size()); qThumb.loadFromData(ba); } catch (...) { @@ -931,8 +928,7 @@ void DkMetaDataT::setThumbnail(QImage th try { // whipe all exif data of the thumbnail - Exiv2::MemIo::AutoPtr exifBufferThumb(new Exiv2::MemIo((const byte*)ba.constData(), ba.size())); - Exiv2::Image::AutoPtr exifImgThumb = Exiv2::ImageFactory::open(exifBufferThumb); + Exiv2::Image::UniquePtr exifImgThumb = Exiv2::ImageFactory::open((const byte *)ba.constData(), ba.size()); if (exifImgThumb.get() != 0 && exifImgThumb->good()) exifImgThumb->clearExifData(); @@ -1045,11 +1041,11 @@ void DkMetaDataT::setOrientation(int o) pos = exifData.findKey(key); } - Exiv2::Value::AutoPtr v = pos->getValue(); + Exiv2::Value::UniquePtr v = pos->getValue(); Exiv2::UShortValue* prv = dynamic_cast<Exiv2::UShortValue*>(v.release()); if (!prv) return; - Exiv2::UShortValue::AutoPtr rv = Exiv2::UShortValue::AutoPtr(prv); + Exiv2::UShortValue::UniquePtr rv = Exiv2::UShortValue::UniquePtr(prv); if (rv->value_.empty()) return; orientation = (int) rv->value_[0]; @@ -1110,7 +1106,7 @@ void DkMetaDataT::setRating(int r) { exifData["Exif.Image.Rating"] = uint16_t(r); exifData["Exif.Image.RatingPercent"] = uint16_t(r); - Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::xmpText); + Exiv2::Value::UniquePtr v = Exiv2::Value::create(Exiv2::xmpText); v->read(sRating); xmpData.add(Exiv2::XmpKey("Xmp.xmp.Rating"), v.get()); v->read(sRatingPercent); @@ -1354,9 +1350,9 @@ DkRotatingRect DkMetaDataT::getXMPRect(c return DkRotatingRect(rr); } -Exiv2::Image::AutoPtr DkMetaDataT::loadSidecar(const QString& filePath) const { +Exiv2::Image::UniquePtr DkMetaDataT::loadSidecar(const QString& filePath) const { - Exiv2::Image::AutoPtr xmpImg; + Exiv2::Image::UniquePtr xmpImg; //TODO: check if the file type supports xmp @@ -1409,7 +1405,7 @@ bool DkMetaDataT::setXMPValue(Exiv2::Xmp setXMPValueSuccessful = true; } else { - Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::xmpText); + Exiv2::Value::UniquePtr v = Exiv2::Value::create(Exiv2::xmpText); if (!v->read(xmpValue.toStdString())) { if (!xmpData.add(Exiv2::XmpKey(key), v.get())) setXMPValueSuccessful = true; Index: nomacs-3.16.224/ImageLounge/src/DkCore/DkMetaData.h =================================================================== --- nomacs-3.16.224.orig/ImageLounge/src/DkCore/DkMetaData.h +++ nomacs-3.16.224/ImageLounge/src/DkCore/DkMetaData.h @@ -147,8 +147,7 @@ public: bool setXMPValue(Exiv2::XmpData& xmpData, QString xmpKey, QString xmpValue); protected: - - Exiv2::Image::AutoPtr loadSidecar(const QString& filePath) const; + Exiv2::Image::UniquePtr loadSidecar(const QString& filePath) const; enum { not_loaded, @@ -157,7 +156,7 @@ protected: dirty, }; - Exiv2::Image::AutoPtr mExifImg; + Exiv2::Image::UniquePtr mExifImg; QString mFilePath; QStringList mQtKeys; QStringList mQtValues;
