[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:32 UTC 2017


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

The following commit has been merged in the master branch:
commit ade51daf7f3261184c2a5e9587b47c847a28c151
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Thu Jun 18 02:46:09 2015 +0000

    Only compile ssh module if using SSH and another hack to prevent a compiler warning about undefined EXV_USE_SSH.
---
 config/config.mk.in       |  1 +
 config/configure.ac       |  7 ++++---
 include/exiv2/basicio.hpp | 22 ++++++++++++----------
 include/exiv2/exiv2.hpp   |  2 ++
 samples/Makefile          |  9 +++++++--
 src/Makefile              |  8 +++++---
 src/ssh.cpp               |  9 ++-------
 src/utils.hpp             |  4 +++-
 8 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/config/config.mk.in b/config/config.mk.in
index 119008f..eaf3d57 100644
--- a/config/config.mk.in
+++ b/config/config.mk.in
@@ -111,6 +111,7 @@ CURL_LDFLAGS = @CURL_LDFLAGS@
 CURL_LIBS = @CURL_LIBS@
 
 # Libssh need for SshIO if it's selected
+USE_SSH = @USE_SSH@
 SSH_CPPFLAGS = @SSH_CPPFLAGS@
 SSH_LDFLAGS = @SSH_LDFLAGS@
 SSH_LIBS = @SSH_LIBS@
diff --git a/config/configure.ac b/config/configure.ac
index b3aa0e2..3f519bd 100644
--- a/config/configure.ac
+++ b/config/configure.ac
@@ -234,7 +234,7 @@ if test "$enable_webready" = "yes"; then
         SSH_LIBS=
         AC_CHECK_HEADERS(libssh/libssh.h,
             AC_CHECK_LIB(ssh, ssh_new,[
-                USE_SSH=yes
+                USE_SSH=1
                 AC_DEFINE([USE_SSH], [1], [Use libssh library])
                 SSH_LIBS="-lssh"
                 if test "x${SSH_DIR}" != "x"; then
@@ -248,6 +248,7 @@ if test "$enable_webready" = "yes"; then
         AC_SUBST(SSH_LDFLAGS)
         AC_SUBST(SSH_LIBS)
     fi
+    AC_SUBST(USE_SSH,$USE_SSH)
     CPPFLAGS=${_cppflags}
     LDFLAGS=${_ldflags}
 fi
@@ -405,8 +406,8 @@ yes) echo "-- Using Lib Curl................. YES" ;;
      echo "" ;;
 esac
 
-case "$USE_SSH" in
-yes) echo "-- Using Lib SSH.................. YES" ;;
+case "x$USE_SSH" in
+x1)  echo "-- Using Lib SSH.................. YES" ;;
 *)   echo "-- Using Lib SSH.................. NO"
      echo ""
      echo "Libssh is required for SshIo in basicIo.cpp. Make sure the libssh header"
diff --git a/include/exiv2/basicio.hpp b/include/exiv2/basicio.hpp
index 6a8fbf2..8705c99 100644
--- a/include/exiv2/basicio.hpp
+++ b/include/exiv2/basicio.hpp
@@ -29,16 +29,6 @@
 #ifndef BASICIO_HPP_
 #define BASICIO_HPP_
 
-// The way to handle data from stdin or data uri path. If EXV_XPATH_MEMIO = 1,
-// it uses MemIo. Otherwises, it uses FileIo.
-#ifndef EXV_XPATH_MEMIO
-#define EXV_XPATH_MEMIO 0
-#endif
-
-#ifndef EXV_USE_CURL
-#define EXV_USE_CURL 0
-#endif
-
 // *****************************************************************************
 // included header files
 #include "types.hpp"
@@ -52,6 +42,18 @@
 #include <ctime>        // timestamp for the name of temporary file
 #include <cstring>      // std::memcpy
 
+// The way to handle data from stdin or data uri path. If EXV_XPATH_MEMIO = 1,
+// it uses MemIo. Otherwises, it uses FileIo.
+#ifndef EXV_XPATH_MEMIO
+#define EXV_XPATH_MEMIO 0
+#endif
+#ifndef EXV_USE_CURL
+#define EXV_USE_CURL 0
+#endif
+#ifndef EXV_USE_SSH
+#define EXV_USE_SSH 0
+#endif
+
 // *****************************************************************************
 // namespace extensions
 namespace Exiv2 {
diff --git a/include/exiv2/exiv2.hpp b/include/exiv2/exiv2.hpp
index 60b0080..365a563 100644
--- a/include/exiv2/exiv2.hpp
+++ b/include/exiv2/exiv2.hpp
@@ -58,7 +58,9 @@
 #include "psdimage.hpp"
 #include "rafimage.hpp"
 #include "rw2image.hpp"
+#if EXV_USE_SSH == 1
 #include "ssh.hpp"
+#endif
 #include "tags.hpp"
 #include "tgaimage.hpp"
 #include "tiffimage.hpp"
diff --git a/samples/Makefile b/samples/Makefile
index fb6e74f..acac004 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -107,7 +107,7 @@ LDFLAGS := `pkg-config exiv2 --libs`
 BINOBJ = $(BINSRC:.cpp=.o)
 BINARY = $(BINSRC:.cpp=)
 
-OTHEROBJ = $(OTHERSRC:.cpp=.o)
+OTHEROBJ = $(OTHERSRC:.cpp=.o) Jzon.o
 OTHERBIN = $(OTHERSRC:.cpp=)
 
 EXECUTABLE = $(BINSRC:%.cpp=../bin/%$(EXEEXT)) $(OTHERSRC:%.cpp=../bin/%$(EXEEXT))
@@ -118,6 +118,11 @@ endif
 
 PREFIX = /usr/local/lib
 LINK.cc += -rpath $(PREFIX) -L$(PREFIX)
+
+# TODO: This should really not be here. We should use the installed headers
+# 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/exiv2
 
 # ******************************************************************************
@@ -163,7 +168,7 @@ geotag: %: %.cpp
 
 # link applications which require utils.cpp support
 metacopy path-test: %: %.cpp ../src/utils.o
-	$(COMPILE.cc) -I../src -o $@.o $<
+	$(COMPILE.cc) -I../src -I../include/exiv2 -o $@.o $<
 	@$(MAKEDEPEND)
 	@$(POSTDEPEND)
 	$(LIBTOOL) --mode=link $(LINK.cc) $@.o ../src/utils.o -o ../bin/$@
diff --git a/src/Makefile b/src/Makefile
index 559cc47..f17ae69 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -105,9 +105,11 @@ CCSRC += preview.cpp           \
 	 psdimage.cpp          \
 	 rafimage.cpp          \
 	 rw2image.cpp          \
-	 samsungmn.cpp         \
-	 ssh.cpp               \
-	 sigmamn.cpp           \
+	 samsungmn.cpp
+ifdef USE_SSH
+CCSRC += ssh.cpp
+endif
+CCSRC += sigmamn.cpp           \
 	 sonymn.cpp            \
 	 tags.cpp              \
 	 tgaimage.cpp          \
diff --git a/src/ssh.cpp b/src/ssh.cpp
index 0a729dd..0ee2112 100644
--- a/src/ssh.cpp
+++ b/src/ssh.cpp
@@ -30,12 +30,7 @@
 EXIV2_RCSID("@(#) $Id: rw2image.cpp 3201 2013-12-01 12:13:42Z ahuggel $")
 
 #include "ssh.hpp"
-#if EXV_USE_SSH != 1
-namespace Exiv2 {
-extern int ssh_extern;
-int        ssh_extern = 1;
-}
-#else
+#if EXV_USE_SSH == 1
 // class member definitions
 namespace Exiv2 {
 
@@ -157,4 +152,4 @@ namespace Exiv2 {
         ssh_free(session_);
     }
 }
-#endif
+#endif // EXV_USE_SSH == 1
diff --git a/src/utils.hpp b/src/utils.hpp
index 6bee3c7..dabf6e0 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -31,9 +31,11 @@
 
 // *********************************************************************
 // included header files
+#include "futils.hpp"
+
 // + standard includes
 #include <string>
-#include <futils.hpp>
+
 // *********************************************************************
 // namespace extensions
 /*!

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list