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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:43:25 UTC 2017


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

The following commit has been merged in the master branch:
commit 67fe7792129f9c2427a1fa2cf341522a6f62a841
Author: Robin Mills <robin at clanmills.com>
Date:   Fri Sep 21 15:43:19 2012 +0000

    MSVC/video port. Simplification of basicio.{hpp|cpp}.  CMake updates to eliminate warnings in Cygwin.  By default, don't build intl with CMake.
---
 CMakeLists.txt        |  2 +-
 config/config.h.cmake |  8 +++----
 src/basicio.cpp       | 62 +++++++++++++++++++++++++--------------------------
 src/basicio.hpp       | 42 +++++++++-------------------------
 xmpsdk/CMakeLists.txt |  5 +++--
 5 files changed, 49 insertions(+), 70 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 47536f9..a856f8b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,7 @@ OPTION( EXIV2_ENABLE_SHARED        "Build exiv2 as a shared library (dll)"
 OPTION( EXIV2_ENABLE_XMP           "Build with XMP metadata support"                       ON  )
 OPTION( EXIV2_ENABLE_LIBXMP        "Build a static convenience Library for XMP"            ON  )
 OPTION( EXIV2_ENABLE_PNG           "Build with png support (requires libz)"                ON  )
-OPTION( EXIV2_ENABLE_NLS           "Build native language support (requires gettext)"      ON  )
+OPTION( EXIV2_ENABLE_NLS           "Build native language support (requires gettext)"      OFF )
 OPTION( EXIV2_ENABLE_PRINTUCS2     "Build with Printucs2"                                  ON  )
 OPTION( EXIV2_ENABLE_LENSDATA      "Build including lens data"                             ON  )
 OPTION( EXIV2_ENABLE_COMMERCIAL    "Build with the EXV_COMMERCIAL_VERSION symbol set"      OFF )
diff --git a/config/config.h.cmake b/config/config.h.cmake
index 84f7b2a..e8d46f0 100644
--- a/config/config.h.cmake
+++ b/config/config.h.cmake
@@ -15,7 +15,7 @@
 #cmakedefine EXV_HAVE_INTTYPES_H 1
 
 /* Define to 1 if you have the <libintl.h> header file. */
-#cmakedefine EXV_HAVE_LIBINTL_H 1
+#cmakedefine EXV_HAVE_LIBINTL_H 0
 
 #ifndef EXV_COMMERCIAL_VERSION
 
@@ -24,10 +24,10 @@
 
 /* Define to 1 if translation of program messages to the user's
    native language is requested. */
-#cmakedefine EXV_ENABLE_NLS 1
+#cmakedefine EXV_ENABLE_NLS 0
 
 /* Define to 1 if you have the `iconv' function. */
-#cmakedefine EXV_HAVE_ICONV 1
+#cmakedefine EXV_HAVE_ICONV 0
 
 /* Define to 1 to enable conversion of UCS2 encoded Windows tags to UTF-8. */
 #cmakedefine EXV_HAVE_PRINTUCS2 1
@@ -43,7 +43,7 @@
 #endif
 
 /* Define to 1 if you have the <libintl.h> header file. */
-#cmakedefine EXV_HAVE_LIBINTL_H 1
+#cmakedefine EXV_HAVE_LIBINTL_H 0
 
 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
    to 0 otherwise. */
diff --git a/src/basicio.cpp b/src/basicio.cpp
index 6eaf2fa..a99eaad 100644
--- a/src/basicio.cpp
+++ b/src/basicio.cpp
@@ -822,21 +822,6 @@ namespace Exiv2 {
         return putc(data, p_->fp_);
     }
 
-    int FileIo::seek(long offset, Position pos)
-    {
-        assert(p_->fp_ != 0);
-
-        int fileSeek = 0;
-        switch (pos) {
-        case BasicIo::cur: fileSeek = SEEK_CUR; break;
-        case BasicIo::beg: fileSeek = SEEK_SET; break;
-        case BasicIo::end: fileSeek = SEEK_END; break;
-        }
-
-        if (p_->switchMode(Impl::opSeek) != 0) return 1;
-        return std::fseek(p_->fp_, offset, fileSeek);
-    }
-
 #if defined(_MSC_VER)
 	int FileIo::seek( uint64_t offset, Position pos )
 	{
@@ -856,6 +841,21 @@ namespace Exiv2 {
 		return std::fseek(p_->fp_,static_cast<long>(offset), fileSeek);
 #endif
 	}
+#else
+	int FileIo::seek(long offset, Position pos)
+    {
+        assert(p_->fp_ != 0);
+
+        int fileSeek = 0;
+        switch (pos) {
+        case BasicIo::cur: fileSeek = SEEK_CUR; break;
+        case BasicIo::beg: fileSeek = SEEK_SET; break;
+        case BasicIo::end: fileSeek = SEEK_END; break;
+        }
+
+        if (p_->switchMode(Impl::opSeek) != 0) return 1;
+        return std::fseek(p_->fp_, offset, fileSeek);
+    }
 #endif
 
     long FileIo::tell() const
@@ -1131,22 +1131,6 @@ namespace Exiv2 {
         return data;
     }
 
-    int MemIo::seek(long offset, Position pos)
-    {
-        long newIdx = 0;
-
-        switch (pos) {
-        case BasicIo::cur: newIdx = p_->idx_ + offset; break;
-        case BasicIo::beg: newIdx = offset; break;
-        case BasicIo::end: newIdx = p_->size_ + offset; break;
-        }
-
-        if (newIdx < 0 || newIdx > p_->size_) return 1;
-        p_->idx_ = newIdx;
-        p_->eof_ = false;
-        return 0;
-    }
-
 #if defined(_MSC_VER)
 	int MemIo::seek( uint64_t offset, Position pos )
 	{
@@ -1163,6 +1147,22 @@ namespace Exiv2 {
 		p_->eof_ = false;
 		return 0;
 	}
+#else
+	int MemIo::seek(long offset, Position pos)
+    {
+        long newIdx = 0;
+
+        switch (pos) {
+        case BasicIo::cur: newIdx = p_->idx_ + offset; break;
+        case BasicIo::beg: newIdx = offset; break;
+        case BasicIo::end: newIdx = p_->size_ + offset; break;
+        }
+
+        if (newIdx < 0 || newIdx > p_->size_) return 1;
+        p_->idx_ = newIdx;
+        p_->eof_ = false;
+        return 0;
+    }
 #endif
 
     byte* MemIo::mmap(bool /*isWriteable*/)
diff --git a/src/basicio.hpp b/src/basicio.hpp
index c4ca326..9a360f8 100644
--- a/src/basicio.hpp
+++ b/src/basicio.hpp
@@ -169,22 +169,15 @@ namespace Exiv2 {
           @return 0 if successful;<BR>
               Nonzero if failure;
          */
-        virtual int seek(long offset, Position pos) = 0;
-        /*!
-          @brief Move the current IO position.
-          @param offset Number of bytes to move the position relative
-              to the starting position specified by \em pos
-          @param pos Position from which the seek should start
-          @return 0 if successful;<BR>
-              Nonzero if failure;
-         */
 #if defined(_MSC_VER)
         virtual int seek(uint64_t offset, Position pos) = 0;
 
-                int seek( int     offset, Position pos)
-            {return seek(static_cast<long>(offset),pos);}
-                int seek(uint32_t offset, Position pos)
-            {return seek(static_cast<long>(offset),pos);}
+//                int seek( int     offset, Position pos)
+//            {return seek(static_cast<long>(offset),pos);}
+//                int seek(uint32_t offset, Position pos)
+//            {return seek(static_cast<long>(offset),pos);}
+#else
+		virtual int seek(long offset, Position pos) = 0;
 #endif
 
         /*!
@@ -441,17 +434,10 @@ namespace Exiv2 {
           @return 0 if successful;<BR>
                  Nonzero if failure;
          */
-        virtual int seek(long offset, Position pos);
-        /*!
-          @brief Move the current file position.
-          @param offset Number of bytes to move the file position
-              relative to the starting position specified by \em pos
-          @param pos Position from which the seek should start
-          @return 0 if successful;<BR>
-                 Nonzero if failure;
-         */
 #if defined(_MSC_VER)
         virtual int seek(uint64_t offset, Position pos);
+#else
+        virtual int seek(long offset, Position pos);
 #endif
 		/*!
           @brief Map the file into the process's address space. The file must be
@@ -660,18 +646,10 @@ namespace Exiv2 {
           @return 0 if successful;<BR>
                  Nonzero if failure;
          */
-
-		virtual int seek(long offset, Position pos);
-		/*!
-          @brief Move the current IO position.
-          @param offset Number of bytes to move the IO position
-              relative to the starting position specified by \em pos
-          @param pos Position from which the seek should start
-          @return 0 if successful;<BR>
-                 Nonzero if failure;
-         */
 #if defined(_MSC_VER)
         virtual int seek(uint64_t offset, Position pos);
+#else
+		virtual int seek(long offset, Position pos);
 #endif
 		/*!
           @brief Allow direct access to the underlying data buffer. The buffer
diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
index 69db79e..28780ee 100644
--- a/xmpsdk/CMakeLists.txt
+++ b/xmpsdk/CMakeLists.txt
@@ -10,9 +10,10 @@ include(../CMake_msvc.txt)
 msvc_runtime_configure(${EXIV2_ENABLE_SHARED})
 
 FOREACH(_currentfile ${XMPSRC})
-    IF(NOT MSVC)
+    # http://www.openguru.com/2009/04/cmake-detecting-platformoperating.html
+    IF(NOT MSVC AND NOT CYGWIN AND NOT MSYS)
         SET_SOURCE_FILES_PROPERTIES(${_currentfile} PROPERTIES COMPILE_FLAGS "-fPIC")
-    ENDIF(NOT MSVC)
+    ENDIF(NOT MSVC AND NOT CYGWIN AND NOT MSYS)
 ENDFOREACH(_currentfile ${XMPSRC})
 
 IF( EXIV2_ENABLE_XMP AND EXIV2_ENABLE_LIBXMP )

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list