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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:47:15 UTC 2017


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

The following commit has been merged in the master branch:
commit 6ea3b00b0227d3be72e9487064336a3908401e8d
Author: Robin Mills <robin at clanmills.com>
Date:   Sun Oct 23 22:25:58 2016 +0000

    #1249 Fixes
---
 CMakeLists.txt                   | 15 +++++++++++++--
 config/configure.ac              | 24 +++++++++++++++++++++++-
 samples/Makefile                 |  2 +-
 src/jpgimage.cpp                 |  3 ++-
 xmpsdk/src/XMPMeta-Serialize.cpp |  5 ++---
 5 files changed, 41 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce93745..543b972 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,8 +75,19 @@ IF( MINGW OR UNIX )
                     -W
                    )
     ENDIF()
-
-    IF ( CYGWIN )
+    
+    if (CMAKE_COMPILER_IS_GNUCC)
+        execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
+                        OUTPUT_VARIABLE GCC_VERSION)
+        string(REGEX MATCHALL "[0-9]+" GCC_VERSION_COMPONENTS ${GCC_VERSION})
+        list(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR)
+        list(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR)
+
+        message(STATUS Compiler major ${GCC_MAJOR})
+        message(STATUS ${GCC_MINOR})
+    endif()
+
+    IF ( CYGWIN OR ( ${GCC_MAJOR} GREATER 5 ))
         ADD_DEFINITIONS( -std=gnu++98 ) # to support snprintf
     ELSE()
         ADD_DEFINITIONS( -std=c++98 )
diff --git a/config/configure.ac b/config/configure.ac
index 1e0c6fd..2dab6d3 100644
--- a/config/configure.ac
+++ b/config/configure.ac
@@ -335,6 +335,26 @@ for u in gettext msginit msgmerge msgfmt msgconv msgfilter ; do
     fi
 done
 
+AC_DEFUN([AX_GCC_VERSION], [
+  GCC_VERSION=""
+  AX_CHECK_COMPILE_FLAG([-dumpversion],
+     [ax_gcc_version_option=yes],
+     [ax_gcc_version_option=no])
+
+  AS_IF([test "x$GCC" = "xyes"],[
+    AS_IF([test "x$ax_gcc_version_option" != "xno"],[
+      AC_CACHE_CHECK([gcc version],[ax_cv_gcc_version],[
+        ax_cv_gcc_version="`$CC -dumpversion`"
+        AS_IF([test "x$ax_cv_gcc_version" = "x"],[
+          ax_cv_gcc_version=""
+        ])
+      ])
+      GCC_VERSION=$ax_cv_gcc_version
+    ])
+  ])
+  AC_SUBST([GCC_VERSION])
+])
+
 # 1188 v0.26 uses c++98
 # 1188 v0.27 should have an option to specify versions such as c++11
 case "$host_os" in
@@ -345,7 +365,9 @@ case "$host_os" in
         CPPFLAGS="$CPPFLAGS"               # mingw doesn't link pthreads if you specify -std !!
     ;;
     *)
-        CPPFLAGS="$CPPFLAGS -std=c++98"    # // all others use c++98
+        if [ $GCC_VERSION -le 5 ]; then CPPFLAGS="$CPPFLAGS -std=c++98"    # // most others use c++98
+        else                            CPPFLAGS="$CPPFLAGS -std=gnu++98"  # // but not GCC 6
+        fi
     ;;
 esac
 
diff --git a/samples/Makefile b/samples/Makefile
index 366c810..8c4c17c 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -123,7 +123,7 @@ LINK.cc += -rpath $(PREFIX) -L$(PREFIX)
 # to build the samples. Some errors only show up in this scenario, e.g., errors
 # due to missing headers which are not installed (depending on compile-time
 # settings) but may be wrongly included from other headers.
-COMPILE.cc += -I$(top_srcdir)/include -I$(top_srcdir)/include/exiv2
+COMPILE.cc += -I$(top_srcdir)/include -I$(top_srcdir)/include/exiv2 -std=gnu++98 
 
 # ******************************************************************************
 # Rules
diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp
index 21d3d79..7fa007f 100644
--- a/src/jpgimage.cpp
+++ b/src/jpgimage.cpp
@@ -674,7 +674,8 @@ namespace Exiv2 {
                             // and dumping the XMP in a post read operation similar to kpsIptcErase
                             // for the moment, dumping 'on the fly' is working fine
                             if ( ! bExtXMP ) {
-                                while (xmp[start]) start++; start++;
+                                while (xmp[start]) start++;
+                                start++;
                                 if ( ::strstr((char*)xmp+start,"HasExtendedXMP") ) {
                                     start  = size ; // ignore this packet, we'll get on the next time around
                                     bExtXMP = true;
diff --git a/xmpsdk/src/XMPMeta-Serialize.cpp b/xmpsdk/src/XMPMeta-Serialize.cpp
index 8cc96ae..70a7b02 100644
--- a/xmpsdk/src/XMPMeta-Serialize.cpp
+++ b/xmpsdk/src/XMPMeta-Serialize.cpp
@@ -1,5 +1,4 @@
-// =================================================================================================
-// Copyright 2002-2008 Adobe Systems Incorporated
+// ================================================================================================= // Copyright 2002-2008 Adobe Systems Incorporated
 // All Rights Reserved.
 //
 // NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
@@ -284,7 +283,7 @@ AppendNodeValue ( XMP_VarString & outputStr, const XMP_VarString & value, bool f
 	unsigned char * runStart = (unsigned char *) value.c_str();
 	unsigned char * runLimit  = runStart + value.size();
 	unsigned char * runEnd;
-	unsigned char   ch;
+	unsigned char   ch=0;
 	
 	while ( runStart < runLimit ) {
 	

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list