Created attachment 117108 [details] cmake.patch Using the attached patch to fix detecting the new version fails later during merge.
Created attachment 117109 [details] build.log /var/tmp/portage/media-gfx/krita-4.1.7/work/krita-4.1.7.101/libs/ui/kisexiv2/kis_xmp_io.cpp:284:75: error: ‘std::vector<std::__cxx11::basic_string<char> > Exiv2::XmpArrayValue::value_’ is private within this context for (std::vector< std::string >::const_iterator it = xav->value_.begin(); ^~~~~~ In file included from /usr/include/exiv2/metadatum.hpp:37, from /usr/include/exiv2/datasets.hpp:32, from /usr/include/exiv2/exiv2.hpp:33, from /var/tmp/portage/media-gfx/krita-4.1.7/work/krita-4.1.7.101/libs/ui/kisexiv2/kis_exiv2.h:24, from /var/tmp/portage/media-gfx/krita-4.1.7/work/krita-4.1.7.101/libs/ui/kisexiv2/kis_xmp_io.cpp:20: /usr/include/exiv2/value.hpp:861:34: note: declared private here std::vector<std::string> value_; //!< Stores the string values. ^~~~~~ /var/tmp/portage/media-gfx/krita-4.1.7/work/krita-4.1.7.101/libs/ui/kisexiv2/kis_xmp_io.cpp:285:36: error: ‘std::vector<std::__cxx11::basic_string<char> > Exiv2::XmpArrayValue::value_’ is private within this context it != xav->value_.end(); ++it) { ^~~~~~
Presumably caused by exiv2 commit https://github.com/Exiv2/exiv2/commit/4574a659ccf8ee290f6ecd1be2a81c92105059b8#diff-e5d5750424779515909c8b10e8b93cb2
This change fixes the use of the private api: @@ -277,15 +281,15 @@ bool KisXMPIO::loadFrom(KisMetaData::Store* store, QIODevice* ioDevice) const const Exiv2::XmpArrayValue* xav = dynamic_cast<const Exiv2::XmpArrayValue*>(value.get()); Q_ASSERT(xav); QList<KisMetaData::Value> array; - for (std::vector< std::string >::const_iterator it = xav->value_.begin(); - it != xav->value_.end(); ++it) { - QString value = it->c_str(); + for (int i = 0; i == xav->size(); ++i) { + QString value = QString::fromStdString(xav->toString(i)); if (parser) { array.push_back(parser->parse(value)); } else { dbgImage << "No parser " << tagName; array.push_back(KisMetaData::Value(value)); } + } KisMetaData::Value::ValueType vt = KisMetaData::Value::Invalid; switch (xav->xmpArrayType()) { ~ The only thing I wonder about is the removal of FindExiv2.cmake and then this change: -target_link_libraries(kritajpegimport kritaui ${JPEG_LIBRARIES} ${LCMS2_LIBRARIES} ${EXIV2_LIBRARIES} ) +target_link_libraries(kritajpegimport kritaui ${JPEG_LIBRARIES} ${LCMS2_LIBRARIES} LibExiv2::LibExiv2 ) Is that really what we want?
Git commit 06dfa759f4dd2d3918bb12ebb2155b00b811b60f by Boudewijn Rempt, on behalf of Andreas Sturmlechner. Committed on 01/01/2019 at 12:11. Pushed by rempt into branch 'krita/4.1'. Fix building against exiv2-0.27 Summary: Copied FindLibExiv2.cmake from ECM 5.53.0 until we raise min version. Thanks-to: Boudewijn Rempt <boud@valdyas.org> for final fix to kis_xmp_io.cpp. Test Plan: Built fine against exiv2-0.26 and exiv2-0.27. Reviewers: #krita, rempt Reviewed By: #krita, rempt Subscribers: pino Tags: #krita Differential Revision: https://phabricator.kde.org/D17810 M +1 -5 CMakeLists.txt D +0 -80 cmake/modules/FindExiv2.cmake A +115 -0 cmake/modules/FindLibExiv2.cmake M +1 -2 libs/ui/CMakeLists.txt M +6 -8 libs/ui/kisexiv2/kis_exif_io.cpp M +2 -1 libs/ui/kisexiv2/kis_exiv2.h M +2 -2 libs/ui/kisexiv2/kis_iptc_io.cpp M +2 -4 libs/ui/kisexiv2/kis_xmp_io.cpp M +2 -3 plugins/impex/jpeg/CMakeLists.txt https://commits.kde.org/krita/06dfa759f4dd2d3918bb12ebb2155b00b811b60f