File fix-build-with-exiv2-0.28.patch of Package strigi
diff -ur a/libstreamanalyzer/plugins/endplugins/jpegendanalyzer.cpp b/libstreamanalyzer/plugins/endplugins/jpegendanalyzer.cpp
--- a/libstreamanalyzer/plugins/endplugins/jpegendanalyzer.cpp
+++ b/libstreamanalyzer/plugins/endplugins/jpegendanalyzer.cpp
@@ -237,7 +237,11 @@
signed char
JpegEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) {
// parse the jpeg file now
+#if EXIV2_TEST_VERSION(0,28,0)
+ Exiv2::Image::UniquePtr img;
+#else
Exiv2::Image::AutoPtr img;
+#endif
bool ok = false;
if (ar.depth() == 0) {
try {
@@ -278,9 +282,11 @@
// to catch it separately
m_error.assign(e.what());
return -1;
+#if !EXIV2_TEST_VERSION(0,28,0)
} catch (Exiv2::AnyError& e) {
m_error.assign(e.what());
return -1;
+#endif
} catch(std::exception& e) {
// trueg: here Exiv2::Error is not caught above, until the reason is found
// I added this generic exception handling which should do no harm whatsoever
@@ -324,7 +330,11 @@
}
else if (i->key() == "Exif.Photo.ISOSpeedRatings") {
stringstream st;
+#if EXIV2_TEST_VERSION(0,28,0)
+ st << i->toInt64();
+#else
st << i->toLong();
+#endif
ar.addValue(factory->exifFields.find("Exif.Photo.ISOSpeedRatings")->second, st.str());
}
else if (i->key() != "Exif.Photo.PixelXDimension" && i->key() != "Exif.Photo.PixelYDimension") {
@@ -338,9 +348,17 @@
#else
Exiv2::DataBuf thumbnail = exif.copyThumbnail();
#endif
+#if EXIV2_TEST_VERSION(0,28,0)
+ data = (const char*)thumbnail.c_data();
+#else
data = (const char*)thumbnail.pData_;
+#endif
if (data) {
+#if EXIV2_TEST_VERSION(0,28,0)
+ StringInputStream thumbstream(data, (int32_t)thumbnail.size(), false);
+#else
StringInputStream thumbstream(data, (int32_t)thumbnail.size_, false);
+#endif
string thumbname("thumbnail");
#if (EXIV2_TEST_VERSION(0,17,91))
ar.indexChild(thumbname + thumb.extension(), ar.mTime(),