[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:45:50 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=db4be31

The following commit has been merged in the master branch:
commit db4be31b6fa1156f3c73c032841f1a49b37b6331
Author: Robin Mills <robin at clanmills.com>
Date:   Thu Oct 29 19:33:34 2015 +0000

    #1130.  Thank You Jakub for reporting this.
---
 src/convert.cpp | 10 +++++++---
 src/image.cpp   |  6 ++++--
 src/version.cpp | 41 +++++++++++++++++++++++++++++++++++------
 src/xmp.cpp     | 23 +++++++++++++++--------
 4 files changed, 61 insertions(+), 19 deletions(-)

diff --git a/src/convert.cpp b/src/convert.cpp
index e62886f..7c9a022 100644
--- a/src/convert.cpp
+++ b/src/convert.cpp
@@ -1172,9 +1172,9 @@ namespace Exiv2 {
         if (erase_) xmpData_->erase(pos);
     }
 
+#ifdef EXV_HAVE_XMP_TOOLKIT
     std::string Converter::computeExifDigest(bool tiff)
     {
-#ifdef EXV_HAVE_XMP_TOOLKIT
         std::ostringstream res;
         MD5_CTX    context;
         unsigned char digest[16];
@@ -1203,10 +1203,14 @@ namespace Exiv2 {
             res << static_cast<int>(digest[i]);
         }
         return res.str();
+    }
 #else
+    std::string Converter::computeExifDigest(bool)
+    {
         return std::string("");
-#endif
     }
+#endif
+
 
     void Converter::writeExifDigest()
     {
@@ -1483,7 +1487,7 @@ namespace {
     }
 
     typedef bool (*ConvFct)(std::string& str);
-    
+
     struct ConvFctList {
         bool operator==(std::pair<const char*, const char*> fromTo) const
             { return 0 == strcmp(from_, fromTo.first) && 0 == strcmp(to_, fromTo.second); }
diff --git a/src/image.cpp b/src/image.cpp
index 27843e1..7cea7d9 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -264,12 +264,14 @@ namespace Exiv2 {
         writeXmpFromPacket(false);
     }
 
+#ifdef EXV_HAVE_XMP_TOOLKIT
     void Image::writeXmpFromPacket(bool flag)
     {
-#ifdef EXV_HAVE_XMP_TOOLKIT
         writeXmpFromPacket_ = flag;
-#endif
     }
+#else
+    void Image::writeXmpFromPacket(bool) {}
+#endif
 
     void Image::clearComment()
     {
diff --git a/src/version.cpp b/src/version.cpp
index 13477b9..dbda9a2 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -55,23 +55,52 @@ EXIV2_RCSID("@(#) $Id$")
 # endif
 #endif
 
+#ifndef EXV_HAVE_XMP_TOOLKIT
+#define EXV_HAVE_XMP_TOOLKIT 0
+#endif
+
+#ifndef EXV_HAVE_STRINGS
+#define EXV_HAVE_STRINGS 0
+#endif
+
+#ifndef  EXV_SYS_TYPES
+#define  EXV_SYS_TYPES 0
+#endif
+
+
+#ifndef  EXV_HAVE_UNISTD
+#define  EXV_HAVE_UNISTD 0
+#endif
+
+#ifndef  EXV_UNICODE_PATH
+#define  EXV_UNICODE_PATH 0
+#endif
+
+#ifndef  EXV_ENABLE_VIDEO
+#define  EXV_ENABLE_VIDEO 0
+#endif
+
+#ifndef  EXV_ENABLE_WEBREADY
+#define  EXV_ENABLE_WEBREADY 0
+#endif
+
 #include "http.hpp"
 #include "svn_version.h"
 #include "version.hpp"
 
+// Adobe XMP Toolkit
+#if EXV_HAVE_XMP_TOOLKIT
+#include "xmp.hpp"
+#endif
+
 // + standard includes
 #include <iomanip>
 #include <sstream>
 #include <string>
 #include <vector>
 #include <stdio.h>
-
 #include <iostream>
 
-// Adobe XMP Toolkit
-#ifdef EXV_HAVE_XMP_TOOLKIT
-#include "xmp.hpp"
-#endif
 
 namespace Exiv2 {
     int versionNumber()
@@ -533,7 +562,7 @@ void Exiv2::dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys)
     output(os,keys,"enable_video"      ,enable_video     );
     output(os,keys,"enable_webready"   ,enable_webready  );
 
-#ifdef EXV_HAVE_XMP_TOOLKIT
+#if EXV_HAVE_XMP_TOOLKIT
     const char* name = "xmlns";
 
     Exiv2::Dictionary ns;
diff --git a/src/xmp.cpp b/src/xmp.cpp
index 1b8dcb5..d3fa8fb 100644
--- a/src/xmp.cpp
+++ b/src/xmp.cpp
@@ -94,11 +94,11 @@ namespace {
                    const std::string& propPath,
                    const std::string& propValue,
                    const XMP_OptionBits& opt);
-#endif // EXV_HAVE_XMP_TOOLKIT
 
     //! Make an XMP key from a schema namespace and property path
     Exiv2::XmpKey::AutoPtr makeXmpKey(const std::string& schemaNs,
                                       const std::string& propPath);
+#endif // EXV_HAVE_XMP_TOOLKIT
 
     //! Helper class used to serialize critical sections
     class AutoLock
@@ -394,10 +394,10 @@ namespace Exiv2 {
     XmpParser::XmpLockFct XmpParser::xmpLockFct_ = 0;
     void* XmpParser::pLockData_ = 0;
 
+#ifdef EXV_HAVE_XMP_TOOLKIT
     bool XmpParser::initialize(XmpParser::XmpLockFct xmpLockFct, void* pLockData)
     {
         if (!initialized_) {
-#ifdef EXV_HAVE_XMP_TOOLKIT
             xmpLockFct_ = xmpLockFct;
             pLockData_ = pLockData;
             initialized_ = SXMPMeta::Initialize();
@@ -422,13 +422,17 @@ namespace Exiv2 {
             SXMPMeta::RegisterNamespace("http://cipa.jp/exif/1.0/", "exifEX");
             SXMPMeta::RegisterNamespace("http://www.audio/", "audio");
             SXMPMeta::RegisterNamespace("http://www.video/", "video");
-#else
-            initialized_ = true;
-#endif
         }
+    }
+#else
+    bool XmpParser::initialize(XmpParser::XmpLockFct, void* )
+    {
+    	initialized_ = true;
         return initialized_;
     }
+#endif
 
+#ifdef EXV_HAVE_XMP_TOOLKIT
     static XMP_Status nsDumper
     ( void*           refCon
     , XMP_StringPtr   buffer
@@ -465,20 +469,23 @@ namespace Exiv2 {
         }
         return result;
     }
+#endif
 
+#ifdef EXV_HAVE_XMP_TOOLKIT
     void XmpParser::registeredNamespaces(Exiv2::Dictionary& dict)
     {
     	bool bInit = !initialized_;
         try {
         	if (bInit) initialize();
-#ifdef EXV_HAVE_XMP_TOOLKIT
         	SXMPMeta::DumpNamespaces(nsDumper,&dict);
-#endif
         	if (bInit) terminate();
         } catch (const XMP_Error& e) {
             throw Error(40, e.GetID(), e.GetErrMsg());
         }
     }
+#else
+    void XmpParser::registeredNamespaces(Exiv2::Dictionary&){}
+#endif
 
     void XmpParser::terminate()
     {
@@ -908,7 +915,6 @@ namespace {
                    const XMP_OptionBits& )
     {}
 #endif // DEBUG
-#endif // EXV_HAVE_XMP_TOOLKIT
 
     Exiv2::XmpKey::AutoPtr makeXmpKey(const std::string& schemaNs,
                                       const std::string& propPath)
@@ -926,5 +932,6 @@ namespace {
         }
         return Exiv2::XmpKey::AutoPtr(new Exiv2::XmpKey(prefix, property));
     } // makeXmpKey
+#endif // EXV_HAVE_XMP_TOOLKIT
 
 }

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list